diff --git a/.github/workflows/code-format.yml b/.github/workflows/code-format.yml index 06679b621..5ff5168f0 100644 --- a/.github/workflows/code-format.yml +++ b/.github/workflows/code-format.yml @@ -56,7 +56,7 @@ jobs: - name: configure-git-safe-directory run: git config --global --add safe.directory /__w/ncnn/ncnn - - uses: stefanzweifel/git-auto-commit-action@v5 + - uses: stefanzweifel/git-auto-commit-action@v6 with: commit_message: apply code-format changes diff --git a/.github/workflows/linux-riscv64.yml b/.github/workflows/linux-riscv64.yml index 725b18f7a..8880208b3 100644 --- a/.github/workflows/linux-riscv64.yml +++ b/.github/workflows/linux-riscv64.yml @@ -133,14 +133,15 @@ jobs: fail-fast: false matrix: include: - - { cpu: x60, QEMU_CPU: rv64, OPENMP: ON, RVV: ON, XTHEADVECTOR: OFF, ZFH: ON, ZVFH: ON } + - { cpu: x60, QEMU_CPU: "max,vlen=256,elen=64,vext_spec=v1.0", OPENMP: ON, RVV: ON, XTHEADVECTOR: OFF, ZFH: ON, ZVFH: ON } steps: - uses: actions/checkout@v4 + # https://archive.spacemit.com/toolchain/spacemit-toolchain-linux-glibc-x86_64-v1.1.2.tar.xz - name: build-gcc run: | - export RISCV_ROOT_PATH=/data/action/osd/spacemit-toolchain-linux-glibc-x86_64-v1.0.5 + export RISCV_ROOT_PATH=/data/action/osd/spacemit-toolchain-linux-glibc-x86_64-v1.1.2 mkdir build-gcc && cd build-gcc cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/k1.toolchain.cmake -DCMAKE_BUILD_TYPE=release \ -DNCNN_OPENMP=${{ matrix.OPENMP }} -DNCNN_THREADS=${{ matrix.OPENMP }} \ @@ -154,7 +155,7 @@ jobs: - name: build-llvm run: | - export RISCV_ROOT_PATH=/data/action/osd/spacemit-toolchain-linux-glibc-x86_64-v1.0.5 + export RISCV_ROOT_PATH=/data/action/osd/spacemit-toolchain-linux-glibc-x86_64-v1.1.2 mkdir build-llvm && cd build-llvm cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/k1.llvm.toolchain.cmake -DCMAKE_BUILD_TYPE=release \ -DNCNN_OPENMP=${{ matrix.OPENMP }} -DNCNN_THREADS=${{ matrix.OPENMP }} \ @@ -166,11 +167,20 @@ jobs: -DNCNN_SIMPLEOCV=ON -DNCNN_BUILD_EXAMPLES=ON -DNCNN_BUILD_TESTS=ON .. cmake --build . -j 8 - # - name: test-gcc - # run: | - # export PATH=/data/action/osd/spacemit-ai-sdk.v1.1.0/spacemit-qemu/bin:$PATH - # cd build-gcc - # TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-cpu;${{ matrix.QEMU_CPU }}" ctest --output-on-failure -j 8 + # https://archive.spacemit.com/spacemit-ai/qemu/jdsk-qemu-v0.0.14.tar.gz + - name: test-gcc + run: | + export RISCV_ROOT_PATH=/data/action/osd/spacemit-toolchain-linux-glibc-x86_64-v1.1.2 + export PATH=/data/action/osd/jdsk-qemu/bin:$PATH + cd build-gcc + TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-cpu;${{ matrix.QEMU_CPU }};-L;${RISCV_ROOT_PATH}/sysroot" ctest --output-on-failure -j 8 + + - name: test-llvm + run: | + export RISCV_ROOT_PATH=/data/action/osd/spacemit-toolchain-linux-glibc-x86_64-v1.1.2 + export PATH=/data/action/osd/jdsk-qemu/bin:$PATH + cd build-llvm + TESTS_EXECUTABLE_LOADER=qemu-riscv64 TESTS_EXECUTABLE_LOADER_ARGUMENTS="-cpu;${{ matrix.QEMU_CPU }};-L;${RISCV_ROOT_PATH}/sysroot" ctest --output-on-failure -j 8 gcc-rvv: runs-on: [self-hosted, linux, ubuntu] diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 4754bef24..24501fe55 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -59,6 +59,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/.local/bin/codecov files: build/lcov.info linux-gcc-x64: @@ -140,6 +141,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/osd/codecov files: build/lcov.info,build-openmp/lcov.info linux-gcc-x64-simplestl-simplemath: @@ -171,6 +173,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/osd/codecov files: build/lcov.info linux-gcc-x64-sde: @@ -222,6 +225,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/osd/codecov files: build/lcov.info linux-gcc-x64-sde-combined: @@ -281,6 +285,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/osd/codecov files: build/lcov.info linux-gcc-riscv64-rvv: @@ -356,6 +361,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/osd/codecov files: build/lcov.info linux-gpu-swiftshader: @@ -413,6 +419,7 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/osd/codecov files: build/lcov.info linux-gcc-cross: @@ -571,4 +578,5 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} disable_search: true plugins: noop + binary: /data/action/osd/codecov files: build/lcov.info,build-openmp/lcov.info diff --git a/.github/workflows/windows-xp-clang.yml b/.github/workflows/windows-xp-clang.yml new file mode 100644 index 000000000..2bb0abe71 --- /dev/null +++ b/.github/workflows/windows-xp-clang.yml @@ -0,0 +1,62 @@ +name: windows-xp-clang +on: + push: + branches: [master] + paths: + - '.github/workflows/windows-xp-clang.yml' + - 'toolchains/windows-xp-clang.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/x86/**' + - 'tests/**' + pull_request: + branches: [master] + paths: + - '.github/workflows/windows-xp-clang.yml' + - 'toolchains/windows-xp-clang.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/x86/**' + - 'tests/**' +concurrency: + group: windows-xp-clang-${{ github.ref }} + cancel-in-progress: true +permissions: + contents: read + +jobs: + windows: + name: Clang + runs-on: windows-2022 + + env: + UseMultiToolTask: true + NCNN_CMAKE_OPTIONS: -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Set up Clang + run: choco install llvm --version=6.0.0 --allow-downgrade + - name: Verify Clang + run: | + clang --version + clang++ --version + - name: config + run: | + Invoke-WebRequest -Uri https://jaist.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z -OutFile i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z + 7z x ./i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z + Add-Content -Path $env:GITHUB_ENV -Value "MINGW32_ROOT_PATH=${{ github.workspace }}\mingw32" + echo "${{ github.workspace }}\mingw32\bin;$env:PATH" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 + - name: build + run: | + mkdir build; cd build + cmake ${{ env.NCNN_CMAKE_OPTIONS }} -DCMAKE_TOOLCHAIN_FILE="../toolchains/windows-xp-clang.toolchain.cmake" -DNCNN_SIMPLEOCV=ON -DNCNN_SIMPLEOMP=ON -DNCNN_AVX2=OFF -DNCNN_AVX=OFF .. -G "MinGW Makefiles" + cmake --build . --config Release -j 4 + - name: test + run: cd build; ctest -C Release --output-on-failure -j 4 \ No newline at end of file diff --git a/.github/workflows/windows-xp-mingw.yml b/.github/workflows/windows-xp-mingw.yml new file mode 100644 index 000000000..560320bcc --- /dev/null +++ b/.github/workflows/windows-xp-mingw.yml @@ -0,0 +1,57 @@ +name: windows-xp-mingw +on: + push: + branches: [master] + paths: + - '.github/workflows/windows-xp-mingw.yml' + - 'toolchains/windows-xp-mingw.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/x86/**' + - 'tests/**' + pull_request: + branches: [master] + paths: + - '.github/workflows/windows-xp-mingw.yml' + - 'toolchains/windows-xp-mingw.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/x86/**' + - 'tests/**' +concurrency: + group: windows-xp-mingw-${{ github.ref }} + cancel-in-progress: true +permissions: + contents: read + +jobs: + windows: + name: MinGW-w32 + runs-on: windows-2022 + + env: + UseMultiToolTask: true + NCNN_CMAKE_OPTIONS: -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: config + run: | + Invoke-WebRequest -Uri https://jaist.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z -OutFile i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z + 7z x ./i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z + Add-Content -Path $env:GITHUB_ENV -Value "MINGW32_ROOT_PATH=${{ github.workspace }}\mingw32" + Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}\mingw32\bin" + - name: build + run: | + mkdir build; cd build + cmake ${{ env.NCNN_CMAKE_OPTIONS }} -DCMAKE_TOOLCHAIN_FILE="../toolchains/windows-xp-mingw.toolchain.cmake" -DNCNN_SIMPLEOCV=ON -DNCNN_AVX2=OFF -DNCNN_AVX=OFF -DNCNN_VULKAN=OFF .. -G "MinGW Makefiles" + cmake --build . --config Release -j 4 + - name: test + run: cd build; ctest -C Release --output-on-failure -j 4 \ No newline at end of file diff --git a/.github/workflows/windows-xp-msvc.yml b/.github/workflows/windows-xp-msvc.yml new file mode 100644 index 000000000..1119f37c7 --- /dev/null +++ b/.github/workflows/windows-xp-msvc.yml @@ -0,0 +1,56 @@ +name: windows-xp-msvc +on: + push: + branches: [master] + paths: + - '.github/workflows/windows-xp-msvc.yml' + - 'toolchains/windows-xp-msvc.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/x86/**' + - 'tests/**' + pull_request: + branches: [master] + paths: + - '.github/workflows/windows-xp-msvc.yml' + - 'toolchains/windows-xp-msvc.toolchain.cmake' + - 'CMakeLists.txt' + - 'cmake/**' + - 'src/*' + - 'src/layer/*' + - 'src/layer/x86/**' + - 'tests/**' +concurrency: + group: windows-xp-msvc-${{ github.ref }} + cancel-in-progress: true +permissions: + contents: read + +jobs: + windows: + name: MSVC + runs-on: windows-2022 + + env: + VS_INSTALL_DIR: C:\Program Files\Microsoft Visual Studio\2022\Enterprise + UseMultiToolTask: true + NCNN_CMAKE_OPTIONS: -DNCNN_BUILD_TOOLS=OFF -DNCNN_BUILD_EXAMPLES=OFF -DNCNN_BUILD_TESTS=ON + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: config + shell: cmd + run: | + "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe" modify --installPath "${{ env.VS_INSTALL_DIR }}" --channelId VisualStudio.17.Release --add Microsoft.VisualStudio.Component.WinXP --add Microsoft.VisualStudio.Component.VC.Tools.X86.X64.Spectre --add Microsoft.VisualStudio.Component.VC.Tools.X86.X64 --add Microsoft.VisualStudio.Component.VC.Tools.X86.X64 --add Microsoft.VisualStudio.Component.VC.v141.xp --nocache --quiet + call "${{ env.VS_INSTALL_DIR }}\VC\Auxiliary\Build\vcvarsall.bat" x86 + - name: build + run: | + mkdir build; cd build + cmake ${{ env.NCNN_CMAKE_OPTIONS }} -A WIN32 -G "Visual Studio 17 2022" -T v141_xp -DNCNN_SIMPLEOCV=ON -DNCNN_OPENMP=OFF -DNCNN_BUILD_WITH_STATIC_CRT=ON -DNCNN_AVX2=OFF -DNCNN_AVX=OFF -DCMAKE_TOOLCHAIN_FILE="../toolchains/windows-xp-msvc.toolchain.cmake" .. + cmake --build . --config Release -j 4 + - name: test + run: cd build; ctest -C Release --output-on-failure -j 4 \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE.txt index 2eb0363c7..cb24570a4 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,5 +1,5 @@ Tencent is pleased to support the open source community by making ncnn available. -Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. +Copyright (C) 2017 Tencent. All rights reserved. If you have downloaded a copy of the ncnn binary from Tencent, please note that the ncnn binary is licensed under the BSD 3-Clause License. If you have downloaded a copy of the ncnn source code from Tencent, please note that ncnn source code is licensed under the BSD 3-Clause License, except for the third-party components listed below which are subject to different license terms. Your integration of ncnn into your own projects may require compliance with the BSD 3-Clause License, as well as the other licenses applicable to the third-party components included within ncnn. A copy of the BSD 3-Clause License is included in this file. @@ -7,7 +7,7 @@ A copy of the BSD 3-Clause License is included in this file. Other dependencies and licenses: Open Source Software Licensed Under the zlib License: -The below software in this distribution may have been modified by THL A29 Limited (“Tencent Modifications”). All Tencent Modifications are Copyright (C) 2017 THL A29 Limited. +The below software in this distribution may have been modified by Tencent (“Tencent Modifications”). All Tencent Modifications are Copyright (C) 2017 Tencent. ---------------------------------------------------------------------------------------- 1. neon_mathfun.h Copyright (C) 2011 Julien Pommier @@ -38,7 +38,7 @@ Permission is granted to anyone to use this software for any purpose, including Open Source Software Licensed Under the BSD 2-Clause License: -The below software in this distribution may have been modified by THL A29 Limited (“Tencent Modifications”). All Tencent Modifications are Copyright (C) 2017 THL A29 Limited. +The below software in this distribution may have been modified by Tencent (“Tencent Modifications”). All Tencent Modifications are Copyright (C) 2017 Tencent. ---------------------------------------------------------------------------------------- 1. squeezenet 1.1 Copyright (c) 2016 Forrest N. Iandola and Matthew W. Moskewicz and Khalid Ashraf and Song Han and William J. Dally and Kurt Keutzer @@ -66,7 +66,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND Open Source Software Licensed Under the BSD 3-Clause License: -The below software in this distribution may have been modified by THL A29 Limited (“Tencent Modifications”). All Tencent Modifications are Copyright (C) 2017 THL A29 Limited. +The below software in this distribution may have been modified by Tencent (“Tencent Modifications”). All Tencent Modifications are Copyright (C) 2017 Tencent. ---------------------------------------------------------------------------------------- 1. android.toolchain.cmake master Copyright (c) 2010-2011, Ethan Rublee diff --git a/benchmark/RankCards/Rcards.h b/benchmark/RankCards/Rcards.h index 7822095ab..a8dd8c09b 100644 --- a/benchmark/RankCards/Rcards.h +++ b/benchmark/RankCards/Rcards.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef RCARDS_H #define RCARDS_H diff --git a/benchmark/RankCards/main.cpp b/benchmark/RankCards/main.cpp index ef34ec5da..b5e2a9823 100644 --- a/benchmark/RankCards/main.cpp +++ b/benchmark/RankCards/main.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/benchmark/benchncnn.cpp b/benchmark/benchncnn.cpp index 22a77fb68..d2bc37569 100644 --- a/benchmark/benchncnn.cpp +++ b/benchmark/benchncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include @@ -59,6 +48,14 @@ static ncnn::VkAllocator* g_staging_vkallocator = 0; void benchmark(const char* comment, const std::vector& _in, const ncnn::Option& opt, bool fixed_path = true) { + // Skip if int8 model name and using GPU + if (opt.use_vulkan_compute && strstr(comment, "int8") != NULL) + { + if (!fixed_path) + fprintf(stderr, "%20s skipped (int8+GPU not supported)\n", comment); + return; + } + g_blob_pool_allocator.clear(); g_workspace_pool_allocator.clear(); diff --git a/cmake/ncnnConfig.cmake.in b/cmake/ncnnConfig.cmake.in index 6bed3b8da..19d79d58b 100644 --- a/cmake/ncnnConfig.cmake.in +++ b/cmake/ncnnConfig.cmake.in @@ -1,3 +1,4 @@ +set(NCNN_VERSION @NCNN_VERSION@) set(NCNN_OPENMP @NCNN_OPENMP@) set(NCNN_THREADS @NCNN_THREADS@) set(NCNN_VULKAN @NCNN_VULKAN@) @@ -44,3 +45,10 @@ if(NCNN_VULKAN) endif() include(${CMAKE_CURRENT_LIST_DIR}/ncnn.cmake) + +if(TARGET ncnn) + set(ncnn_FOUND TRUE) + if(NOT ncnn_FIND_QUIETLY) + message(STATUS "Found ncnn: ${NCNN_VERSION}") + endif() +endif() diff --git a/docs/developer-guide/build-ncnn-on-windows-xp.zh.md b/docs/developer-guide/build-ncnn-on-windows-xp.zh.md new file mode 100644 index 000000000..9de15b5dd --- /dev/null +++ b/docs/developer-guide/build-ncnn-on-windows-xp.zh.md @@ -0,0 +1,137 @@ +# Build ncnn on Windows XP + +> **Contributors:** [@Sugar-Baby](https://github.com/Sugar-Baby) and [@AtomAlpaca](https://github.com/AtomAlpaca) + +## 0. 环境准备 + +#### 0.1 虚拟机设置 + +我使用的是[我的MSDN](https://www.imsdn.cn/)提供的[Windows XP SP3 x64版本](https://www.imsdn.cn/operating-systems/windows-xp/)。虚拟机使用Oracle VM VirtualBox,内存4GB,存储空间64GB(C盘16GB,D盘48GB)。 + +**在虚拟机关机的情况下**,点击虚拟机管理器界面的"设置"-"网络"-"高级",将控制芯片改为PCnet-FAST III,混杂模式设置为拒绝,勾选接入网线,点击"OK"保存。重启虚拟机就可以连接上网络了。 + +点击虚拟机界面的"设备"-"安装增强功能...",在虚拟机中进入"我的电脑",刷新后出现"VirtualBox Guest Additions (D: )",右键选择"自动播放",完成安装后重启。 + +点击虚拟机界面的"设备"-"共享粘贴板",设置为"双向"。点击"设备"-"共享文件夹"-"共享文件夹..",点击右侧加号,在"共享文件夹路径"中选择"其他...",然后选择需要共享的主机文件夹。勾选"自动挂载"和"固定分配",点击"OK"保存。在虚拟机中进入"我的电脑",刷新后出现'VBoxSvr' 上的 <主机文件夹名称>,双击进入就可以双向传输文件了。 + +#### 0.2 开发环境配置 + +浏览器推荐[Mypal 68](https://www.mypal-browser.org/download.html),注意要选择32位版本。Windows XP自带ZIP文件解压。安装后就可以访问互联网了。 + +从Github下载[w64devkit](https://github.com/skeeto/w64devkit),选择x86版本。这里下载的是一个自解压的7z文件,在虚拟机中解压即可。 + +在"开始"-"控制面板"-"切换到经典视图"-"系统"-"高级"-"环境变量"-"系统变量"中,选择Path,点击"编辑",在字符串末尾加入一个分号(;),然后粘贴w64devkit下bin文件夹的目录。点击"确定"保存之后可以打开命令提示符输入例如c++的命令验证是否成功加入环境变量。 + +由于年代过于久远,Git的官方release已经没有兼容Windows XP的版本了。最后一个兼容的版本(1.9.5)可以在[这里](https://www.xiazaiba.com/html/29352.html)下载。 + +为了使用Git,需要安装[Win32 OpenSSL](https://slproweb.com/products/Win32OpenSSL.html)。选择Win32 OpenSSL Light版本。这个过程中会附带安装VC++ 2022运行时库。 + +如果因为协议、代理等问题不能在虚拟机中使用Git,也可以下载ZIP版本后在虚拟机中解压。 + +需要手动下载[CMake最后支持Windows XP的版本](https://github.com/Kitware/CMake/releases/download/v3.10.3/cmake-3.10.3-win32-x86.zip)。建议解压在C:\Program Files下,并且需要设置系统变量,到CMake目录下的bin文件夹。具体可以参考上面w64devkit的方法。 + +## 1. 编译 + +### 1.1 使用 MinGW-w64 + +运行 + +```bash +cd +mkdir build +cd build +cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/windows-xp-mingw.toolchain.cmake -DNCNN_VULKAN=OFF -DNCNN_SIMPLEOCV=ON -DNCNN_AVX=OFF -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" .. +make -j2 +make install +``` + +由于平台性能的限制,Vulkan SDK 最低要求 Windows 7 SP1,XP 无法安装官方驱动和工具链,因此需要关闭Vulkan选项。同时需要使用简化版 OpenCV 替代库NCNN_SIMPLEOCV。 + +### 1.2 使用 Clang + +需要先配置 MinGW-w64 环境,然后安装 Clang 6.0 或更高版本。 + +```bash +cd +mkdir build +cd build +cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/windows-xp-clang.toolchain.cmake -DNCNN_SIMPLEOCV=ON -DNCNN_SIMPLEOMP=ON -DNCNN_AVX=OFF -DCMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" .. +make -j2 +make install +``` + +### 1.3 使用 Visual Studio (MSVC) + +需要安装支持 Windows XP 的 v141_xp 工具集: + +1. 打开 Visual Studio 安装程序(工具 → 获取工具和功能) +2. 选择"使用 C++ 的桌面开发" +3. 在摘要部分选择"对 C++ 的 Windows XP 支持" +4. 点击修改 + +```bash +cd +mkdir build +cd build +cmake -A WIN32 -G "Visual Studio 17 2022" -T v141_xp -DNCNN_SIMPLEOCV=ON -DNCNN_OPENMP=OFF -DNCNN_AVX=OFF -DNCNN_BUILD_WITH_STATIC_CRT=ON -DCMAKE_TOOLCHAIN_FILE=../toolchains/windows-xp-msvc.toolchain.cmake .. +cmake --build . --config Release -j 2 +cmake --build . --config Release --target install +``` + +## 2. 测试 + +### 2.1 benchncnn + +将benchmark目录下的所有文件复制到build/benchmark目录下。在命令提示符中cd到build/benchmark, 然后运行 + +```bash +benchncnn [测试的循环次数] [线程数] [节能模式] +``` + +其中,节能模式取值为0时关闭,为1时打开。 + +### 2.2 examples + +从[这里](https://github.com/nihui/ncnn-assets/tree/master/models)可以下载到所有需要的param和bin文件。需要注意的是,ZF_faster_rcnn_final.bin开头的三个文件(.zip,.z01,.z02)最好先放在主机上解压出bin文件再传进虚拟机。 + +把这些文件放在build/examples目录下。 + +我写了一个bat脚本来批量测试这些模型: + +```batch +@echo off +setlocal enabledelayedexpansion + +set EXAMPLES_DIR=\BUILD\EXAMPLES +set IMAGE_PATH=\IMAGES\256-ncnn.png +set LOG_FILE=test_results.log + +echo NCNN Examples Test Results > %LOG_FILE% +echo ========================= >> %LOG_FILE% +echo Test started: %date% %time% >> %LOG_FILE% +echo. >> %LOG_FILE% + +for %%f in ("%EXAMPLES_DIR%\*.exe") do ( + set EXE_NAME=%%~nf + set EXE_PATH=%%f + echo Testing: !EXE_NAME! >> %LOG_FILE% + echo -------------------------------- >> %LOG_FILE% + + !EXE_PATH! "%IMAGE_PATH%" >> %LOG_FILE% 2>&1 + + if errorlevel 1 ( + echo [ERROR] !EXE_NAME! failed to run. >> %LOG_FILE% + ) else ( + echo [SUCCESS] !EXE_NAME! completed. >> %LOG_FILE% + ) + echo. >> %LOG_FILE% +) + +echo Test finished: %date% %time% >> %LOG_FILE% +echo Results saved to %LOG_FILE% +endlocal +``` + +把这个bat脚本放在build/examples目录下,替换掉所有的``,双击运行。通过生成的test_results.log即可查看所有模型的结果。 + +通过修改`set IMAGE_PATH=\IMAGES\256-ncnn.png`中的路径来更换需要测试的文件。 \ No newline at end of file diff --git a/docs/developer-guide/glsl-extension.md b/docs/developer-guide/glsl-extension.md index 5a6b51a94..9a59a82f8 100644 --- a/docs/developer-guide/glsl-extension.md +++ b/docs/developer-guide/glsl-extension.md @@ -168,24 +168,6 @@ shared lfp tmp_a[8][4][2]; |lfp|float|float|float|float16_t| |lfpvec4|vec4|uvec2|uint64_t|f16vec4| -## image format and precision hint type - -declare image format in descriptor binding - -```c -layout (binding = 0) uniform unfp sampler3D bottom_blob_3d; -layout (binding = 1, imfmtc4) writeonly uniform unfp image3D top_blob_3d; -``` - -|format type|fp32|fp16p|fp16s| -|---|---|---|---| -|imfmt1|r32f|f32f|r16f| -|imfmt4|rgba32f|rgba16f|rgba16f| - -|precision hint type|fp32|fp16p|fp16s| -|---|---|---|---| -|unfp|highp|mediump|mediump| - # buffer functions - load typed value from src[offset] @@ -230,53 +212,6 @@ void buffer_cp4to1(sfp dst, ivec4 dst_offsets, sfpvec4 src, int src_offset); void buffer_cp8to1(sfp dst, ivec4 dst_offsets_0, ivec4 dst_offsets_1, sfpvec8 src, int src_offset); void buffer_cp8to4(sfpvec4 dst, ivec2 dst_offsets, sfpvec8 src, int src_offset); ``` - -# image functions - -- load typed value from src at pos - -```c -afp image1d_ld1(sampler1D src, float pos); -afp image2d_ld1(sampler2D src, vec2 pos); -afp image3d_ld1(sampler3D src, vec3 pos); -afpvec4 image1d_ld4(sampler1D src, float pos); -afpvec4 image2d_ld4(sampler2D src, vec2 pos); -afpvec4 image3d_ld4(sampler3D src, vec3 pos); -afpvec8 image1d_ld8(sampler1D src, float pos); -afpvec8 image2d_ld8(sampler2D src, vec2 pos); -afpvec8 image3d_ld8(sampler3D src, vec3 pos); -``` - -- store typed value to dst at pos - -```c -void image1d_st1(image1D dst, int pos, afp v); -void image2d_st1(image2D dst, ivec2 pos, afp v); -void image3d_st1(image3D dst, ivec3 pos, afp v); -void image1d_st4(image1D dst, int pos, afpvec4 v); -void image2d_st4(image2D dst, ivec2 pos, afpvec4 v); -void image3d_st4(image3D dst, ivec3 pos, afpvec4 v); -void image1d_st8(image1D dst, int pos, afpvec8 v); -void image2d_st8(image2D dst, ivec2 pos, afpvec8 v); -void image3d_st8(image3D dst, ivec3 pos, afpvec8 v); -``` - -- copy typed value from src at src_pos to dst at dst_pos - -```c -void image1d_cp1(image1D dst, int dst_pos, sampler1D src, float src_pos); -void image2d_cp1(image2D dst, ivec2 dst_pos, sampler2D src, vec2 src_pos); -void image3d_cp1(image3D dst, ivec3 dst_pos, sampler3D src, vec3 src_pos); -void image1d_cp4(image1D dst, int dst_pos, sampler1D src, float src_pos); -void image2d_cp4(image2D dst, ivec2 dst_pos, sampler2D src, vec2 src_pos); -void image3d_cp4(image3D dst, ivec3 dst_pos, sampler3D src, vec3 src_pos); -void image1d_cp8(image1D dst, int dst_pos, sampler1D src, float src_pos); -void image2d_cp8(image2D dst, ivec2 dst_pos, sampler2D src, vec2 src_pos); -void image3d_cp8(image3D dst, ivec3 dst_pos, sampler3D src, vec3 src_pos); -``` - -Note: Since image is an opaque data structure, no copy and pack/unpack functions are provided. To achieve this operation, you need to load first and then store. - # local data conversion functions - storage buffer to local memory @@ -398,7 +333,7 @@ void main() ncnn will define some additional convenient macros when the vulkan validation layer enabled -* `ncnn_enable_validataion_layer` +* `ncnn_enable_validation_layer` * `NCNN_LOGE` currently, you have to modify the `ENABLE_VALIDATION_LAYER` definition at the beginning of `src/gpu.cpp` to `1` to enable these macros. @@ -410,7 +345,7 @@ void main() { int gx = int(gl_GlobalInvocationID.x); -#if ncnn_enable_validataion_layer +#if ncnn_enable_validation_layer NCNN_LOGE("gx = %d\n", gx); #endif } @@ -439,16 +374,6 @@ void main() } ``` -declare descriptor binding for image or buffer - -```c -#if NCNN_image_shader -layout (binding = 0) uniform unfp sampler3D bottom_blob_3d; -#else -layout (binding = 0) readonly buffer bottom_blob { sfpvec4 bottom_blob_data[]; }; -#endif -``` - |macro|defined by option| |---|---| |NCNN_fp16_packed|opt.use_fp16_packed| diff --git a/docs/developer-guide/glsl-extension.zh.md b/docs/developer-guide/glsl-extension.zh.md index a23904de5..f37f9c9c3 100644 --- a/docs/developer-guide/glsl-extension.zh.md +++ b/docs/developer-guide/glsl-extension.zh.md @@ -76,13 +76,6 @@ NCNN_EXPORT int compile_spirv_module(int shader_type_index, const Option& opt, s static const char my_glsl_data[] = R"( #version 450 -#if NCNN_fp16_storage -#extension GL_EXT_shader_16bit_storage: require -#endif -#if NCNN_fp16_arithmetic -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#endif - layout (binding = 0) readonly buffer a_blob { sfpvec4 a_blob_data[]; }; layout (binding = 1) writeonly buffer b_blob { sfpvec4 b_blob_data[]; }; @@ -139,7 +132,7 @@ layout (binding = 0) buffer top_blob { sfpvec4 top_blob_data[]; }; |存储类型|fp32|fp16p|fp16s| |---|---|---|---| -|sfp|float|float|float16_t| +|sfp|float|uint|float16_t| |sfpvec2|vec2|uint|f16vec2| |sfpvec4|vec4|uvec2|f16vec4| |sfpvec8|mat2x4|uvec4|f16mat2x4| @@ -175,24 +168,6 @@ shared lfp tmp_a[8][4][2]; |lfp|float|float|float|float16_t| |lfpvec4|vec4|uvec2|uint64_t|f16vec4| -## 图像格式类型(image format type)和精度类型(precision hint type) - -在描述符绑定中声明图像格式 - -```c -layout (binding = 0) uniform unfp sampler3D bottom_blob_3d; -layout (binding = 1, imfmtc4) writeonly uniform unfp image3D top_blob_3d; -``` - -|格式类型|fp32|fp16p|fp16s| -|---|---|---|---| -|imfmt1|r32f|f32f|r16f| -|imfmt4|rgba32f|rgba16f|rgba16f| - -|精度类型|fp32|fp16p|fp16s| -|---|---|---|---| -|unfp|highp|mediump|mediump| - # 缓冲区函数(buffer functions) - 从 src[offset] 加载已经确定类型的值 @@ -238,52 +213,6 @@ void buffer_cp8to1(sfp dst, ivec4 dst_offsets_0, ivec4 dst_offsets_1, sfpvec8 sr void buffer_cp8to4(sfpvec4 dst, ivec2 dst_offsets, sfpvec8 src, int src_offset); ``` -# 图像函数 - -- 根据 sampler?D 图像(透过 src 和 pos) 来加载数据 - -```c -afp image1d_ld1(sampler1D src, float pos); -afp image2d_ld1(sampler2D src, vec2 pos); -afp image3d_ld1(sampler3D src, vec3 pos); -afpvec4 image1d_ld4(sampler1D src, float pos); -afpvec4 image2d_ld4(sampler2D src, vec2 pos); -afpvec4 image3d_ld4(sampler3D src, vec3 pos); -afpvec8 image1d_ld8(sampler1D src, float pos); -afpvec8 image2d_ld8(sampler2D src, vec2 pos); -afpvec8 image3d_ld8(sampler3D src, vec3 pos); -``` - -- 存储确定类型的值到 image?D (透过 dst 和 pos 参数) - -```c -void image1d_st1(image1D dst, int pos, afp v); -void image2d_st1(image2D dst, ivec2 pos, afp v); -void image3d_st1(image3D dst, ivec3 pos, afp v); -void image1d_st4(image1D dst, int pos, afpvec4 v); -void image2d_st4(image2D dst, ivec2 pos, afpvec4 v); -void image3d_st4(image3D dst, ivec3 pos, afpvec4 v); -void image1d_st8(image1D dst, int pos, afpvec8 v); -void image2d_st8(image2D dst, ivec2 pos, afpvec8 v); -void image3d_st8(image3D dst, ivec3 pos, afpvec8 v); -``` - -- 把 sampler?D 的值的内容(透过 src 和 src_pos 参数) 拷贝到 image?D (透过 dst 和 dst_pos 参数) - -```c -void image1d_cp1(image1D dst, int dst_pos, sampler1D src, float src_pos); -void image2d_cp1(image2D dst, ivec2 dst_pos, sampler2D src, vec2 src_pos); -void image3d_cp1(image3D dst, ivec3 dst_pos, sampler3D src, vec3 src_pos); -void image1d_cp4(image1D dst, int dst_pos, sampler1D src, float src_pos); -void image2d_cp4(image2D dst, ivec2 dst_pos, sampler2D src, vec2 src_pos); -void image3d_cp4(image3D dst, ivec3 dst_pos, sampler3D src, vec3 src_pos); -void image1d_cp8(image1D dst, int dst_pos, sampler1D src, float src_pos); -void image2d_cp8(image2D dst, ivec2 dst_pos, sampler2D src, vec2 src_pos); -void image3d_cp8(image3D dst, ivec3 dst_pos, sampler3D src, vec3 src_pos); -``` - -注意:由于图像是不透明的数据结构,因此不提供复制和打包/解包功能。要实现此操作,您需要先加载,然后再存储。 - # 本地数据转换函数 - 存储缓冲区转换到本地内存 @@ -336,27 +265,114 @@ void main() #endif ``` -# 条件宏定义与option的关系 +ncnn 在新版本中添加了额外的宏定义,可能与现在的 glsl 代码冲突或引起混淆。为了实现 ncnn 的跨版本兼容性,可以根据 `ncnn_glsl_version` 宏的版本号在新旧代码之间进行切换 。 -仅当用户启用某些选项时才启用 GLSL 扩展 +```c +#if ncnn_glsl_version >= 1 +// 使用自版本 1 起引入的设备宏 +#endif +``` + +ncnn 额外定义了大多数 vulcan 设备相关功能作为宏,我们可以用来区分不同的平台、设备扩展、功能和属性。 + +### 扩展宏定义 + +当设备支持某个扩展时,`ncnn_` 被定义为扩展版本 ```c -#if NCNN_fp16_storage -#extension GL_EXT_shader_16bit_storage: require +void main() +{ +#if ncnn_VK_KHR_16bit_storage + // 支持 VK_KHR_16bit_storage 设备的代码 #endif -#if NCNN_fp16_arithmetic -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require + +#if ncnn_VK_KHR_sampler_ycbcr_conversion >= 10 + // 支持 VK_KHR_sampler_ycbcr_conversion 且版本 >=10 的代码 #endif +} ``` -声明图像或缓冲区的描述符绑定 +### 设备特性和属性宏 + +ncnn 会查询设备特性和属性,然后将它们定义为宏。 + +宏名称为 `ncnn_` 或 `ncnn_` + +当设备支持 `shaderInt64` 时,`GL_EXT_shader_explicit_arithmetic_types_int64` 扩展会自动启用,无需显式代码指示。 + +```c +void main() +{ +#if ncnn_robustBufferAccess + // 支持 robustBufferAccess 特性的设备代码 +#endif + +#if ncnn_vendorID == 4318 + // 供应商特定代码,4318 是 nvidia 显卡 +#endif + +#if ncnn_subgroupSize == 32 + // 为 subgroup_size == 32 优化的代码路径 +#endif + + // 使用宏定义 + uint size; // 来自先前例程的动态值 + if (size < ncnn_subgroupSize) + { +#if ncnn_supportedOperations & 4 + // subgroup 支持算术运算 +#endif + +#if ncnn_subgroup_arithmetic + // 检查 subgroup 算术运算的简写形式 +#endif + } +} +``` + +### 验证层宏定义 + +当启用 vulkan 验证层时,ncnn 会定义一些额外的便捷宏 + +* `ncnn_enable_validation_layer` +* `NCNN_LOGE` + +目前,你必须将 `src/gpu.cpp` 开头的 `ENABLE_VALIDATION_LAYER` 定义修改为 `1` 才能启用这些宏。 + +`GL_EXT_debug_printf` 扩展会自动启用,无需在代码中显式指定。 ```c -#if NCNN_image_shader -layout (binding = 0) uniform unfp sampler3D bottom_blob_3d; -#else -layout (binding = 0) readonly buffer bottom_blob { sfpvec4 bottom_blob_data[]; }; +void main() +{ + int gx = int(gl_GlobalInvocationID.x); + +#if ncnn_enable_validation_layer + NCNN_LOGE("gx = %d\n", gx); #endif +} +``` + +在运行时,`NCNN_LOGE` 将打印出 `gx` 的值 + +### 选项宏 + +仅当用户启用某些选项时才启用 GLSL 扩展 + +`GL_EXT_shader_16bit_storage` 扩展会在设备支持 16 位存储且用户开启了 `opt.use_fp16_storage` 选项时,自动启用,无需显式代码指示。 + +`GL_EXT_shader_explicit_arithmetic_types_float16` 扩展会在设备支持 16 位算术运算且用户开启了 `opt.use_fp16_arithmetic` 选项时,自动启用,无需显式代码指示。 + +```c +void main() +{ +#if NCNN_fp16_storage + // 用户启用 fp16 存储选项,且设备支持 fp16 存储 +#endif + +#if NCNN_fp16_arithmetic + // 用户启用 fp16 算术选项,且设备支持 fp16 算术运算 +#endif +} ``` |宏定义|option中所定义的变量| diff --git a/docs/how-to-build/how-to-build.md b/docs/how-to-build/how-to-build.md index 771ab4c04..3d7e814d2 100644 --- a/docs/how-to-build/how-to-build.md +++ b/docs/how-to-build/how-to-build.md @@ -16,9 +16,14 @@ git submodule update --init - [Verification](#verification) - [Build for Windows x64 using Visual Studio Community 2017](#build-for-windows-x64-using-visual-studio-community-2017) - [Build for Windows x64 using MinGW-w64](#build-for-windows-x64-using-mingw-w64) +- [Build for Windows XP (x86)](#build-for-windows-xp-x86) + - [Using MinGW-w64](#using-mingw-w64) + - [Using Clang](#using-clang) + - [Using Visual Studio (MSVC)](#using-visual-studio-msvc) - [Build for macOS](#build-for-macos) - [Build for ARM Cortex-A family with cross-compiling](#build-for-arm-cortex-a-family-with-cross-compiling) - [Build for Hisilicon platform with cross-compiling](#build-for-hisilicon-platform-with-cross-compiling) +- [Build for AnyCloud platform with cross-compiling](#build-for-AnyCloud-platform-with-cross-compiling) - [Build for Android](#build-for-android) - [Build for iOS on macOS with xcode](#build-for-ios-on-macos-with-xcode) - [Build for WebAssembly](#build-for-webassembly) @@ -262,6 +267,57 @@ cmake --build . --config Release --target install *** +### Build for Windows XP (x86) + +> **Note:** Windows XP support is provided through collaborative contributions from [@Sugar-Baby](https://github.com/Sugar-Baby) and [@AtomAlpaca](https://github.com/AtomAlpaca). + +#### Using MinGW-w64 + +Download mingw toolchain targeting 32 bit from [sourceforge](https://jaist.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/8.1.0/threads-posix/dwarf/i686-8.1.0-release-posix-dwarf-rt_v6-rev0.7z), extract and add environment variable named `MINGW32_ROOT_PATH` valued by ``, and add `/bin` to `PATH`. + +```shell +mkdir build +cd build +cmake -DCMAKE_TOOLCHAIN_FILE="../toolchains/windows-xp-mingw.toolchain.cmake" -DNCNN_SIMPLEOCV=ON -DNCNN_AVX2=OFF -DNCNN_AVX=OFF -DNCNN_VULKAN=OFF .. -G "MinGW Makefiles" +cmake --build . --config Release -j 4 +cmake --build . --config Release --target install +``` + +#### Using Clang + +Clang requires libraries from mingw. Configure mingw toolchain targeting 32-bit as described in the [MinGW-w64 section](#using-mingw-w64). + +Install Clang 6.0 or later. + +```shell +mkdir build +cd build +cmake -DCMAKE_TOOLCHAIN_FILE="../toolchains/windows-xp-clang.toolchain.cmake" -DNCNN_SIMPLEOCV=ON -DNCNN_SIMPLEOMP=ON -DNCNN_AVX2=OFF -DNCNN_AVX=OFF .. -G "MinGW Makefiles" +cmake --build . --config Release -j 4 +cmake --build . --config Release --target install +``` + +#### Using Visual Studio (MSVC) + +Install v141_xp toolset for Windows XP: + +1. Bring up the Visual Studio installer (Tools → Get Tools and Features) +2. Select Desktop development with C++ +3. Select Windows XP support for C++ from the Summary section +4. Click Modify + +```shell +mkdir build +cd build +cmake -A WIN32 -G "Visual Studio 17 2022" -T v141_xp -DNCNN_SIMPLEOCV=ON -DNCNN_OPENMP=OFF -DNCNN_AVX2=OFF -DNCNN_AVX=OFF -DNCNN_BUILD_WITH_STATIC_CRT=ON -DCMAKE_TOOLCHAIN_FILE="../toolchains/windows-xp-msvc.toolchain.cmake" .. +cmake --build . --config Release -j 2 +cmake --build . --config Release --target install +``` + +**Note:** The MSVC toolchain uses the `v141_xp` platform toolset for Windows XP compatibility. Vulkan is disabled for XP compatibility, and advanced CPU features (AVX, AVX2, AVX512) are disabled to ensure compatibility with older processors. + +*** + ### Build for macOS We've published ncnn to [brew](https://formulae.brew.sh/formula/ncnn#default) now, you can just use following method to install ncnn if you have the Xcode Command Line Tools installed. @@ -349,7 +405,8 @@ make -j$(nproc) *** ### Build for Hisilicon platform with cross-compiling -Download and install Hisilicon SDK. The toolchain should be in `/opt/hisi-linux/x86-arm` +Download and install Hisilicon SDK. The toolchain should be in `/opt/hisi-linux/x86-arm` +new version of Hisilicon toolchain should be in `/opt/linux/x86-arm/` ```shell cd @@ -361,6 +418,24 @@ cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/hisiv300.toolchain.cmake .. cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/hisiv500.toolchain.cmake .. cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/himix100.toolchain.cmake .. cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/himix200.toolchain.cmake .. +cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/himix210.toolchain.cmake .. + +make -j$(nproc) +make install +``` + +*** + +### Build for AnyCloud platform with cross-compiling +Download and install AnyCloud SDK. And load env to set toolchain can access in shell + +```shell +cd +mkdir -p build +cd build + +# Choose one cmake toolchain file depends on your target platform +cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/anykav500.toolchain.cmake .. make -j$(nproc) make install diff --git a/examples/fasterrcnn.cpp b/examples/fasterrcnn.cpp index 48aa10657..f075ba6ad 100644 --- a/examples/fasterrcnn.cpp +++ b/examples/fasterrcnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/mobilenetssd.cpp b/examples/mobilenetssd.cpp index 59ea209bc..792ef46f0 100644 --- a/examples/mobilenetssd.cpp +++ b/examples/mobilenetssd.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/mobilenetv2ssdlite.cpp b/examples/mobilenetv2ssdlite.cpp index e1650e11a..da6411e1f 100644 --- a/examples/mobilenetv2ssdlite.cpp +++ b/examples/mobilenetv2ssdlite.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/mobilenetv3ssdlite.cpp b/examples/mobilenetv3ssdlite.cpp index 724e501c0..8235b981d 100644 --- a/examples/mobilenetv3ssdlite.cpp +++ b/examples/mobilenetv3ssdlite.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" #include "platform.h" diff --git a/examples/nanodet.cpp b/examples/nanodet.cpp index 2dafd908a..1e5dc2d16 100644 --- a/examples/nanodet.cpp +++ b/examples/nanodet.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/nanodetplus_pnnx.cpp b/examples/nanodetplus_pnnx.cpp index 7aa3ed1f7..e7cb5dedd 100644 --- a/examples/nanodetplus_pnnx.cpp +++ b/examples/nanodetplus_pnnx.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/p2pnet.cpp b/examples/p2pnet.cpp index cee307742..f7562b0b2 100644 --- a/examples/p2pnet.cpp +++ b/examples/p2pnet.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" #if defined(USE_NCNN_SIMPLEOCV) diff --git a/examples/peleenetssd_seg.cpp b/examples/peleenetssd_seg.cpp index 84dc4d627..f3e1d4f67 100644 --- a/examples/peleenetssd_seg.cpp +++ b/examples/peleenetssd_seg.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/ppocrv5.cpp b/examples/ppocrv5.cpp index e7cdaa81c..1c48b6799 100644 --- a/examples/ppocrv5.cpp +++ b/examples/ppocrv5.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // pip install paddlepaddle==3.0.0 // pip install paddleocr==3.0.0 diff --git a/examples/ppocrv5_dict.h b/examples/ppocrv5_dict.h index be752d494..a05a9c2b2 100644 --- a/examples/ppocrv5_dict.h +++ b/examples/ppocrv5_dict.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause static const char* character_dict[] = { " ", diff --git a/examples/retinaface.cpp b/examples/retinaface.cpp index e7f84e51a..9279c0868 100644 --- a/examples/retinaface.cpp +++ b/examples/retinaface.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/rfcn.cpp b/examples/rfcn.cpp index 985464717..befde72dc 100644 --- a/examples/rfcn.cpp +++ b/examples/rfcn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/rvm.cpp b/examples/rvm.cpp index 640bf7a62..97f5d19f5 100644 --- a/examples/rvm.cpp +++ b/examples/rvm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // ncnn model exported from https://github.com/PeterL1n/RobustVideoMatting // diff --git a/examples/scrfd.cpp b/examples/scrfd.cpp index 8b06ecb3e..793a0f9d4 100644 --- a/examples/scrfd.cpp +++ b/examples/scrfd.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/scrfd_crowdhuman.cpp b/examples/scrfd_crowdhuman.cpp index 7a4d683bd..10e5b5072 100644 --- a/examples/scrfd_crowdhuman.cpp +++ b/examples/scrfd_crowdhuman.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/shufflenetv2.cpp b/examples/shufflenetv2.cpp index eaf3ec809..93f42772d 100644 --- a/examples/shufflenetv2.cpp +++ b/examples/shufflenetv2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/simplepose.cpp b/examples/simplepose.cpp index 867d54f13..ac7629321 100644 --- a/examples/simplepose.cpp +++ b/examples/simplepose.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/squeezenet.cpp b/examples/squeezenet.cpp index a026c1315..7bc3a324d 100644 --- a/examples/squeezenet.cpp +++ b/examples/squeezenet.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/squeezenet_c_api.cpp b/examples/squeezenet_c_api.cpp index 851a5903e..2dafbc3d1 100644 --- a/examples/squeezenet_c_api.cpp +++ b/examples/squeezenet_c_api.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "c_api.h" diff --git a/examples/squeezenetssd.cpp b/examples/squeezenetssd.cpp index c233b5b7f..a762e4cbe 100644 --- a/examples/squeezenetssd.cpp +++ b/examples/squeezenetssd.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/yolact.cpp b/examples/yolact.cpp index 44e24f3b1..9e5f1b99b 100644 --- a/examples/yolact.cpp +++ b/examples/yolact.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/yolo11.cpp b/examples/yolo11.cpp index 1c614ab1d..969c34add 100644 --- a/examples/yolo11.cpp +++ b/examples/yolo11.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolo11_cls.cpp b/examples/yolo11_cls.cpp index 24e326f70..8bdf21d05 100644 --- a/examples/yolo11_cls.cpp +++ b/examples/yolo11_cls.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolo11_obb.cpp b/examples/yolo11_obb.cpp index 793479878..e7d865961 100644 --- a/examples/yolo11_obb.cpp +++ b/examples/yolo11_obb.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolo11_pose.cpp b/examples/yolo11_pose.cpp index 5b4418c60..267ccbc1d 100644 --- a/examples/yolo11_pose.cpp +++ b/examples/yolo11_pose.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolo11_seg.cpp b/examples/yolo11_seg.cpp index 5f0149a5d..4a2fdfa75 100644 --- a/examples/yolo11_seg.cpp +++ b/examples/yolo11_seg.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolov2.cpp b/examples/yolov2.cpp index 111040fae..1d349622b 100644 --- a/examples/yolov2.cpp +++ b/examples/yolov2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/yolov3.cpp b/examples/yolov3.cpp index 0417c0561..28bea3570 100644 --- a/examples/yolov3.cpp +++ b/examples/yolov3.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/yolov4.cpp b/examples/yolov4.cpp index 6ffb83d97..3d40048f4 100644 --- a/examples/yolov4.cpp +++ b/examples/yolov4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/examples/yolov5.cpp b/examples/yolov5.cpp index 88f6db212..16d272744 100644 --- a/examples/yolov5.cpp +++ b/examples/yolov5.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "net.h" diff --git a/examples/yolov5_pnnx.cpp b/examples/yolov5_pnnx.cpp index 5d0190353..b81d9b2ca 100644 --- a/examples/yolov5_pnnx.cpp +++ b/examples/yolov5_pnnx.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "net.h" diff --git a/examples/yolov7.cpp b/examples/yolov7.cpp index 7898185a4..b9879fe22 100644 --- a/examples/yolov7.cpp +++ b/examples/yolov7.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "net.h" diff --git a/examples/yolov7_pnnx.cpp b/examples/yolov7_pnnx.cpp index 3dc7b41ea..344c31b7e 100644 --- a/examples/yolov7_pnnx.cpp +++ b/examples/yolov7_pnnx.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "net.h" diff --git a/examples/yolov8.cpp b/examples/yolov8.cpp index 02f012193..5bac9e1ff 100644 --- a/examples/yolov8.cpp +++ b/examples/yolov8.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolov8_cls.cpp b/examples/yolov8_cls.cpp index d682a7e5b..d25bfbf16 100644 --- a/examples/yolov8_cls.cpp +++ b/examples/yolov8_cls.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolov8_obb.cpp b/examples/yolov8_obb.cpp index b10f2bb68..95d493596 100644 --- a/examples/yolov8_obb.cpp +++ b/examples/yolov8_obb.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolov8_pose.cpp b/examples/yolov8_pose.cpp index 887e7f8bd..0f44169e3 100644 --- a/examples/yolov8_pose.cpp +++ b/examples/yolov8_pose.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolov8_seg.cpp b/examples/yolov8_seg.cpp index b71e4db80..00f5909e7 100644 --- a/examples/yolov8_seg.cpp +++ b/examples/yolov8_seg.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yoloworld.cpp b/examples/yoloworld.cpp index 5ba2678bc..51e5fb439 100644 --- a/examples/yoloworld.cpp +++ b/examples/yoloworld.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause // 1. install // pip3 install -U ultralytics pnnx ncnn diff --git a/examples/yolox.cpp b/examples/yolox.cpp index 65e40e232..e4ec54733 100644 --- a/examples/yolox.cpp +++ b/examples/yolox.cpp @@ -1,17 +1,6 @@ -// This file is wirtten base on the following file: -// https://github.com/Tencent/ncnn/blob/master/examples/yolov5.cpp -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. -// ------------------------------------------------------------------------------ -// Copyright (C) 2020-2021, Megvii Inc. All rights reserved. +// Copyright 2020 Tencent +// Copyright 2020-2021 Megvii Inc. +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "net.h" diff --git a/python/examples/fasterrcnn.py b/python/examples/fasterrcnn.py index d0b84f4ef..eb8b7275f 100644 --- a/python/examples/fasterrcnn.py +++ b/python/examples/fasterrcnn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/mobilenetssd.py b/python/examples/mobilenetssd.py index d3bf46d04..6a66af701 100644 --- a/python/examples/mobilenetssd.py +++ b/python/examples/mobilenetssd.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/mobilenetv2ssdlite.py b/python/examples/mobilenetv2ssdlite.py index c65e65673..2dedd34be 100644 --- a/python/examples/mobilenetv2ssdlite.py +++ b/python/examples/mobilenetv2ssdlite.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/mobilenetv3ssdlite.py b/python/examples/mobilenetv3ssdlite.py index 09fc49aa3..70de8be57 100644 --- a/python/examples/mobilenetv3ssdlite.py +++ b/python/examples/mobilenetv3ssdlite.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/model_zoo.py b/python/examples/model_zoo.py index 605737a74..f5973c2a4 100644 --- a/python/examples/model_zoo.py +++ b/python/examples/model_zoo.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause from ncnn.model_zoo import get_model_list diff --git a/python/examples/nanodet.py b/python/examples/nanodet.py index 05e269021..9c98e4af4 100644 --- a/python/examples/nanodet.py +++ b/python/examples/nanodet.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/peleenetssd.py b/python/examples/peleenetssd.py index 54c882dd2..0deffa27b 100644 --- a/python/examples/peleenetssd.py +++ b/python/examples/peleenetssd.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/retinaface.py b/python/examples/retinaface.py index 322720fcf..a84f9f92d 100644 --- a/python/examples/retinaface.py +++ b/python/examples/retinaface.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/rfcn.py b/python/examples/rfcn.py index 82b180a6b..4e593476c 100644 --- a/python/examples/rfcn.py +++ b/python/examples/rfcn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/shufflenetv2.py b/python/examples/shufflenetv2.py index 248716d3c..05d7ed1ab 100644 --- a/python/examples/shufflenetv2.py +++ b/python/examples/shufflenetv2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/simplepose.py b/python/examples/simplepose.py index c8519943a..3cbc16f4c 100644 --- a/python/examples/simplepose.py +++ b/python/examples/simplepose.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/squeezenet.py b/python/examples/squeezenet.py index 645ba2db2..495cec9cb 100644 --- a/python/examples/squeezenet.py +++ b/python/examples/squeezenet.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/squeezenetssd.py b/python/examples/squeezenetssd.py index 0b2228cac..20d6f59a7 100644 --- a/python/examples/squeezenetssd.py +++ b/python/examples/squeezenetssd.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/yolact.py b/python/examples/yolact.py index dff1b4b4f..7e97dd177 100644 --- a/python/examples/yolact.py +++ b/python/examples/yolact.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/yolov2.py b/python/examples/yolov2.py index 621b21f2d..bf4b6051f 100644 --- a/python/examples/yolov2.py +++ b/python/examples/yolov2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/yolov3.py b/python/examples/yolov3.py index 0ad8376aa..0159dbf0c 100644 --- a/python/examples/yolov3.py +++ b/python/examples/yolov3.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/yolov4.py b/python/examples/yolov4.py index d23d0649e..0bfd00b84 100644 --- a/python/examples/yolov4.py +++ b/python/examples/yolov4.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/yolov5.py b/python/examples/yolov5.py index 2b2bcde7e..369b1e95d 100644 --- a/python/examples/yolov5.py +++ b/python/examples/yolov5.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/examples/yolov8.py b/python/examples/yolov8.py index b5ab2223f..6f1e151d3 100644 --- a/python/examples/yolov8.py +++ b/python/examples/yolov8.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import cv2 diff --git a/python/ncnn/__init__.py b/python/ncnn/__init__.py index 0c1479f0b..2e5538ea6 100644 --- a/python/ncnn/__init__.py +++ b/python/ncnn/__init__.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause from .ncnn import * diff --git a/python/ncnn/model_zoo/__init__.py b/python/ncnn/model_zoo/__init__.py index c694375f4..8028470ad 100644 --- a/python/ncnn/model_zoo/__init__.py +++ b/python/ncnn/model_zoo/__init__.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause # coding: utf-8 """Predefined and pretrained models.""" diff --git a/python/ncnn/model_zoo/fasterrcnn.py b/python/ncnn/model_zoo/fasterrcnn.py index 3eec88c19..085b7a8b0 100644 --- a/python/ncnn/model_zoo/fasterrcnn.py +++ b/python/ncnn/model_zoo/fasterrcnn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import ncnn diff --git a/python/ncnn/model_zoo/mobilenetssd.py b/python/ncnn/model_zoo/mobilenetssd.py index bca5d1917..f97992f30 100644 --- a/python/ncnn/model_zoo/mobilenetssd.py +++ b/python/ncnn/model_zoo/mobilenetssd.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/mobilenetv2ssdlite.py b/python/ncnn/model_zoo/mobilenetv2ssdlite.py index 588886f5e..687a51736 100644 --- a/python/ncnn/model_zoo/mobilenetv2ssdlite.py +++ b/python/ncnn/model_zoo/mobilenetv2ssdlite.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/mobilenetv3ssdlite.py b/python/ncnn/model_zoo/mobilenetv3ssdlite.py index d40507c38..6e6f67acf 100644 --- a/python/ncnn/model_zoo/mobilenetv3ssdlite.py +++ b/python/ncnn/model_zoo/mobilenetv3ssdlite.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import ncnn diff --git a/python/ncnn/model_zoo/model_store.py b/python/ncnn/model_zoo/model_store.py index 2d562b43b..b547b23d0 100644 --- a/python/ncnn/model_zoo/model_store.py +++ b/python/ncnn/model_zoo/model_store.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause """Model store which provides pretrained models.""" from __future__ import print_function diff --git a/python/ncnn/model_zoo/model_zoo.py b/python/ncnn/model_zoo/model_zoo.py index 7f82116ca..d071e8bb1 100644 --- a/python/ncnn/model_zoo/model_zoo.py +++ b/python/ncnn/model_zoo/model_zoo.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause from .yolov2 import MobileNet_YoloV2 from .yolov3 import MobileNetV2_YoloV3 diff --git a/python/ncnn/model_zoo/nanodet.py b/python/ncnn/model_zoo/nanodet.py index f8d2959fd..4995cac4f 100644 --- a/python/ncnn/model_zoo/nanodet.py +++ b/python/ncnn/model_zoo/nanodet.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import ncnn diff --git a/python/ncnn/model_zoo/peleenetssd.py b/python/ncnn/model_zoo/peleenetssd.py index cbd9870e3..437bdb014 100644 --- a/python/ncnn/model_zoo/peleenetssd.py +++ b/python/ncnn/model_zoo/peleenetssd.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/retinaface.py b/python/ncnn/model_zoo/retinaface.py index 8b784f503..c3d28567d 100644 --- a/python/ncnn/model_zoo/retinaface.py +++ b/python/ncnn/model_zoo/retinaface.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import ncnn diff --git a/python/ncnn/model_zoo/rfcn.py b/python/ncnn/model_zoo/rfcn.py index 01afd7cdf..cdac8e673 100644 --- a/python/ncnn/model_zoo/rfcn.py +++ b/python/ncnn/model_zoo/rfcn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import ncnn diff --git a/python/ncnn/model_zoo/shufflenetv2.py b/python/ncnn/model_zoo/shufflenetv2.py index 3d8360ec7..e97b85b69 100644 --- a/python/ncnn/model_zoo/shufflenetv2.py +++ b/python/ncnn/model_zoo/shufflenetv2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import ncnn diff --git a/python/ncnn/model_zoo/simplepose.py b/python/ncnn/model_zoo/simplepose.py index 5e5a0d7a2..de8a5a22e 100644 --- a/python/ncnn/model_zoo/simplepose.py +++ b/python/ncnn/model_zoo/simplepose.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/squeezenet.py b/python/ncnn/model_zoo/squeezenet.py index 3f1ccbc5f..ffe9662ba 100644 --- a/python/ncnn/model_zoo/squeezenet.py +++ b/python/ncnn/model_zoo/squeezenet.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import ncnn diff --git a/python/ncnn/model_zoo/squeezenetssd.py b/python/ncnn/model_zoo/squeezenetssd.py index 66bb94e53..1969bc30b 100644 --- a/python/ncnn/model_zoo/squeezenetssd.py +++ b/python/ncnn/model_zoo/squeezenetssd.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/yolact.py b/python/ncnn/model_zoo/yolact.py index c5dc33398..f0f6b0693 100644 --- a/python/ncnn/model_zoo/yolact.py +++ b/python/ncnn/model_zoo/yolact.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause from math import sqrt import numpy as np diff --git a/python/ncnn/model_zoo/yolov2.py b/python/ncnn/model_zoo/yolov2.py index e832bcc54..ede548bf7 100644 --- a/python/ncnn/model_zoo/yolov2.py +++ b/python/ncnn/model_zoo/yolov2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/yolov3.py b/python/ncnn/model_zoo/yolov3.py index 64e7d0110..52df97e77 100644 --- a/python/ncnn/model_zoo/yolov3.py +++ b/python/ncnn/model_zoo/yolov3.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/yolov4.py b/python/ncnn/model_zoo/yolov4.py index 9a23a7138..b3389842c 100644 --- a/python/ncnn/model_zoo/yolov4.py +++ b/python/ncnn/model_zoo/yolov4.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/yolov5.py b/python/ncnn/model_zoo/yolov5.py index d70592fdd..db16f5c1a 100644 --- a/python/ncnn/model_zoo/yolov5.py +++ b/python/ncnn/model_zoo/yolov5.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import time import numpy as np diff --git a/python/ncnn/model_zoo/yolov7.py b/python/ncnn/model_zoo/yolov7.py index 8a7b34530..6297b4d1b 100644 --- a/python/ncnn/model_zoo/yolov7.py +++ b/python/ncnn/model_zoo/yolov7.py @@ -1,18 +1,10 @@ -# Kenny Bradley 2023 +# Copyright 2020 Tencent +# Copyright 2023 Kenny Bradley +# SPDX-License-Identifier: BSD-3-Clause + # Ported yolov7-tiny to python based on: # - https://github.com/Qengineering/YoloV7-ncnn-Raspberry-Pi-4/blob/main/yolo.cpp -# -# Format based on the ncnn yolov4 implementation by THL A29 Limited, a Tencent company -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Format based on the ncnn yolov4 implementation import ncnn from .model_store import get_model_file diff --git a/python/ncnn/model_zoo/yolov8.py b/python/ncnn/model_zoo/yolov8.py index 0debb9365..25bbcfaa5 100644 --- a/python/ncnn/model_zoo/yolov8.py +++ b/python/ncnn/model_zoo/yolov8.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import time import numpy as np diff --git a/python/ncnn/utils/__init__.py b/python/ncnn/utils/__init__.py index 67c1f151e..eb0b6fa24 100644 --- a/python/ncnn/utils/__init__.py +++ b/python/ncnn/utils/__init__.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause from .download import download, check_sha1 from .visual import * diff --git a/python/ncnn/utils/download.py b/python/ncnn/utils/download.py index 4d77e67ab..b26de60b4 100644 --- a/python/ncnn/utils/download.py +++ b/python/ncnn/utils/download.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause """Download files with progress bar.""" diff --git a/python/ncnn/utils/functional.py b/python/ncnn/utils/functional.py index 5b886ebaf..9e6879bc1 100644 --- a/python/ncnn/utils/functional.py +++ b/python/ncnn/utils/functional.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np diff --git a/python/ncnn/utils/objects.py b/python/ncnn/utils/objects.py index 60653e83b..6fcbc8047 100644 --- a/python/ncnn/utils/objects.py +++ b/python/ncnn/utils/objects.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np diff --git a/python/ncnn/utils/visual.py b/python/ncnn/utils/visual.py index 3af4c2c9f..71c2c6175 100644 --- a/python/ncnn/utils/visual.py +++ b/python/ncnn/utils/visual.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import cv2 diff --git a/python/src/main.cpp b/python/src/main.cpp index 2d25ebb0f..b20266fae 100644 --- a/python/src/main.cpp +++ b/python/src/main.cpp @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/python/src/pybind11_allocator.h b/python/src/pybind11_allocator.h index 64ce553c7..e7f06d658 100644 --- a/python/src/pybind11_allocator.h +++ b/python/src/pybind11_allocator.h @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PYBIND11_NCNN_ALLOCATOR_H #define PYBIND11_NCNN_ALLOCATOR_H diff --git a/python/src/pybind11_bind.h b/python/src/pybind11_bind.h index 389be28b2..8186e032a 100644 --- a/python/src/pybind11_bind.h +++ b/python/src/pybind11_bind.h @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PYBIND11_NCNN_BIND_H #define PYBIND11_NCNN_BIND_H @@ -49,4 +37,4 @@ PYBIND11_OVERRIDE_REFERENCE_NAME(PYBIND11_TYPE(ret_type), PYBIND11_TYPE(cname), #fn, fn, __VA_ARGS__) /////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#endif \ No newline at end of file +#endif diff --git a/python/src/pybind11_datareader.h b/python/src/pybind11_datareader.h index 63b67ee47..b9f9e4a69 100644 --- a/python/src/pybind11_datareader.h +++ b/python/src/pybind11_datareader.h @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PYBIND11_NCNN_DATAREADER_H #define PYBIND11_NCNN_DATAREADER_H diff --git a/python/src/pybind11_layer.h b/python/src/pybind11_layer.h index a05fc1997..fe5f9c6e6 100644 --- a/python/src/pybind11_layer.h +++ b/python/src/pybind11_layer.h @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PYBIND11_NCNN_LAYER_H #define PYBIND11_NCNN_LAYER_H diff --git a/python/src/pybind11_mat.h b/python/src/pybind11_mat.h index 04663e829..b50d92e8f 100644 --- a/python/src/pybind11_mat.h +++ b/python/src/pybind11_mat.h @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PYBIND11_NCNN_MAT_H #define PYBIND11_NCNN_MAT_H diff --git a/python/src/pybind11_modelbin.h b/python/src/pybind11_modelbin.h index 32d4eb5d9..c9907aa34 100644 --- a/python/src/pybind11_modelbin.h +++ b/python/src/pybind11_modelbin.h @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PYBIND11_NCNN_MODELBIN_H #define PYBIND11_NCNN_MODELBIN_H diff --git a/python/tests/benchmark.py b/python/tests/benchmark.py index 0c8846a25..efe4dd634 100644 --- a/python/tests/benchmark.py +++ b/python/tests/benchmark.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import time diff --git a/python/tests/test_allocator.py b/python/tests/test_allocator.py index d2f4d5531..d5e288ebe 100644 --- a/python/tests/test_allocator.py +++ b/python/tests/test_allocator.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest diff --git a/python/tests/test_blob.py b/python/tests/test_blob.py index 1d0e96a93..433793d78 100644 --- a/python/tests/test_blob.py +++ b/python/tests/test_blob.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest diff --git a/python/tests/test_extractor.py b/python/tests/test_extractor.py index 219f258e2..333596122 100644 --- a/python/tests/test_extractor.py +++ b/python/tests/test_extractor.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest diff --git a/python/tests/test_mat.py b/python/tests/test_mat.py index 1a6870c06..160ea2604 100644 --- a/python/tests/test_mat.py +++ b/python/tests/test_mat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import sys import numpy as np diff --git a/python/tests/test_net.py b/python/tests/test_net.py index 362cc4791..db7e5df57 100644 --- a/python/tests/test_net.py +++ b/python/tests/test_net.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import numpy as np import pytest diff --git a/python/tests/test_option.py b/python/tests/test_option.py index 883bbc75a..840849b73 100644 --- a/python/tests/test_option.py +++ b/python/tests/test_option.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest diff --git a/python/tests/test_paramdict.py b/python/tests/test_paramdict.py index 8a7ce6892..121144b2c 100644 --- a/python/tests/test_paramdict.py +++ b/python/tests/test_paramdict.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest diff --git a/python/tests/test_vulkan_allocator.py b/python/tests/test_vulkan_allocator.py index 3146f80d1..67bafd484 100644 --- a/python/tests/test_vulkan_allocator.py +++ b/python/tests/test_vulkan_allocator.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest diff --git a/python/tests/test_vulkan_device.py b/python/tests/test_vulkan_device.py index b6e1d93e1..aa189e7a7 100644 --- a/python/tests/test_vulkan_device.py +++ b/python/tests/test_vulkan_device.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 261221104..cb7570a02 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -717,6 +717,13 @@ add_dependencies(ncnn ncnn-generate-spirv) if(NCNN_INSTALL_SDK) include(GNUInstallDirs) + include(CMakePackageConfigHelpers) + write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/ncnnConfigVersion.cmake + VERSION ${NCNN_VERSION} + COMPATIBILITY AnyNewerVersion + ) + install(TARGETS ncnn EXPORT ncnn ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} @@ -756,7 +763,10 @@ if(NCNN_INSTALL_SDK) ) install(EXPORT ncnn DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ncnn) configure_file(${CMAKE_CURRENT_LIST_DIR}/../cmake/ncnnConfig.cmake.in ncnnConfig.cmake @ONLY) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ncnnConfig.cmake DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ncnn) + install(FILES + ${CMAKE_CURRENT_BINARY_DIR}/ncnnConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/ncnnConfigVersion.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ncnn) # pkgconfig configure_file(ncnn.pc.in ${CMAKE_CURRENT_BINARY_DIR}/ncnn.pc @ONLY) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ncnn.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) diff --git a/src/allocator.cpp b/src/allocator.cpp index e036cc976..bf034ded3 100644 --- a/src/allocator.cpp +++ b/src/allocator.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "allocator.h" diff --git a/src/allocator.h b/src/allocator.h index e3e987ed4..7464e8641 100644 --- a/src/allocator.h +++ b/src/allocator.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_ALLOCATOR_H #define NCNN_ALLOCATOR_H diff --git a/src/benchmark.cpp b/src/benchmark.cpp index 49538faad..fe0ef161d 100644 --- a/src/benchmark.cpp +++ b/src/benchmark.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "benchmark.h" diff --git a/src/benchmark.h b/src/benchmark.h index ed42c1acb..5df5026e8 100644 --- a/src/benchmark.h +++ b/src/benchmark.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_BENCHMARK_H #define NCNN_BENCHMARK_H diff --git a/src/blob.cpp b/src/blob.cpp index dc4da0543..75469f20b 100644 --- a/src/blob.cpp +++ b/src/blob.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "blob.h" diff --git a/src/blob.h b/src/blob.h index c9f144fb1..212e71961 100644 --- a/src/blob.h +++ b/src/blob.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_BLOB_H #define NCNN_BLOB_H diff --git a/src/c_api.cpp b/src/c_api.cpp index 75cf6a664..c31381199 100644 --- a/src/c_api.cpp +++ b/src/c_api.cpp @@ -1,17 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "platform.h" diff --git a/src/c_api.h b/src/c_api.h index 141713f31..33fdc8f40 100644 --- a/src/c_api.h +++ b/src/c_api.h @@ -1,16 +1,5 @@ -/* Tencent is pleased to support the open source community by making ncnn available. - * - * Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. - * - * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at - * - * https://opensource.org/licenses/BSD-3-Clause - * - * Unless required by applicable law or agreed to in writing, software distributed - * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR - * CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. +/* Copyright 2020 Tencent + * SPDX-License-Identifier: BSD-3-Clause */ #ifndef NCNN_C_API_H diff --git a/src/command.cpp b/src/command.cpp index 27f037178..84d4f0e0b 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "command.h" diff --git a/src/command.h b/src/command.h index 8866f220c..9590bd316 100644 --- a/src/command.h +++ b/src/command.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_COMMAND_H #define NCNN_COMMAND_H diff --git a/src/convert_ycbcr.comp b/src/convert_ycbcr.comp index 4185f613a..d5e714f28 100644 --- a/src/convert_ycbcr.comp +++ b/src/convert_ycbcr.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/cpu.cpp b/src/cpu.cpp index b55dcae2a..e73e2fd98 100644 --- a/src/cpu.cpp +++ b/src/cpu.cpp @@ -160,7 +160,11 @@ __attribute__((constructor)) void ncnn_kmp_env_initializer() // and cpu core goes offline in powersave mode on android, which triggers abort // disable affinity capability, we handle thread affinity for openmp threads #if defined _WIN32 +#if _WIN32_WINNT >= 0x0600 _putenv_s("KMP_AFFINITY", "disabled"); +#else + _putenv("KMP_AFFINITY=disabled"); +#endif #else setenv("KMP_AFFINITY", "disabled", 1); #endif @@ -170,7 +174,11 @@ __attribute__((constructor)) void ncnn_kmp_env_initializer() // this happens when loading multiple libraries that are static linked openmp // just let it continue to work, it works well in most cases, at least it won't crash unexpectedly #if defined _WIN32 +#if _WIN32_WINNT >= 0x0600 _putenv_s("KMP_DUPLICATE_LIB_OK", "1"); +#else + _putenv("KMP_DUPLICATE_LIB_OK=1"); +#endif #else setenv("KMP_DUPLICATE_LIB_OK", "1", 1); #endif @@ -1769,8 +1777,7 @@ static void initialize_cpu_thread_affinity_mask(ncnn::CpuSet& mask_all, ncnn::Cp DWORD bufferSize = 0; glpie(RelationProcessorCore, NULL, &bufferSize); std::vector buffer(bufferSize); - if (!GetLogicalProcessorInformationEx(RelationProcessorCore, - (SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*)(buffer.data()), &bufferSize)) + if (!glpie(RelationProcessorCore, (SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX*)(buffer.data()), &bufferSize)) { NCNN_LOGE("GetLogicalProcessorInformationEx failed"); return; diff --git a/src/datareader.cpp b/src/datareader.cpp index 310049205..6acdcb0dd 100644 --- a/src/datareader.cpp +++ b/src/datareader.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "datareader.h" diff --git a/src/datareader.h b/src/datareader.h index ed2aba3c8..0161d7994 100644 --- a/src/datareader.h +++ b/src/datareader.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_DATAREADER_H #define NCNN_DATAREADER_H diff --git a/src/expression.cpp b/src/expression.cpp index 17c26ba24..ac27c899e 100644 --- a/src/expression.cpp +++ b/src/expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "expression.h" diff --git a/src/expression.h b/src/expression.h index 610647a43..194c7394e 100644 --- a/src/expression.h +++ b/src/expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" diff --git a/src/gpu.cpp b/src/gpu.cpp index a04f88076..00a711d09 100644 --- a/src/gpu.cpp +++ b/src/gpu.cpp @@ -1,21 +1,11 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gpu.h" #if NCNN_VULKAN +#include #include #include #include @@ -2025,6 +2015,79 @@ const std::vector& GpuInfo::queryCooperativeVec return d->queryCooperativeVectorSubPropertiesNV; } +void GpuInfo::get_optimal_cooperative_matrix_mnk(int M, int N, int K, VkComponentTypeKHR type, VkComponentTypeKHR acctype, VkScopeKHR scope, int& coopmat_M, int& coopmat_N, int& coopmat_K) const +{ + coopmat_M = 0; + coopmat_N = 0; + coopmat_K = 0; + + // collect mnk candidates + std::vector mnk_properties; + + if (d->support_VK_KHR_cooperative_matrix && d->queryCooperativeMatrixFeatures.cooperativeMatrix) + { + for (size_t i = 0; i < d->queryCooperativeMatrixSubProperties.size(); i++) + { + const VkCooperativeMatrixPropertiesKHR& cmp = d->queryCooperativeMatrixSubProperties[i]; + + if (cmp.AType == type && cmp.BType == type + && cmp.CType == acctype && cmp.ResultType == acctype + && cmp.scope == scope) + { + mnk_properties.push_back(cmp); + } + } + } + else if (d->support_VK_NV_cooperative_matrix && d->queryCooperativeMatrixFeaturesNV.cooperativeMatrix) + { + for (size_t i = 0; i < d->queryCooperativeMatrixSubPropertiesNV.size(); i++) + { + const VkCooperativeMatrixPropertiesNV& cmp = d->queryCooperativeMatrixSubPropertiesNV[i]; + + if (cmp.AType == (VkComponentTypeNV)type && cmp.BType == (VkComponentTypeNV)type + && cmp.CType == (VkComponentTypeNV)acctype && cmp.DType == (VkComponentTypeNV)acctype + && cmp.scope == (VkScopeNV)scope) + { + VkCooperativeMatrixPropertiesKHR cmp_khr; + cmp_khr.MSize = cmp.MSize; + cmp_khr.NSize = cmp.NSize; + cmp_khr.KSize = cmp.KSize; + + mnk_properties.push_back(cmp_khr); + } + } + } + + if (mnk_properties.empty() && (acctype == VK_COMPONENT_TYPE_FLOAT16_KHR || acctype == VK_COMPONENT_TYPE_BFLOAT16_KHR)) + { + // try acctype fp32 + return get_optimal_cooperative_matrix_mnk(M, N, K, type, VK_COMPONENT_TYPE_FLOAT32_KHR, scope, coopmat_M, coopmat_N, coopmat_K); + } + + if (mnk_properties.empty()) + return; + + // find the optimal, prefer the first mnk tuple with same cost + double min_cost = DBL_MAX; + for (size_t i = 0; i < mnk_properties.size(); i++) + { + const VkCooperativeMatrixPropertiesKHR& cmp = mnk_properties[i]; + + const int M_pad = (M + cmp.MSize - 1) / cmp.MSize * cmp.MSize; + const int N_pad = (N + cmp.NSize - 1) / cmp.NSize * cmp.NSize; + const int K_pad = (K + cmp.KSize - 1) / cmp.KSize * cmp.KSize; + + double cost = M_pad * N_pad * K_pad - M * N * K; + if (cost < min_cost) + { + min_cost = cost; + coopmat_M = cmp.MSize; + coopmat_N = cmp.NSize; + coopmat_K = cmp.KSize; + } + } +} + static int init_instance_core() { vkAllocateCommandBuffers = (PFN_vkAllocateCommandBuffers)vkGetInstanceProcAddr(g_instance, "vkAllocateCommandBuffers"); @@ -5306,7 +5369,7 @@ int compile_spirv_module(const char* comp_data, int comp_data_size, const Option #if ENABLE_VALIDATION_LAYER if (info.support_VK_KHR_shader_non_semantic_info()) { - device_defines.append("enable_validataion_layer", VK_TRUE); + device_defines.append("enable_validation_layer", VK_TRUE); custom_defines.append("NCNN_LOGE", "debugPrintfEXT"); } #endif diff --git a/src/gpu.h b/src/gpu.h index 333bb9c0e..7863b2e21 100644 --- a/src/gpu.h +++ b/src/gpu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_GPU_H #define NCNN_GPU_H @@ -392,6 +381,9 @@ public: const std::vector& queryCooperativeMatrixFlexibleDimensionsSubPropertiesNV() const; const std::vector& queryCooperativeVectorSubPropertiesNV() const; + // some utility functions + void get_optimal_cooperative_matrix_mnk(int M, int N, int K, VkComponentTypeKHR type, VkComponentTypeKHR acctype, VkScopeKHR scope, int& coopmat_M, int& coopmat_N, int& coopmat_K) const; + private: GpuInfo(const GpuInfo&); GpuInfo& operator=(const GpuInfo&); diff --git a/src/layer.cpp b/src/layer.cpp index 223ee9afd..f1b849dad 100644 --- a/src/layer.cpp +++ b/src/layer.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" diff --git a/src/layer.h b/src/layer.h index 6a600de46..5351de1c0 100644 --- a/src/layer.h +++ b/src/layer.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_LAYER_H #define NCNN_LAYER_H diff --git a/src/layer/absval.cpp b/src/layer/absval.cpp index 81660f42d..2f38d3520 100644 --- a/src/layer/absval.cpp +++ b/src/layer/absval.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "absval.h" diff --git a/src/layer/absval.h b/src/layer/absval.h index 39783e4d5..deb9540d0 100644 --- a/src/layer/absval.h +++ b/src/layer/absval.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ABSVAL_H #define LAYER_ABSVAL_H diff --git a/src/layer/argmax.cpp b/src/layer/argmax.cpp index 01908b396..66c601d24 100644 --- a/src/layer/argmax.cpp +++ b/src/layer/argmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "argmax.h" diff --git a/src/layer/argmax.h b/src/layer/argmax.h index 05d5ca401..d59ea874f 100644 --- a/src/layer/argmax.h +++ b/src/layer/argmax.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ARGMAX_H #define LAYER_ARGMAX_H diff --git a/src/layer/arm/absval_arm.cpp b/src/layer/arm/absval_arm.cpp index 71f6416cd..73c7e4563 100644 --- a/src/layer/arm/absval_arm.cpp +++ b/src/layer/arm/absval_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "absval_arm.h" diff --git a/src/layer/arm/absval_arm.h b/src/layer/arm/absval_arm.h index c1cea1dfb..b9eb4ff51 100644 --- a/src/layer/arm/absval_arm.h +++ b/src/layer/arm/absval_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ABSVAL_ARM_H #define LAYER_ABSVAL_ARM_H diff --git a/src/layer/arm/arm_activation.h b/src/layer/arm/arm_activation.h index 2a3f6595c..9e428733d 100644 --- a/src/layer/arm/arm_activation.h +++ b/src/layer/arm/arm_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef ARM_ACTIVATION_H #define ARM_ACTIVATION_H diff --git a/src/layer/arm/arm_usability.h b/src/layer/arm/arm_usability.h index be17249a2..4832188b0 100644 --- a/src/layer/arm/arm_usability.h +++ b/src/layer/arm/arm_usability.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef ARM_USABILITY_H #define ARM_USABILITY_H diff --git a/src/layer/arm/batchnorm_arm.cpp b/src/layer/arm/batchnorm_arm.cpp index 86427f6f5..139665a4d 100644 --- a/src/layer/arm/batchnorm_arm.cpp +++ b/src/layer/arm/batchnorm_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_arm.h" diff --git a/src/layer/arm/batchnorm_arm.h b/src/layer/arm/batchnorm_arm.h index 1393bb30e..533cc6aa6 100644 --- a/src/layer/arm/batchnorm_arm.h +++ b/src/layer/arm/batchnorm_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BATCHNORM_ARM_H #define LAYER_BATCHNORM_ARM_H diff --git a/src/layer/arm/batchnorm_arm_asimdhp.cpp b/src/layer/arm/batchnorm_arm_asimdhp.cpp index 565bbe69d..3ccc0c730 100644 --- a/src/layer/arm/batchnorm_arm_asimdhp.cpp +++ b/src/layer/arm/batchnorm_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_arm.h" diff --git a/src/layer/arm/bias_arm.cpp b/src/layer/arm/bias_arm.cpp index 9d3535a43..9422dafd5 100644 --- a/src/layer/arm/bias_arm.cpp +++ b/src/layer/arm/bias_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "bias_arm.h" diff --git a/src/layer/arm/bias_arm.h b/src/layer/arm/bias_arm.h index 5f08facf1..a883b5ad8 100644 --- a/src/layer/arm/bias_arm.h +++ b/src/layer/arm/bias_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BIAS_ARM_H #define LAYER_BIAS_ARM_H diff --git a/src/layer/arm/binaryop_arm.cpp b/src/layer/arm/binaryop_arm.cpp index 6ebea3e62..d90db5b93 100644 --- a/src/layer/arm/binaryop_arm.cpp +++ b/src/layer/arm/binaryop_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_arm.h" diff --git a/src/layer/arm/binaryop_arm.h b/src/layer/arm/binaryop_arm.h index 1337065eb..5039c6b76 100644 --- a/src/layer/arm/binaryop_arm.h +++ b/src/layer/arm/binaryop_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BINARYOP_ARM_H #define LAYER_BINARYOP_ARM_H diff --git a/src/layer/arm/binaryop_arm_asimdhp.cpp b/src/layer/arm/binaryop_arm_asimdhp.cpp index 12b129ba5..0860e2ac2 100644 --- a/src/layer/arm/binaryop_arm_asimdhp.cpp +++ b/src/layer/arm/binaryop_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_arm.h" diff --git a/src/layer/arm/cast_arm.cpp b/src/layer/arm/cast_arm.cpp index fd99dc02c..f028ad7e1 100644 --- a/src/layer/arm/cast_arm.cpp +++ b/src/layer/arm/cast_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cast_arm.h" diff --git a/src/layer/arm/cast_arm.h b/src/layer/arm/cast_arm.h index fc32c70d3..10c89eae4 100644 --- a/src/layer/arm/cast_arm.h +++ b/src/layer/arm/cast_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CAST_ARM_H #define LAYER_CAST_ARM_H diff --git a/src/layer/arm/cast_arm_bf16.cpp b/src/layer/arm/cast_arm_bf16.cpp index 358b9a9d2..18b68970a 100644 --- a/src/layer/arm/cast_arm_bf16.cpp +++ b/src/layer/arm/cast_arm_bf16.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/cast_arm_vfpv4.cpp b/src/layer/arm/cast_arm_vfpv4.cpp index 60f44bb5c..ce32854bb 100644 --- a/src/layer/arm/cast_arm_vfpv4.cpp +++ b/src/layer/arm/cast_arm_vfpv4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/cast_bf16.h b/src/layer/arm/cast_bf16.h index ab1966871..453ba7e8c 100644 --- a/src/layer/arm/cast_bf16.h +++ b/src/layer/arm/cast_bf16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM84BF16 && __aarch64__ && !__ARM_FEATURE_BF16_VECTOR_ARITHMETIC void cast_fp32_to_bf16_neon_bf16(const Mat& bottom_blob, Mat& top_blob, const Option& opt); diff --git a/src/layer/arm/cast_fp16.h b/src/layer/arm/cast_fp16.h index 7d5866d0a..929d4b58f 100644 --- a/src/layer/arm/cast_fp16.h +++ b/src/layer/arm/cast_fp16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_VFPV4 && __ARM_NEON && !(__ARM_FP & 2) void cast_fp32_to_fp16_neon_vfpv4(const Mat& bottom_blob, Mat& top_blob, const Option& opt); diff --git a/src/layer/arm/clip_arm.cpp b/src/layer/arm/clip_arm.cpp index 138a9d706..b622d1fb5 100644 --- a/src/layer/arm/clip_arm.cpp +++ b/src/layer/arm/clip_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "clip_arm.h" diff --git a/src/layer/arm/clip_arm.h b/src/layer/arm/clip_arm.h index ef281d249..b93ffb092 100644 --- a/src/layer/arm/clip_arm.h +++ b/src/layer/arm/clip_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CLIP_ARM_H #define LAYER_CLIP_ARM_H diff --git a/src/layer/arm/clip_arm_asimdhp.cpp b/src/layer/arm/clip_arm_asimdhp.cpp index 55040c3b6..fa9096c35 100644 --- a/src/layer/arm/clip_arm_asimdhp.cpp +++ b/src/layer/arm/clip_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "clip_arm.h" diff --git a/src/layer/arm/concat_arm.cpp b/src/layer/arm/concat_arm.cpp index 481bc13e4..bd20c00fa 100644 --- a/src/layer/arm/concat_arm.cpp +++ b/src/layer/arm/concat_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "concat_arm.h" diff --git a/src/layer/arm/concat_arm.h b/src/layer/arm/concat_arm.h index 9491a2801..06248a9f6 100644 --- a/src/layer/arm/concat_arm.h +++ b/src/layer/arm/concat_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONCAT_ARM_H #define LAYER_CONCAT_ARM_H diff --git a/src/layer/arm/convolution1d_arm.cpp b/src/layer/arm/convolution1d_arm.cpp index ec1df5146..398c3b78f 100644 --- a/src/layer/arm/convolution1d_arm.cpp +++ b/src/layer/arm/convolution1d_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_arm.h" diff --git a/src/layer/arm/convolution1d_arm.h b/src/layer/arm/convolution1d_arm.h index 48babb914..9ede63c95 100644 --- a/src/layer/arm/convolution1d_arm.h +++ b/src/layer/arm/convolution1d_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION1D_ARM_H #define LAYER_CONVOLUTION1D_ARM_H diff --git a/src/layer/arm/convolution1d_arm_asimdhp.cpp b/src/layer/arm/convolution1d_arm_asimdhp.cpp index cb6336d01..f8bc5da29 100644 --- a/src/layer/arm/convolution1d_arm_asimdhp.cpp +++ b/src/layer/arm/convolution1d_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_arm.h" diff --git a/src/layer/arm/convolution1d_packed.h b/src/layer/arm/convolution1d_packed.h index 7b4874135..3577a35c7 100644 --- a/src/layer/arm/convolution1d_packed.h +++ b/src/layer/arm/convolution1d_packed.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution1d_transform_kernel_packed(const Mat& kernel, Mat& kernel_tm, int inh, int outh, int kernel_w) { diff --git a/src/layer/arm/convolution1d_packed_bf16s.h b/src/layer/arm/convolution1d_packed_bf16s.h index 8f626b578..e5122f615 100644 --- a/src/layer/arm/convolution1d_packed_bf16s.h +++ b/src/layer/arm/convolution1d_packed_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution1d_transform_kernel_packed_bf16s(const Mat& kernel, Mat& kernel_tm, int inh, int outh, int kernel_w) { diff --git a/src/layer/arm/convolution1d_packed_fp16s.h b/src/layer/arm/convolution1d_packed_fp16s.h index 7b0c3e497..f3fec50a8 100644 --- a/src/layer/arm/convolution1d_packed_fp16s.h +++ b/src/layer/arm/convolution1d_packed_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution1d_transform_kernel_packed_fp16s(const Mat& kernel, Mat& kernel_tm, int inh, int outh, int kernel_w) { diff --git a/src/layer/arm/convolution_1x1.h b/src/layer/arm/convolution_1x1.h index 727cf17f4..11bdfa511 100644 --- a/src/layer/arm/convolution_1x1.h +++ b/src/layer/arm/convolution_1x1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_2x2.h b/src/layer/arm/convolution_2x2.h index 2bedf4bfd..5921c9c74 100644 --- a/src/layer/arm/convolution_2x2.h +++ b/src/layer/arm/convolution_2x2.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv2x2s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3.h b/src/layer/arm/convolution_3x3.h index aa2350541..a1f0d0d57 100644 --- a/src/layer/arm/convolution_3x3.h +++ b/src/layer/arm/convolution_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_int8.h b/src/layer/arm/convolution_3x3_int8.h index 1868b5d68..32d9b7a20 100644 --- a/src/layer/arm/convolution_3x3_int8.h +++ b/src/layer/arm/convolution_3x3_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s2_transform_kernel_int8_neon(const Mat& _kernel, Mat& kernel_tm, int inch, int outch) { diff --git a/src/layer/arm/convolution_3x3_pack1to4.h b/src/layer/arm/convolution_3x3_pack1to4.h index e1e452a9b..a77a2f3f2 100644 --- a/src/layer/arm/convolution_3x3_pack1to4.h +++ b/src/layer/arm/convolution_3x3_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to4_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack1to4_bf16s.h b/src/layer/arm/convolution_3x3_pack1to4_bf16s.h index cf5997753..9affc7752 100644 --- a/src/layer/arm/convolution_3x3_pack1to4_bf16s.h +++ b/src/layer/arm/convolution_3x3_pack1to4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack1to4_fp16s.h b/src/layer/arm/convolution_3x3_pack1to4_fp16s.h index f8a055cd6..5006d1301 100644 --- a/src/layer/arm/convolution_3x3_pack1to4_fp16s.h +++ b/src/layer/arm/convolution_3x3_pack1to4_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to4_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack1to8_fp16s.h b/src/layer/arm/convolution_3x3_pack1to8_fp16s.h index 40e276cde..62b9f4fe4 100644 --- a/src/layer/arm/convolution_3x3_pack1to8_fp16s.h +++ b/src/layer/arm/convolution_3x3_pack1to8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to8_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack4.h b/src/layer/arm/convolution_3x3_pack4.h index 5255d1623..6cae44593 100644 --- a/src/layer/arm/convolution_3x3_pack4.h +++ b/src/layer/arm/convolution_3x3_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s2_pack4_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack4_bf16s.h b/src/layer/arm/convolution_3x3_pack4_bf16s.h index 9f47aa4cb..fdd8ab285 100644 --- a/src/layer/arm/convolution_3x3_pack4_bf16s.h +++ b/src/layer/arm/convolution_3x3_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s2_pack4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack4_fp16s.h b/src/layer/arm/convolution_3x3_pack4_fp16s.h index 52ef02718..959e7f2b7 100644 --- a/src/layer/arm/convolution_3x3_pack4_fp16s.h +++ b/src/layer/arm/convolution_3x3_pack4_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack4_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack4to1.h b/src/layer/arm/convolution_3x3_pack4to1.h index 206a93bde..20b99f2d3 100644 --- a/src/layer/arm/convolution_3x3_pack4to1.h +++ b/src/layer/arm/convolution_3x3_pack4to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack4to1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_pack8_fp16s.h b/src/layer/arm/convolution_3x3_pack8_fp16s.h index fb4480bc4..06cf0f960 100644 --- a/src/layer/arm/convolution_3x3_pack8_fp16s.h +++ b/src/layer/arm/convolution_3x3_pack8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack8_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_3x3_winograd.h b/src/layer/arm/convolution_3x3_winograd.h index 56277f039..03491471e 100644 --- a/src/layer/arm/convolution_3x3_winograd.h +++ b/src/layer/arm/convolution_3x3_winograd.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd_pack_A_tile(const Mat& A, Mat& AT, int batch, int max_ii, int max_kk) { @@ -4686,7 +4675,7 @@ static inline void conv3x3s1_winograd23_transform_input_tile(const Mat& bottom_b const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w - 1) / 2; @@ -5185,7 +5174,7 @@ static inline void conv3x3s1_winograd23_transform_output_tile(const Mat& top_til const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 1) / 2; @@ -5830,7 +5819,7 @@ static inline void conv3x3s1_winograd43_transform_input_tile(const Mat& bottom_b const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 1) / 4; @@ -6631,7 +6620,7 @@ static inline void conv3x3s1_winograd43_transform_output_tile(const Mat& top_til const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 3) / 4; @@ -7517,7 +7506,7 @@ static inline void conv3x3s1_winograd63_transform_input_tile(const Mat& bottom_b const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 3) / 6; @@ -8483,7 +8472,7 @@ static inline void conv3x3s1_winograd63_transform_output_tile(const Mat& top_til const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 5) / 6; diff --git a/src/layer/arm/convolution_3x3_winograd_bf16s.h b/src/layer/arm/convolution_3x3_winograd_bf16s.h index 79debb126..369c9bede 100644 --- a/src/layer/arm/convolution_3x3_winograd_bf16s.h +++ b/src/layer/arm/convolution_3x3_winograd_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static inline void conv3x3s1_winograd23_transform_input_tile_bf16s(const Mat& bottom_blob, Mat& B, int j, int max_jj, int k, int max_kk, int nT) { @@ -24,7 +13,7 @@ static inline void conv3x3s1_winograd23_transform_input_tile_bf16s(const Mat& bo const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w - 1) / 2; @@ -525,7 +514,7 @@ static inline void conv3x3s1_winograd23_transform_output_tile_bf16s(const Mat& t const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 1) / 2; @@ -1066,7 +1055,7 @@ static inline void conv3x3s1_winograd43_transform_input_tile_bf16s(const Mat& bo const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 1) / 4; @@ -1869,7 +1858,7 @@ static inline void conv3x3s1_winograd43_transform_output_tile_bf16s(const Mat& t const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 3) / 4; @@ -2645,7 +2634,7 @@ static inline void conv3x3s1_winograd63_transform_input_tile_bf16s(const Mat& bo const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 3) / 6; @@ -3615,7 +3604,7 @@ static inline void conv3x3s1_winograd63_transform_output_tile_bf16s(const Mat& t const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 5) / 6; diff --git a/src/layer/arm/convolution_3x3_winograd_fp16s.h b/src/layer/arm/convolution_3x3_winograd_fp16s.h index 97b1a1dd8..58ddade29 100644 --- a/src/layer/arm/convolution_3x3_winograd_fp16s.h +++ b/src/layer/arm/convolution_3x3_winograd_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd_pack_A_tile_fp16(const Mat& A, Mat& AT, int batch, int max_ii, int max_kk) { diff --git a/src/layer/arm/convolution_3x3_winograd_int8.h b/src/layer/arm/convolution_3x3_winograd_int8.h index ec533b131..d7edc1a84 100644 --- a/src/layer/arm/convolution_3x3_winograd_int8.h +++ b/src/layer/arm/convolution_3x3_winograd_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pack_A_tile_int8(const Mat& A, Mat& AT, int batch, int max_ii, int max_kk) { @@ -3637,7 +3626,7 @@ static inline void conv3x3s1_winograd23_transform_input_tile_int8(const Mat& bot const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w - 1) / 2; @@ -3930,7 +3919,7 @@ static inline void conv3x3s1_winograd23_transform_output_tile_int8(const Mat& to const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 1) / 2; @@ -4495,7 +4484,7 @@ static inline void conv3x3s1_winograd43_transform_input_tile_int8(const Mat& bot const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 1) / 4; @@ -4907,7 +4896,7 @@ static inline void conv3x3s1_winograd43_transform_output_tile_int8(const Mat& to const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 3) / 4; diff --git a/src/layer/arm/convolution_4x4.h b/src/layer/arm/convolution_4x4.h index 93507ccad..ab98f7fa9 100644 --- a/src/layer/arm/convolution_4x4.h +++ b/src/layer/arm/convolution_4x4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv4x4s4_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_5x5.h b/src/layer/arm/convolution_5x5.h index 93529fe24..073684d3e 100644 --- a/src/layer/arm/convolution_5x5.h +++ b/src/layer/arm/convolution_5x5.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv5x5s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_5x5_pack4.h b/src/layer/arm/convolution_5x5_pack4.h index 96981b46a..3d1a0a22a 100644 --- a/src/layer/arm/convolution_5x5_pack4.h +++ b/src/layer/arm/convolution_5x5_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv5x5s1_pack4_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_5x5_pack4_bf16s.h b/src/layer/arm/convolution_5x5_pack4_bf16s.h index 18e8eaebb..a0a7beb64 100644 --- a/src/layer/arm/convolution_5x5_pack4_bf16s.h +++ b/src/layer/arm/convolution_5x5_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv5x5s1_pack4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_5x5_pack8_fp16s.h b/src/layer/arm/convolution_5x5_pack8_fp16s.h index 69e6564b3..5392d7b48 100644 --- a/src/layer/arm/convolution_5x5_pack8_fp16s.h +++ b/src/layer/arm/convolution_5x5_pack8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv5x5s1_pack8_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_7x7.h b/src/layer/arm/convolution_7x7.h index d5448d927..5f9d4ea67 100644 --- a/src/layer/arm/convolution_7x7.h +++ b/src/layer/arm/convolution_7x7.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_7x7_pack1to4.h b/src/layer/arm/convolution_7x7_pack1to4.h index 5744d499e..5611dcfeb 100644 --- a/src/layer/arm/convolution_7x7_pack1to4.h +++ b/src/layer/arm/convolution_7x7_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s2_pack1to4_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_7x7_pack1to4_bf16s.h b/src/layer/arm/convolution_7x7_pack1to4_bf16s.h index 3ffd6b411..a45c09873 100644 --- a/src/layer/arm/convolution_7x7_pack1to4_bf16s.h +++ b/src/layer/arm/convolution_7x7_pack1to4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s2_pack1to4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_7x7_pack1to8_fp16s.h b/src/layer/arm/convolution_7x7_pack1to8_fp16s.h index 7af4135a6..3acf410d5 100644 --- a/src/layer/arm/convolution_7x7_pack1to8_fp16s.h +++ b/src/layer/arm/convolution_7x7_pack1to8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s2_pack1to8_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolution_arm.cpp b/src/layer/arm/convolution_arm.cpp index 5ac06602f..b0948e290 100644 --- a/src/layer/arm/convolution_arm.cpp +++ b/src/layer/arm/convolution_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_arm.h" diff --git a/src/layer/arm/convolution_arm.h b/src/layer/arm/convolution_arm.h index e25f509c7..8ec2d9075 100644 --- a/src/layer/arm/convolution_arm.h +++ b/src/layer/arm/convolution_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION_ARM_H #define LAYER_CONVOLUTION_ARM_H diff --git a/src/layer/arm/convolution_arm_asimddp.cpp b/src/layer/arm/convolution_arm_asimddp.cpp index d600e1b06..50abcefe5 100644 --- a/src/layer/arm/convolution_arm_asimddp.cpp +++ b/src/layer/arm/convolution_arm_asimddp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/convolution_arm_asimdhp.cpp b/src/layer/arm/convolution_arm_asimdhp.cpp index c7762020e..f3bd42415 100644 --- a/src/layer/arm/convolution_arm_asimdhp.cpp +++ b/src/layer/arm/convolution_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_arm.h" diff --git a/src/layer/arm/convolution_arm_i8mm.cpp b/src/layer/arm/convolution_arm_i8mm.cpp index 0bfe3c65c..3488e586d 100644 --- a/src/layer/arm/convolution_arm_i8mm.cpp +++ b/src/layer/arm/convolution_arm_i8mm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/convolution_im2col_gemm.h b/src/layer/arm/convolution_im2col_gemm.h index 25a3e94d7..f99d4215e 100644 --- a/src/layer/arm/convolution_im2col_gemm.h +++ b/src/layer/arm/convolution_im2col_gemm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_im2col_pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { @@ -191,7 +180,7 @@ static void convolution_gemm_transB_packed_tile(const Mat& AT_tile, const Mat& B // NCNN_LOGE("convolution_gemm_transB_packed_tile %d %d %d %d %d %d", i, max_ii, j, max_jj, k, max_kk); const int out_elempack = top_blob.elempack; - const int out_hstep = (int)top_blob.cstep; + const size_t out_hstep = top_blob.cstep; const float* pAT = AT_tile; const float* pBT = BT_tile; diff --git a/src/layer/arm/convolution_im2col_gemm_bf16s.h b/src/layer/arm/convolution_im2col_gemm_bf16s.h index 95819e2d6..da0d7fc94 100644 --- a/src/layer/arm/convolution_im2col_gemm_bf16s.h +++ b/src/layer/arm/convolution_im2col_gemm_bf16s.h @@ -1,23 +1,12 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_gemm_transB_packed_tile_bf16s(const Mat& AT_tile, const Mat& BT_tile, const Mat& CT_tile, Mat& topT_tile, Mat& top_blob, int i, int max_ii, int j, int max_jj, int k, int max_kk, bool k_end, int use_a53_a55_optimized_kernel) { // NCNN_LOGE("convolution_gemm_transB_packed_tile_bf16s %d %d %d %d %d %d", i, max_ii, j, max_jj, k, max_kk); const int out_elempack = top_blob.elempack; - const int out_hstep = (int)top_blob.cstep; + const size_t out_hstep = top_blob.cstep; const unsigned short* pAT = AT_tile; const unsigned short* pBT = BT_tile; diff --git a/src/layer/arm/convolution_im2col_gemm_bf16s_fp16s.h b/src/layer/arm/convolution_im2col_gemm_bf16s_fp16s.h index aedec0244..f95386d6d 100644 --- a/src/layer/arm/convolution_im2col_gemm_bf16s_fp16s.h +++ b/src/layer/arm/convolution_im2col_gemm_bf16s_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_im2col_pack_A_tile_bf16_fp16(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { diff --git a/src/layer/arm/convolution_im2col_gemm_fp16s.h b/src/layer/arm/convolution_im2col_gemm_fp16s.h index 8e499b3e7..315262002 100644 --- a/src/layer/arm/convolution_im2col_gemm_fp16s.h +++ b/src/layer/arm/convolution_im2col_gemm_fp16s.h @@ -1,23 +1,12 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_gemm_transB_packed_tile_fp16sa(const Mat& AT_tile, const Mat& BT_tile, const Mat& CT_tile, Mat& topT_tile, Mat& top_blob, int i, int max_ii, int j, int max_jj, int k, int max_kk, bool k_end, int use_a53_a55_optimized_kernel) { // NCNN_LOGE("convolution_gemm_transB_packed_tile_fp16sa %d %d %d %d %d %d", i, max_ii, j, max_jj, k, max_kk); const int out_elempack = top_blob.elempack; - const int out_hstep = (int)top_blob.cstep; + const size_t out_hstep = top_blob.cstep; const __fp16* pAT = AT_tile; const __fp16* pBT = BT_tile; diff --git a/src/layer/arm/convolution_im2col_gemm_int8.h b/src/layer/arm/convolution_im2col_gemm_int8.h index 4240d04e1..a246e7133 100644 --- a/src/layer/arm/convolution_im2col_gemm_int8.h +++ b/src/layer/arm/convolution_im2col_gemm_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM84I8MM && __aarch64__ && !__ARM_FEATURE_MATMUL_INT8 void convolution_im2col_gemm_transform_kernel_int8_i8mm(const Mat& kernel, Mat& AT, int inch, int outch, int kernel_w, int kernel_h, const Option& opt); diff --git a/src/layer/arm/convolution_packed.h b/src/layer/arm/convolution_packed.h index 0be5c1d42..0c3d1d17c 100644 --- a/src/layer/arm/convolution_packed.h +++ b/src/layer/arm/convolution_packed.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_transform_kernel_packed(const Mat& kernel, Mat& kernel_tm, int inch, int outch, int kernel_w, int kernel_h) { @@ -510,14 +499,14 @@ static void convolution_packed(const Mat& bottom_blob, Mat& top_blob, const Mat& const int elempack = bottom_blob.elempack; const int inch = bottom_blob.c * elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; const int outch = top_blob.c * out_elempack; - const int M = top_blob.cstep * out_elempack; + const size_t M = top_blob.cstep * out_elempack; const int maxk = kernel_w * kernel_h; diff --git a/src/layer/arm/convolution_packed_bf16s.h b/src/layer/arm/convolution_packed_bf16s.h index b4000da95..90e4529ec 100644 --- a/src/layer/arm/convolution_packed_bf16s.h +++ b/src/layer/arm/convolution_packed_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_transform_kernel_packed_bf16s(const Mat& kernel, Mat& kernel_tm, int inch, int outch, int kernel_w, int kernel_h) { @@ -510,14 +499,14 @@ static void convolution_packed_bf16s(const Mat& bottom_blob, Mat& top_blob, cons const int elempack = bottom_blob.elempack; const int inch = bottom_blob.c * elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; const int outch = top_blob.c * out_elempack; - const int M = top_blob.cstep * out_elempack; + const size_t M = top_blob.cstep * out_elempack; const int maxk = kernel_w * kernel_h; diff --git a/src/layer/arm/convolution_packed_fp16s.h b/src/layer/arm/convolution_packed_fp16s.h index d565fb23f..a211a6fce 100644 --- a/src/layer/arm/convolution_packed_fp16s.h +++ b/src/layer/arm/convolution_packed_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_transform_kernel_packed_fp16s(const Mat& kernel, Mat& kernel_tm, int inch, int outch, int kernel_w, int kernel_h) { @@ -459,14 +448,14 @@ static void convolution_packed_fp16s(const Mat& bottom_blob, Mat& top_blob, cons const int elempack = bottom_blob.elempack; const int inch = bottom_blob.c * elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; const int outch = top_blob.c * out_elempack; - const int M = top_blob.cstep * out_elempack; + const size_t M = top_blob.cstep * out_elempack; const int maxk = kernel_w * kernel_h; @@ -1234,14 +1223,14 @@ static void convolution_packed_fp16sa(const Mat& bottom_blob, Mat& top_blob, con const int elempack = bottom_blob.elempack; const int inch = bottom_blob.c * elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; const int outch = top_blob.c * out_elempack; - const int M = top_blob.cstep * out_elempack; + const size_t M = top_blob.cstep * out_elempack; const int maxk = kernel_w * kernel_h; diff --git a/src/layer/arm/convolution_packed_int8.h b/src/layer/arm/convolution_packed_int8.h index 897b19ab3..b9c12a8a3 100644 --- a/src/layer/arm/convolution_packed_int8.h +++ b/src/layer/arm/convolution_packed_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM84I8MM && __aarch64__ && !__ARM_FEATURE_MATMUL_INT8 void convolution_transform_kernel_packed_int8_i8mm(const Mat& kernel, Mat& kernel_tm, int inch, int outch, int kernel_w, int kernel_h); @@ -547,7 +536,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const const int elempack = bottom_blob.elempack; const int inch = bottom_blob.c * elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int outw = top_blob.w; const int outh = top_blob.h; @@ -587,8 +576,8 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const // shadowed variable for less openmp task args const int outw = top_blob.w; const int outh = top_blob.h; - const int N = bottom_blob.cstep * elempack; - const int M = top_blob.cstep * out_elempack; + const size_t N = bottom_blob.cstep * elempack; + const size_t M = top_blob.cstep * out_elempack; int* outptr = top_blob.channel(p / out_elempack); @@ -919,8 +908,8 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const // shadowed variable for less openmp task args const int outw = top_blob.w; const int outh = top_blob.h; - const int N = bottom_blob.cstep * elempack; - const int M = top_blob.cstep * out_elempack; + const size_t N = bottom_blob.cstep * elempack; + const size_t M = top_blob.cstep * out_elempack; int* outptr = top_blob.channel(p / out_elempack); @@ -1178,7 +1167,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const // shadowed variable for less openmp task args const int outw = top_blob.w; const int outh = top_blob.h; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; int* outptr0 = top_blob.channel(p); int* outptr1 = top_blob.channel(p + 1); diff --git a/src/layer/arm/convolutiondepthwise_3x3.h b/src/layer/arm/convolutiondepthwise_3x3.h index 8260d80eb..0f574e576 100644 --- a/src/layer/arm/convolutiondepthwise_3x3.h +++ b/src/layer/arm/convolutiondepthwise_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_3x3_fp16s.h b/src/layer/arm/convolutiondepthwise_3x3_fp16s.h index 118914c98..04585ca59 100644 --- a/src/layer/arm/convolutiondepthwise_3x3_fp16s.h +++ b/src/layer/arm/convolutiondepthwise_3x3_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_3x3_int8.h b/src/layer/arm/convolutiondepthwise_3x3_int8.h index 1d7dd1b7d..e5072ad3d 100644 --- a/src/layer/arm/convolutiondepthwise_3x3_int8.h +++ b/src/layer/arm/convolutiondepthwise_3x3_int8.h @@ -1,16 +1,5 @@ -// BUG1989 is pleased to support the open source community by supporting ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_int8_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_3x3_pack4.h b/src/layer/arm/convolutiondepthwise_3x3_pack4.h index c3089111d..66dcba36a 100644 --- a/src/layer/arm/convolutiondepthwise_3x3_pack4.h +++ b/src/layer/arm/convolutiondepthwise_3x3_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack4_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_3x3_pack4_bf16s.h b/src/layer/arm/convolutiondepthwise_3x3_pack4_bf16s.h index 8c778132a..38e9dbc72 100644 --- a/src/layer/arm/convolutiondepthwise_3x3_pack4_bf16s.h +++ b/src/layer/arm/convolutiondepthwise_3x3_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_3x3_pack8_fp16s.h b/src/layer/arm/convolutiondepthwise_3x3_pack8_fp16s.h index 05ca6af90..cf6e7a747 100644 --- a/src/layer/arm/convolutiondepthwise_3x3_pack8_fp16s.h +++ b/src/layer/arm/convolutiondepthwise_3x3_pack8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack8_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_3x3_pack8_int8.h b/src/layer/arm/convolutiondepthwise_3x3_pack8_int8.h index 47714a431..44cfcdcaa 100644 --- a/src/layer/arm/convolutiondepthwise_3x3_pack8_int8.h +++ b/src/layer/arm/convolutiondepthwise_3x3_pack8_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack8_int8_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_5x5.h b/src/layer/arm/convolutiondepthwise_5x5.h index ef9b1e784..06721ed81 100644 --- a/src/layer/arm/convolutiondepthwise_5x5.h +++ b/src/layer/arm/convolutiondepthwise_5x5.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_5x5_pack4.h b/src/layer/arm/convolutiondepthwise_5x5_pack4.h index 6f9ab51dc..78f6a91c7 100644 --- a/src/layer/arm/convolutiondepthwise_5x5_pack4.h +++ b/src/layer/arm/convolutiondepthwise_5x5_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack4_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_5x5_pack4_bf16s.h b/src/layer/arm/convolutiondepthwise_5x5_pack4_bf16s.h index f65c3ab53..f8d19b4fe 100644 --- a/src/layer/arm/convolutiondepthwise_5x5_pack4_bf16s.h +++ b/src/layer/arm/convolutiondepthwise_5x5_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_5x5_pack8_fp16s.h b/src/layer/arm/convolutiondepthwise_5x5_pack8_fp16s.h index 81e0a1994..6acc738ea 100644 --- a/src/layer/arm/convolutiondepthwise_5x5_pack8_fp16s.h +++ b/src/layer/arm/convolutiondepthwise_5x5_pack8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack8_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/convolutiondepthwise_arm.cpp b/src/layer/arm/convolutiondepthwise_arm.cpp index 4aa1bba31..3f9b45db8 100644 --- a/src/layer/arm/convolutiondepthwise_arm.cpp +++ b/src/layer/arm/convolutiondepthwise_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_arm.h" diff --git a/src/layer/arm/convolutiondepthwise_arm.h b/src/layer/arm/convolutiondepthwise_arm.h index 8536c0813..31689a656 100644 --- a/src/layer/arm/convolutiondepthwise_arm.h +++ b/src/layer/arm/convolutiondepthwise_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE_ARM_H #define LAYER_CONVOLUTIONDEPTHWISE_ARM_H diff --git a/src/layer/arm/convolutiondepthwise_arm_asimdhp.cpp b/src/layer/arm/convolutiondepthwise_arm_asimdhp.cpp index c21e32e45..e4531178a 100644 --- a/src/layer/arm/convolutiondepthwise_arm_asimdhp.cpp +++ b/src/layer/arm/convolutiondepthwise_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_arm.h" diff --git a/src/layer/arm/crop_arm.cpp b/src/layer/arm/crop_arm.cpp index e1b38cd8d..af6d0e388 100644 --- a/src/layer/arm/crop_arm.cpp +++ b/src/layer/arm/crop_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "crop_arm.h" diff --git a/src/layer/arm/crop_arm.h b/src/layer/arm/crop_arm.h index 9f2bea6e1..902641cc6 100644 --- a/src/layer/arm/crop_arm.h +++ b/src/layer/arm/crop_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CROP_ARM_H #define LAYER_CROP_ARM_H diff --git a/src/layer/arm/deconvolution_3x3.h b/src/layer/arm/deconvolution_3x3.h index 30df240f2..bbddd91c6 100644 --- a/src/layer/arm/deconvolution_3x3.h +++ b/src/layer/arm/deconvolution_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconv3x3s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/deconvolution_4x4.h b/src/layer/arm/deconvolution_4x4.h index 4d1c5d828..95d584725 100644 --- a/src/layer/arm/deconvolution_4x4.h +++ b/src/layer/arm/deconvolution_4x4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconv4x4s1_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/deconvolution_4x4_fp16s.h b/src/layer/arm/deconvolution_4x4_fp16s.h index 03e1d5f3b..9bee222a2 100644 --- a/src/layer/arm/deconvolution_4x4_fp16s.h +++ b/src/layer/arm/deconvolution_4x4_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconv4x4s2_fp16sa_neon(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/arm/deconvolution_arm.cpp b/src/layer/arm/deconvolution_arm.cpp index e4d5c1715..a7592bcde 100644 --- a/src/layer/arm/deconvolution_arm.cpp +++ b/src/layer/arm/deconvolution_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_arm.h" diff --git a/src/layer/arm/deconvolution_arm.h b/src/layer/arm/deconvolution_arm.h index b4cdcbe0e..7718ec7b3 100644 --- a/src/layer/arm/deconvolution_arm.h +++ b/src/layer/arm/deconvolution_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION_ARM_H #define LAYER_DECONVOLUTION_ARM_H diff --git a/src/layer/arm/deconvolution_arm_asimdhp.cpp b/src/layer/arm/deconvolution_arm_asimdhp.cpp index 69bee4d79..91ea4f751 100644 --- a/src/layer/arm/deconvolution_arm_asimdhp.cpp +++ b/src/layer/arm/deconvolution_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_arm.h" diff --git a/src/layer/arm/deconvolutiondepthwise_arm.cpp b/src/layer/arm/deconvolutiondepthwise_arm.cpp index 7baf4f720..edbaf4069 100644 --- a/src/layer/arm/deconvolutiondepthwise_arm.cpp +++ b/src/layer/arm/deconvolutiondepthwise_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_arm.h" diff --git a/src/layer/arm/deconvolutiondepthwise_arm.h b/src/layer/arm/deconvolutiondepthwise_arm.h index a7ef393dd..3a69541d3 100644 --- a/src/layer/arm/deconvolutiondepthwise_arm.h +++ b/src/layer/arm/deconvolutiondepthwise_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE_ARM_H #define LAYER_DECONVOLUTIONDEPTHWISE_ARM_H diff --git a/src/layer/arm/deconvolutiondepthwise_arm_asimdhp.cpp b/src/layer/arm/deconvolutiondepthwise_arm_asimdhp.cpp index 8e8f274f7..f08168f1a 100644 --- a/src/layer/arm/deconvolutiondepthwise_arm_asimdhp.cpp +++ b/src/layer/arm/deconvolutiondepthwise_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_arm.h" diff --git a/src/layer/arm/dequantize_arm.cpp b/src/layer/arm/dequantize_arm.cpp index f23a51519..66a473543 100644 --- a/src/layer/arm/dequantize_arm.cpp +++ b/src/layer/arm/dequantize_arm.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// Copyright 2019 BUG1989 +// SPDX-License-Identifier: BSD-3-Clause #include "dequantize_arm.h" diff --git a/src/layer/arm/dequantize_arm.h b/src/layer/arm/dequantize_arm.h index e9e854c8c..ec713ae88 100644 --- a/src/layer/arm/dequantize_arm.h +++ b/src/layer/arm/dequantize_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEQUANTIZE_ARM_H #define LAYER_DEQUANTIZE_ARM_H diff --git a/src/layer/arm/dequantize_arm_asimdhp.cpp b/src/layer/arm/dequantize_arm_asimdhp.cpp index 18404104c..08206a893 100644 --- a/src/layer/arm/dequantize_arm_asimdhp.cpp +++ b/src/layer/arm/dequantize_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dequantize_arm.h" diff --git a/src/layer/arm/dropout_arm.cpp b/src/layer/arm/dropout_arm.cpp index f355c8856..5cb0ed8e5 100644 --- a/src/layer/arm/dropout_arm.cpp +++ b/src/layer/arm/dropout_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dropout_arm.h" diff --git a/src/layer/arm/dropout_arm.h b/src/layer/arm/dropout_arm.h index 9a970525a..8922ea0dc 100644 --- a/src/layer/arm/dropout_arm.h +++ b/src/layer/arm/dropout_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DROPOUT_ARM_H #define LAYER_DROPOUT_ARM_H diff --git a/src/layer/arm/eltwise_arm.cpp b/src/layer/arm/eltwise_arm.cpp index 38517ebb7..cc04ba9bd 100644 --- a/src/layer/arm/eltwise_arm.cpp +++ b/src/layer/arm/eltwise_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_arm.h" diff --git a/src/layer/arm/eltwise_arm.h b/src/layer/arm/eltwise_arm.h index 6bd91f5da..0470d19ac 100644 --- a/src/layer/arm/eltwise_arm.h +++ b/src/layer/arm/eltwise_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELTWISE_ARM_H #define LAYER_ELTWISE_ARM_H diff --git a/src/layer/arm/eltwise_arm_asimdhp.cpp b/src/layer/arm/eltwise_arm_asimdhp.cpp index 0d9cb62ac..482a96fa5 100644 --- a/src/layer/arm/eltwise_arm_asimdhp.cpp +++ b/src/layer/arm/eltwise_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_arm.h" diff --git a/src/layer/arm/flatten_arm.cpp b/src/layer/arm/flatten_arm.cpp index 375e3e60f..12dd800c8 100644 --- a/src/layer/arm/flatten_arm.cpp +++ b/src/layer/arm/flatten_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "flatten_arm.h" diff --git a/src/layer/arm/flatten_arm.h b/src/layer/arm/flatten_arm.h index 9bc9a0d1b..7423379e5 100644 --- a/src/layer/arm/flatten_arm.h +++ b/src/layer/arm/flatten_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FLATTEN_ARM_H #define LAYER_FLATTEN_ARM_H diff --git a/src/layer/arm/gelu_arm.cpp b/src/layer/arm/gelu_arm.cpp index 80d4efba0..d3b074ec7 100644 --- a/src/layer/arm/gelu_arm.cpp +++ b/src/layer/arm/gelu_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gelu_arm.h" diff --git a/src/layer/arm/gelu_arm.h b/src/layer/arm/gelu_arm.h index 5be9fc4d6..9b61ca420 100644 --- a/src/layer/arm/gelu_arm.h +++ b/src/layer/arm/gelu_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GELU_ARM_H #define LAYER_GELU_ARM_H diff --git a/src/layer/arm/gelu_arm_asimdhp.cpp b/src/layer/arm/gelu_arm_asimdhp.cpp index 0b4b59ab5..635dbc587 100644 --- a/src/layer/arm/gelu_arm_asimdhp.cpp +++ b/src/layer/arm/gelu_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gelu_arm.h" diff --git a/src/layer/arm/gemm_arm.cpp b/src/layer/arm/gemm_arm.cpp index 09f25869f..7e5f07131 100644 --- a/src/layer/arm/gemm_arm.cpp +++ b/src/layer/arm/gemm_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm_arm.h" @@ -56,7 +45,7 @@ Gemm_arm::Gemm_arm() void pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; float* pp = AT; @@ -267,7 +256,7 @@ void pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) static void transpose_pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; float* pp = AT; @@ -411,7 +400,7 @@ static void transpose_pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int static void pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; float* pp = BT; @@ -719,7 +708,7 @@ static void pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int k, int max static void transpose_pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; float* pp = BT; @@ -906,7 +895,7 @@ static void transpose_pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int static void transpose_unpack_output_tile(const Mat& topT, Mat& top_blob, int i, int max_ii, int j, int max_jj) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const float* pp = topT; @@ -1053,7 +1042,7 @@ static void transpose_unpack_output_tile(const Mat& topT, Mat& top_blob, int i, static void gemm_transB_packed_tile(const Mat& AT_tile, const Mat& BT_tile, const Mat& CT_tile, Mat& topT_tile, Mat& top_blob, int broadcast_type_C, int i, int max_ii, int j, int max_jj, int k, int max_kk, bool k_end) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const float* pAT = AT_tile; const float* pBT = BT_tile; diff --git a/src/layer/arm/gemm_arm.h b/src/layer/arm/gemm_arm.h index 4b7d8ab24..7caf73e38 100644 --- a/src/layer/arm/gemm_arm.h +++ b/src/layer/arm/gemm_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GEMM_ARM_H #define LAYER_GEMM_ARM_H diff --git a/src/layer/arm/gemm_arm_asimddp.cpp b/src/layer/arm/gemm_arm_asimddp.cpp index de4689988..07b389bb4 100644 --- a/src/layer/arm/gemm_arm_asimddp.cpp +++ b/src/layer/arm/gemm_arm_asimddp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/gemm_arm_asimdfhm.cpp b/src/layer/arm/gemm_arm_asimdfhm.cpp index 52c5d672e..db403ba48 100644 --- a/src/layer/arm/gemm_arm_asimdfhm.cpp +++ b/src/layer/arm/gemm_arm_asimdfhm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm_arm.h" diff --git a/src/layer/arm/gemm_arm_asimdhp.cpp b/src/layer/arm/gemm_arm_asimdhp.cpp index dd5d4e6f8..d255710b7 100644 --- a/src/layer/arm/gemm_arm_asimdhp.cpp +++ b/src/layer/arm/gemm_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm_arm.h" @@ -34,7 +23,7 @@ namespace ncnn { static void gemm_transB_packed_tile_fp16sa(const Mat& AT_tile, const Mat& BT_tile, const Mat& CT_tile, Mat& topT_tile, Mat& top_blob, int broadcast_type_C, int i, int max_ii, int j, int max_jj, int k, int max_kk, bool k_end) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const __fp16* pAT = AT_tile; const __fp16* pBT = BT_tile; diff --git a/src/layer/arm/gemm_arm_i8mm.cpp b/src/layer/arm/gemm_arm_i8mm.cpp index b808e4c92..596fef8a2 100644 --- a/src/layer/arm/gemm_arm_i8mm.cpp +++ b/src/layer/arm/gemm_arm_i8mm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/gemm_arm_vfpv4.cpp b/src/layer/arm/gemm_arm_vfpv4.cpp index 2f84f9911..6a1ac1f05 100644 --- a/src/layer/arm/gemm_arm_vfpv4.cpp +++ b/src/layer/arm/gemm_arm_vfpv4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm_arm.h" diff --git a/src/layer/arm/gemm_bf16s.h b/src/layer/arm/gemm_bf16s.h index 06a1b8f53..b006b1ca5 100644 --- a/src/layer/arm/gemm_bf16s.h +++ b/src/layer/arm/gemm_bf16s.h @@ -1,20 +1,9 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pack_A_tile_fp32_to_bf16(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; unsigned short* pp = AT; @@ -203,7 +192,7 @@ static void pack_A_tile_fp32_to_bf16(const Mat& A, Mat& AT, int i, int max_ii, i static void transpose_pack_A_tile_fp32_to_bf16(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; unsigned short* pp = AT; @@ -267,7 +256,7 @@ static void transpose_pack_A_tile_fp32_to_bf16(const Mat& A, Mat& AT, int i, int static void pack_B_tile_fp32_to_bf16(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; unsigned short* pp = BT; @@ -578,7 +567,7 @@ static void pack_B_tile_fp32_to_bf16(const Mat& B, Mat& BT, int j, int max_jj, i static void transpose_pack_B_tile_fp32_to_bf16(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; unsigned short* pp = BT; @@ -657,7 +646,7 @@ static void transpose_pack_B_tile_fp32_to_bf16(const Mat& B, Mat& BT, int j, int static void transpose_unpack_output_tile_fp32_to_bf16(const Mat& topT, Mat& top_blob, int i, int max_ii, int j, int max_jj) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const float* pp = topT; @@ -796,7 +785,7 @@ static void transpose_unpack_output_tile_fp32_to_bf16(const Mat& topT, Mat& top_ static void gemm_transB_packed_tile_bf16s(const Mat& AT_tile, const Mat& BT_tile, const Mat& CT_tile, Mat& topT_tile, Mat& top_blob, int broadcast_type_C, float alpha, int i, int max_ii, int j, int max_jj, int k, int max_kk, bool k_end) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const unsigned short* pAT = AT_tile; const unsigned short* pBT = BT_tile; diff --git a/src/layer/arm/gemm_bf16s_fp16s.h b/src/layer/arm/gemm_bf16s_fp16s.h index 7f93d003c..1470fb4f3 100644 --- a/src/layer/arm/gemm_bf16s_fp16s.h +++ b/src/layer/arm/gemm_bf16s_fp16s.h @@ -1,21 +1,10 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pack_A_tile_bf16_fp16(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; unsigned short* pp = AT; @@ -258,7 +247,7 @@ static void pack_A_tile_bf16_fp16(const Mat& A, Mat& AT, int i, int max_ii, int static void transpose_pack_A_tile_bf16_fp16(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; unsigned short* pp = AT; @@ -463,7 +452,7 @@ static void transpose_pack_A_tile_bf16_fp16(const Mat& A, Mat& AT, int i, int ma static void pack_B_tile_bf16_fp16(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; unsigned short* pp = BT; @@ -913,7 +902,7 @@ static void pack_B_tile_bf16_fp16(const Mat& B, Mat& BT, int j, int max_jj, int static void transpose_pack_B_tile_bf16_fp16(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; unsigned short* pp = BT; @@ -1193,7 +1182,7 @@ static void transpose_pack_B_tile_bf16_fp16(const Mat& B, Mat& BT, int j, int ma static void transpose_unpack_output_tile_bf16_fp16(const Mat& topT, Mat& top_blob, int i, int max_ii, int j, int max_jj) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const unsigned short* pp = topT; diff --git a/src/layer/arm/gemm_fp16s.h b/src/layer/arm/gemm_fp16s.h index 6905c637c..eeae9f10d 100644 --- a/src/layer/arm/gemm_fp16s.h +++ b/src/layer/arm/gemm_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM82FP16FML && __aarch64__ && !__ARM_FEATURE_FP16_FML void gemm_transB_packed_tile_fp16s_asimdfhm(const Mat& AT_tile, const Mat& BT_tile, const Mat& CT_tile, Mat& topT_tile, Mat& top_blob, int broadcast_type_C, float alpha, int i, int max_ii, int j, int max_jj, int k, int max_kk, bool k_end); @@ -18,7 +7,7 @@ void gemm_transB_packed_tile_fp16s_asimdfhm(const Mat& AT_tile, const Mat& BT_ti static void pack_A_tile_fp32_to_fp16(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; unsigned short* pp = AT; @@ -201,7 +190,7 @@ static void pack_A_tile_fp32_to_fp16(const Mat& A, Mat& AT, int i, int max_ii, i static void transpose_pack_A_tile_fp32_to_fp16(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; unsigned short* pp = AT; @@ -263,7 +252,7 @@ static void transpose_pack_A_tile_fp32_to_fp16(const Mat& A, Mat& AT, int i, int static void pack_B_tile_fp32_to_fp16(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; unsigned short* pp = BT; @@ -568,7 +557,7 @@ static void pack_B_tile_fp32_to_fp16(const Mat& B, Mat& BT, int j, int max_jj, i static void transpose_pack_B_tile_fp32_to_fp16(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; unsigned short* pp = BT; @@ -645,7 +634,7 @@ static void transpose_pack_B_tile_fp32_to_fp16(const Mat& B, Mat& BT, int j, int static void transpose_unpack_output_tile_fp32_to_fp16(const Mat& topT, Mat& top_blob, int i, int max_ii, int j, int max_jj) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const float* pp = topT; @@ -792,7 +781,7 @@ static void gemm_transB_packed_tile_fp16s(const Mat& AT_tile, const Mat& BT_tile #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; #if __ARM_FEATURE_FP16_FML const __fp16* pAT = AT_tile; diff --git a/src/layer/arm/gemm_int8.h b/src/layer/arm/gemm_int8.h index 652f300b4..af6d92ad9 100644 --- a/src/layer/arm/gemm_int8.h +++ b/src/layer/arm/gemm_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM84I8MM && __aarch64__ && !__ARM_FEATURE_MATMUL_INT8 void pack_A_tile_int8_i8mm(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk); @@ -1717,7 +1706,7 @@ static void transpose_pack_B_tile_int8(const Mat& B, Mat& BT, int j, int max_jj, static void compute_A_tile_fp32_int8_scales(const Mat& A, Mat& scales, float B_scale, Mat& out_descales, int i, int max_ii) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; const int K = A.w; // NCNN_LOGE("compute_A_tile_int8_scales %d %d", max_ii, elempack); @@ -1885,7 +1874,7 @@ static void pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("pack_A_tile_fp32_to_int8 %d %d", max_ii, elempack); @@ -2736,7 +2725,7 @@ static void pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i static void transpose_compute_A_tile_fp32_int8_scales(const Mat& A, Mat& scales, float B_scale, Mat& out_descales, int i, int max_ii) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; const int K = A.dims == 3 ? A.c : A.h; // NCNN_LOGE("transpose_compute_A_tile_int8_scales %d %d", max_ii, elempack); @@ -3043,7 +3032,7 @@ static void transpose_pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("transpose_pack_A_tile_fp32_to_int8 %d %d", max_ii, elempack); @@ -3940,7 +3929,7 @@ static void compute_B_fp32_int8_scale(const Mat& B, float& scale) #endif for (int i = 0; i < (B.dims == 3 ? B.c : B.h); i++) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; const float* ptr = (const float*)B + i * B_hstep * B.elempack; const int size = B.w * B.elempack; @@ -3987,7 +3976,7 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("pack_B_tile_fp32_to_int8 %d %d %d", max_jj, max_kk, elempack); @@ -4794,7 +4783,7 @@ static void transpose_pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("transpose_pack_B_tile_fp32_to_int8 %d %d", max_jj, elempack); @@ -5630,9 +5619,9 @@ static void unpack_output_tile_int32_to_fp32(const Mat& topT, const Mat& C, Mat& #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int c_hstep = C.dims == 3 ? (int)C.cstep : C.w; + const size_t c_hstep = C.dims == 3 ? C.cstep : (size_t)C.w; const int c_elempack = C.elempack; const float* pC = C; @@ -7710,9 +7699,9 @@ static void transpose_unpack_output_tile_int32_to_fp32(const Mat& topT, const Ma #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int c_hstep = C.dims == 3 ? (int)C.cstep : C.w; + const size_t c_hstep = C.dims == 3 ? C.cstep : (size_t)C.w; const int c_elempack = C.elempack; const float* pC = C; diff --git a/src/layer/arm/gemm_int8_bf16s.h b/src/layer/arm/gemm_int8_bf16s.h index a1ad87d51..352beb91f 100644 --- a/src/layer/arm/gemm_int8_bf16s.h +++ b/src/layer/arm/gemm_int8_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM84I8MM && __aarch64__ && !__ARM_FEATURE_MATMUL_INT8 void pack_A_tile_bf16_to_int8_i8mm(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk, const Mat& scales); @@ -31,7 +20,7 @@ void transpose_unpack_output_tile_int32_to_bf16_asimddp(const Mat& topT, const M static void compute_A_tile_bf16_int8_scales(const Mat& A, Mat& scales, float B_scale, Mat& out_descales, int i, int max_ii) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; const int K = A.w; // NCNN_LOGE("compute_A_tile_bf16_int8_scales %d %d", max_ii, elempack); @@ -205,7 +194,7 @@ static void pack_A_tile_bf16_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("pack_A_tile_bf16_to_int8 %d %d", max_ii, elempack); @@ -1107,7 +1096,7 @@ static void pack_A_tile_bf16_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i static void transpose_compute_A_tile_bf16_int8_scales(const Mat& A, Mat& scales, float B_scale, Mat& out_descales, int i, int max_ii) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; const int K = A.dims == 3 ? A.c : A.h; // NCNN_LOGE("transpose_compute_A_tile_bf16_int8_scales %d %d", max_ii, elempack); @@ -1350,7 +1339,7 @@ static void transpose_pack_A_tile_bf16_to_int8(const Mat& A, Mat& AT, int i, int #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("transpose_pack_A_tile_bf16_to_int8 %d %d", max_ii, elempack); @@ -2325,7 +2314,7 @@ static void compute_B_bf16_int8_scale(const Mat& B, float& scale) #endif for (int i = 0; i < (B.dims == 3 ? B.c : B.h); i++) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; const unsigned short* ptr = (const unsigned short*)B + i * B_hstep * B.elempack; const int size = B.w * B.elempack; @@ -2381,7 +2370,7 @@ static void pack_B_tile_bf16_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("pack_B_tile_bf16_to_int8 %d %d", max_jj, elempack); @@ -3238,7 +3227,7 @@ static void transpose_pack_B_tile_bf16_to_int8(const Mat& B, Mat& BT, int j, int #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("transpose_pack_B_tile_bf16_to_int8 %d %d", max_jj, elempack); @@ -4153,9 +4142,9 @@ static void unpack_output_tile_int32_to_bf16(const Mat& topT, const Mat& C, Mat& #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int c_hstep = C.dims == 3 ? (int)C.cstep : C.w; + const size_t c_hstep = C.dims == 3 ? C.cstep : (size_t)C.w; const int c_elempack = C.elempack; const unsigned short* pC = C; @@ -6343,9 +6332,9 @@ static void transpose_unpack_output_tile_int32_to_bf16(const Mat& topT, const Ma #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int c_hstep = C.dims == 3 ? (int)C.cstep : C.w; + const size_t c_hstep = C.dims == 3 ? C.cstep : (size_t)C.w; const int c_elempack = C.elempack; const unsigned short* pC = C; diff --git a/src/layer/arm/gemm_int8_fp16s.h b/src/layer/arm/gemm_int8_fp16s.h index 0ea6c389c..f5845a48f 100644 --- a/src/layer/arm/gemm_int8_fp16s.h +++ b/src/layer/arm/gemm_int8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM84I8MM && __aarch64__ && !__ARM_FEATURE_MATMUL_INT8 void pack_A_tile_fp16_to_int8_i8mm(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk, const Mat& scales); @@ -45,7 +34,7 @@ static void compute_A_tile_fp16_int8_scales(const Mat& A, Mat& scales, float B_s #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; const int K = A.w; // NCNN_LOGE("compute_A_tile_fp16_int8_scales %d %d", max_ii, elempack); @@ -378,7 +367,7 @@ static void pack_A_tile_fp16_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("pack_A_tile_fp16_to_int8 %d %d", max_ii, elempack); @@ -1457,7 +1446,7 @@ static void transpose_compute_A_tile_fp16_int8_scales(const Mat& A, Mat& scales, #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; const int K = A.dims == 3 ? A.c : A.h; // NCNN_LOGE("transpose_compute_A_tile_fp16_int8_scales %d %d", max_ii, elempack); @@ -2023,7 +2012,7 @@ static void transpose_pack_A_tile_fp16_to_int8(const Mat& A, Mat& AT, int i, int #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("transpose_pack_A_tile_fp16_to_int8 %d %d", max_ii, elempack); @@ -3268,7 +3257,7 @@ static void compute_B_fp16_int8_scale(const Mat& B, float& scale) #endif for (int i = 0; i < (B.dims == 3 ? B.c : B.h); i++) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; const int size = B.w * B.elempack; @@ -3397,7 +3386,7 @@ static void pack_B_tile_fp16_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("pack_B_tile_fp16_to_int8 %d %d", max_jj, elempack); @@ -4423,7 +4412,7 @@ static void transpose_pack_B_tile_fp16_to_int8(const Mat& B, Mat& BT, int j, int #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("transpose_pack_B_tile_fp16_to_int8 %d %d", max_jj, elempack); @@ -5589,9 +5578,9 @@ static void unpack_output_tile_int32_to_fp16(const Mat& topT, const Mat& C, Mat& #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int c_hstep = C.dims == 3 ? (int)C.cstep : C.w; + const size_t c_hstep = C.dims == 3 ? C.cstep : (size_t)C.w; const int c_elempack = C.elempack; const unsigned short* pC = C; @@ -7967,9 +7956,9 @@ static void transpose_unpack_output_tile_int32_to_fp16(const Mat& topT, const Ma #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int c_hstep = C.dims == 3 ? (int)C.cstep : C.w; + const size_t c_hstep = C.dims == 3 ? C.cstep : (size_t)C.w; const int c_elempack = C.elempack; const unsigned short* pC = C; diff --git a/src/layer/arm/groupnorm_arm.cpp b/src/layer/arm/groupnorm_arm.cpp index cde5611b5..4fc658c80 100644 --- a/src/layer/arm/groupnorm_arm.cpp +++ b/src/layer/arm/groupnorm_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "groupnorm_arm.h" diff --git a/src/layer/arm/groupnorm_arm.h b/src/layer/arm/groupnorm_arm.h index bc1ba0c73..9037cc426 100644 --- a/src/layer/arm/groupnorm_arm.h +++ b/src/layer/arm/groupnorm_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GROUPNORM_ARM_H #define LAYER_GROUPNORM_ARM_H diff --git a/src/layer/arm/groupnorm_arm_asimdhp.cpp b/src/layer/arm/groupnorm_arm_asimdhp.cpp index 978d7b64b..e610db6b7 100644 --- a/src/layer/arm/groupnorm_arm_asimdhp.cpp +++ b/src/layer/arm/groupnorm_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "groupnorm_arm.h" diff --git a/src/layer/arm/gru_arm.cpp b/src/layer/arm/gru_arm.cpp index a42241947..1c3dd0182 100644 --- a/src/layer/arm/gru_arm.cpp +++ b/src/layer/arm/gru_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gru_arm.h" diff --git a/src/layer/arm/gru_arm.h b/src/layer/arm/gru_arm.h index aba1608df..5689c8ba3 100644 --- a/src/layer/arm/gru_arm.h +++ b/src/layer/arm/gru_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GRU_ARM_H #define LAYER_GRU_ARM_H diff --git a/src/layer/arm/gru_arm_asimddp.cpp b/src/layer/arm/gru_arm_asimddp.cpp index 3de7ed84e..f03c226ae 100644 --- a/src/layer/arm/gru_arm_asimddp.cpp +++ b/src/layer/arm/gru_arm_asimddp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/gru_arm_asimdhp.cpp b/src/layer/arm/gru_arm_asimdhp.cpp index 3a3d92d5d..f3c635b0f 100644 --- a/src/layer/arm/gru_arm_asimdhp.cpp +++ b/src/layer/arm/gru_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gru_arm.h" diff --git a/src/layer/arm/gru_arm_vfpv4.cpp b/src/layer/arm/gru_arm_vfpv4.cpp index 8a2942508..7bec871b3 100644 --- a/src/layer/arm/gru_arm_vfpv4.cpp +++ b/src/layer/arm/gru_arm_vfpv4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/gru_int8.h b/src/layer/arm/gru_int8.h index 8d0c720bb..33772f0a1 100644 --- a/src/layer/arm/gru_int8.h +++ b/src/layer/arm/gru_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM82DOT && __aarch64__ && !__ARM_FEATURE_DOTPROD void gru_transform_weight_int8_asimddp(const Mat& weight_xc, const Mat& weight_xc_int8_scales, const Mat& weight_hc, const Mat& weight_hc_int8_scales, const Mat& bias_c, Mat& weight_data_tm, Mat& weight_data_tm_int8_descales, Mat& bias_c_tm, int size, int num_output, int num_directions, const Option& opt); diff --git a/src/layer/arm/hardsigmoid_arm.cpp b/src/layer/arm/hardsigmoid_arm.cpp index d79a53948..191a9b20f 100644 --- a/src/layer/arm/hardsigmoid_arm.cpp +++ b/src/layer/arm/hardsigmoid_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_arm.h" diff --git a/src/layer/arm/hardsigmoid_arm.h b/src/layer/arm/hardsigmoid_arm.h index 13783ff16..6150b6994 100644 --- a/src/layer/arm/hardsigmoid_arm.h +++ b/src/layer/arm/hardsigmoid_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSIGMOID_ARM_H #define LAYER_HARDSIGMOID_ARM_H diff --git a/src/layer/arm/hardsigmoid_arm_asimdhp.cpp b/src/layer/arm/hardsigmoid_arm_asimdhp.cpp index 0c63db65d..5a58fb723 100644 --- a/src/layer/arm/hardsigmoid_arm_asimdhp.cpp +++ b/src/layer/arm/hardsigmoid_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_arm.h" diff --git a/src/layer/arm/hardswish_arm.cpp b/src/layer/arm/hardswish_arm.cpp index 74b633eb6..85f3f7c47 100644 --- a/src/layer/arm/hardswish_arm.cpp +++ b/src/layer/arm/hardswish_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_arm.h" diff --git a/src/layer/arm/hardswish_arm.h b/src/layer/arm/hardswish_arm.h index a534ceb16..d1a0a5cfc 100644 --- a/src/layer/arm/hardswish_arm.h +++ b/src/layer/arm/hardswish_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSWISH_ARM_H #define LAYER_HARDSWISH_ARM_H diff --git a/src/layer/arm/hardswish_arm_asimdhp.cpp b/src/layer/arm/hardswish_arm_asimdhp.cpp index 5ab492ef0..5d98607fe 100644 --- a/src/layer/arm/hardswish_arm_asimdhp.cpp +++ b/src/layer/arm/hardswish_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_arm.h" diff --git a/src/layer/arm/innerproduct_arm.cpp b/src/layer/arm/innerproduct_arm.cpp index 99e93d6fb..56dc06f56 100644 --- a/src/layer/arm/innerproduct_arm.cpp +++ b/src/layer/arm/innerproduct_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_arm.h" diff --git a/src/layer/arm/innerproduct_arm.h b/src/layer/arm/innerproduct_arm.h index 70a545331..cdd705335 100644 --- a/src/layer/arm/innerproduct_arm.h +++ b/src/layer/arm/innerproduct_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INNERPRODUCT_ARM_H #define LAYER_INNERPRODUCT_ARM_H diff --git a/src/layer/arm/innerproduct_arm_asimdfhm.cpp b/src/layer/arm/innerproduct_arm_asimdfhm.cpp index 1fb06b243..bcba51a78 100644 --- a/src/layer/arm/innerproduct_arm_asimdfhm.cpp +++ b/src/layer/arm/innerproduct_arm_asimdfhm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_arm.h" diff --git a/src/layer/arm/innerproduct_arm_asimdhp.cpp b/src/layer/arm/innerproduct_arm_asimdhp.cpp index e29dea2a3..47f0db1c7 100644 --- a/src/layer/arm/innerproduct_arm_asimdhp.cpp +++ b/src/layer/arm/innerproduct_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_arm.h" diff --git a/src/layer/arm/innerproduct_arm_vfpv4.cpp b/src/layer/arm/innerproduct_arm_vfpv4.cpp index 063cb00d1..5f711e47a 100644 --- a/src/layer/arm/innerproduct_arm_vfpv4.cpp +++ b/src/layer/arm/innerproduct_arm_vfpv4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_arm.h" diff --git a/src/layer/arm/innerproduct_fp16s.h b/src/layer/arm/innerproduct_fp16s.h index d8c74d56a..acebd5c5a 100644 --- a/src/layer/arm/innerproduct_fp16s.h +++ b/src/layer/arm/innerproduct_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM82FP16FML && __aarch64__ && !__ARM_FEATURE_FP16_FML void innerproduct_pack4_fp16s_neon_asimdfhm(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int activation_type, const Mat& activation_params, const Option& opt); diff --git a/src/layer/arm/innerproduct_gemm_fp16s.h b/src/layer/arm/innerproduct_gemm_fp16s.h index c3b36e0b9..a52370327 100644 --- a/src/layer/arm/innerproduct_gemm_fp16s.h +++ b/src/layer/arm/innerproduct_gemm_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM82FP16FML && __aarch64__ && !__ARM_FEATURE_FP16_FML void innerproduct_gemm_fp16s_neon_asimdfhm(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int activation_type, const Mat& activation_params, const Option& opt); diff --git a/src/layer/arm/instancenorm_arm.cpp b/src/layer/arm/instancenorm_arm.cpp index 84c50087e..4f24b463a 100644 --- a/src/layer/arm/instancenorm_arm.cpp +++ b/src/layer/arm/instancenorm_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "instancenorm_arm.h" diff --git a/src/layer/arm/instancenorm_arm.h b/src/layer/arm/instancenorm_arm.h index 98dec71ac..aca174c6e 100644 --- a/src/layer/arm/instancenorm_arm.h +++ b/src/layer/arm/instancenorm_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INSTANCENORM_ARM_H #define LAYER_INSTANCENORM_ARM_H diff --git a/src/layer/arm/instancenorm_arm_asimdhp.cpp b/src/layer/arm/instancenorm_arm_asimdhp.cpp index 67e408122..6bca0cc61 100644 --- a/src/layer/arm/instancenorm_arm_asimdhp.cpp +++ b/src/layer/arm/instancenorm_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "instancenorm_arm.h" diff --git a/src/layer/arm/interp_arm.cpp b/src/layer/arm/interp_arm.cpp index f7a3ea42b..46ce386d0 100644 --- a/src/layer/arm/interp_arm.cpp +++ b/src/layer/arm/interp_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp_arm.h" diff --git a/src/layer/arm/interp_arm.h b/src/layer/arm/interp_arm.h index 6c15c7380..16f680ec0 100644 --- a/src/layer/arm/interp_arm.h +++ b/src/layer/arm/interp_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INTERP_ARM_H #define LAYER_INTERP_ARM_H diff --git a/src/layer/arm/interp_arm_asimdhp.cpp b/src/layer/arm/interp_arm_asimdhp.cpp index 0fd2389e2..d880618d7 100644 --- a/src/layer/arm/interp_arm_asimdhp.cpp +++ b/src/layer/arm/interp_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp_arm.h" diff --git a/src/layer/arm/interp_bicubic.h b/src/layer/arm/interp_bicubic.h index efff2d4db..4b477af5b 100644 --- a/src/layer/arm/interp_bicubic.h +++ b/src/layer/arm/interp_bicubic.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static inline void interpolate_cubic(float fx, float* coeffs) { diff --git a/src/layer/arm/interp_bicubic_bf16s.h b/src/layer/arm/interp_bicubic_bf16s.h index bd7d1f49f..e52bc5ca2 100644 --- a/src/layer/arm/interp_bicubic_bf16s.h +++ b/src/layer/arm/interp_bicubic_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_bf16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bicubic_fp16s.h b/src/layer/arm/interp_bicubic_fp16s.h index 18b2e5679..f187f2938 100644 --- a/src/layer/arm/interp_bicubic_fp16s.h +++ b/src/layer/arm/interp_bicubic_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static inline void interpolate_cubic_fp16sa(float fx, __fp16* coeffs) { diff --git a/src/layer/arm/interp_bicubic_pack4.h b/src/layer/arm/interp_bicubic_pack4.h index ab0d56125..a7c81f577 100644 --- a/src/layer/arm/interp_bicubic_pack4.h +++ b/src/layer/arm/interp_bicubic_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bicubic_pack4_bf16s.h b/src/layer/arm/interp_bicubic_pack4_bf16s.h index 6546accf6..e6cec65d7 100644 --- a/src/layer/arm/interp_bicubic_pack4_bf16s.h +++ b/src/layer/arm/interp_bicubic_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack4_bf16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bicubic_pack4_fp16s.h b/src/layer/arm/interp_bicubic_pack4_fp16s.h index 7f8231484..c1c7cacdc 100644 --- a/src/layer/arm/interp_bicubic_pack4_fp16s.h +++ b/src/layer/arm/interp_bicubic_pack4_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack4_fp16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bicubic_pack8_fp16s.h b/src/layer/arm/interp_bicubic_pack8_fp16s.h index 75157b6d3..aae630a2a 100644 --- a/src/layer/arm/interp_bicubic_pack8_fp16s.h +++ b/src/layer/arm/interp_bicubic_pack8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack8_fp16sa(const Mat& src, Mat& dst, __fp16* alpha, int* xofs, __fp16* beta, int* yofs) { diff --git a/src/layer/arm/interp_bilinear.h b/src/layer/arm/interp_bilinear.h index 38f002074..d31b4cdbd 100644 --- a/src/layer/arm/interp_bilinear.h +++ b/src/layer/arm/interp_bilinear.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void linear_coeffs(int w, int outw, int* xofs, float* alpha, int align_corner) { diff --git a/src/layer/arm/interp_bilinear_bf16s.h b/src/layer/arm/interp_bilinear_bf16s.h index 84583f83d..adb20cfd4 100644 --- a/src/layer/arm/interp_bilinear_bf16s.h +++ b/src/layer/arm/interp_bilinear_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_bf16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bilinear_fp16s.h b/src/layer/arm/interp_bilinear_fp16s.h index 33314e7a1..bc7063412 100644 --- a/src/layer/arm/interp_bilinear_fp16s.h +++ b/src/layer/arm/interp_bilinear_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void linear_coeffs_fp16sa(int w, int outw, int* xofs, __fp16* alpha, int align_corner) { diff --git a/src/layer/arm/interp_bilinear_pack4.h b/src/layer/arm/interp_bilinear_pack4.h index 46f20485e..62dcc0a84 100644 --- a/src/layer/arm/interp_bilinear_pack4.h +++ b/src/layer/arm/interp_bilinear_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bilinear_pack4_bf16s.h b/src/layer/arm/interp_bilinear_pack4_bf16s.h index 87ebac503..5047033ee 100644 --- a/src/layer/arm/interp_bilinear_pack4_bf16s.h +++ b/src/layer/arm/interp_bilinear_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack4_bf16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bilinear_pack4_fp16s.h b/src/layer/arm/interp_bilinear_pack4_fp16s.h index 0b6c6de00..d9bb72d0a 100644 --- a/src/layer/arm/interp_bilinear_pack4_fp16s.h +++ b/src/layer/arm/interp_bilinear_pack4_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack4_fp16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/arm/interp_bilinear_pack8_fp16s.h b/src/layer/arm/interp_bilinear_pack8_fp16s.h index c0f84b012..fb7326924 100644 --- a/src/layer/arm/interp_bilinear_pack8_fp16s.h +++ b/src/layer/arm/interp_bilinear_pack8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack8_fp16sa(const Mat& src, Mat& dst, __fp16* alpha, int* xofs, __fp16* beta, int* yofs) { diff --git a/src/layer/arm/layernorm_arm.cpp b/src/layer/arm/layernorm_arm.cpp index 4c49a5e76..06d5610f9 100644 --- a/src/layer/arm/layernorm_arm.cpp +++ b/src/layer/arm/layernorm_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layernorm_arm.h" diff --git a/src/layer/arm/layernorm_arm.h b/src/layer/arm/layernorm_arm.h index d3bcac1b2..2f2dd8db6 100644 --- a/src/layer/arm/layernorm_arm.h +++ b/src/layer/arm/layernorm_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LAYERNORM_ARM_H #define LAYER_LAYERNORM_ARM_H diff --git a/src/layer/arm/layernorm_arm_asimdhp.cpp b/src/layer/arm/layernorm_arm_asimdhp.cpp index 1b746707d..252cf4b96 100644 --- a/src/layer/arm/layernorm_arm_asimdhp.cpp +++ b/src/layer/arm/layernorm_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layernorm_arm.h" diff --git a/src/layer/arm/lrn_arm.cpp b/src/layer/arm/lrn_arm.cpp index f763bfb2a..f66aca553 100644 --- a/src/layer/arm/lrn_arm.cpp +++ b/src/layer/arm/lrn_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lrn_arm.h" diff --git a/src/layer/arm/lrn_arm.h b/src/layer/arm/lrn_arm.h index f2c43ba08..b81a6dd9b 100644 --- a/src/layer/arm/lrn_arm.h +++ b/src/layer/arm/lrn_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LRN_ARM_H #define LAYER_LRN_ARM_H diff --git a/src/layer/arm/lstm_arm.cpp b/src/layer/arm/lstm_arm.cpp index a6db35ad2..8b439eeeb 100644 --- a/src/layer/arm/lstm_arm.cpp +++ b/src/layer/arm/lstm_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lstm_arm.h" diff --git a/src/layer/arm/lstm_arm.h b/src/layer/arm/lstm_arm.h index cd6546103..cb18fcb6f 100644 --- a/src/layer/arm/lstm_arm.h +++ b/src/layer/arm/lstm_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LSTM_ARM_H #define LAYER_LSTM_ARM_H diff --git a/src/layer/arm/lstm_arm_asimddp.cpp b/src/layer/arm/lstm_arm_asimddp.cpp index 966dafabb..965e8c617 100644 --- a/src/layer/arm/lstm_arm_asimddp.cpp +++ b/src/layer/arm/lstm_arm_asimddp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/lstm_arm_asimdhp.cpp b/src/layer/arm/lstm_arm_asimdhp.cpp index f9d96d21c..919dbb557 100644 --- a/src/layer/arm/lstm_arm_asimdhp.cpp +++ b/src/layer/arm/lstm_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lstm_arm.h" diff --git a/src/layer/arm/lstm_arm_vfpv4.cpp b/src/layer/arm/lstm_arm_vfpv4.cpp index fcd52084c..7f35a9648 100644 --- a/src/layer/arm/lstm_arm_vfpv4.cpp +++ b/src/layer/arm/lstm_arm_vfpv4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/lstm_int8.h b/src/layer/arm/lstm_int8.h index 8e7a4ed34..da229de7e 100644 --- a/src/layer/arm/lstm_int8.h +++ b/src/layer/arm/lstm_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM82DOT && __aarch64__ && !__ARM_FEATURE_DOTPROD void lstm_transform_weight_int8_asimddp(const Mat& weight_xc, const Mat& weight_xc_int8_scales, const Mat& weight_hc, const Mat& weight_hc_int8_scales, const Mat& bias_c, Mat& weight_data_tm, Mat& weight_data_tm_int8_descales, Mat& bias_c_tm, int size, int num_output, int num_directions, int hidden_size, const Option& opt); diff --git a/src/layer/arm/matmul_arm.cpp b/src/layer/arm/matmul_arm.cpp index 363ab4490..ce0d72cd5 100644 --- a/src/layer/arm/matmul_arm.cpp +++ b/src/layer/arm/matmul_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "matmul_arm.h" diff --git a/src/layer/arm/matmul_arm.h b/src/layer/arm/matmul_arm.h index a4537300d..937a506c4 100644 --- a/src/layer/arm/matmul_arm.h +++ b/src/layer/arm/matmul_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MATMUL_ARM_H #define LAYER_MATMUL_ARM_H diff --git a/src/layer/arm/mish_arm.cpp b/src/layer/arm/mish_arm.cpp index 31c9f77df..b01d19d07 100644 --- a/src/layer/arm/mish_arm.cpp +++ b/src/layer/arm/mish_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish_arm.h" diff --git a/src/layer/arm/mish_arm.h b/src/layer/arm/mish_arm.h index 9f99a7a12..42c2be692 100644 --- a/src/layer/arm/mish_arm.h +++ b/src/layer/arm/mish_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MISH_ARM_H #define LAYER_MISH_ARM_H diff --git a/src/layer/arm/mish_arm_asimdhp.cpp b/src/layer/arm/mish_arm_asimdhp.cpp index 70dd74ae2..f6649b7bf 100644 --- a/src/layer/arm/mish_arm_asimdhp.cpp +++ b/src/layer/arm/mish_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish_arm.h" diff --git a/src/layer/arm/multiheadattention_arm.cpp b/src/layer/arm/multiheadattention_arm.cpp index 1e9148730..5b8c82f63 100644 --- a/src/layer/arm/multiheadattention_arm.cpp +++ b/src/layer/arm/multiheadattention_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "multiheadattention_arm.h" diff --git a/src/layer/arm/multiheadattention_arm.h b/src/layer/arm/multiheadattention_arm.h index f1b721f22..c99988b03 100644 --- a/src/layer/arm/multiheadattention_arm.h +++ b/src/layer/arm/multiheadattention_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MULTIHEADATTENTION_ARM_H #define LAYER_MULTIHEADATTENTION_ARM_H diff --git a/src/layer/arm/neon_mathfun_fp16s.h b/src/layer/arm/neon_mathfun_fp16s.h index 5e3f7a28e..2ad7e2144 100644 --- a/src/layer/arm/neon_mathfun_fp16s.h +++ b/src/layer/arm/neon_mathfun_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause /* NEON implementation of sin, cos, exp and log * diff --git a/src/layer/arm/neon_mathfun_tanh.h b/src/layer/arm/neon_mathfun_tanh.h index 1f9073dd1..fc873a64b 100644 --- a/src/layer/arm/neon_mathfun_tanh.h +++ b/src/layer/arm/neon_mathfun_tanh.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NEON_MATHFUN_TANH_H #define NEON_MATHFUN_TANH_H diff --git a/src/layer/arm/packing_arm.cpp b/src/layer/arm/packing_arm.cpp index 49b628561..0b325a941 100644 --- a/src/layer/arm/packing_arm.cpp +++ b/src/layer/arm/packing_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "packing_arm.h" diff --git a/src/layer/arm/packing_arm.h b/src/layer/arm/packing_arm.h index 17c648540..684a77132 100644 --- a/src/layer/arm/packing_arm.h +++ b/src/layer/arm/packing_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PACKING_ARM_H #define LAYER_PACKING_ARM_H diff --git a/src/layer/arm/padding_arm.cpp b/src/layer/arm/padding_arm.cpp index 2258e5a59..df95afa13 100644 --- a/src/layer/arm/padding_arm.cpp +++ b/src/layer/arm/padding_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "padding_arm.h" diff --git a/src/layer/arm/padding_arm.h b/src/layer/arm/padding_arm.h index 164cfe4c3..ffc2d6889 100644 --- a/src/layer/arm/padding_arm.h +++ b/src/layer/arm/padding_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PADDING_ARM_H #define LAYER_PADDING_ARM_H diff --git a/src/layer/arm/padding_pack4.h b/src/layer/arm/padding_pack4.h index d52e991b8..1d13b60dc 100644 --- a/src/layer/arm/padding_pack4.h +++ b/src/layer/arm/padding_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack4_neon(const Mat& src, Mat& dst, int top, int bottom, int left, int right, float32x4_t v) { diff --git a/src/layer/arm/padding_pack4_bf16s_fp16s.h b/src/layer/arm/padding_pack4_bf16s_fp16s.h index 3ca2b7fe2..50ab91c99 100644 --- a/src/layer/arm/padding_pack4_bf16s_fp16s.h +++ b/src/layer/arm/padding_pack4_bf16s_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack4_bf16_fp16s_neon(const Mat& src, Mat& dst, int top, int bottom, int left, int right, uint16x8_t v) { diff --git a/src/layer/arm/padding_pack8_fp16s.h b/src/layer/arm/padding_pack8_fp16s.h index 7116821f9..071f0eab4 100644 --- a/src/layer/arm/padding_pack8_fp16s.h +++ b/src/layer/arm/padding_pack8_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack8_fp16s_neon(const Mat& src, Mat& dst, int top, int bottom, int left, int right, uint16x8_t v) { diff --git a/src/layer/arm/padding_pack8_int8.h b/src/layer/arm/padding_pack8_int8.h index 02a5b0304..fbc53d048 100644 --- a/src/layer/arm/padding_pack8_int8.h +++ b/src/layer/arm/padding_pack8_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack8_int8_neon(const Mat& src, Mat& dst, int top, int bottom, int left, int right, int8x8_t v) { diff --git a/src/layer/arm/pixelshuffle_arm.cpp b/src/layer/arm/pixelshuffle_arm.cpp index 21fc08ed0..f9bc84532 100644 --- a/src/layer/arm/pixelshuffle_arm.cpp +++ b/src/layer/arm/pixelshuffle_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pixelshuffle_arm.h" diff --git a/src/layer/arm/pixelshuffle_arm.h b/src/layer/arm/pixelshuffle_arm.h index a2d714c9e..4812c08e9 100644 --- a/src/layer/arm/pixelshuffle_arm.h +++ b/src/layer/arm/pixelshuffle_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PIXELSHUFFLE_ARM_H #define LAYER_PIXELSHUFFLE_ARM_H diff --git a/src/layer/arm/pooling_2x2.h b/src/layer/arm/pooling_2x2.h index 34482de46..0695d8ea6 100644 --- a/src/layer/arm/pooling_2x2.h +++ b/src/layer/arm/pooling_2x2.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling2x2s2_max_neon(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/arm/pooling_2x2_pack4.h b/src/layer/arm/pooling_2x2_pack4.h index 881e249ca..3b773c08b 100644 --- a/src/layer/arm/pooling_2x2_pack4.h +++ b/src/layer/arm/pooling_2x2_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling2x2s2_max_pack4_neon(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/arm/pooling_2x2_pack4_bf16s.h b/src/layer/arm/pooling_2x2_pack4_bf16s.h index de3f14f49..d4fa1bd29 100644 --- a/src/layer/arm/pooling_2x2_pack4_bf16s.h +++ b/src/layer/arm/pooling_2x2_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling2x2s2_max_pack4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/arm/pooling_3x3.h b/src/layer/arm/pooling_3x3.h index f105aeea7..d38974e37 100644 --- a/src/layer/arm/pooling_3x3.h +++ b/src/layer/arm/pooling_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling3x3s2_max_neon(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/arm/pooling_3x3_pack4.h b/src/layer/arm/pooling_3x3_pack4.h index c0d509455..5e88c17e9 100644 --- a/src/layer/arm/pooling_3x3_pack4.h +++ b/src/layer/arm/pooling_3x3_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling3x3s2_max_pack4_neon(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/arm/pooling_3x3_pack4_bf16s.h b/src/layer/arm/pooling_3x3_pack4_bf16s.h index b5f1a4c58..0e41ab87f 100644 --- a/src/layer/arm/pooling_3x3_pack4_bf16s.h +++ b/src/layer/arm/pooling_3x3_pack4_bf16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling3x3s2_max_pack4_bf16s_neon(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/arm/pooling_arm.cpp b/src/layer/arm/pooling_arm.cpp index 211f071ac..b7eccfd5d 100644 --- a/src/layer/arm/pooling_arm.cpp +++ b/src/layer/arm/pooling_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_arm.h" diff --git a/src/layer/arm/pooling_arm.h b/src/layer/arm/pooling_arm.h index ead9270c7..14afde883 100644 --- a/src/layer/arm/pooling_arm.h +++ b/src/layer/arm/pooling_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING_ARM_H #define LAYER_POOLING_ARM_H diff --git a/src/layer/arm/pooling_arm_asimdhp.cpp b/src/layer/arm/pooling_arm_asimdhp.cpp index 95ce4b1f3..de0f0d890 100644 --- a/src/layer/arm/pooling_arm_asimdhp.cpp +++ b/src/layer/arm/pooling_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_arm.h" diff --git a/src/layer/arm/prelu_arm.cpp b/src/layer/arm/prelu_arm.cpp index c8f8f8c13..4d0c9320d 100644 --- a/src/layer/arm/prelu_arm.cpp +++ b/src/layer/arm/prelu_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_arm.h" diff --git a/src/layer/arm/prelu_arm.h b/src/layer/arm/prelu_arm.h index 9354be744..3bc857e5b 100644 --- a/src/layer/arm/prelu_arm.h +++ b/src/layer/arm/prelu_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRELU_ARM_H #define LAYER_PRELU_ARM_H diff --git a/src/layer/arm/prelu_arm_asimdhp.cpp b/src/layer/arm/prelu_arm_asimdhp.cpp index a6732eae6..b631319d8 100644 --- a/src/layer/arm/prelu_arm_asimdhp.cpp +++ b/src/layer/arm/prelu_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_arm.h" diff --git a/src/layer/arm/quantize_arm.cpp b/src/layer/arm/quantize_arm.cpp index 18a07f0a3..ab839f758 100644 --- a/src/layer/arm/quantize_arm.cpp +++ b/src/layer/arm/quantize_arm.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// Copyright 2019 BUG1989 +// SPDX-License-Identifier: BSD-3-Clause #include "quantize_arm.h" diff --git a/src/layer/arm/quantize_arm.h b/src/layer/arm/quantize_arm.h index 60a716198..c78907f24 100644 --- a/src/layer/arm/quantize_arm.h +++ b/src/layer/arm/quantize_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_QUANTIZE_ARM_H #define LAYER_QUANTIZE_ARM_H diff --git a/src/layer/arm/quantize_arm_asimdhp.cpp b/src/layer/arm/quantize_arm_asimdhp.cpp index 3c3bcb836..d4c86332e 100644 --- a/src/layer/arm/quantize_arm_asimdhp.cpp +++ b/src/layer/arm/quantize_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "quantize_arm.h" diff --git a/src/layer/arm/relu_arm.cpp b/src/layer/arm/relu_arm.cpp index 05ee8678d..f5ec85232 100644 --- a/src/layer/arm/relu_arm.cpp +++ b/src/layer/arm/relu_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "relu_arm.h" diff --git a/src/layer/arm/relu_arm.h b/src/layer/arm/relu_arm.h index c2212513a..bc1cd4e9a 100644 --- a/src/layer/arm/relu_arm.h +++ b/src/layer/arm/relu_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RELU_ARM_H #define LAYER_RELU_ARM_H diff --git a/src/layer/arm/relu_arm_asimdhp.cpp b/src/layer/arm/relu_arm_asimdhp.cpp index 55e75d885..9cbbd19df 100644 --- a/src/layer/arm/relu_arm_asimdhp.cpp +++ b/src/layer/arm/relu_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "relu_arm.h" diff --git a/src/layer/arm/requantize_arm.cpp b/src/layer/arm/requantize_arm.cpp index 041ca2f9e..410ce8446 100644 --- a/src/layer/arm/requantize_arm.cpp +++ b/src/layer/arm/requantize_arm.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "requantize_arm.h" diff --git a/src/layer/arm/requantize_arm.h b/src/layer/arm/requantize_arm.h index c6fc184a0..d05121800 100644 --- a/src/layer/arm/requantize_arm.h +++ b/src/layer/arm/requantize_arm.h @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REQUANTIZE_ARM_H #define LAYER_REQUANTIZE_ARM_H diff --git a/src/layer/arm/reshape_arm.cpp b/src/layer/arm/reshape_arm.cpp index cca159363..2428c5bdd 100644 --- a/src/layer/arm/reshape_arm.cpp +++ b/src/layer/arm/reshape_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reshape_arm.h" diff --git a/src/layer/arm/reshape_arm.h b/src/layer/arm/reshape_arm.h index 0f66ea741..97d2147f1 100644 --- a/src/layer/arm/reshape_arm.h +++ b/src/layer/arm/reshape_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RESHAPE_ARM_H #define LAYER_RESHAPE_ARM_H diff --git a/src/layer/arm/rmsnorm_arm.cpp b/src/layer/arm/rmsnorm_arm.cpp index e19136ca2..7a3161d26 100644 --- a/src/layer/arm/rmsnorm_arm.cpp +++ b/src/layer/arm/rmsnorm_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rmsnorm_arm.h" diff --git a/src/layer/arm/rmsnorm_arm.h b/src/layer/arm/rmsnorm_arm.h index 440153333..95a20977a 100644 --- a/src/layer/arm/rmsnorm_arm.h +++ b/src/layer/arm/rmsnorm_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RMSNORM_ARM_H #define LAYER_RMSNORM_ARM_H diff --git a/src/layer/arm/rmsnorm_arm_asimdhp.cpp b/src/layer/arm/rmsnorm_arm_asimdhp.cpp index 98d8e6964..5795cdada 100644 --- a/src/layer/arm/rmsnorm_arm_asimdhp.cpp +++ b/src/layer/arm/rmsnorm_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rmsnorm_arm.h" diff --git a/src/layer/arm/rnn_arm.cpp b/src/layer/arm/rnn_arm.cpp index 8177448a3..c0000e270 100644 --- a/src/layer/arm/rnn_arm.cpp +++ b/src/layer/arm/rnn_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rnn_arm.h" diff --git a/src/layer/arm/rnn_arm.h b/src/layer/arm/rnn_arm.h index ef07a4f6b..cccb3fc65 100644 --- a/src/layer/arm/rnn_arm.h +++ b/src/layer/arm/rnn_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RNN_ARM_H #define LAYER_RNN_ARM_H diff --git a/src/layer/arm/rnn_arm_asimddp.cpp b/src/layer/arm/rnn_arm_asimddp.cpp index 6e4890de9..edf234f5a 100644 --- a/src/layer/arm/rnn_arm_asimddp.cpp +++ b/src/layer/arm/rnn_arm_asimddp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/rnn_arm_asimdhp.cpp b/src/layer/arm/rnn_arm_asimdhp.cpp index c8ef6898c..1077be1cc 100644 --- a/src/layer/arm/rnn_arm_asimdhp.cpp +++ b/src/layer/arm/rnn_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rnn_arm.h" diff --git a/src/layer/arm/rnn_arm_vfpv4.cpp b/src/layer/arm/rnn_arm_vfpv4.cpp index 893f6e061..c4a59884b 100644 --- a/src/layer/arm/rnn_arm_vfpv4.cpp +++ b/src/layer/arm/rnn_arm_vfpv4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/arm/rnn_int8.h b/src/layer/arm/rnn_int8.h index 2850fe9cc..ffe6cf6b3 100644 --- a/src/layer/arm/rnn_int8.h +++ b/src/layer/arm/rnn_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_ARM82DOT && __aarch64__ && !__ARM_FEATURE_DOTPROD void rnn_transform_weight_int8_asimddp(const Mat& weight_xc, const Mat& weight_xc_int8_scales, const Mat& weight_hc, const Mat& weight_hc_int8_scales, const Mat& bias_c, Mat& weight_data_tm, Mat& weight_data_tm_int8_descales, Mat& bias_c_tm, int size, int num_output, int num_directions, const Option& opt); diff --git a/src/layer/arm/scale_arm.cpp b/src/layer/arm/scale_arm.cpp index 9731bc757..e399bf5cc 100644 --- a/src/layer/arm/scale_arm.cpp +++ b/src/layer/arm/scale_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "scale_arm.h" diff --git a/src/layer/arm/scale_arm.h b/src/layer/arm/scale_arm.h index c540cdd62..4ccda9d21 100644 --- a/src/layer/arm/scale_arm.h +++ b/src/layer/arm/scale_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SCALE_ARM_H #define LAYER_SCALE_ARM_H diff --git a/src/layer/arm/selu_arm.cpp b/src/layer/arm/selu_arm.cpp index afe360cd6..c51bf18de 100644 --- a/src/layer/arm/selu_arm.cpp +++ b/src/layer/arm/selu_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "selu_arm.h" diff --git a/src/layer/arm/selu_arm.h b/src/layer/arm/selu_arm.h index d951804db..74cc86306 100644 --- a/src/layer/arm/selu_arm.h +++ b/src/layer/arm/selu_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SELU_ARM_H #define LAYER_SELU_ARM_H diff --git a/src/layer/arm/shufflechannel_arm.cpp b/src/layer/arm/shufflechannel_arm.cpp index 571e98316..3ee727935 100644 --- a/src/layer/arm/shufflechannel_arm.cpp +++ b/src/layer/arm/shufflechannel_arm.cpp @@ -1,16 +1,5 @@ -// // Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "shufflechannel_arm.h" diff --git a/src/layer/arm/shufflechannel_arm.h b/src/layer/arm/shufflechannel_arm.h index dcdbf760b..da092517e 100644 --- a/src/layer/arm/shufflechannel_arm.h +++ b/src/layer/arm/shufflechannel_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SHUFFLECHANNEL_ARM_H #define LAYER_SHUFFLECHANNEL_ARM_H diff --git a/src/layer/arm/sigmoid_arm.cpp b/src/layer/arm/sigmoid_arm.cpp index af2b396dd..8a27595b5 100644 --- a/src/layer/arm/sigmoid_arm.cpp +++ b/src/layer/arm/sigmoid_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_arm.h" diff --git a/src/layer/arm/sigmoid_arm.h b/src/layer/arm/sigmoid_arm.h index 4c3901abb..2aa506599 100644 --- a/src/layer/arm/sigmoid_arm.h +++ b/src/layer/arm/sigmoid_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SIGMOID_ARM_H #define LAYER_SIGMOID_ARM_H diff --git a/src/layer/arm/sigmoid_arm_asimdhp.cpp b/src/layer/arm/sigmoid_arm_asimdhp.cpp index 5d777f276..3dd543fd6 100644 --- a/src/layer/arm/sigmoid_arm_asimdhp.cpp +++ b/src/layer/arm/sigmoid_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_arm.h" diff --git a/src/layer/arm/slice_arm.cpp b/src/layer/arm/slice_arm.cpp index 5fdf20994..c7b69308e 100644 --- a/src/layer/arm/slice_arm.cpp +++ b/src/layer/arm/slice_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "slice_arm.h" diff --git a/src/layer/arm/slice_arm.h b/src/layer/arm/slice_arm.h index c3b558b9e..84a42f631 100644 --- a/src/layer/arm/slice_arm.h +++ b/src/layer/arm/slice_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SLICE_ARM_H #define LAYER_SLICE_ARM_H diff --git a/src/layer/arm/softmax_arm.cpp b/src/layer/arm/softmax_arm.cpp index bf7b64f95..bbbbefb19 100644 --- a/src/layer/arm/softmax_arm.cpp +++ b/src/layer/arm/softmax_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "softmax_arm.h" @@ -153,7 +142,7 @@ static void softmax(float* _ptr, int elemcount, int elempack) } #if __ARM_NEON -static void softmax_pack4(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_pack4(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -289,7 +278,7 @@ static void softmax_pack4(float* _ptr, int elemcount, int stride, int size1, flo } #endif // __ARM_NEON -static void softmax_pack1(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_pack1(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -399,7 +388,7 @@ static void softmax_pack1(float* _ptr, int elemcount, int stride, int size1, flo } } -static void softmax(float* _ptr, int elemcount, int elempack, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax(float* _ptr, int elemcount, int elempack, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max { @@ -486,7 +475,7 @@ int Softmax_arm::forward_inplace(Mat& bottom_top_blob, const Option& opt) const { const int size = w; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = w * elempack; + const size_t stride = (size_t)w * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) @@ -524,7 +513,7 @@ int Softmax_arm::forward_inplace(Mat& bottom_top_blob, const Option& opt) const { const int size = w * h * d; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = bottom_top_blob.cstep * elempack; + const size_t stride = bottom_top_blob.cstep * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) @@ -782,7 +771,7 @@ static void softmax_bf16s(unsigned short* _ptr, int elemcount, int elempack) } #if __ARM_NEON -static void softmax_bf16s_pack4(unsigned short* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_bf16s_pack4(unsigned short* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -938,7 +927,7 @@ static void softmax_bf16s_pack4(unsigned short* _ptr, int elemcount, int stride, } #endif // __ARM_NEON -static void softmax_bf16s_pack1(unsigned short* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_bf16s_pack1(unsigned short* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -1099,7 +1088,7 @@ static void softmax_bf16s_pack1(unsigned short* _ptr, int elemcount, int stride, } } -static void softmax_bf16s(unsigned short* _ptr, int elemcount, int elempack, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_bf16s(unsigned short* _ptr, int elemcount, int elempack, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max { @@ -1174,7 +1163,7 @@ int Softmax_arm::forward_inplace_bf16s(Mat& bottom_top_blob, const Option& opt) { const int size = w; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = w * elempack; + const size_t stride = (size_t)w * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) @@ -1212,7 +1201,7 @@ int Softmax_arm::forward_inplace_bf16s(Mat& bottom_top_blob, const Option& opt) { const int size = w * h * d; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = bottom_top_blob.cstep * elempack; + const size_t stride = bottom_top_blob.cstep * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) diff --git a/src/layer/arm/softmax_arm.h b/src/layer/arm/softmax_arm.h index 78c540845..dd10dd017 100644 --- a/src/layer/arm/softmax_arm.h +++ b/src/layer/arm/softmax_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTMAX_ARM_H #define LAYER_SOFTMAX_ARM_H diff --git a/src/layer/arm/softmax_arm_asimdhp.cpp b/src/layer/arm/softmax_arm_asimdhp.cpp index 90b5074b5..352aa3ba0 100644 --- a/src/layer/arm/softmax_arm_asimdhp.cpp +++ b/src/layer/arm/softmax_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "softmax_arm.h" @@ -153,7 +142,7 @@ static void softmax_fp16s(__fp16* _ptr, int elemcount, int elempack) } } -static void softmax_fp16s_pack8(__fp16* _ptr, int elemcount, int stride, int size1, __fp16* _maxptr, __fp16* _sumptr) +static void softmax_fp16s_pack8(__fp16* _ptr, int elemcount, size_t stride, int size1, __fp16* _maxptr, __fp16* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -390,7 +379,7 @@ static void softmax_fp16s_pack8(__fp16* _ptr, int elemcount, int stride, int siz } } -static void softmax_fp16s_pack4(__fp16* _ptr, int elemcount, int stride, int size1, __fp16* _maxptr, __fp16* _sumptr) +static void softmax_fp16s_pack4(__fp16* _ptr, int elemcount, size_t stride, int size1, __fp16* _maxptr, __fp16* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -584,7 +573,7 @@ static void softmax_fp16s_pack4(__fp16* _ptr, int elemcount, int stride, int siz } } -static void softmax_fp16s_pack1(__fp16* _ptr, int elemcount, int stride, int size1, __fp16* _maxptr, __fp16* _sumptr) +static void softmax_fp16s_pack1(__fp16* _ptr, int elemcount, size_t stride, int size1, __fp16* _maxptr, __fp16* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -725,7 +714,7 @@ static void softmax_fp16s_pack1(__fp16* _ptr, int elemcount, int stride, int siz } } -static void softmax_fp16s(__fp16* _ptr, int elemcount, int elempack, int stride, int size1, __fp16* _maxptr, __fp16* _sumptr) +static void softmax_fp16s(__fp16* _ptr, int elemcount, int elempack, size_t stride, int size1, __fp16* _maxptr, __fp16* _sumptr) { // reduce max { @@ -810,7 +799,7 @@ int Softmax_arm::forward_inplace_fp16s(Mat& bottom_top_blob, const Option& opt) { const int size = w; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = w * elempack; + const size_t stride = (size_t)w * elempack; Mat maxsum(sizen, 2, opt.num_threads, 2u, opt.workspace_allocator); if (maxsum.empty()) @@ -848,7 +837,7 @@ int Softmax_arm::forward_inplace_fp16s(Mat& bottom_top_blob, const Option& opt) { const int size = w * h * d; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = bottom_top_blob.cstep * elempack; + const size_t stride = bottom_top_blob.cstep * elempack; Mat maxsum(sizen, 2, opt.num_threads, 2u, opt.workspace_allocator); if (maxsum.empty()) diff --git a/src/layer/arm/swish_arm.cpp b/src/layer/arm/swish_arm.cpp index d68e61727..e035eb87a 100644 --- a/src/layer/arm/swish_arm.cpp +++ b/src/layer/arm/swish_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish_arm.h" diff --git a/src/layer/arm/swish_arm.h b/src/layer/arm/swish_arm.h index 907d79708..624ef9051 100644 --- a/src/layer/arm/swish_arm.h +++ b/src/layer/arm/swish_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SWISH_ARM_H #define LAYER_SWISH_ARM_H diff --git a/src/layer/arm/swish_arm_asimdhp.cpp b/src/layer/arm/swish_arm_asimdhp.cpp index 55d7fcdba..1680696e0 100644 --- a/src/layer/arm/swish_arm_asimdhp.cpp +++ b/src/layer/arm/swish_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish_arm.h" diff --git a/src/layer/arm/tanh_arm.cpp b/src/layer/arm/tanh_arm.cpp index 6e86d7ad3..3c6752067 100644 --- a/src/layer/arm/tanh_arm.cpp +++ b/src/layer/arm/tanh_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_arm.h" diff --git a/src/layer/arm/tanh_arm.h b/src/layer/arm/tanh_arm.h index db62f117a..424dd2315 100644 --- a/src/layer/arm/tanh_arm.h +++ b/src/layer/arm/tanh_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TANH_ARM_H #define LAYER_TANH_ARM_H diff --git a/src/layer/arm/tanh_arm_asimdhp.cpp b/src/layer/arm/tanh_arm_asimdhp.cpp index 42194a945..d2d83c067 100644 --- a/src/layer/arm/tanh_arm_asimdhp.cpp +++ b/src/layer/arm/tanh_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_arm.h" diff --git a/src/layer/arm/unaryop_arm.cpp b/src/layer/arm/unaryop_arm.cpp index e2dbd68c3..c5011d8b9 100644 --- a/src/layer/arm/unaryop_arm.cpp +++ b/src/layer/arm/unaryop_arm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_arm.h" diff --git a/src/layer/arm/unaryop_arm.h b/src/layer/arm/unaryop_arm.h index ab4b23c05..8d2405d70 100644 --- a/src/layer/arm/unaryop_arm.h +++ b/src/layer/arm/unaryop_arm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNARYOP_ARM_H #define LAYER_UNARYOP_ARM_H diff --git a/src/layer/arm/unaryop_arm_asimdhp.cpp b/src/layer/arm/unaryop_arm_asimdhp.cpp index f42848226..028e1a3ae 100644 --- a/src/layer/arm/unaryop_arm_asimdhp.cpp +++ b/src/layer/arm/unaryop_arm_asimdhp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_arm.h" diff --git a/src/layer/batchnorm.cpp b/src/layer/batchnorm.cpp index b13e5ef29..718da2a70 100644 --- a/src/layer/batchnorm.cpp +++ b/src/layer/batchnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm.h" diff --git a/src/layer/batchnorm.h b/src/layer/batchnorm.h index e2b56cda2..6043d0e41 100644 --- a/src/layer/batchnorm.h +++ b/src/layer/batchnorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BATCHNORM_H #define LAYER_BATCHNORM_H diff --git a/src/layer/bias.cpp b/src/layer/bias.cpp index 549e7177e..18c7e04b6 100644 --- a/src/layer/bias.cpp +++ b/src/layer/bias.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "bias.h" diff --git a/src/layer/bias.h b/src/layer/bias.h index f540d34e7..4bf703f5e 100644 --- a/src/layer/bias.h +++ b/src/layer/bias.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BIAS_H #define LAYER_BIAS_H diff --git a/src/layer/binaryop.cpp b/src/layer/binaryop.cpp index 52d3d083b..75ed67ae6 100644 --- a/src/layer/binaryop.cpp +++ b/src/layer/binaryop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop.h" diff --git a/src/layer/binaryop.h b/src/layer/binaryop.h index 5fc06918d..20706cfe1 100644 --- a/src/layer/binaryop.h +++ b/src/layer/binaryop.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BINARYOP_H #define LAYER_BINARYOP_H diff --git a/src/layer/bnll.cpp b/src/layer/bnll.cpp index 9341ebcfc..7ea74dcb0 100644 --- a/src/layer/bnll.cpp +++ b/src/layer/bnll.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "bnll.h" diff --git a/src/layer/bnll.h b/src/layer/bnll.h index e1293aa95..b814065d1 100644 --- a/src/layer/bnll.h +++ b/src/layer/bnll.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BNLL_H #define LAYER_BNLL_H diff --git a/src/layer/cast.cpp b/src/layer/cast.cpp index 49b7e3e56..3dcff38f3 100644 --- a/src/layer/cast.cpp +++ b/src/layer/cast.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cast.h" diff --git a/src/layer/cast.h b/src/layer/cast.h index e178e5bc4..036e61efe 100644 --- a/src/layer/cast.h +++ b/src/layer/cast.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CAST_H #define LAYER_CAST_H diff --git a/src/layer/celu.cpp b/src/layer/celu.cpp index 8c17244c0..630c3dc0c 100644 --- a/src/layer/celu.cpp +++ b/src/layer/celu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "celu.h" diff --git a/src/layer/celu.h b/src/layer/celu.h index 5e4b9c87f..ba0471dbb 100644 --- a/src/layer/celu.h +++ b/src/layer/celu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CELU_H #define LAYER_CELU_H diff --git a/src/layer/clip.cpp b/src/layer/clip.cpp index cf77f2606..95c7cda92 100644 --- a/src/layer/clip.cpp +++ b/src/layer/clip.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "clip.h" diff --git a/src/layer/clip.h b/src/layer/clip.h index 608964c02..0ccb145e4 100644 --- a/src/layer/clip.h +++ b/src/layer/clip.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CLIP_H #define LAYER_CLIP_H diff --git a/src/layer/concat.cpp b/src/layer/concat.cpp index 268c97ca7..84debc76d 100644 --- a/src/layer/concat.cpp +++ b/src/layer/concat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "concat.h" diff --git a/src/layer/concat.h b/src/layer/concat.h index bf2fe77e6..86f184308 100644 --- a/src/layer/concat.h +++ b/src/layer/concat.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONCAT_H #define LAYER_CONCAT_H diff --git a/src/layer/convolution.cpp b/src/layer/convolution.cpp index c55b3f276..8533ee0b0 100644 --- a/src/layer/convolution.cpp +++ b/src/layer/convolution.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution.h" diff --git a/src/layer/convolution.h b/src/layer/convolution.h index 7af0735fd..bc57aed91 100644 --- a/src/layer/convolution.h +++ b/src/layer/convolution.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION_H #define LAYER_CONVOLUTION_H diff --git a/src/layer/convolution1d.cpp b/src/layer/convolution1d.cpp index 7d6be1e11..3ee960b88 100644 --- a/src/layer/convolution1d.cpp +++ b/src/layer/convolution1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d.h" diff --git a/src/layer/convolution1d.h b/src/layer/convolution1d.h index d87099e25..c92c0acfc 100644 --- a/src/layer/convolution1d.h +++ b/src/layer/convolution1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION1D_H #define LAYER_CONVOLUTION1D_H diff --git a/src/layer/convolution3d.cpp b/src/layer/convolution3d.cpp index 9db45df4c..52d41dbca 100644 --- a/src/layer/convolution3d.cpp +++ b/src/layer/convolution3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution3d.h" diff --git a/src/layer/convolution3d.h b/src/layer/convolution3d.h index aee377420..7dfa16870 100644 --- a/src/layer/convolution3d.h +++ b/src/layer/convolution3d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION3D_H #define LAYER_CONVOLUTION3D_H diff --git a/src/layer/convolutiondepthwise.cpp b/src/layer/convolutiondepthwise.cpp index fb8e1e5c0..bdc54f6a3 100644 --- a/src/layer/convolutiondepthwise.cpp +++ b/src/layer/convolutiondepthwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise.h" diff --git a/src/layer/convolutiondepthwise.h b/src/layer/convolutiondepthwise.h index 8a955dbd2..5bb25d85e 100644 --- a/src/layer/convolutiondepthwise.h +++ b/src/layer/convolutiondepthwise.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE_H #define LAYER_CONVOLUTIONDEPTHWISE_H diff --git a/src/layer/convolutiondepthwise1d.cpp b/src/layer/convolutiondepthwise1d.cpp index 2ace80658..ea5e2b057 100644 --- a/src/layer/convolutiondepthwise1d.cpp +++ b/src/layer/convolutiondepthwise1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise1d.h" diff --git a/src/layer/convolutiondepthwise1d.h b/src/layer/convolutiondepthwise1d.h index 6026f0498..cc3de1a5b 100644 --- a/src/layer/convolutiondepthwise1d.h +++ b/src/layer/convolutiondepthwise1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE1D_H #define LAYER_CONVOLUTIONDEPTHWISE1D_H diff --git a/src/layer/convolutiondepthwise3d.cpp b/src/layer/convolutiondepthwise3d.cpp index ba4e46c7a..8d587004f 100644 --- a/src/layer/convolutiondepthwise3d.cpp +++ b/src/layer/convolutiondepthwise3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise3d.h" diff --git a/src/layer/convolutiondepthwise3d.h b/src/layer/convolutiondepthwise3d.h index e8aa1db0c..678ecfff9 100644 --- a/src/layer/convolutiondepthwise3d.h +++ b/src/layer/convolutiondepthwise3d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE3D_H #define LAYER_CONVOLUTIONDEPTHWISE3D_H diff --git a/src/layer/copyto.cpp b/src/layer/copyto.cpp index 8e1650fe4..a471b17dc 100644 --- a/src/layer/copyto.cpp +++ b/src/layer/copyto.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "copyto.h" diff --git a/src/layer/copyto.h b/src/layer/copyto.h index f1a6eb3a6..91f03c101 100644 --- a/src/layer/copyto.h +++ b/src/layer/copyto.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_COPYTO_H #define LAYER_COPYTO_H diff --git a/src/layer/crop.cpp b/src/layer/crop.cpp index 01d1c8bce..becf012d2 100644 --- a/src/layer/crop.cpp +++ b/src/layer/crop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "crop.h" diff --git a/src/layer/crop.h b/src/layer/crop.h index bad3b4822..ec538c577 100644 --- a/src/layer/crop.h +++ b/src/layer/crop.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CROP_H #define LAYER_CROP_H diff --git a/src/layer/cumulativesum.cpp b/src/layer/cumulativesum.cpp index 7cff0f518..0403b3b52 100644 --- a/src/layer/cumulativesum.cpp +++ b/src/layer/cumulativesum.cpp @@ -1,16 +1,5 @@ -// Copyright (c) 2023 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "cumulativesum.h" diff --git a/src/layer/cumulativesum.h b/src/layer/cumulativesum.h index e50f370b7..5e84192b2 100644 --- a/src/layer/cumulativesum.h +++ b/src/layer/cumulativesum.h @@ -1,16 +1,5 @@ -// Copyright (c) 2023 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CUMULATIVESUM_H #define LAYER_CUMULATIVESUM_H diff --git a/src/layer/deconvolution.cpp b/src/layer/deconvolution.cpp index 438e2bf72..c78046cf2 100644 --- a/src/layer/deconvolution.cpp +++ b/src/layer/deconvolution.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution.h" diff --git a/src/layer/deconvolution.h b/src/layer/deconvolution.h index ece5e1e50..f18f4adc0 100644 --- a/src/layer/deconvolution.h +++ b/src/layer/deconvolution.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION_H #define LAYER_DECONVOLUTION_H diff --git a/src/layer/deconvolution1d.cpp b/src/layer/deconvolution1d.cpp index 0dd7ae470..19074a1ed 100644 --- a/src/layer/deconvolution1d.cpp +++ b/src/layer/deconvolution1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution1d.h" diff --git a/src/layer/deconvolution1d.h b/src/layer/deconvolution1d.h index c3b64dd56..0fed20fb9 100644 --- a/src/layer/deconvolution1d.h +++ b/src/layer/deconvolution1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION1D_H #define LAYER_DECONVOLUTION1D_H diff --git a/src/layer/deconvolution3d.cpp b/src/layer/deconvolution3d.cpp index 45bc3690a..82df85368 100644 --- a/src/layer/deconvolution3d.cpp +++ b/src/layer/deconvolution3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution3d.h" diff --git a/src/layer/deconvolution3d.h b/src/layer/deconvolution3d.h index 3545c040c..7fdba160c 100644 --- a/src/layer/deconvolution3d.h +++ b/src/layer/deconvolution3d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION3D_H #define LAYER_DECONVOLUTION3D_H diff --git a/src/layer/deconvolutiondepthwise.cpp b/src/layer/deconvolutiondepthwise.cpp index 462ade2a2..bd08acd4c 100644 --- a/src/layer/deconvolutiondepthwise.cpp +++ b/src/layer/deconvolutiondepthwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise.h" diff --git a/src/layer/deconvolutiondepthwise.h b/src/layer/deconvolutiondepthwise.h index 8e6507d64..6c0b5dd5c 100644 --- a/src/layer/deconvolutiondepthwise.h +++ b/src/layer/deconvolutiondepthwise.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE_H #define LAYER_DECONVOLUTIONDEPTHWISE_H diff --git a/src/layer/deconvolutiondepthwise1d.cpp b/src/layer/deconvolutiondepthwise1d.cpp index 955795eb7..b982ebbe5 100644 --- a/src/layer/deconvolutiondepthwise1d.cpp +++ b/src/layer/deconvolutiondepthwise1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise1d.h" diff --git a/src/layer/deconvolutiondepthwise1d.h b/src/layer/deconvolutiondepthwise1d.h index 1ed1513d2..c5dc7bca5 100644 --- a/src/layer/deconvolutiondepthwise1d.h +++ b/src/layer/deconvolutiondepthwise1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE1D_H #define LAYER_DECONVOLUTIONDEPTHWISE1D_H diff --git a/src/layer/deconvolutiondepthwise3d.cpp b/src/layer/deconvolutiondepthwise3d.cpp index 1f96dd013..edac91681 100644 --- a/src/layer/deconvolutiondepthwise3d.cpp +++ b/src/layer/deconvolutiondepthwise3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise3d.h" diff --git a/src/layer/deconvolutiondepthwise3d.h b/src/layer/deconvolutiondepthwise3d.h index 7820b1bbf..5e06d031a 100644 --- a/src/layer/deconvolutiondepthwise3d.h +++ b/src/layer/deconvolutiondepthwise3d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE3D_H #define LAYER_DECONVOLUTIONDEPTHWISE3D_H diff --git a/src/layer/deepcopy.cpp b/src/layer/deepcopy.cpp index 41139b040..75f0eac20 100644 --- a/src/layer/deepcopy.cpp +++ b/src/layer/deepcopy.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deepcopy.h" diff --git a/src/layer/deepcopy.h b/src/layer/deepcopy.h index 4e9015f2a..ec231dfc8 100644 --- a/src/layer/deepcopy.h +++ b/src/layer/deepcopy.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEEPCOPY_H #define LAYER_DEEPCOPY_H diff --git a/src/layer/deformableconv2d.cpp b/src/layer/deformableconv2d.cpp index 36eb9cd07..a8c6806be 100644 --- a/src/layer/deformableconv2d.cpp +++ b/src/layer/deformableconv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deformableconv2d.h" diff --git a/src/layer/deformableconv2d.h b/src/layer/deformableconv2d.h index d7315fc3a..fcecb5959 100644 --- a/src/layer/deformableconv2d.h +++ b/src/layer/deformableconv2d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEFORMABLECONV2D_H #define LAYER_DEFORMABLECONV2D_H diff --git a/src/layer/dequantize.cpp b/src/layer/dequantize.cpp index 9adf65210..afb6b6f2f 100644 --- a/src/layer/dequantize.cpp +++ b/src/layer/dequantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dequantize.h" diff --git a/src/layer/dequantize.h b/src/layer/dequantize.h index 39cd209ec..c3d5cba15 100644 --- a/src/layer/dequantize.h +++ b/src/layer/dequantize.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEQUANTIZE_H #define LAYER_DEQUANTIZE_H diff --git a/src/layer/detectionoutput.cpp b/src/layer/detectionoutput.cpp index f90b90478..24ff3a0b7 100644 --- a/src/layer/detectionoutput.cpp +++ b/src/layer/detectionoutput.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "detectionoutput.h" diff --git a/src/layer/detectionoutput.h b/src/layer/detectionoutput.h index 02347da20..b7d7b333d 100644 --- a/src/layer/detectionoutput.h +++ b/src/layer/detectionoutput.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DETECTIONOUTPUT_H #define LAYER_DETECTIONOUTPUT_H diff --git a/src/layer/diag.cpp b/src/layer/diag.cpp index 549a353d0..e18dbaa8f 100644 --- a/src/layer/diag.cpp +++ b/src/layer/diag.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "diag.h" diff --git a/src/layer/diag.h b/src/layer/diag.h index 8dd0babea..fe6bf9bf2 100644 --- a/src/layer/diag.h +++ b/src/layer/diag.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DIAG_H #define LAYER_DIAG_H diff --git a/src/layer/dropout.cpp b/src/layer/dropout.cpp index 9e5ddaa17..1f7470ac1 100644 --- a/src/layer/dropout.cpp +++ b/src/layer/dropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dropout.h" diff --git a/src/layer/dropout.h b/src/layer/dropout.h index 396740abf..94cf6d760 100644 --- a/src/layer/dropout.h +++ b/src/layer/dropout.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DROPOUT_H #define LAYER_DROPOUT_H diff --git a/src/layer/einsum.cpp b/src/layer/einsum.cpp index bbc3bee67..f57f58be1 100644 --- a/src/layer/einsum.cpp +++ b/src/layer/einsum.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "einsum.h" #include diff --git a/src/layer/einsum.h b/src/layer/einsum.h index 07f484c42..104d6a455 100644 --- a/src/layer/einsum.h +++ b/src/layer/einsum.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_EINSUM_H #define LAYER_EINSUM_H diff --git a/src/layer/eltwise.cpp b/src/layer/eltwise.cpp index 0a9d155dd..27f88c148 100644 --- a/src/layer/eltwise.cpp +++ b/src/layer/eltwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise.h" diff --git a/src/layer/eltwise.h b/src/layer/eltwise.h index 4256bc30d..54e2bce8c 100644 --- a/src/layer/eltwise.h +++ b/src/layer/eltwise.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELTWISE_H #define LAYER_ELTWISE_H diff --git a/src/layer/elu.cpp b/src/layer/elu.cpp index e710d4f1c..8568d2745 100644 --- a/src/layer/elu.cpp +++ b/src/layer/elu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "elu.h" diff --git a/src/layer/elu.h b/src/layer/elu.h index 8d44124cb..189f69b41 100644 --- a/src/layer/elu.h +++ b/src/layer/elu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELU_H #define LAYER_ELU_H diff --git a/src/layer/embed.cpp b/src/layer/embed.cpp index 98f0c9fe5..a74aab4f3 100644 --- a/src/layer/embed.cpp +++ b/src/layer/embed.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "embed.h" diff --git a/src/layer/embed.h b/src/layer/embed.h index b94c2b17b..90ecfbb7e 100644 --- a/src/layer/embed.h +++ b/src/layer/embed.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_EMBED_H #define LAYER_EMBED_H diff --git a/src/layer/erf.cpp b/src/layer/erf.cpp index 5cd707e94..6d7f9fce9 100644 --- a/src/layer/erf.cpp +++ b/src/layer/erf.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "erf.h" diff --git a/src/layer/erf.h b/src/layer/erf.h index 31a7058b9..f2788a177 100644 --- a/src/layer/erf.h +++ b/src/layer/erf.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ERF_H #define LAYER_ERF_H diff --git a/src/layer/exp.cpp b/src/layer/exp.cpp index 83644a793..66bdf5b51 100644 --- a/src/layer/exp.cpp +++ b/src/layer/exp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "exp.h" diff --git a/src/layer/exp.h b/src/layer/exp.h index df1c53f89..5a2937626 100644 --- a/src/layer/exp.h +++ b/src/layer/exp.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_EXP_H #define LAYER_EXP_H diff --git a/src/layer/expanddims.cpp b/src/layer/expanddims.cpp index 473a3b71b..12e18d671 100644 --- a/src/layer/expanddims.cpp +++ b/src/layer/expanddims.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "expanddims.h" diff --git a/src/layer/expanddims.h b/src/layer/expanddims.h index 4c8c990f7..0aa25aede 100644 --- a/src/layer/expanddims.h +++ b/src/layer/expanddims.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_EXPANDDIMS_H #define LAYER_EXPANDDIMS_H diff --git a/src/layer/flatten.cpp b/src/layer/flatten.cpp index f6f0939a0..5de5befbc 100644 --- a/src/layer/flatten.cpp +++ b/src/layer/flatten.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "flatten.h" diff --git a/src/layer/flatten.h b/src/layer/flatten.h index 22667a45a..0c592584c 100644 --- a/src/layer/flatten.h +++ b/src/layer/flatten.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FLATTEN_H #define LAYER_FLATTEN_H diff --git a/src/layer/fold.cpp b/src/layer/fold.cpp index 60242ad81..d1c36657c 100644 --- a/src/layer/fold.cpp +++ b/src/layer/fold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fold.h" diff --git a/src/layer/fold.h b/src/layer/fold.h index e6eccad55..ea30d7d81 100644 --- a/src/layer/fold.h +++ b/src/layer/fold.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FOLD_H #define LAYER_FOLD_H diff --git a/src/layer/fused_activation.h b/src/layer/fused_activation.h index d59192577..c1d6647f4 100644 --- a/src/layer/fused_activation.h +++ b/src/layer/fused_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef FUSED_ACTIVATION_H #define FUSED_ACTIVATION_H diff --git a/src/layer/gelu.cpp b/src/layer/gelu.cpp index d10726537..d21d7f4c9 100644 --- a/src/layer/gelu.cpp +++ b/src/layer/gelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gelu.h" diff --git a/src/layer/gelu.h b/src/layer/gelu.h index a4fb37a6f..4b9e48a41 100644 --- a/src/layer/gelu.h +++ b/src/layer/gelu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GELU_H #define LAYER_GELU_H diff --git a/src/layer/gemm.cpp b/src/layer/gemm.cpp index b4a263f9b..45a5065cb 100644 --- a/src/layer/gemm.cpp +++ b/src/layer/gemm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm.h" @@ -147,10 +136,10 @@ static void gemm_transB(const Mat& A, const Mat& BT, const Mat& C, Mat& top_blob #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < M; i++) { - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; - const int BT_hstep = BT.dims == 3 ? (int)BT.cstep : BT.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; + const size_t BT_hstep = BT.dims == 3 ? BT.cstep : (size_t)BT.w; const float* ptrA = (const float*)A + i * A_hstep; const float* ptrC = C; @@ -223,7 +212,7 @@ static void gemm_transB_int8(const Mat& A_int8, const Mat& BT_int8, const Mat& A #pragma omp parallel for num_threads(opt.num_threads) for (int i = 0; i < M; i++) { - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const signed char* ptrA = A_int8.row(i); const float* ptrC = C; @@ -317,7 +306,7 @@ int Gemm::forward(const std::vector& bottom_blobs, std::vector& top_bl // transpose A to row-major A.create((A0.dims == 3 ? A0.c : A0.h), A0.w, elemsize, opt.workspace_allocator); - const int A0_hstep = A0.dims == 3 ? (int)A0.cstep : A0.w; + const size_t A0_hstep = A0.dims == 3 ? A0.cstep : (size_t)A0.w; for (int i = 0; i < A.h; i++) { @@ -335,7 +324,7 @@ int Gemm::forward(const std::vector& bottom_blobs, std::vector& top_bl // transpose B to col-major BT.create((B0.dims == 3 ? B0.c : B0.h), B0.w, elemsize, opt.workspace_allocator); - const int B0_hstep = B0.dims == 3 ? (int)B0.cstep : B0.w; + const size_t B0_hstep = B0.dims == 3 ? B0.cstep : (size_t)B0.w; for (int i = 0; i < BT.h; i++) { @@ -487,7 +476,7 @@ int Gemm::forward_int8(const std::vector& bottom_blobs, std::vector& t for (int i = 0; i < A_int8.h; i++) { - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; const float* ptr = (const float*)A + i * A_hstep; float absmax = 0.f; @@ -518,7 +507,7 @@ int Gemm::forward_int8(const std::vector& bottom_blobs, std::vector& t float absmax = 0.f; for (int i = 0; i < B0_int8.h; i++) { - const int B_hstep = B0.dims == 3 ? (int)B0.cstep : B0.w; + const size_t B_hstep = B0.dims == 3 ? B0.cstep : (size_t)B0.w; const float* ptr = (const float*)B0 + i * B_hstep; for (int k = 0; k < B0_int8.w; k++) @@ -531,7 +520,7 @@ int Gemm::forward_int8(const std::vector& bottom_blobs, std::vector& t for (int i = 0; i < B0_int8.h; i++) { - const int B_hstep = B0.dims == 3 ? (int)B0.cstep : B0.w; + const size_t B_hstep = B0.dims == 3 ? B0.cstep : (size_t)B0.w; const float* ptr = (const float*)B0 + i * B_hstep; signed char* ptrBi = B0_int8.row(i); diff --git a/src/layer/gemm.h b/src/layer/gemm.h index 8408772c1..120d9ee91 100644 --- a/src/layer/gemm.h +++ b/src/layer/gemm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GEMM_H #define LAYER_GEMM_H diff --git a/src/layer/glu.cpp b/src/layer/glu.cpp index 8f8e057e9..df79123aa 100644 --- a/src/layer/glu.cpp +++ b/src/layer/glu.cpp @@ -1,16 +1,5 @@ -// Copyright (c) 2022 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "glu.h" @@ -133,7 +122,7 @@ int GLU::forward(const Mat& bottom_blob, Mat& top_blob, top_blob.create(out_w, out_h, out_c, sizeof(float), opt.blob_allocator); - int offset = out_c * bottom_blob.cstep; + size_t offset = out_c * bottom_blob.cstep; int size = w * h; #pragma omp parallel for num_threads(opt.num_threads) diff --git a/src/layer/glu.h b/src/layer/glu.h index 003682955..035a3a7fe 100644 --- a/src/layer/glu.h +++ b/src/layer/glu.h @@ -1,16 +1,5 @@ -// Copyright (c) 2022 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GLU_H #define LAYER_GLU_H diff --git a/src/layer/gridsample.cpp b/src/layer/gridsample.cpp index abeec6fa5..52ff52ed9 100644 --- a/src/layer/gridsample.cpp +++ b/src/layer/gridsample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// coord compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to coord writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gridsample.h" diff --git a/src/layer/gridsample.h b/src/layer/gridsample.h index f6e17c9d2..e808e7586 100644 --- a/src/layer/gridsample.h +++ b/src/layer/gridsample.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GRIDSAMPLE_H #define LAYER_GRIDSAMPLE_H diff --git a/src/layer/groupnorm.cpp b/src/layer/groupnorm.cpp index 8f96c8b5a..fa654ba0d 100644 --- a/src/layer/groupnorm.cpp +++ b/src/layer/groupnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "groupnorm.h" diff --git a/src/layer/groupnorm.h b/src/layer/groupnorm.h index b6bd5a6d7..2f693ec1c 100644 --- a/src/layer/groupnorm.h +++ b/src/layer/groupnorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GROUPNORM_H #define LAYER_GROUPNORM_H diff --git a/src/layer/gru.cpp b/src/layer/gru.cpp index 6da1f715d..71b8242d7 100644 --- a/src/layer/gru.cpp +++ b/src/layer/gru.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gru.h" diff --git a/src/layer/gru.h b/src/layer/gru.h index 1f9d73cf7..31725c4c5 100644 --- a/src/layer/gru.h +++ b/src/layer/gru.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GRU_H #define LAYER_GRU_H diff --git a/src/layer/hardsigmoid.cpp b/src/layer/hardsigmoid.cpp index 060b08e63..a63c7db97 100644 --- a/src/layer/hardsigmoid.cpp +++ b/src/layer/hardsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid.h" diff --git a/src/layer/hardsigmoid.h b/src/layer/hardsigmoid.h index 57b7074da..583981ddd 100644 --- a/src/layer/hardsigmoid.h +++ b/src/layer/hardsigmoid.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSIGMOID_H #define LAYER_HARDSIGMOID_H diff --git a/src/layer/hardswish.cpp b/src/layer/hardswish.cpp index 2bcc17d82..f8b959f8c 100644 --- a/src/layer/hardswish.cpp +++ b/src/layer/hardswish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish.h" diff --git a/src/layer/hardswish.h b/src/layer/hardswish.h index 021db2f8d..f69371250 100644 --- a/src/layer/hardswish.h +++ b/src/layer/hardswish.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSWISH_H #define LAYER_HARDSWISH_H diff --git a/src/layer/innerproduct.cpp b/src/layer/innerproduct.cpp index 9cb422d21..2a8104a0f 100644 --- a/src/layer/innerproduct.cpp +++ b/src/layer/innerproduct.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct.h" diff --git a/src/layer/innerproduct.h b/src/layer/innerproduct.h index becf7b1d0..57549aa50 100644 --- a/src/layer/innerproduct.h +++ b/src/layer/innerproduct.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INNERPRODUCT_H #define LAYER_INNERPRODUCT_H diff --git a/src/layer/input.cpp b/src/layer/input.cpp index 2f63c9949..e0f83ae76 100644 --- a/src/layer/input.cpp +++ b/src/layer/input.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "input.h" diff --git a/src/layer/input.h b/src/layer/input.h index ba26d3f7d..ca1ac6edc 100644 --- a/src/layer/input.h +++ b/src/layer/input.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INPUT_H #define LAYER_INPUT_H diff --git a/src/layer/instancenorm.cpp b/src/layer/instancenorm.cpp index 27dba6c2a..5648340f7 100644 --- a/src/layer/instancenorm.cpp +++ b/src/layer/instancenorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "instancenorm.h" diff --git a/src/layer/instancenorm.h b/src/layer/instancenorm.h index 9a37932ac..49a9f2f12 100644 --- a/src/layer/instancenorm.h +++ b/src/layer/instancenorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INSTANCENORM_H #define LAYER_INSTANCENORM_H diff --git a/src/layer/interp.cpp b/src/layer/interp.cpp index 174694955..6bab7221c 100644 --- a/src/layer/interp.cpp +++ b/src/layer/interp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp.h" diff --git a/src/layer/interp.h b/src/layer/interp.h index 1bf397c02..190f42877 100644 --- a/src/layer/interp.h +++ b/src/layer/interp.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INTERP_H #define LAYER_INTERP_H diff --git a/src/layer/inversespectrogram.cpp b/src/layer/inversespectrogram.cpp index 08aa0f86d..99610d5b5 100644 --- a/src/layer/inversespectrogram.cpp +++ b/src/layer/inversespectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "inversespectrogram.h" diff --git a/src/layer/inversespectrogram.h b/src/layer/inversespectrogram.h index 969868d15..20472cfca 100644 --- a/src/layer/inversespectrogram.h +++ b/src/layer/inversespectrogram.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INVERSESPECTROGRAM_H #define LAYER_INVERSESPECTROGRAM_H diff --git a/src/layer/layernorm.cpp b/src/layer/layernorm.cpp index 5c9f42bae..69b8b9573 100644 --- a/src/layer/layernorm.cpp +++ b/src/layer/layernorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layernorm.h" diff --git a/src/layer/layernorm.h b/src/layer/layernorm.h index 375c0eb40..76544da02 100644 --- a/src/layer/layernorm.h +++ b/src/layer/layernorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LAYERNORM_H #define LAYER_LAYERNORM_H diff --git a/src/layer/log.cpp b/src/layer/log.cpp index 422ebbb22..d15b4e6f5 100644 --- a/src/layer/log.cpp +++ b/src/layer/log.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "log.h" diff --git a/src/layer/log.h b/src/layer/log.h index 185a14076..8e4158c4f 100644 --- a/src/layer/log.h +++ b/src/layer/log.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LOG_H #define LAYER_LOG_H diff --git a/src/layer/loongarch/absval_loongarch.cpp b/src/layer/loongarch/absval_loongarch.cpp index ea60b01ea..f900f969f 100644 --- a/src/layer/loongarch/absval_loongarch.cpp +++ b/src/layer/loongarch/absval_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "absval_loongarch.h" diff --git a/src/layer/loongarch/absval_loongarch.h b/src/layer/loongarch/absval_loongarch.h index 855f959cf..e0d2f30b1 100644 --- a/src/layer/loongarch/absval_loongarch.h +++ b/src/layer/loongarch/absval_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ABSVAL_LOONGARCH_H #define LAYER_ABSVAL_LOONGARCH_H diff --git a/src/layer/loongarch/batchnorm_loongarch.cpp b/src/layer/loongarch/batchnorm_loongarch.cpp index f0e33b78e..fe2a856e8 100644 --- a/src/layer/loongarch/batchnorm_loongarch.cpp +++ b/src/layer/loongarch/batchnorm_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_loongarch.h" diff --git a/src/layer/loongarch/batchnorm_loongarch.h b/src/layer/loongarch/batchnorm_loongarch.h index fb477a9ae..81137bb36 100644 --- a/src/layer/loongarch/batchnorm_loongarch.h +++ b/src/layer/loongarch/batchnorm_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BATCHNORM_LOONGARCH_H #define LAYER_BATCHNORM_LOONGARCH_H diff --git a/src/layer/loongarch/bias_loongarch.cpp b/src/layer/loongarch/bias_loongarch.cpp index 74129a8d3..ba7885c1d 100644 --- a/src/layer/loongarch/bias_loongarch.cpp +++ b/src/layer/loongarch/bias_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "bias_loongarch.h" diff --git a/src/layer/loongarch/bias_loongarch.h b/src/layer/loongarch/bias_loongarch.h index 358249974..acfdb9dfe 100644 --- a/src/layer/loongarch/bias_loongarch.h +++ b/src/layer/loongarch/bias_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BIAS_LOONGARCH_H #define LAYER_BIAS_LOONGARCH_H diff --git a/src/layer/loongarch/binaryop_loongarch.cpp b/src/layer/loongarch/binaryop_loongarch.cpp index 7829ba2d8..6f7ed45c5 100644 --- a/src/layer/loongarch/binaryop_loongarch.cpp +++ b/src/layer/loongarch/binaryop_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_loongarch.h" diff --git a/src/layer/loongarch/binaryop_loongarch.h b/src/layer/loongarch/binaryop_loongarch.h index 2fc401ad6..dd85cc231 100644 --- a/src/layer/loongarch/binaryop_loongarch.h +++ b/src/layer/loongarch/binaryop_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BINARYOP_LOONGARCH_H #define LAYER_BINARYOP_LOONGARCH_H diff --git a/src/layer/loongarch/cast_loongarch.cpp b/src/layer/loongarch/cast_loongarch.cpp index 2e956657f..b2a0bb8ac 100644 --- a/src/layer/loongarch/cast_loongarch.cpp +++ b/src/layer/loongarch/cast_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "cast_loongarch.h" diff --git a/src/layer/loongarch/cast_loongarch.h b/src/layer/loongarch/cast_loongarch.h index 8925f242e..38278ac3c 100644 --- a/src/layer/loongarch/cast_loongarch.h +++ b/src/layer/loongarch/cast_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CAST_LOONGARCH_H #define LAYER_CAST_LOONGARCH_H diff --git a/src/layer/loongarch/clip_loongarch.cpp b/src/layer/loongarch/clip_loongarch.cpp index 7cf0246d0..af65e2e2f 100644 --- a/src/layer/loongarch/clip_loongarch.cpp +++ b/src/layer/loongarch/clip_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "clip_loongarch.h" diff --git a/src/layer/loongarch/clip_loongarch.h b/src/layer/loongarch/clip_loongarch.h index 1ebeee2ae..0f9a99272 100644 --- a/src/layer/loongarch/clip_loongarch.h +++ b/src/layer/loongarch/clip_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CLIP_LOONGARCH_H #define LAYER_CLIP_LOONGARCH_H diff --git a/src/layer/loongarch/concat_loongarch.cpp b/src/layer/loongarch/concat_loongarch.cpp index 7b372e95f..cc4a4fd12 100644 --- a/src/layer/loongarch/concat_loongarch.cpp +++ b/src/layer/loongarch/concat_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "concat_loongarch.h" diff --git a/src/layer/loongarch/concat_loongarch.h b/src/layer/loongarch/concat_loongarch.h index 91b32ef2f..3255ef9d1 100644 --- a/src/layer/loongarch/concat_loongarch.h +++ b/src/layer/loongarch/concat_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONCAT_LOONGARCH_H #define LAYER_CONCAT_LOONGARCH_H diff --git a/src/layer/loongarch/convolution1d_loongarch.cpp b/src/layer/loongarch/convolution1d_loongarch.cpp index 95590b3d7..7a6594660 100644 --- a/src/layer/loongarch/convolution1d_loongarch.cpp +++ b/src/layer/loongarch/convolution1d_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_loongarch.h" diff --git a/src/layer/loongarch/convolution1d_loongarch.h b/src/layer/loongarch/convolution1d_loongarch.h index 922fae598..b935fe710 100644 --- a/src/layer/loongarch/convolution1d_loongarch.h +++ b/src/layer/loongarch/convolution1d_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION1D_LOONGARCH_H #define LAYER_CONVOLUTION1D_LOONGARCH_H diff --git a/src/layer/loongarch/convolution_1x1.h b/src/layer/loongarch/convolution_1x1.h index 83d377841..b5c5269b1 100644 --- a/src/layer/loongarch/convolution_1x1.h +++ b/src/layer/loongarch/convolution_1x1.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_1x1_int8.h b/src/layer/loongarch/convolution_1x1_int8.h index 08f439c48..190526a1f 100644 --- a/src/layer/loongarch/convolution_1x1_int8.h +++ b/src/layer/loongarch/convolution_1x1_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_int8_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_1x1_pack1to4_int8.h b/src/layer/loongarch/convolution_1x1_pack1to4_int8.h index 00e1e2581..a0cd5806d 100644 --- a/src/layer/loongarch/convolution_1x1_pack1to4_int8.h +++ b/src/layer/loongarch/convolution_1x1_pack1to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack1to4_int8_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_1x1_pack4.h b/src/layer/loongarch/convolution_1x1_pack4.h index cf5a5b8e3..75150bd1b 100644 --- a/src/layer/loongarch/convolution_1x1_pack4.h +++ b/src/layer/loongarch/convolution_1x1_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_1x1_pack4to1.h b/src/layer/loongarch/convolution_1x1_pack4to1.h index b87129091..c437e40b2 100644 --- a/src/layer/loongarch/convolution_1x1_pack4to1.h +++ b/src/layer/loongarch/convolution_1x1_pack4to1.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack4to1_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_1x1_pack8to1_int8.h b/src/layer/loongarch/convolution_1x1_pack8to1_int8.h index 8df0e128b..d28b456cf 100644 --- a/src/layer/loongarch/convolution_1x1_pack8to1_int8.h +++ b/src/layer/loongarch/convolution_1x1_pack8to1_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack8to1_int8_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_1x1_pack8to4_int8.h b/src/layer/loongarch/convolution_1x1_pack8to4_int8.h index 6aaa720d2..e0b9a0b3f 100644 --- a/src/layer/loongarch/convolution_1x1_pack8to4_int8.h +++ b/src/layer/loongarch/convolution_1x1_pack8to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack8to4_int8_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_3x3.h b/src/layer/loongarch/convolution_3x3.h index 66e10106b..91b8856cd 100644 --- a/src/layer/loongarch/convolution_3x3.h +++ b/src/layer/loongarch/convolution_3x3.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd23_transform_kernel_lsx(const Mat& kernel, Mat& kernel_tm2, int inch, int outch, const Option& opt) { diff --git a/src/layer/loongarch/convolution_3x3_int8.h b/src/layer/loongarch/convolution_3x3_int8.h index 3ea28dd09..8b1f84bb9 100644 --- a/src/layer/loongarch/convolution_3x3_int8.h +++ b/src/layer/loongarch/convolution_3x3_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_kernel_int8_lsx(const Mat& kernel, Mat& kernel_tm_packed, int inch, int outch, const Option& opt) { diff --git a/src/layer/loongarch/convolution_3x3_pack1to4.h b/src/layer/loongarch/convolution_3x3_pack1to4.h index 2bcb0ce16..72ab21f32 100644 --- a/src/layer/loongarch/convolution_3x3_pack1to4.h +++ b/src/layer/loongarch/convolution_3x3_pack1to4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_3x3_pack4.h b/src/layer/loongarch/convolution_3x3_pack4.h index f06bb7e90..0800e1275 100644 --- a/src/layer/loongarch/convolution_3x3_pack4.h +++ b/src/layer/loongarch/convolution_3x3_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_kernel_pack4_lsx(const Mat& kernel, Mat& kernel_tm_pack4, int inch, int outch, const Option& opt) { diff --git a/src/layer/loongarch/convolution_3x3_pack8to1_int8.h b/src/layer/loongarch/convolution_3x3_pack8to1_int8.h index 3c4f97187..f5ec9e65c 100644 --- a/src/layer/loongarch/convolution_3x3_pack8to1_int8.h +++ b/src/layer/loongarch/convolution_3x3_pack8to1_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_kernel_pack8to1_int8_lsx(const Mat& kernel, Mat& kernel_tm_pack8to1, int inch, int outch, const Option& opt) { diff --git a/src/layer/loongarch/convolution_3x3_pack8to4_int8.h b/src/layer/loongarch/convolution_3x3_pack8to4_int8.h index bf328cee7..2981d7f16 100644 --- a/src/layer/loongarch/convolution_3x3_pack8to4_int8.h +++ b/src/layer/loongarch/convolution_3x3_pack8to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_kernel_pack8to4_int8_lsx(const Mat& kernel, Mat& kernel_tm_pack8, int inch, int outch, const Option& opt) { diff --git a/src/layer/loongarch/convolution_7x7_pack1to4.h b/src/layer/loongarch/convolution_7x7_pack1to4.h index f57923b53..6e5720f0e 100644 --- a/src/layer/loongarch/convolution_7x7_pack1to4.h +++ b/src/layer/loongarch/convolution_7x7_pack1to4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s2_pack1to4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_int8.h b/src/layer/loongarch/convolution_int8.h index 22c7a8ccb..57001d0a2 100644 --- a/src/layer/loongarch/convolution_int8.h +++ b/src/layer/loongarch/convolution_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_int8(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/loongarch/convolution_loongarch.cpp b/src/layer/loongarch/convolution_loongarch.cpp index 58e1f159a..6a63e74ba 100644 --- a/src/layer/loongarch/convolution_loongarch.cpp +++ b/src/layer/loongarch/convolution_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_loongarch.h" diff --git a/src/layer/loongarch/convolution_loongarch.h b/src/layer/loongarch/convolution_loongarch.h index 7807f43f9..5e0123d96 100644 --- a/src/layer/loongarch/convolution_loongarch.h +++ b/src/layer/loongarch/convolution_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION_LOONGARCH_H #define LAYER_CONVOLUTION_LOONGARCH_H diff --git a/src/layer/loongarch/convolution_pack1to4.h b/src/layer/loongarch/convolution_pack1to4.h index b7e0123d5..d6af4bf84 100644 --- a/src/layer/loongarch/convolution_pack1to4.h +++ b/src/layer/loongarch/convolution_pack1to4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack1to4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack1ton, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/loongarch/convolution_pack1to4_int8.h b/src/layer/loongarch/convolution_pack1to4_int8.h index b043503c2..8dd15fd6e 100644 --- a/src/layer/loongarch/convolution_pack1to4_int8.h +++ b/src/layer/loongarch/convolution_pack1to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack1to4_int8_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/loongarch/convolution_pack4.h b/src/layer/loongarch/convolution_pack4.h index 66a7863f0..0dc5e5597 100644 --- a/src/layer/loongarch/convolution_pack4.h +++ b/src/layer/loongarch/convolution_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/loongarch/convolution_pack4to1.h b/src/layer/loongarch/convolution_pack4to1.h index 872759fc7..0b0b0d5ac 100644 --- a/src/layer/loongarch/convolution_pack4to1.h +++ b/src/layer/loongarch/convolution_pack4to1.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack4to1_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4to1, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/loongarch/convolution_pack8to1_int8.h b/src/layer/loongarch/convolution_pack8to1_int8.h index c7463a472..c52d35d65 100644 --- a/src/layer/loongarch/convolution_pack8to1_int8.h +++ b/src/layer/loongarch/convolution_pack8to1_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack8to1_int8_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/loongarch/convolution_pack8to4_int8.h b/src/layer/loongarch/convolution_pack8to4_int8.h index 00d90387b..3fbb58481 100644 --- a/src/layer/loongarch/convolution_pack8to4_int8.h +++ b/src/layer/loongarch/convolution_pack8to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack8to4_int8_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/loongarch/convolution_sgemm.h b/src/layer/loongarch/convolution_sgemm.h index 7b74ceac1..060161925 100644 --- a/src/layer/loongarch/convolution_sgemm.h +++ b/src/layer/loongarch/convolution_sgemm.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_lsx(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_sgemm_int8.h b/src/layer/loongarch/convolution_sgemm_int8.h index 98f477609..f90c60dbb 100644 --- a/src/layer/loongarch/convolution_sgemm_int8.h +++ b/src/layer/loongarch/convolution_sgemm_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_int8_lsx(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_sgemm_pack1to4_int8.h b/src/layer/loongarch/convolution_sgemm_pack1to4_int8.h index 3429bfae5..2821da43d 100644 --- a/src/layer/loongarch/convolution_sgemm_pack1to4_int8.h +++ b/src/layer/loongarch/convolution_sgemm_pack1to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack1to4_int8_lsx(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_sgemm_pack4.h b/src/layer/loongarch/convolution_sgemm_pack4.h index e3e7279a5..e5f5d2672 100644 --- a/src/layer/loongarch/convolution_sgemm_pack4.h +++ b/src/layer/loongarch/convolution_sgemm_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack4_lsx(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_sgemm_pack4to1.h b/src/layer/loongarch/convolution_sgemm_pack4to1.h index 3748645b4..9185817bc 100644 --- a/src/layer/loongarch/convolution_sgemm_pack4to1.h +++ b/src/layer/loongarch/convolution_sgemm_pack4to1.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack4to1_lsx(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolution_sgemm_pack8to1_int8.h b/src/layer/loongarch/convolution_sgemm_pack8to1_int8.h index 98d11a574..1dacea831 100644 --- a/src/layer/loongarch/convolution_sgemm_pack8to1_int8.h +++ b/src/layer/loongarch/convolution_sgemm_pack8to1_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack8to1_int8_lsx(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_sgemm_pack8to4_int8.h b/src/layer/loongarch/convolution_sgemm_pack8to4_int8.h index ae9090c95..89ad00c52 100644 --- a/src/layer/loongarch/convolution_sgemm_pack8to4_int8.h +++ b/src/layer/loongarch/convolution_sgemm_pack8to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack8to4_int8_lsx(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_dot.h b/src/layer/loongarch/convolution_winograd_dot.h index 9dbbe4955..c11d8df45 100644 --- a/src/layer/loongarch/convolution_winograd_dot.h +++ b/src/layer/loongarch/convolution_winograd_dot.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_lsx(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_dot_int8.h b/src/layer/loongarch/convolution_winograd_dot_int8.h index 2ae5ce4f5..c1aa166d1 100644 --- a/src/layer/loongarch/convolution_winograd_dot_int8.h +++ b/src/layer/loongarch/convolution_winograd_dot_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_int8_lsx(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_dot_pack4.h b/src/layer/loongarch/convolution_winograd_dot_pack4.h index 66002a62a..dffb4bb98 100644 --- a/src/layer/loongarch/convolution_winograd_dot_pack4.h +++ b/src/layer/loongarch/convolution_winograd_dot_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_pack4_lsx(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_dot_pack8to1_int8.h b/src/layer/loongarch/convolution_winograd_dot_pack8to1_int8.h index f87aa9ef5..66dfc8e50 100644 --- a/src/layer/loongarch/convolution_winograd_dot_pack8to1_int8.h +++ b/src/layer/loongarch/convolution_winograd_dot_pack8to1_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_pack8to1_int8_lsx(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_dot_pack8to4_int8.h b/src/layer/loongarch/convolution_winograd_dot_pack8to4_int8.h index c20400cbf..ccc60f864 100644 --- a/src/layer/loongarch/convolution_winograd_dot_pack8to4_int8.h +++ b/src/layer/loongarch/convolution_winograd_dot_pack8to4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_pack8to4_int8_lsx(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_transform.h b/src/layer/loongarch/convolution_winograd_transform.h index 624600e95..84c41291e 100644 --- a/src/layer/loongarch/convolution_winograd_transform.h +++ b/src/layer/loongarch/convolution_winograd_transform.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_input_lsx(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_transform_int8.h b/src/layer/loongarch/convolution_winograd_transform_int8.h index 09ef669e4..a83e6548c 100644 --- a/src/layer/loongarch/convolution_winograd_transform_int8.h +++ b/src/layer/loongarch/convolution_winograd_transform_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_input_int8_lsx(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_transform_pack4.h b/src/layer/loongarch/convolution_winograd_transform_pack4.h index 3969e59cf..084a66eff 100644 --- a/src/layer/loongarch/convolution_winograd_transform_pack4.h +++ b/src/layer/loongarch/convolution_winograd_transform_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_input_pack4_lsx(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_transform_pack4_int8.h b/src/layer/loongarch/convolution_winograd_transform_pack4_int8.h index 8b31ce97a..b2d86a7a0 100644 --- a/src/layer/loongarch/convolution_winograd_transform_pack4_int8.h +++ b/src/layer/loongarch/convolution_winograd_transform_pack4_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_output_pack4_int8_lsx(const Mat& top_blob_tm, Mat& top_blob, const Option& opt) { diff --git a/src/layer/loongarch/convolution_winograd_transform_pack8_int8.h b/src/layer/loongarch/convolution_winograd_transform_pack8_int8.h index 5e49a8766..d54862c68 100644 --- a/src/layer/loongarch/convolution_winograd_transform_pack8_int8.h +++ b/src/layer/loongarch/convolution_winograd_transform_pack8_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_input_pack8_int8_lsx(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/loongarch/convolutiondepthwise_3x3.h b/src/layer/loongarch/convolutiondepthwise_3x3.h index 1c37f7789..c2f0eda94 100644 --- a/src/layer/loongarch/convolutiondepthwise_3x3.h +++ b/src/layer/loongarch/convolutiondepthwise_3x3.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolutiondepthwise_3x3_pack4.h b/src/layer/loongarch/convolutiondepthwise_3x3_pack4.h index 48ae66412..b80f12af7 100644 --- a/src/layer/loongarch/convolutiondepthwise_3x3_pack4.h +++ b/src/layer/loongarch/convolutiondepthwise_3x3_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolutiondepthwise_5x5_pack4.h b/src/layer/loongarch/convolutiondepthwise_5x5_pack4.h index 4f94c5e69..d0a5fd70b 100644 --- a/src/layer/loongarch/convolutiondepthwise_5x5_pack4.h +++ b/src/layer/loongarch/convolutiondepthwise_5x5_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/loongarch/convolutiondepthwise_loongarch.cpp b/src/layer/loongarch/convolutiondepthwise_loongarch.cpp index be0c52ea4..944f5f51a 100644 --- a/src/layer/loongarch/convolutiondepthwise_loongarch.cpp +++ b/src/layer/loongarch/convolutiondepthwise_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_loongarch.h" diff --git a/src/layer/loongarch/convolutiondepthwise_loongarch.h b/src/layer/loongarch/convolutiondepthwise_loongarch.h index 35cdd8f00..57c418227 100644 --- a/src/layer/loongarch/convolutiondepthwise_loongarch.h +++ b/src/layer/loongarch/convolutiondepthwise_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE_LOONGARCH_H #define LAYER_CONVOLUTIONDEPTHWISE_LOONGARCH_H diff --git a/src/layer/loongarch/crop_loongarch.cpp b/src/layer/loongarch/crop_loongarch.cpp index d2e6382c8..d9cb3da70 100644 --- a/src/layer/loongarch/crop_loongarch.cpp +++ b/src/layer/loongarch/crop_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "crop_loongarch.h" diff --git a/src/layer/loongarch/crop_loongarch.h b/src/layer/loongarch/crop_loongarch.h index cfb4ff352..3b2accd29 100644 --- a/src/layer/loongarch/crop_loongarch.h +++ b/src/layer/loongarch/crop_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CROP_LOONGARCH_H #define LAYER_CROP_LOONGARCH_H diff --git a/src/layer/loongarch/deconvolution_loongarch.cpp b/src/layer/loongarch/deconvolution_loongarch.cpp index afdd77f47..55b0b673a 100644 --- a/src/layer/loongarch/deconvolution_loongarch.cpp +++ b/src/layer/loongarch/deconvolution_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_loongarch.h" diff --git a/src/layer/loongarch/deconvolution_loongarch.h b/src/layer/loongarch/deconvolution_loongarch.h index 00ddf67e0..0af289427 100644 --- a/src/layer/loongarch/deconvolution_loongarch.h +++ b/src/layer/loongarch/deconvolution_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION_LOONGARCH_H #define LAYER_DECONVOLUTION_LOONGARCH_H diff --git a/src/layer/loongarch/deconvolution_pack1to4.h b/src/layer/loongarch/deconvolution_pack1to4.h index ee1f932b5..c79cc1a58 100644 --- a/src/layer/loongarch/deconvolution_pack1to4.h +++ b/src/layer/loongarch/deconvolution_pack1to4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack1to4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack1ton, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/loongarch/deconvolution_pack4.h b/src/layer/loongarch/deconvolution_pack4.h index 179a41035..961eceff7 100644 --- a/src/layer/loongarch/deconvolution_pack4.h +++ b/src/layer/loongarch/deconvolution_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/loongarch/deconvolution_pack4to1.h b/src/layer/loongarch/deconvolution_pack4to1.h index e13721c2c..86ebbaa2c 100644 --- a/src/layer/loongarch/deconvolution_pack4to1.h +++ b/src/layer/loongarch/deconvolution_pack4to1.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4to1_lsx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4to1, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/loongarch/deconvolutiondepthwise_loongarch.cpp b/src/layer/loongarch/deconvolutiondepthwise_loongarch.cpp index b31786bbb..928b097fa 100644 --- a/src/layer/loongarch/deconvolutiondepthwise_loongarch.cpp +++ b/src/layer/loongarch/deconvolutiondepthwise_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_loongarch.h" diff --git a/src/layer/loongarch/deconvolutiondepthwise_loongarch.h b/src/layer/loongarch/deconvolutiondepthwise_loongarch.h index 87c5351fa..cdf64b261 100644 --- a/src/layer/loongarch/deconvolutiondepthwise_loongarch.h +++ b/src/layer/loongarch/deconvolutiondepthwise_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE_LOONGARCH_H #define LAYER_DECONVOLUTIONDEPTHWISE_LOONGARCH_H diff --git a/src/layer/loongarch/dequantize_loongarch.cpp b/src/layer/loongarch/dequantize_loongarch.cpp index eb40962f5..edb1417ae 100644 --- a/src/layer/loongarch/dequantize_loongarch.cpp +++ b/src/layer/loongarch/dequantize_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "dequantize_loongarch.h" diff --git a/src/layer/loongarch/dequantize_loongarch.h b/src/layer/loongarch/dequantize_loongarch.h index ae7d3fe64..66030cd71 100644 --- a/src/layer/loongarch/dequantize_loongarch.h +++ b/src/layer/loongarch/dequantize_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEQUANTIZE_LOONGARCH_H #define LAYER_DEQUANTIZE_LOONGARCH_H diff --git a/src/layer/loongarch/dropout_loongarch.cpp b/src/layer/loongarch/dropout_loongarch.cpp index 04a1f9ea9..4c09447a8 100644 --- a/src/layer/loongarch/dropout_loongarch.cpp +++ b/src/layer/loongarch/dropout_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "dropout_loongarch.h" diff --git a/src/layer/loongarch/dropout_loongarch.h b/src/layer/loongarch/dropout_loongarch.h index f9beff050..ac4750dd4 100644 --- a/src/layer/loongarch/dropout_loongarch.h +++ b/src/layer/loongarch/dropout_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DROPOUT_LOONGARCH_H #define LAYER_DROPOUT_LOONGARCH_H diff --git a/src/layer/loongarch/eltwise_loongarch.cpp b/src/layer/loongarch/eltwise_loongarch.cpp index 0a6ca32c3..5004433a0 100644 --- a/src/layer/loongarch/eltwise_loongarch.cpp +++ b/src/layer/loongarch/eltwise_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_loongarch.h" diff --git a/src/layer/loongarch/eltwise_loongarch.h b/src/layer/loongarch/eltwise_loongarch.h index f523132bb..cd0686ca1 100644 --- a/src/layer/loongarch/eltwise_loongarch.h +++ b/src/layer/loongarch/eltwise_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELTWISE_LOONGARCH_H #define LAYER_ELTWISE_LOONGARCH_H diff --git a/src/layer/loongarch/flatten_loongarch.cpp b/src/layer/loongarch/flatten_loongarch.cpp index fa92d2fca..cc9f41659 100644 --- a/src/layer/loongarch/flatten_loongarch.cpp +++ b/src/layer/loongarch/flatten_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "flatten_loongarch.h" diff --git a/src/layer/loongarch/flatten_loongarch.h b/src/layer/loongarch/flatten_loongarch.h index da75fd12f..148a39323 100644 --- a/src/layer/loongarch/flatten_loongarch.h +++ b/src/layer/loongarch/flatten_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FLATTEN_LOONGARCH_H #define LAYER_FLATTEN_LOONGARCH_H diff --git a/src/layer/loongarch/hardsigmoid_loongarch.cpp b/src/layer/loongarch/hardsigmoid_loongarch.cpp index 9dfedb689..66a3d4e57 100644 --- a/src/layer/loongarch/hardsigmoid_loongarch.cpp +++ b/src/layer/loongarch/hardsigmoid_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_loongarch.h" diff --git a/src/layer/loongarch/hardsigmoid_loongarch.h b/src/layer/loongarch/hardsigmoid_loongarch.h index 519a4ba95..7d42e0c25 100644 --- a/src/layer/loongarch/hardsigmoid_loongarch.h +++ b/src/layer/loongarch/hardsigmoid_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSIGMOID_LOONGARCH_H #define LAYER_HARDSIGMOID_LOONGARCH_H diff --git a/src/layer/loongarch/hardswish_loongarch.cpp b/src/layer/loongarch/hardswish_loongarch.cpp index f1417a798..4873989a8 100644 --- a/src/layer/loongarch/hardswish_loongarch.cpp +++ b/src/layer/loongarch/hardswish_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_loongarch.h" diff --git a/src/layer/loongarch/hardswish_loongarch.h b/src/layer/loongarch/hardswish_loongarch.h index ef69cb054..9eeb3716c 100644 --- a/src/layer/loongarch/hardswish_loongarch.h +++ b/src/layer/loongarch/hardswish_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSWISH_LOONGARCH_H #define LAYER_HARDSWISH_LOONGARCH_H diff --git a/src/layer/loongarch/innerproduct_loongarch.cpp b/src/layer/loongarch/innerproduct_loongarch.cpp index 0f52c7352..f7f3d1715 100644 --- a/src/layer/loongarch/innerproduct_loongarch.cpp +++ b/src/layer/loongarch/innerproduct_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_loongarch.h" diff --git a/src/layer/loongarch/innerproduct_loongarch.h b/src/layer/loongarch/innerproduct_loongarch.h index 2ae1a1e57..34d2eb410 100644 --- a/src/layer/loongarch/innerproduct_loongarch.h +++ b/src/layer/loongarch/innerproduct_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INNERPRODUCT_LOONGARCH_H #define LAYER_INNERPRODUCT_LOONGARCH_H diff --git a/src/layer/loongarch/interp_bicubic.h b/src/layer/loongarch/interp_bicubic.h index e52ba81de..eb12bda66 100644 --- a/src/layer/loongarch/interp_bicubic.h +++ b/src/layer/loongarch/interp_bicubic.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static inline void interpolate_cubic(float fx, float* coeffs) { diff --git a/src/layer/loongarch/interp_bicubic_pack4.h b/src/layer/loongarch/interp_bicubic_pack4.h index 6e52dc1e4..ca4efe252 100644 --- a/src/layer/loongarch/interp_bicubic_pack4.h +++ b/src/layer/loongarch/interp_bicubic_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/loongarch/interp_bilinear.h b/src/layer/loongarch/interp_bilinear.h index 8ace18686..1530faa38 100644 --- a/src/layer/loongarch/interp_bilinear.h +++ b/src/layer/loongarch/interp_bilinear.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void linear_coeffs(int w, int outw, int* xofs, float* alpha, int align_corner) { diff --git a/src/layer/loongarch/interp_bilinear_pack4.h b/src/layer/loongarch/interp_bilinear_pack4.h index 3702b2571..8c2d3430f 100644 --- a/src/layer/loongarch/interp_bilinear_pack4.h +++ b/src/layer/loongarch/interp_bilinear_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/loongarch/interp_loongarch.cpp b/src/layer/loongarch/interp_loongarch.cpp index 47ec8abd8..316a5bccc 100644 --- a/src/layer/loongarch/interp_loongarch.cpp +++ b/src/layer/loongarch/interp_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "interp_loongarch.h" diff --git a/src/layer/loongarch/interp_loongarch.h b/src/layer/loongarch/interp_loongarch.h index f1fa80705..149f7361e 100644 --- a/src/layer/loongarch/interp_loongarch.h +++ b/src/layer/loongarch/interp_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INTERP_LOONGARCH_H #define LAYER_INTERP_LOONGARCH_H diff --git a/src/layer/loongarch/lasx_mathfun.h b/src/layer/loongarch/lasx_mathfun.h new file mode 100644 index 000000000..28a9e6fd9 --- /dev/null +++ b/src/layer/loongarch/lasx_mathfun.h @@ -0,0 +1,604 @@ +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause + +#ifndef LASX_MATHFUN_H +#define LASX_MATHFUN_H + +#include "loongarch_usability.h" + +#include + +_LOONGARCH_FLOAT_CONST_PS256(c_0, 0.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_1, 1.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_2, 2.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_3, 3.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_4, 4.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_n1, -1.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_n3, -3.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_0p5, 0.5f); +_LOONGARCH_FLOAT_CONST_PS256(c_eps, 1E-8f); + +#define c_inv_mant_mask ~0x7f800000u +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_SQRTHF, 0.707106781186547524); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p0, 7.0376836292E-2); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p1, -1.1514610310E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p2, 1.1676998740E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p3, -1.2420140846E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p4, +1.4249322787E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p5, -1.6668057665E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p6, +2.0000714765E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p7, -2.4999993993E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_p8, +3.3333331174E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_q1, -2.12194440e-4); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_log_q2, 0.693359375); + +/* natural logarithm computed for 4 simultaneous float + * return NaN for x <= 0 + */ +static inline __m256 log256_ps(__m256 x) +{ + __m256 one = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i); + + x = __lasx_xvfmax_s(x, (__m256)__lasx_xvreplgr2vr_w(0)); /* force flush to zero on denormal values */ + __m256i invalid_mask = __lasx_xvfcmp_cle_s(x, (__m256)__lasx_xvreplgr2vr_w(0)); + + __m256i ux = (__m256i)(x); + + __m256i emm0 = __lasx_xvsrl_w(ux, __lasx_xvreplgr2vr_w(23)); + + /* keep only the fractional part */ + ux = __lasx_xvand_v(ux, __lasx_xvreplgr2vr_w(c_inv_mant_mask)); + ux = __lasx_xvor_v(ux, __lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + x = (__m256)(ux); + + emm0 = __lasx_xvsub_w(emm0, __lasx_xvreplgr2vr_w(0x7f)); + __m256 e = __lasx_xvffint_s_w(emm0); + + e = __lasx_xvfadd_s(e, one); + + /* part2: + * if( x < SQRTHF ) { + * e -= 1; + * x = x + x - 1.0; + * } else { x = x - 1.0; } + */ + __m256i mask = __lasx_xvfcmp_clt_s((__m256)x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_SQRTHF.i)); + __m256 tmp = (__m256)(__lasx_xvand_v((__m256i)(x), (__m256i)mask)); + x = __lasx_xvfsub_s(x, one); + e = __lasx_xvfsub_s(e, (__m256)(__lasx_xvand_v((__m256i)(one), (__m256i)mask))); + x = __lasx_xvfadd_s(x, tmp); + + __m256 z = __lasx_xvfmul_s(x, x); + + __m256 y = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p0.i); + + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p1.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p2.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p3.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p4.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p5.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p6.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p7.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_p8.i)); + y = __lasx_xvfmul_s(y, x); + + y = __lasx_xvfmul_s(y, z); + + tmp = __lasx_xvfmul_s(e, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_q1.i)); + y = __lasx_xvfadd_s(y, tmp); + + tmp = __lasx_xvfmul_s(z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + y = __lasx_xvfsub_s(y, tmp); + + tmp = __lasx_xvfmul_s(e, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_log_q2.i)); + x = __lasx_xvfadd_s(x, y); + x = __lasx_xvfadd_s(x, tmp); + x = (__m256)(__lasx_xvor_v((__m256i)(x), (__m256i)invalid_mask)); // negative arg will be NAN + return x; +} + +_LOONGARCH_FLOAT_CONST_PS256(c_exp_hi, 88.3762626647949f); +_LOONGARCH_FLOAT_CONST_PS256(c_exp_lo, -88.3762626647949f); + +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_LOG2EF, 1.44269504088896341); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_C1, 0.693359375); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_C2, -2.12194440e-4); + +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_p0, 1.9875691500E-4); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_p1, 1.3981999507E-3); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_p2, 8.3334519073E-3); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_p3, 4.1665795894E-2); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_p4, 1.6666665459E-1); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_exp_p5, 5.0000001201E-1); + +/* exp() computed for 4 float at once */ +static inline __m256 exp256_ps(__m256 x) +{ + __m256 tmp, fx; + + __m256 one = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i); + x = __lasx_xvfmin_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_exp_hi.i)); + x = __lasx_xvfmax_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_exp_lo.i)); + + /* express exp(x) as exp(g + n*log(2)) */ + fx = __lasx_xvfmul_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_LOG2EF.i)); + fx = __lasx_xvfadd_s(fx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + + /* perform a floorf */ + tmp = __lasx_xvffint_s_w(__lasx_xvftint_w_s(fx)); + + /* if greater, substract 1 */ + __m256i mask = __lasx_xvfcmp_clt_s(fx, tmp); + mask = __lasx_xvand_v(mask, (__m256i)one); + + fx = __lasx_xvfsub_s(tmp, (__m256)mask); + + tmp = __lasx_xvfmul_s(fx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_C1.i)); + __m256 z = __lasx_xvfmul_s(fx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_C2.i)); + x = __lasx_xvfsub_s(x, tmp); + x = __lasx_xvfsub_s(x, z); + + __m256 y = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_p0.i); + + z = __lasx_xvfmul_s(x, x); + + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_p1.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_p2.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_p3.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_p4.i)); + y = __lasx_xvfmadd_s(x, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_exp_p5.i)); + + y = __lasx_xvfmul_s(y, z); + y = __lasx_xvfadd_s(y, x); + y = __lasx_xvfadd_s(y, one); + + /* build 2^n */ + __m256i mm; + mm = __lasx_xvftintrz_w_s(fx); + mm = __lasx_xvadd_w(mm, __lasx_xvreplgr2vr_w(0x7f)); + mm = __lasx_xvsll_w(mm, __lasx_xvreplgr2vr_w(23)); + + y = __lasx_xvfmul_s(y, (__m256)mm); + return y; +} + +_LOONGARCH_FLOAT_CONST_PS256(c_minus_cephes_DP1, -0.78515625f); +_LOONGARCH_FLOAT_CONST_PS256(c_minus_cephes_DP2, -2.4187564849853515625e-4f); +_LOONGARCH_FLOAT_CONST_PS256(c_minus_cephes_DP3, -3.77489497744594108e-8f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_sin_p0, -1.9515295891E-4f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_sin_p1, 8.3321608736E-3f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_sin_p2, -1.6666654611E-1f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_cos_p0, 2.443315711809948E-005f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_cos_p1, -1.388731625493765E-003f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_cos_p2, 4.166664568298827E-002f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_FOPI, 1.27323954473516f); // 4/PI + +static inline __m256 sin256_ps(__m256 x) +{ + __m256 y; + __m256i swap_sign_bit, poly_mask, sign_bit; + __m256 n0p5 = __lasx_xvfmul_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_n1.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + + sign_bit = __lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x80000000)); + x = (__m256)__lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x7fffffff)); + + y = __lasx_xvfmul_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_FOPI.i)); + + poly_mask = __lasx_xvftintrz_w_s(y); + poly_mask = __lasx_xvadd_w(poly_mask, __lasx_xvreplgr2vr_w(1)); + poly_mask = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(~1)); + y = __lasx_xvffint_s_w(poly_mask); + + swap_sign_bit = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(4)); + swap_sign_bit = __lasx_xvslli_w(swap_sign_bit, 29); + + poly_mask = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(2)); + poly_mask = __lasx_xvseq_w(poly_mask, __lasx_xvreplgr2vr_w(0)); + + sign_bit = __lasx_xvxor_v(sign_bit, swap_sign_bit); + + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP1.i), x); + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP2.i), x); + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP3.i), x); + + y = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p0.i); + __m256 z = __lasx_xvfmul_s(x, x); + y = __lasx_xvfmadd_s(y, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p1.i)); + y = __lasx_xvfmadd_s(y, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p2.i)); + y = __lasx_xvfmul_s(y, z); + y = __lasx_xvfmul_s(y, z); + y = __lasx_xvfmadd_s(z, n0p5, y); + y = __lasx_xvfadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i)); + + __m256 y2 = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p0.i); + y2 = __lasx_xvfmadd_s(y2, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p1.i)); + y2 = __lasx_xvfmadd_s(y2, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p2.i)); + y2 = __lasx_xvfmul_s(y2, z); + y2 = __lasx_xvfmadd_s(y2, x, x); + + y2 = (__m256)__lasx_xvand_v((__m256i)y2, poly_mask); + y = (__m256)__lasx_xvand_v(__lasx_xvxor_v(poly_mask, __lasx_xvreplgr2vr_w(0xffffffff)), (__m256i)y); + y = __lasx_xvfadd_s(y, y2); + y = (__m256)__lasx_xvxor_v((__m256i)y, sign_bit); + + return y; +} + +static inline __m256 cos256_ps(__m256 x) +{ + __m256 y; + __m256i swap_sign_bit, poly_mask, sign_bit; + __m256 n0p5 = __lasx_xvfmul_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_n1.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + + x = (__m256)__lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x7fffffff)); + + y = __lasx_xvfmul_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_FOPI.i)); + + poly_mask = __lasx_xvftintrz_w_s(y); + poly_mask = __lasx_xvadd_w(poly_mask, __lasx_xvreplgr2vr_w(1)); + poly_mask = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(~1)); + y = __lasx_xvffint_s_w(poly_mask); + poly_mask = __lasx_xvsub_w(poly_mask, __lasx_xvreplgr2vr_w(2)); + + swap_sign_bit = __lasx_xvandn_v(poly_mask, __lasx_xvreplgr2vr_w(4)); + swap_sign_bit = __lasx_xvslli_w(swap_sign_bit, 29); + + poly_mask = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(2)); + poly_mask = __lasx_xvseq_w(poly_mask, __lasx_xvreplgr2vr_w(0)); + + sign_bit = swap_sign_bit; + + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP1.i), x); + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP2.i), x); + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP3.i), x); + + y = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p0.i); + __m256 z = __lasx_xvfmul_s(x, x); + y = __lasx_xvfmadd_s(y, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p1.i)); + y = __lasx_xvfmadd_s(y, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p2.i)); + y = __lasx_xvfmul_s(y, z); + y = __lasx_xvfmul_s(y, z); + y = __lasx_xvfmadd_s(z, n0p5, y); + y = __lasx_xvfadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i)); + + __m256 y2 = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p0.i); + y2 = __lasx_xvfmadd_s(y2, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p1.i)); + y2 = __lasx_xvfmadd_s(y2, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p2.i)); + y2 = __lasx_xvfmul_s(y2, z); + y2 = __lasx_xvfmadd_s(y2, x, x); + + y2 = (__m256)__lasx_xvand_v((__m256i)y2, poly_mask); + y = (__m256)__lasx_xvandn_v(poly_mask, (__m256i)y); + y = __lasx_xvfadd_s(y, y2); + y = (__m256)__lasx_xvxor_v((__m256i)y, sign_bit); + + return y; +} + +static inline void sincos256_ps(__m256 x, __m256* s, __m256* c) +{ + __m256 y; + __m256i swap_sign_bit_cos, swap_sign_bit_sin, poly_mask, sign_bit_sin, sign_bit_cos; + __m256 n0p5 = __lasx_xvfmul_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_n1.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + + sign_bit_sin = __lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x80000000)); + x = (__m256)__lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x7fffffff)); + + y = __lasx_xvfmul_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_FOPI.i)); + + poly_mask = __lasx_xvftintrz_w_s(y); + poly_mask = __lasx_xvadd_w(poly_mask, __lasx_xvreplgr2vr_w(1)); + poly_mask = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(~1)); + y = __lasx_xvffint_s_w(poly_mask); + + swap_sign_bit_cos = __lasx_xvsub_w(poly_mask, __lasx_xvreplgr2vr_w(2)); + swap_sign_bit_cos = __lasx_xvandn_v(swap_sign_bit_cos, __lasx_xvreplgr2vr_w(4)); + swap_sign_bit_cos = __lasx_xvslli_w(swap_sign_bit_cos, 29); + + swap_sign_bit_sin = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(4)); + swap_sign_bit_sin = __lasx_xvslli_w(swap_sign_bit_sin, 29); + + poly_mask = __lasx_xvand_v(poly_mask, __lasx_xvreplgr2vr_w(2)); + poly_mask = __lasx_xvseq_w(poly_mask, __lasx_xvreplgr2vr_w(0)); + + sign_bit_sin = __lasx_xvxor_v(sign_bit_sin, swap_sign_bit_sin); + sign_bit_cos = swap_sign_bit_cos; + + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP1.i), x); + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP2.i), x); + x = __lasx_xvfmadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_minus_cephes_DP3.i), x); + + __m256 z = __lasx_xvfmul_s(x, x); + y = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p0.i); + y = __lasx_xvfmadd_s(y, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p1.i)); + y = __lasx_xvfmadd_s(y, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_cos_p2.i)); + y = __lasx_xvfmul_s(y, z); + y = __lasx_xvfmul_s(y, z); + y = __lasx_xvfmadd_s(z, n0p5, y); + y = __lasx_xvfadd_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i)); + + __m256 y2 = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p0.i); + y2 = __lasx_xvfmadd_s(y2, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p1.i)); + y2 = __lasx_xvfmadd_s(y2, z, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_sin_p2.i)); + y2 = __lasx_xvfmul_s(y2, z); + y2 = __lasx_xvfmadd_s(y2, x, x); + + __m256 ysin1 = (__m256)__lasx_xvandn_v(poly_mask, (__m256i)y); + __m256 ysin2 = (__m256)__lasx_xvand_v(poly_mask, (__m256i)y2); + y2 = __lasx_xvfsub_s(y2, ysin2); + y = __lasx_xvfsub_s(y, ysin1); + + ysin1 = __lasx_xvfadd_s(ysin1, ysin2); + y = __lasx_xvfadd_s(y, y2); + + *s = (__m256)__lasx_xvxor_v((__m256i)ysin1, sign_bit_sin); + *c = (__m256)__lasx_xvxor_v((__m256i)y, sign_bit_cos); +} + +static inline __m256 tan256_ps(__m256 x) +{ + __m256 ysin, ycos; + __m256 eps = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_eps.i); + __m256 zero = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0.i); + sincos256_ps(x, &ysin, &ycos); + __m256i mask = __lasx_xvfcmp_ceq_s(ycos, eps); + mask = __lasx_xvand_v(mask, (__m256i)eps); + ycos = __lasx_xvfadd_s(ycos, (__m256)mask); + __m256 ytan = __lasx_xvfdiv_s(ysin, ycos); + return ytan; +} + +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_a4, 0.023994016f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_a5, 0.042417344f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_a2, 0.07494697f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_a3, 0.045520633f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_a0, 1.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_a1, 0.166667819f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_half_pi, 1.5707964f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_pi, 3.1415927f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_asin_npi, -3.1415927f); + +static inline __m256 asin256_ps(__m256 x) +{ + __m256 big_input_approx, input_approx, square_of_input_approx, fourth_power_of_input_approx; + __m256 is_big_input_one, output_approx, final_approx; + __m256 tmp1, tmp2, tmp3, tmp4; + __m256i mask, is_small_input, is_big_input; + + mask = __lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x80000000)); + x = (__m256)__lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x7fffffff)); + + is_small_input = __lasx_xvfcmp_cle_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + is_big_input = __lasx_xvxor_v(is_small_input, __lasx_xvreplgr2vr_w(0xffffffff)); + is_big_input_one = (__m256)__lasx_xvand_v(__lasx_xvreplgr2vr_w(_ps256_c_1.i), is_big_input); + + big_input_approx = __lasx_xvfsub_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i), x); + big_input_approx = __lasx_xvfmul_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i), big_input_approx); + big_input_approx = __lasx_xvfsqrt_s(big_input_approx); + + input_approx = (__m256)__lasx_xvand_v(is_small_input, (__m256i)x); + input_approx = (__m256)__lasx_xvor_v((__m256i)input_approx, __lasx_xvand_v(is_big_input, (__m256i)big_input_approx)); + + square_of_input_approx = __lasx_xvfmul_s(input_approx, input_approx); + fourth_power_of_input_approx = __lasx_xvfmul_s(square_of_input_approx, square_of_input_approx); + + tmp1 = __lasx_xvfmadd_s(fourth_power_of_input_approx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a4.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a2.i)); + tmp2 = __lasx_xvfmadd_s(fourth_power_of_input_approx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a5.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a3.i)); + tmp3 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp1, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a0.i)); + tmp4 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp2, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a1.i)); + output_approx = __lasx_xvfmadd_s(square_of_input_approx, tmp4, tmp3); + + tmp1 = __lasx_xvfmul_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_half_pi.i), is_big_input_one); + tmp2 = __lasx_xvfmul_s(output_approx, input_approx); + tmp3 = __lasx_xvfmadd_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_n3.i), is_big_input_one, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i)); + + final_approx = __lasx_xvfmadd_s(tmp2, tmp3, tmp1); + final_approx = (__m256)__lasx_xvor_v((__m256i)final_approx, mask); + + return final_approx; +} + +static inline __m256 acos256_ps(__m256 x) +{ + __m256 big_input_approx, input_approx, square_of_input_approx, fourth_power_of_input_approx; + __m256 output_approx, final_approx, small_final_approx, big_final_approx; + __m256 tmp1, tmp2, tmp3, tmp4; + __m256i mask, mask2, is_small_input, is_big_input, lt_zero; + + lt_zero = __lasx_xvfcmp_clt_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0.i)); + mask = __lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x80000000)); + x = (__m256)__lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x7fffffff)); + + is_small_input = __lasx_xvfcmp_cle_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i)); + is_big_input = __lasx_xvxor_v(is_small_input, __lasx_xvreplgr2vr_w(0xffffffff)); + + big_input_approx = __lasx_xvfsub_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i), x); + big_input_approx = __lasx_xvfmul_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_0p5.i), big_input_approx); + big_input_approx = __lasx_xvfsqrt_s(big_input_approx); + + input_approx = (__m256)__lasx_xvand_v(is_small_input, (__m256i)x); + input_approx = (__m256)__lasx_xvor_v((__m256i)input_approx, __lasx_xvand_v(is_big_input, (__m256i)big_input_approx)); + + square_of_input_approx = __lasx_xvfmul_s(input_approx, input_approx); + fourth_power_of_input_approx = __lasx_xvfmul_s(square_of_input_approx, square_of_input_approx); + + tmp1 = __lasx_xvfmadd_s(fourth_power_of_input_approx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a4.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a2.i)); + tmp2 = __lasx_xvfmadd_s(fourth_power_of_input_approx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a5.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a3.i)); + tmp3 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp1, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a0.i)); + tmp4 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp2, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_a1.i)); + output_approx = __lasx_xvfmadd_s(square_of_input_approx, tmp4, tmp3); + + tmp1 = __lasx_xvfmul_s(input_approx, output_approx); + + small_final_approx = (__m256)__lasx_xvor_v((__m256i)tmp1, mask); + small_final_approx = __lasx_xvfsub_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_half_pi.i), small_final_approx); + + big_final_approx = (__m256)__lasx_xvand_v(lt_zero, __lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_pi.i)); + tmp1 = __lasx_xvfadd_s(tmp1, tmp1); + tmp1 = (__m256)__lasx_xvor_v((__m256i)tmp1, mask); + big_final_approx = __lasx_xvfadd_s(big_final_approx, tmp1); + + final_approx = (__m256)__lasx_xvand_v(is_small_input, (__m256i)small_final_approx); + final_approx = (__m256)__lasx_xvor_v((__m256i)final_approx, __lasx_xvand_v(is_big_input, (__m256i)big_final_approx)); + + return final_approx; +} + +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x0, 1.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x1, -0.33333072f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x2, 0.1999262f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x3, -0.14203644f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x4, 0.10640934f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x5, -0.07504295f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x6, 0.04269152f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x7, -0.01606863f); +_LOONGARCH_FLOAT_CONST_PS256(c_cephes_atan_x8, 0.0028498897f); + +static inline __m256 atan256_ps(__m256 x) +{ + __m256i mask, is_small_input, is_big_input; + __m256 tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, input_approx, output_approx; + __m256 square_of_input_approx, fourth_power_of_input_approx; + + mask = __lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x80000000)); + x = (__m256)__lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x7fffffff)); + + is_small_input = __lasx_xvfcmp_clt_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_1.i), x); + is_big_input = __lasx_xvxor_v(is_small_input, __lasx_xvreplgr2vr_w(0xffffffff)); + + tmp1 = (__m256)__lasx_xvand_v(is_small_input, __lasx_xvreplgr2vr_w(_ps256_c_n1.i)); + tmp1 = (__m256)__lasx_xvor_v(__lasx_xvand_v(is_big_input, (__m256i)x), (__m256i)tmp1); + + tmp2 = (__m256)__lasx_xvand_v(is_small_input, (__m256i)x); + tmp2 = (__m256)__lasx_xvor_v(__lasx_xvand_v((__m256i)is_big_input, __lasx_xvreplgr2vr_w(_ps256_c_1.i)), (__m256i)tmp2); + + input_approx = __lasx_xvfdiv_s(tmp1, tmp2); + square_of_input_approx = __lasx_xvfmul_s(input_approx, input_approx); + fourth_power_of_input_approx = __lasx_xvfmul_s(square_of_input_approx, square_of_input_approx); + + tmp1 = __lasx_xvfmadd_s(fourth_power_of_input_approx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x7.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x5.i)); + tmp2 = __lasx_xvfmadd_s(fourth_power_of_input_approx, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x8.i), (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x6.i)); + tmp3 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp1, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x3.i)); + tmp4 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp2, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x4.i)); + tmp5 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp3, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x1.i)); + tmp6 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp4, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x2.i)); + tmp7 = __lasx_xvfmadd_s(fourth_power_of_input_approx, tmp6, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_cephes_atan_x0.i)); + output_approx = __lasx_xvfmadd_s(square_of_input_approx, tmp5, tmp7); + + tmp1 = __lasx_xvfmul_s(input_approx, output_approx); + tmp2 = (__m256)__lasx_xvand_v(is_small_input, __lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_half_pi.i)); + tmp1 = __lasx_xvfadd_s(tmp1, tmp2); + tmp1 = (__m256)__lasx_xvxor_v(mask, (__m256i)tmp1); + return tmp1; +} + +static inline __m256 atan2256_ps(__m256 y, __m256 x) +{ + __m256i not_eq_zero_x, not_eq_zero_y, normal_mode, negative_mask_x, negative_mask_y; + __m256i lt_zero_mask_x, lt_zero_mask_y, ge_zero_mask_y, eq_zero_y; + __m256 pi_additions, tmp1, tmp2, normal_result, special_result, final_result; + + not_eq_zero_x = __lasx_xvfcmp_cne_s(x, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0.i)); + not_eq_zero_y = __lasx_xvfcmp_cne_s(y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_0.i)); + eq_zero_y = __lasx_xvxor_v(not_eq_zero_y, __lasx_xvreplgr2vr_w(0xffffffff)); + normal_mode = __lasx_xvand_v(not_eq_zero_x, not_eq_zero_y); + negative_mask_x = __lasx_xvand_v((__m256i)x, __lasx_xvreplgr2vr_w(0x80000000)); + negative_mask_y = __lasx_xvand_v((__m256i)y, __lasx_xvreplgr2vr_w(0x80000000)); + + lt_zero_mask_x = __lasx_xvfcmp_clt_s(x, (__m256)__lasx_xvreplgr2vr_w(0)); + lt_zero_mask_y = __lasx_xvfcmp_clt_s(y, (__m256)__lasx_xvreplgr2vr_w(0)); + ge_zero_mask_y = __lasx_xvxor_v(lt_zero_mask_y, __lasx_xvreplgr2vr_w(0xffffffff)); + + pi_additions = (__m256)__lasx_xvand_v(lt_zero_mask_y, __lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_npi.i)); + pi_additions = (__m256)__lasx_xvor_v(__lasx_xvand_v(ge_zero_mask_y, __lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_pi.i)), (__m256i)pi_additions); + pi_additions = (__m256)__lasx_xvand_v(lt_zero_mask_x, (__m256i)pi_additions); + + normal_result = __lasx_xvfdiv_s(y, x); + normal_result = __lasx_xvfadd_s(atan256_ps(normal_result), pi_additions); + + tmp1 = (__m256)__lasx_xvand_v(negative_mask_y, __lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_half_pi.i)); + tmp2 = (__m256)__lasx_xvand_v(negative_mask_x, __lasx_xvreplgr2vr_w(_ps256_c_cephes_asin_pi.i)); + special_result = (__m256)__lasx_xvand_v(not_eq_zero_y, (__m256i)tmp1); + special_result = (__m256)__lasx_xvor_v(__lasx_xvand_v(eq_zero_y, (__m256i)tmp2), (__m256i)special_result); + + final_result = (__m256)__lasx_xvand_v(normal_mode, (__m256i)normal_result); + normal_mode = __lasx_xvxor_v(normal_mode, __lasx_xvreplgr2vr_w(0xffffffff)); + final_result = (__m256)__lasx_xvor_v(__lasx_xvand_v(normal_mode, (__m256i)special_result), (__m256i)final_result); + + return final_result; +} + +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_tiny, 1e-4f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_hi, 9.0f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_alpha_1, 4.89352455891786e-3f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_alpha_3, 6.37261928875436e-4f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_alpha_5, 1.48572235717979e-5f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_alpha_7, 5.12229709037114e-8f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_alpha_9, -8.60467152213735e-11f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_alpha_11, 2.00018790482477e-13f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_alpha_13, -2.76076847742355e-16f); +// The monomial coefficients of the denominator polynomial (even). +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_beta_0, 4.89352518554385e-3f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_beta_2, 2.26843463243900e-3f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_beta_4, 1.18534705686654e-4f); +_LOONGARCH_FLOAT_CONST_PS256(c_tanh_beta_6, 1.19825839466702e-6f); + +/* tanh() computed for 4 float at once */ +static inline __m256 tanh256_ps(__m256 x) +{ + __m256 x2 = (__m256)__lasx_xvbitclri_w((__m256i)x, 31); + __m256i tiny_mask = __lasx_xvfcmp_clt_s((__m256)x2, (__m256)(__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_tiny.i)); + __m256i sig_mask = __lasx_xvreplgr2vr_w(1 << 31); + __m256i sig_save = __lasx_xvand_v((__m256i)x, sig_mask); + + // clamp the inputs to the range [-9, 9] since anything outside + // this range is -/+1.0f in single-precision. + x2 = (__m256)__lasx_xvbitsel_v((__m256i)x2, (__m256i)__lasx_xvreplgr2vr_w(_ps256_c_tanh_hi.i), (__m256i)__lasx_xvfcmp_clt_s((__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_hi.i), (__m256)x2)); + + // since the polynomials are odd/even, we need x**2. + __m256 z = __lasx_xvfmul_s(x2, x2); + + // evaluate the numerator polynomial y. + __m256 y = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_alpha_13.i); + y = __lasx_xvfmadd_s(z, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_alpha_11.i)); + y = __lasx_xvfmadd_s(z, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_alpha_9.i)); + y = __lasx_xvfmadd_s(z, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_alpha_7.i)); + y = __lasx_xvfmadd_s(z, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_alpha_5.i)); + y = __lasx_xvfmadd_s(z, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_alpha_3.i)); + y = __lasx_xvfmadd_s(z, y, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_alpha_1.i)); + y = __lasx_xvfmul_s(y, x2); + + // evaluate the denominator polynomial w. + __m256 w = (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_beta_6.i); + w = __lasx_xvfmadd_s(z, w, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_beta_4.i)); + w = __lasx_xvfmadd_s(z, w, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_beta_2.i)); + w = __lasx_xvfmadd_s(z, w, (__m256)__lasx_xvreplgr2vr_w(_ps256_c_tanh_beta_0.i)); + + // divide the numerator by the denominator. + y = __lasx_xvfdiv_s(y, w); + + // reinstate the sign. + y = (__m256)__lasx_xvor_v((__m256i)y, sig_save); + + // when the argument is very small in magnitude it's more accurate to just return it. + y = (__m256)__lasx_xvbitsel_v((__m256i)y, (__m256i)x, (__m256i)tiny_mask); + + return y; +} + +static inline __m256 pow256_ps(__m256 a, __m256 b) +{ + // pow(x, m) = exp(m * log(x)) + return exp256_ps(__lasx_xvfmul_s(b, log256_ps(a))); +} + +static inline __m256 sigmoid256_ps(__m256 _v) +{ + __m256 _one = __lasx_xvreplfr2vr_s(1.f); + _v = (__m256)__lasx_xvbitrevi_w((__m256i)_v, 31); + _v = exp256_ps(_v); + _v = __lasx_xvfadd_s(_v, _one); + return __lasx_xvfdiv_s(_one, _v); +} + +#endif // LASX_MATHFUN_H diff --git a/src/layer/loongarch/loongarch_activation.h b/src/layer/loongarch/loongarch_activation.h index abb268f4b..1e2a0f214 100644 --- a/src/layer/loongarch/loongarch_activation.h +++ b/src/layer/loongarch/loongarch_activation.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LOONGARCH_ACTIVATION_H #define LOONGARCH_ACTIVATION_H diff --git a/src/layer/loongarch/loongarch_usability.h b/src/layer/loongarch/loongarch_usability.h index 0cd82e8fb..5eba18ca2 100644 --- a/src/layer/loongarch/loongarch_usability.h +++ b/src/layer/loongarch/loongarch_usability.h @@ -1,22 +1,14 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LOONGARCH_USABILITY_H #define LOONGARCH_USABILITY_H #if __loongarch_sx #include +#if __loongarch_asx +#include +#endif // __loongarch_asx #endif // __loongarch_sx #include @@ -35,7 +27,15 @@ typedef union /* declare some loongarch constants with union */ #define _LOONGARCH_FLOAT_CONST(Name, Val) \ static const ncnn::FloatInt Name = {.f = Val} +#endif +#if __loongarch_asx +/* declare some loongarch constants with union */ +#define _LOONGARCH_FLOAT_CONST_PS256(Name, Val) \ + static const ncnn::FloatInt _ps256_##Name = {.f = Val} +#endif + +#if __loongarch_sx /* float type data load instructions */ static NCNN_FORCEINLINE __m128 __lsx_vreplfr2vr_s(float val) { @@ -59,6 +59,29 @@ static NCNN_FORCEINLINE int __lsx_reduce_add_w(__m128i _v) #endif // __loongarch_sx +#if __loongarch_asx +/* float type data load instructions */ +static NCNN_FORCEINLINE __m256 __lasx_xvreplfr2vr_s(float val) +{ + ncnn::FloatInt fi_tmpval = {.f = val}; + return (__m256)__lasx_xvreplgr2vr_w(fi_tmpval.i); +} + +static NCNN_FORCEINLINE float __lasx_reduce_fadd_s(__m256 _v) +{ + // TODO find a more efficient way + float* _v_p = (float*)&_v; + return _v_p[0] + _v_p[1] + _v_p[2] + _v_p[3] + _v_p[4] + _v_p[5] + _v_p[6] + _v_p[7]; +} + +static NCNN_FORCEINLINE int __lasx_reduce_add_w(__m256i _v) +{ + // TODO find a more efficient way + int* _v_p = (int*)&_v; + return _v_p[0] + _v_p[1] + _v_p[2] + _v_p[3] + _v_p[4] + _v_p[5] + _v_p[6] + _v_p[7]; +} +#endif // __loongarch_asx + static NCNN_FORCEINLINE signed char float2int8(float v) { int int32 = round(v); @@ -68,9 +91,8 @@ static NCNN_FORCEINLINE signed char float2int8(float v) } #if __loongarch_sx -static NCNN_FORCEINLINE __m128i float2int8(__m128 _v) +static NCNN_FORCEINLINE __m128i round(__m128 _v) { - // simulate round to nearest via +/-0.5 __m128 _p5 = (__m128)__lsx_vreplfr2vr_s(0.5f); __m128i _signmask = __lsx_vreplgr2vr_w(1 << 31); @@ -79,6 +101,13 @@ static NCNN_FORCEINLINE __m128i float2int8(__m128 _v) __m128 _v5 = __lsx_vfadd_s(_v, _p5s); __m128i _v32 = __lsx_vftintrz_w_s(_v5); + return _v32; +} + +static NCNN_FORCEINLINE __m128i float2int8(__m128 _v) +{ + __m128i _v32 = round(_v); + __m128i _v32_16 = __lsx_vsat_w(_v32, 15); __m128i _v16 = __lsx_vpickev_h(_v32_16, _v32_16); _v16 = __lsx_vmax_h(_v16, __lsx_vreplgr2vr_h(-127)); @@ -115,14 +144,7 @@ static NCNN_FORCEINLINE int64_t float2int8(__m128 _vlow, __m128 _vhigh) static NCNN_FORCEINLINE __m128i float2int8relu(__m128 _v) { - // simulate round to nearest via +/-0.5 - __m128 _p5 = (__m128)__lsx_vreplfr2vr_s(0.5f); - __m128i _signmask = __lsx_vreplgr2vr_w(1 << 31); - - __m128i _sign = __lsx_vand_v((__m128i)_v, _signmask); - __m128 _p5s = (__m128)__lsx_vor_v((__m128i)_p5, _sign); - __m128 _v5 = __lsx_vfadd_s(_v, _p5s); - __m128i _v32 = __lsx_vftintrz_w_s(_v5); + __m128i _v32 = round(_v); __m128i _v32_16 = __lsx_vsat_w(_v32, 15); __m128i _v16 = __lsx_vpickev_h(_v32_16, _v32_16); @@ -232,4 +254,168 @@ static NCNN_FORCEINLINE int64_t float2int8leakyrelu(__m128 _vlow, __m128 _vhigh, } #endif // __loongarch_sx +#if __loongarch_asx +static NCNN_FORCEINLINE __m256i round(__m256 _v) +{ + __m256 _p5 = (__m256)__lasx_xvreplfr2vr_s(0.5f); + __m256i _signmask = __lasx_xvreplgr2vr_w(1 << 31); + + __m256i _sign = __lasx_xvand_v((__m256i)_v, _signmask); + __m256 _p5s = (__m256)__lasx_xvor_v((__m256i)_p5, (__m256i)_sign); + __m256 _v5 = __lasx_xvfadd_s(_v, _p5s); + __m256i _v32 = __lasx_xvftintrz_w_s(_v5); + + return _v32; +} + +static NCNN_FORCEINLINE __m256i float2int8(__m256 _v) +{ + __m256i _v32 = round(_v); + + __m256i _v32_16 = __lasx_xvsat_w(_v32, 15); + __m256i _v16 = __lasx_xvpickev_h(_v32_16, _v32_16); + _v16 = __lasx_xvmax_h(_v16, __lasx_xvreplgr2vr_h(-127)); + __m256i _v16_8 = __lasx_xvsat_h(_v16, 7); + __m256i _v8 = __lasx_xvpickev_b(_v16_8, _v16_8); + + return _v8; +} + +static NCNN_FORCEINLINE int64_t float2int8(__m256 _vlow, __m256 _vhigh) +{ + // simulate round to nearest via +/-0.5 + __m256 _p5 = (__m256)__lasx_xvreplfr2vr_s(0.5f); + __m256i _signmask = __lasx_xvreplgr2vr_w(1 << 31); + + __m256i _signlow = __lasx_xvand_v((__m256i)_vlow, _signmask); + __m256i _signhigh = __lasx_xvand_v((__m256i)_vhigh, _signmask); + __m256 _p5low = (__m256)__lasx_xvor_v((__m256i)_p5, _signlow); + __m256 _p5high = (__m256)__lasx_xvor_v((__m256i)_p5, _signhigh); + __m256 _vlow5 = __lasx_xvfadd_s(_vlow, _p5low); + __m256 _vhigh5 = __lasx_xvfadd_s(_vhigh, _p5high); + __m256i _vlow32 = __lasx_xvftintrz_w_s(_vlow5); + __m256i _vhigh32 = __lasx_xvftintrz_w_s(_vhigh5); + + __m256i _vlow32_16 = __lasx_xvsat_w(_vlow32, 15); + __m256i _vhigh32_16 = __lasx_xvsat_w(_vhigh32, 15); + __m256i _v16 = __lasx_xvpickev_h(_vhigh32_16, _vlow32_16); + _v16 = __lasx_xvmax_h(_v16, __lasx_xvreplgr2vr_h(-127)); + __m256i _v16_8 = __lasx_xvsat_h(_v16, 7); + __m256i _v8 = __lasx_xvpickev_b(_v16_8, _v16_8); + + return _v8[0]; +} + +static NCNN_FORCEINLINE __m256i float2int8relu(__m256 _v) +{ + __m256i _v32 = round(_v); + + __m256i _v32_16 = __lasx_xvsat_w(_v32, 15); + __m256i _v16 = __lasx_xvpickev_h(_v32_16, _v32_16); + _v16 = __lasx_xvmaxi_h(_v16, 0); + __m256i _v16_8 = __lasx_xvsat_h(_v16, 7); + __m256i _v8 = __lasx_xvpickev_b(_v16_8, _v16_8); + + return _v8; +} + +static NCNN_FORCEINLINE int64_t float2int8relu(__m256 _vlow, __m256 _vhigh) +{ + // simulate round to nearest via +/-0.5 + __m256 _p5 = (__m256)__lasx_xvreplfr2vr_s(0.5f); + __m256i _signmask = __lasx_xvreplgr2vr_w(1 << 31); + + __m256i _signlow = __lasx_xvand_v((__m256i)_vlow, _signmask); + __m256i _signhigh = __lasx_xvand_v((__m256i)_vhigh, _signmask); + __m256 _p5low = (__m256)__lasx_xvor_v((__m256i)_p5, _signlow); + __m256 _p5high = (__m256)__lasx_xvor_v((__m256i)_p5, _signhigh); + __m256 _vlow5 = __lasx_xvfadd_s(_vlow, _p5low); + __m256 _vhigh5 = __lasx_xvfadd_s(_vhigh, _p5high); + __m256i _vlow32 = __lasx_xvftintrz_w_s(_vlow5); + __m256i _vhigh32 = __lasx_xvftintrz_w_s(_vhigh5); + + __m256i _vlow32_16 = __lasx_xvsat_w(_vlow32, 15); + __m256i _vhigh32_16 = __lasx_xvsat_w(_vhigh32, 15); + __m256i _v16 = __lasx_xvpickev_h(_vhigh32_16, _vlow32_16); + _v16 = __lasx_xvmaxi_h(_v16, 0); + __m256i _v16_8 = __lasx_xvsat_h(_v16, 7); + __m256i _v8 = __lasx_xvpickev_b(_v16_8, _v16_8); + + return _v8[0]; +} + +static NCNN_FORCEINLINE __m256i float2int8leakyrelu(__m256 _v, __m256 _slope) +{ + __m256 _v_leaky = __lasx_xvfmul_s(_v, _slope); + + // simulate round to nearest via +/-0.5 + __m256 _p5 = (__m256)__lasx_xvreplfr2vr_s(0.5f); + __m256i _signmask = __lasx_xvreplgr2vr_w(1 << 31); + + __m256i _sign = __lasx_xvand_v((__m256i)_v, _signmask); + __m256 _p5s = (__m256)__lasx_xvor_v((__m256i)_p5, _sign); + __m256 _v5 = __lasx_xvfadd_s(_v, _p5s); + __m256i _v32 = __lasx_xvftintrz_w_s(_v5); + + __m256i _sign_leaky = __lasx_xvand_v((__m256i)_v_leaky, _signmask); + __m256 _p5_leaky = (__m256)__lasx_xvor_v((__m256i)_p5, _sign_leaky); + __m256 _v5_leaky = __lasx_xvfadd_s(_v_leaky, _p5_leaky); + __m256i _v32_leaky = __lasx_xvftintrz_w_s(_v5_leaky); + + __m256i _v32_16 = __lasx_xvsat_w(_v32, 15); + __m256i _v16 = __lasx_xvpickev_h(_v32_16, _v32_16); + + __m256i _v32_16_leaky = __lasx_xvsat_w(_v32_leaky, 15); + __m256i _v16_leaky = __lasx_xvpickev_h(_v32_16_leaky, _v32_16_leaky); + + _v16 = __lasx_xvmax_h(_v16, _v16_leaky); + __m256i _v16_8 = __lasx_xvsat_h(_v16, 7); + __m256i _v8 = __lasx_xvpickev_b(_v16_8, _v16_8); + + return _v8; +} + +static NCNN_FORCEINLINE int64_t float2int8leakyrelu(__m256 _vlow, __m256 _vhigh, __m256 _slope) +{ + __m256 _vlow_leaky = __lasx_xvfmul_s(_vlow, _slope); + __m256 _vhigh_leaky = __lasx_xvfmul_s(_vhigh, _slope); + + // simulate round to nearest via +/-0.5 + __m256i _p5 = (__m256i)__lasx_xvreplfr2vr_s(0.5f); + __m256i _signmask = __lasx_xvreplgr2vr_w(1 << 31); + + __m256i _signlow = __lasx_xvand_v((__m256i)_vlow, _signmask); + __m256i _signhigh = __lasx_xvand_v((__m256i)_vhigh, _signmask); + __m256 _p5low = (__m256)__lasx_xvor_v(_p5, _signlow); + __m256 _p5high = (__m256)__lasx_xvor_v(_p5, _signhigh); + __m256 _vlow5 = __lasx_xvfadd_s(_vlow, _p5low); + __m256 _vhigh5 = __lasx_xvfadd_s(_vhigh, _p5high); + __m256i _vlow32 = __lasx_xvftintrz_w_s(_vlow5); + __m256i _vhigh32 = __lasx_xvftintrz_w_s(_vhigh5); + + __m256i _signlow_leaky = __lasx_xvand_v((__m256i)_vlow_leaky, _signmask); + __m256i _signhigh_leaky = __lasx_xvand_v((__m256i)_vhigh_leaky, _signmask); + __m256 _p5low_leaky = (__m256)__lasx_xvor_v(_p5, _signlow_leaky); + __m256 _p5high_leaky = (__m256)__lasx_xvor_v(_p5, _signhigh_leaky); + __m256 _vlow5_leaky = __lasx_xvfadd_s(_vlow_leaky, _p5low_leaky); + __m256 _vhigh5_leaky = __lasx_xvfadd_s(_vhigh_leaky, _p5high_leaky); + __m256i _vlow32_leaky = __lasx_xvftintrz_w_s(_vlow5_leaky); + __m256i _vhigh32_leaky = __lasx_xvftintrz_w_s(_vhigh5_leaky); + + __m256i _vlow32_16 = __lasx_xvsat_w(_vlow32, 15); + __m256i _vhigh32_16 = __lasx_xvsat_w(_vhigh32, 15); + __m256i _v16 = __lasx_xvpickev_h(_vhigh32_16, _vlow32_16); + + __m256i _vlow32_16_leaky = __lasx_xvsat_w(_vlow32_leaky, 15); + __m256i _vhigh32_16_leaky = __lasx_xvsat_w(_vhigh32_leaky, 15); + __m256i _v16_leaky = __lasx_xvpickev_h(_vhigh32_16_leaky, _vlow32_16_leaky); + + _v16 = __lasx_xvmax_h(_v16, _v16_leaky); + __m256i _v16_8 = __lasx_xvsat_h(_v16, 7); + __m256i _v8 = __lasx_xvpickev_b(_v16_8, _v16_8); + + return _v8[0]; +} +#endif // __loongarch_asx + #endif // LOONGARCH_USABILITY_H diff --git a/src/layer/loongarch/lsx_mathfun.h b/src/layer/loongarch/lsx_mathfun.h index edbcd8235..5f30bdad7 100644 --- a/src/layer/loongarch/lsx_mathfun.h +++ b/src/layer/loongarch/lsx_mathfun.h @@ -1,4 +1,4 @@ -/* LOONGARCH implementation of exp +/* LOONGARCH implementation of mathfun * * Inspired by Intel Approximate Math library, and based on the * corresponding algorithms of the cephes math library @@ -32,10 +32,15 @@ #include +_LOONGARCH_FLOAT_CONST(c_0, 0.0f); _LOONGARCH_FLOAT_CONST(c_1, 1.0f); _LOONGARCH_FLOAT_CONST(c_2, 2.0f); +_LOONGARCH_FLOAT_CONST(c_3, 3.0f); +_LOONGARCH_FLOAT_CONST(c_4, 4.0f); _LOONGARCH_FLOAT_CONST(c_n1, -1.0f); +_LOONGARCH_FLOAT_CONST(c_n3, -3.0f); _LOONGARCH_FLOAT_CONST(c_0p5, 0.5f); +_LOONGARCH_FLOAT_CONST(c_eps, 1E-8f); #define c_inv_mant_mask ~0x7f800000u _LOONGARCH_FLOAT_CONST(c_cephes_SQRTHF, 0.707106781186547524); @@ -240,6 +245,192 @@ static inline __m128 tanh_ps(__m128 x) return y; } +_LOONGARCH_FLOAT_CONST(c_minus_cephes_DP1, -0.78515625f); +_LOONGARCH_FLOAT_CONST(c_minus_cephes_DP2, -2.4187564849853515625e-4f); +_LOONGARCH_FLOAT_CONST(c_minus_cephes_DP3, -3.77489497744594108e-8f); +_LOONGARCH_FLOAT_CONST(c_cephes_sin_p0, -1.9515295891E-4f); +_LOONGARCH_FLOAT_CONST(c_cephes_sin_p1, 8.3321608736E-3f); +_LOONGARCH_FLOAT_CONST(c_cephes_sin_p2, -1.6666654611E-1f); +_LOONGARCH_FLOAT_CONST(c_cephes_cos_p0, 2.443315711809948E-005f); +_LOONGARCH_FLOAT_CONST(c_cephes_cos_p1, -1.388731625493765E-003f); +_LOONGARCH_FLOAT_CONST(c_cephes_cos_p2, 4.166664568298827E-002f); +_LOONGARCH_FLOAT_CONST(c_cephes_FOPI, 1.27323954473516f); // 4/PI + +static inline __m128 sin_ps(__m128 x) +{ + __m128 y; + __m128i swap_sign_bit, poly_mask, sign_bit; + __m128 n0p5 = __lsx_vfmul_s((__m128)__lsx_vreplgr2vr_w(c_n1.i), (__m128)__lsx_vreplgr2vr_w(c_0p5.i)); + + sign_bit = __lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x80000000)); + x = (__m128)__lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x7fffffff)); + + y = __lsx_vfmul_s(x, (__m128)__lsx_vreplgr2vr_w(c_cephes_FOPI.i)); + + poly_mask = __lsx_vftintrz_w_s(y); + poly_mask = __lsx_vadd_w(poly_mask, __lsx_vreplgr2vr_w(1)); + poly_mask = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(~1)); + y = __lsx_vffint_s_w(poly_mask); + + swap_sign_bit = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(4)); + swap_sign_bit = __lsx_vslli_w(swap_sign_bit, 29); + + poly_mask = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(2)); + poly_mask = __lsx_vseq_w(poly_mask, __lsx_vreplgr2vr_w(0)); + + sign_bit = __lsx_vxor_v(sign_bit, swap_sign_bit); + + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP1.i), x); + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP2.i), x); + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP3.i), x); + + y = (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p0.i); + __m128 z = __lsx_vfmul_s(x, x); + y = __lsx_vfmadd_s(y, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p1.i)); + y = __lsx_vfmadd_s(y, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p2.i)); + y = __lsx_vfmul_s(y, z); + y = __lsx_vfmul_s(y, z); + y = __lsx_vfmadd_s(z, n0p5, y); + y = __lsx_vfadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_1.i)); + + __m128 y2 = (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p0.i); + y2 = __lsx_vfmadd_s(y2, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p1.i)); + y2 = __lsx_vfmadd_s(y2, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p2.i)); + y2 = __lsx_vfmul_s(y2, z); + y2 = __lsx_vfmadd_s(y2, x, x); + + y2 = (__m128)__lsx_vand_v((__m128i)y2, poly_mask); + y = (__m128)__lsx_vand_v(__lsx_vxor_v(poly_mask, __lsx_vreplgr2vr_w(0xffffffff)), (__m128i)y); + y = __lsx_vfadd_s(y, y2); + y = (__m128)__lsx_vxor_v((__m128i)y, sign_bit); + + return y; +} + +static inline __m128 cos_ps(__m128 x) +{ + __m128 y; + __m128i swap_sign_bit, poly_mask, sign_bit; + __m128 n0p5 = __lsx_vfmul_s((__m128)__lsx_vreplgr2vr_w(c_n1.i), (__m128)__lsx_vreplgr2vr_w(c_0p5.i)); + + x = (__m128)__lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x7fffffff)); + + y = __lsx_vfmul_s(x, (__m128)__lsx_vreplgr2vr_w(c_cephes_FOPI.i)); + + poly_mask = __lsx_vftintrz_w_s(y); + poly_mask = __lsx_vadd_w(poly_mask, __lsx_vreplgr2vr_w(1)); + poly_mask = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(~1)); + y = __lsx_vffint_s_w(poly_mask); + poly_mask = __lsx_vsub_w(poly_mask, __lsx_vreplgr2vr_w(2)); + + swap_sign_bit = __lsx_vandn_v(poly_mask, __lsx_vreplgr2vr_w(4)); + swap_sign_bit = __lsx_vslli_w(swap_sign_bit, 29); + + poly_mask = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(2)); + poly_mask = __lsx_vseq_w(poly_mask, __lsx_vreplgr2vr_w(0)); + + sign_bit = swap_sign_bit; + + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP1.i), x); + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP2.i), x); + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP3.i), x); + + y = (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p0.i); + __m128 z = __lsx_vfmul_s(x, x); + y = __lsx_vfmadd_s(y, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p1.i)); + y = __lsx_vfmadd_s(y, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p2.i)); + y = __lsx_vfmul_s(y, z); + y = __lsx_vfmul_s(y, z); + y = __lsx_vfmadd_s(z, n0p5, y); + y = __lsx_vfadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_1.i)); + + __m128 y2 = (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p0.i); + y2 = __lsx_vfmadd_s(y2, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p1.i)); + y2 = __lsx_vfmadd_s(y2, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p2.i)); + y2 = __lsx_vfmul_s(y2, z); + y2 = __lsx_vfmadd_s(y2, x, x); + + y2 = (__m128)__lsx_vand_v((__m128i)y2, poly_mask); + y = (__m128)__lsx_vandn_v(poly_mask, (__m128i)y); + y = __lsx_vfadd_s(y, y2); + y = (__m128)__lsx_vxor_v((__m128i)y, sign_bit); + + return y; +} + +static inline void sincos_ps(__m128 x, __m128* s, __m128* c) +{ + __m128 y; + __m128i swap_sign_bit_cos, swap_sign_bit_sin, poly_mask, sign_bit_sin, sign_bit_cos; + __m128 n0p5 = __lsx_vfmul_s((__m128)__lsx_vreplgr2vr_w(c_n1.i), (__m128)__lsx_vreplgr2vr_w(c_0p5.i)); + + sign_bit_sin = __lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x80000000)); + x = (__m128)__lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x7fffffff)); + + y = __lsx_vfmul_s(x, (__m128)__lsx_vreplgr2vr_w(c_cephes_FOPI.i)); + + poly_mask = __lsx_vftintrz_w_s(y); + poly_mask = __lsx_vadd_w(poly_mask, __lsx_vreplgr2vr_w(1)); + poly_mask = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(~1)); + y = __lsx_vffint_s_w(poly_mask); + + swap_sign_bit_cos = __lsx_vsub_w(poly_mask, __lsx_vreplgr2vr_w(2)); + swap_sign_bit_cos = __lsx_vandn_v(swap_sign_bit_cos, __lsx_vreplgr2vr_w(4)); + swap_sign_bit_cos = __lsx_vslli_w(swap_sign_bit_cos, 29); + + swap_sign_bit_sin = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(4)); + swap_sign_bit_sin = __lsx_vslli_w(swap_sign_bit_sin, 29); + + poly_mask = __lsx_vand_v(poly_mask, __lsx_vreplgr2vr_w(2)); + poly_mask = __lsx_vseq_w(poly_mask, __lsx_vreplgr2vr_w(0)); + + sign_bit_sin = __lsx_vxor_v(sign_bit_sin, swap_sign_bit_sin); + sign_bit_cos = swap_sign_bit_cos; + + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP1.i), x); + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP2.i), x); + x = __lsx_vfmadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_minus_cephes_DP3.i), x); + + __m128 z = __lsx_vfmul_s(x, x); + y = (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p0.i); + y = __lsx_vfmadd_s(y, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p1.i)); + y = __lsx_vfmadd_s(y, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_cos_p2.i)); + y = __lsx_vfmul_s(y, z); + y = __lsx_vfmul_s(y, z); + y = __lsx_vfmadd_s(z, n0p5, y); + y = __lsx_vfadd_s(y, (__m128)__lsx_vreplgr2vr_w(c_1.i)); + + __m128 y2 = (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p0.i); + y2 = __lsx_vfmadd_s(y2, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p1.i)); + y2 = __lsx_vfmadd_s(y2, z, (__m128)__lsx_vreplgr2vr_w(c_cephes_sin_p2.i)); + y2 = __lsx_vfmul_s(y2, z); + y2 = __lsx_vfmadd_s(y2, x, x); + + __m128 ysin1 = (__m128)__lsx_vandn_v(poly_mask, (__m128i)y); + __m128 ysin2 = (__m128)__lsx_vand_v(poly_mask, (__m128i)y2); + y2 = __lsx_vfsub_s(y2, ysin2); + y = __lsx_vfsub_s(y, ysin1); + + ysin1 = __lsx_vfadd_s(ysin1, ysin2); + y = __lsx_vfadd_s(y, y2); + + *s = (__m128)__lsx_vxor_v((__m128i)ysin1, sign_bit_sin); + *c = (__m128)__lsx_vxor_v((__m128i)y, sign_bit_cos); +} + +static inline __m128 tan_ps(__m128 x) +{ + __m128 ysin, ycos; + __m128 eps = (__m128)__lsx_vreplgr2vr_w(c_eps.i); + __m128 zero = (__m128)__lsx_vreplgr2vr_w(c_0.i); + sincos_ps(x, &ysin, &ycos); + __m128i mask = __lsx_vfcmp_ceq_s(ycos, eps); + mask = __lsx_vand_v(mask, (__m128i)eps); + ycos = __lsx_vfadd_s(ycos, (__m128)mask); + __m128 ytan = __lsx_vfdiv_s(ysin, ycos); + return ytan; +} + static inline __m128 pow_ps(__m128 a, __m128 b) { // pow(x, m) = exp(m * log(x)) @@ -255,18 +446,184 @@ static inline __m128 sigmoid_ps(__m128 _v) return __lsx_vfdiv_s(_one, _v); } -static inline __m128 atan2_ps(__m128 a, __m128 b) +_LOONGARCH_FLOAT_CONST(c_cephes_asin_a4, 0.023994016f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_a5, 0.042417344f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_a2, 0.07494697f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_a3, 0.045520633f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_a0, 1.0f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_a1, 0.166667819f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_half_pi, 1.5707964f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_pi, 3.1415927f); +_LOONGARCH_FLOAT_CONST(c_cephes_asin_npi, -3.1415927f); + +static inline __m128 asin_ps(__m128 x) +{ + __m128 big_input_approx, input_approx, square_of_input_approx, fourth_power_of_input_approx; + __m128 is_big_input_one, output_approx, final_approx; + __m128 tmp1, tmp2, tmp3, tmp4; + __m128i mask, is_small_input, is_big_input; + + mask = __lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x80000000)); + x = (__m128)__lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x7fffffff)); + + is_small_input = __lsx_vfcmp_cle_s(x, (__m128)__lsx_vreplgr2vr_w(c_0p5.i)); + is_big_input = __lsx_vxor_v(is_small_input, __lsx_vreplgr2vr_w(0xffffffff)); + is_big_input_one = (__m128)__lsx_vand_v(__lsx_vreplgr2vr_w(c_1.i), is_big_input); + + big_input_approx = __lsx_vfsub_s((__m128)__lsx_vreplgr2vr_w(c_1.i), x); + big_input_approx = __lsx_vfmul_s((__m128)__lsx_vreplgr2vr_w(c_0p5.i), big_input_approx); + big_input_approx = __lsx_vfsqrt_s(big_input_approx); + + input_approx = (__m128)__lsx_vand_v(is_small_input, (__m128i)x); + input_approx = (__m128)__lsx_vor_v((__m128i)input_approx, __lsx_vand_v(is_big_input, (__m128i)big_input_approx)); + + square_of_input_approx = __lsx_vfmul_s(input_approx, input_approx); + fourth_power_of_input_approx = __lsx_vfmul_s(square_of_input_approx, square_of_input_approx); + + tmp1 = __lsx_vfmadd_s(fourth_power_of_input_approx, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a4.i), (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a2.i)); + tmp2 = __lsx_vfmadd_s(fourth_power_of_input_approx, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a5.i), (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a3.i)); + tmp3 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp1, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a0.i)); + tmp4 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp2, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a1.i)); + output_approx = __lsx_vfmadd_s(square_of_input_approx, tmp4, tmp3); + + tmp1 = __lsx_vfmul_s((__m128)__lsx_vreplgr2vr_w(c_cephes_asin_half_pi.i), is_big_input_one); + tmp2 = __lsx_vfmul_s(output_approx, input_approx); + tmp3 = __lsx_vfmadd_s((__m128)__lsx_vreplgr2vr_w(c_n3.i), is_big_input_one, (__m128)__lsx_vreplgr2vr_w(c_1.i)); + + final_approx = __lsx_vfmadd_s(tmp2, tmp3, tmp1); + final_approx = (__m128)__lsx_vor_v((__m128i)final_approx, mask); + + return final_approx; +} + +static inline __m128 acos_ps(__m128 x) +{ + __m128 big_input_approx, input_approx, square_of_input_approx, fourth_power_of_input_approx; + __m128 output_approx, final_approx, small_final_approx, big_final_approx; + __m128 tmp1, tmp2, tmp3, tmp4; + __m128i mask, mask2, is_small_input, is_big_input, lt_zero; + + lt_zero = __lsx_vfcmp_clt_s(x, (__m128)__lsx_vreplgr2vr_w(c_0.i)); + mask = __lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x80000000)); + x = (__m128)__lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x7fffffff)); + + is_small_input = __lsx_vfcmp_cle_s(x, (__m128)__lsx_vreplgr2vr_w(c_0p5.i)); + is_big_input = __lsx_vxor_v(is_small_input, __lsx_vreplgr2vr_w(0xffffffff)); + + big_input_approx = __lsx_vfsub_s((__m128)__lsx_vreplgr2vr_w(c_1.i), x); + big_input_approx = __lsx_vfmul_s((__m128)__lsx_vreplgr2vr_w(c_0p5.i), big_input_approx); + big_input_approx = __lsx_vfsqrt_s(big_input_approx); + + input_approx = (__m128)__lsx_vand_v(is_small_input, (__m128i)x); + input_approx = (__m128)__lsx_vor_v((__m128i)input_approx, __lsx_vand_v(is_big_input, (__m128i)big_input_approx)); + + square_of_input_approx = __lsx_vfmul_s(input_approx, input_approx); + fourth_power_of_input_approx = __lsx_vfmul_s(square_of_input_approx, square_of_input_approx); + + tmp1 = __lsx_vfmadd_s(fourth_power_of_input_approx, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a4.i), (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a2.i)); + tmp2 = __lsx_vfmadd_s(fourth_power_of_input_approx, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a5.i), (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a3.i)); + tmp3 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp1, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a0.i)); + tmp4 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp2, (__m128)__lsx_vreplgr2vr_w(c_cephes_asin_a1.i)); + output_approx = __lsx_vfmadd_s(square_of_input_approx, tmp4, tmp3); + + tmp1 = __lsx_vfmul_s(input_approx, output_approx); + + small_final_approx = (__m128)__lsx_vor_v((__m128i)tmp1, mask); + small_final_approx = __lsx_vfsub_s((__m128)__lsx_vreplgr2vr_w(c_cephes_asin_half_pi.i), small_final_approx); + + big_final_approx = (__m128)__lsx_vand_v(lt_zero, __lsx_vreplgr2vr_w(c_cephes_asin_pi.i)); + tmp1 = __lsx_vfadd_s(tmp1, tmp1); + tmp1 = (__m128)__lsx_vor_v((__m128i)tmp1, mask); + big_final_approx = __lsx_vfadd_s(big_final_approx, tmp1); + + final_approx = (__m128)__lsx_vand_v(is_small_input, (__m128i)small_final_approx); + final_approx = (__m128)__lsx_vor_v((__m128i)final_approx, __lsx_vand_v(is_big_input, (__m128i)big_final_approx)); + + return final_approx; +} + +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x0, 1.0f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x1, -0.33333072f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x2, 0.1999262f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x3, -0.14203644f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x4, 0.10640934f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x5, -0.07504295f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x6, 0.04269152f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x7, -0.01606863f); +_LOONGARCH_FLOAT_CONST(c_cephes_atan_x8, 0.0028498897f); + +static inline __m128 atan_ps(__m128 x) +{ + __m128i mask, is_small_input, is_big_input; + __m128 tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, input_approx, output_approx; + __m128 square_of_input_approx, fourth_power_of_input_approx; + + mask = __lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x80000000)); + x = (__m128)__lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x7fffffff)); + + is_small_input = __lsx_vfcmp_clt_s((__m128)__lsx_vreplgr2vr_w(c_1.i), x); + is_big_input = __lsx_vxor_v(is_small_input, __lsx_vreplgr2vr_w(0xffffffff)); + + tmp1 = (__m128)__lsx_vand_v(is_small_input, __lsx_vreplgr2vr_w(c_n1.i)); + tmp1 = (__m128)__lsx_vor_v(__lsx_vand_v(is_big_input, (__m128i)x), (__m128i)tmp1); + + tmp2 = (__m128)__lsx_vand_v(is_small_input, (__m128i)x); + tmp2 = (__m128)__lsx_vor_v(__lsx_vand_v((__m128i)is_big_input, __lsx_vreplgr2vr_w(c_1.i)), (__m128i)tmp2); + + input_approx = __lsx_vfdiv_s(tmp1, tmp2); + square_of_input_approx = __lsx_vfmul_s(input_approx, input_approx); + fourth_power_of_input_approx = __lsx_vfmul_s(square_of_input_approx, square_of_input_approx); + + tmp1 = __lsx_vfmadd_s(fourth_power_of_input_approx, (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x7.i), (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x5.i)); + tmp2 = __lsx_vfmadd_s(fourth_power_of_input_approx, (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x8.i), (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x6.i)); + tmp3 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp1, (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x3.i)); + tmp4 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp2, (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x4.i)); + tmp5 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp3, (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x1.i)); + tmp6 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp4, (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x2.i)); + tmp7 = __lsx_vfmadd_s(fourth_power_of_input_approx, tmp6, (__m128)__lsx_vreplgr2vr_w(c_cephes_atan_x0.i)); + output_approx = __lsx_vfmadd_s(square_of_input_approx, tmp5, tmp7); + + tmp1 = __lsx_vfmul_s(input_approx, output_approx); + tmp2 = (__m128)__lsx_vand_v(is_small_input, __lsx_vreplgr2vr_w(c_cephes_asin_half_pi.i)); + tmp1 = __lsx_vfadd_s(tmp1, tmp2); + tmp1 = (__m128)__lsx_vxor_v(mask, (__m128i)tmp1); + return tmp1; +} + +static inline __m128 atan2_ps(__m128 y, __m128 x) { - //TODO lsx optimize - float tmpx[4]; - float tmpy[4]; - __lsx_vst(a, tmpx, 0); - __lsx_vst(b, tmpy, 0); - tmpx[0] = atan2f(tmpx[0], tmpy[0]); - tmpx[1] = atan2f(tmpx[1], tmpy[1]); - tmpx[2] = atan2f(tmpx[2], tmpy[2]); - tmpx[3] = atan2f(tmpx[3], tmpy[3]); - return (__m128)__lsx_vld(tmpx, 0); + __m128i not_eq_zero_x, not_eq_zero_y, normal_mode, negative_mask_x, negative_mask_y; + __m128i lt_zero_mask_x, lt_zero_mask_y, ge_zero_mask_y, eq_zero_y; + __m128 pi_additions, tmp1, tmp2, normal_result, special_result, final_result; + + not_eq_zero_x = __lsx_vfcmp_cne_s(x, (__m128)__lsx_vreplgr2vr_w(c_0.i)); + not_eq_zero_y = __lsx_vfcmp_cne_s(y, (__m128)__lsx_vreplgr2vr_w(c_0.i)); + eq_zero_y = __lsx_vxor_v(not_eq_zero_y, __lsx_vreplgr2vr_w(0xffffffff)); + normal_mode = __lsx_vand_v(not_eq_zero_x, not_eq_zero_y); + negative_mask_x = __lsx_vand_v((__m128i)x, __lsx_vreplgr2vr_w(0x80000000)); + negative_mask_y = __lsx_vand_v((__m128i)y, __lsx_vreplgr2vr_w(0x80000000)); + + lt_zero_mask_x = __lsx_vfcmp_clt_s(x, (__m128)__lsx_vreplgr2vr_w(0)); + lt_zero_mask_y = __lsx_vfcmp_clt_s(y, (__m128)__lsx_vreplgr2vr_w(0)); + ge_zero_mask_y = __lsx_vxor_v(lt_zero_mask_y, __lsx_vreplgr2vr_w(0xffffffff)); + + pi_additions = (__m128)__lsx_vand_v(lt_zero_mask_y, __lsx_vreplgr2vr_w(c_cephes_asin_npi.i)); + pi_additions = (__m128)__lsx_vor_v(__lsx_vand_v(ge_zero_mask_y, __lsx_vreplgr2vr_w(c_cephes_asin_pi.i)), (__m128i)pi_additions); + pi_additions = (__m128)__lsx_vand_v(lt_zero_mask_x, (__m128i)pi_additions); + + normal_result = __lsx_vfdiv_s(y, x); + normal_result = __lsx_vfadd_s(atan_ps(normal_result), pi_additions); + + tmp1 = (__m128)__lsx_vand_v(negative_mask_y, __lsx_vreplgr2vr_w(c_cephes_asin_half_pi.i)); + tmp2 = (__m128)__lsx_vand_v(negative_mask_x, __lsx_vreplgr2vr_w(c_cephes_asin_pi.i)); + special_result = (__m128)__lsx_vand_v(not_eq_zero_y, (__m128i)tmp1); + special_result = (__m128)__lsx_vor_v(__lsx_vand_v(eq_zero_y, (__m128i)tmp2), (__m128i)special_result); + + final_result = (__m128)__lsx_vand_v(normal_mode, (__m128i)normal_result); + normal_mode = __lsx_vxor_v(normal_mode, __lsx_vreplgr2vr_w(0xffffffff)); + final_result = (__m128)__lsx_vor_v(__lsx_vand_v(normal_mode, (__m128i)special_result), (__m128i)final_result); + + return final_result; } #endif // LSX_MATHFUN_H diff --git a/src/layer/loongarch/mish_loongarch.cpp b/src/layer/loongarch/mish_loongarch.cpp index 3c5c0dab3..574782a4c 100644 --- a/src/layer/loongarch/mish_loongarch.cpp +++ b/src/layer/loongarch/mish_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "mish_loongarch.h" diff --git a/src/layer/loongarch/mish_loongarch.h b/src/layer/loongarch/mish_loongarch.h index 0c7967580..674b46408 100644 --- a/src/layer/loongarch/mish_loongarch.h +++ b/src/layer/loongarch/mish_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MISH_LOONGARCH_H #define LAYER_MISH_LOONGARCH_H diff --git a/src/layer/loongarch/packing_loongarch.cpp b/src/layer/loongarch/packing_loongarch.cpp index 68dcb09be..6225dd49f 100644 --- a/src/layer/loongarch/packing_loongarch.cpp +++ b/src/layer/loongarch/packing_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "packing_loongarch.h" diff --git a/src/layer/loongarch/packing_loongarch.h b/src/layer/loongarch/packing_loongarch.h index 476ebd33a..811f5ad6d 100644 --- a/src/layer/loongarch/packing_loongarch.h +++ b/src/layer/loongarch/packing_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PACKING_LOONGARCH_H #define LAYER_PACKING_LOONGARCH_H diff --git a/src/layer/loongarch/padding_loongarch.cpp b/src/layer/loongarch/padding_loongarch.cpp index 1f345ce60..ebcb9e057 100644 --- a/src/layer/loongarch/padding_loongarch.cpp +++ b/src/layer/loongarch/padding_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "padding_loongarch.h" diff --git a/src/layer/loongarch/padding_loongarch.h b/src/layer/loongarch/padding_loongarch.h index de4164647..a9a34f737 100644 --- a/src/layer/loongarch/padding_loongarch.h +++ b/src/layer/loongarch/padding_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PADDING_LOONGARCH_H #define LAYER_PADDING_LOONGARCH_H diff --git a/src/layer/loongarch/padding_pack4.h b/src/layer/loongarch/padding_pack4.h index d040ce778..55da1ae33 100644 --- a/src/layer/loongarch/padding_pack4.h +++ b/src/layer/loongarch/padding_pack4.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack4_lsx(const Mat& src, Mat& dst, int top, int bottom, int left, int right, __m128 v) { diff --git a/src/layer/loongarch/padding_pack8_int8.h b/src/layer/loongarch/padding_pack8_int8.h index 4c6586c6a..fe46ac143 100644 --- a/src/layer/loongarch/padding_pack8_int8.h +++ b/src/layer/loongarch/padding_pack8_int8.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack8_int8_lsx(const Mat& src, Mat& dst, int top, int bottom, int left, int right, int64_t _v) { diff --git a/src/layer/loongarch/pooling_loongarch.cpp b/src/layer/loongarch/pooling_loongarch.cpp index 9d9889713..d0a47160c 100644 --- a/src/layer/loongarch/pooling_loongarch.cpp +++ b/src/layer/loongarch/pooling_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_loongarch.h" diff --git a/src/layer/loongarch/pooling_loongarch.h b/src/layer/loongarch/pooling_loongarch.h index 646b10947..240ec8f22 100644 --- a/src/layer/loongarch/pooling_loongarch.h +++ b/src/layer/loongarch/pooling_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING_LOONGARCH_H #define LAYER_POOLING_LOONGARCH_H diff --git a/src/layer/loongarch/prelu_loongarch.cpp b/src/layer/loongarch/prelu_loongarch.cpp index 27cc0bc9d..9b48a7b04 100644 --- a/src/layer/loongarch/prelu_loongarch.cpp +++ b/src/layer/loongarch/prelu_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_loongarch.h" diff --git a/src/layer/loongarch/prelu_loongarch.h b/src/layer/loongarch/prelu_loongarch.h index bafd7ac4c..b0c5a0d37 100644 --- a/src/layer/loongarch/prelu_loongarch.h +++ b/src/layer/loongarch/prelu_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRELU_LOONGARCH_H #define LAYER_PRELU_LOONGARCH_H diff --git a/src/layer/loongarch/quantize_loongarch.cpp b/src/layer/loongarch/quantize_loongarch.cpp index b4d9d7a90..80082cb65 100644 --- a/src/layer/loongarch/quantize_loongarch.cpp +++ b/src/layer/loongarch/quantize_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "quantize_loongarch.h" diff --git a/src/layer/loongarch/quantize_loongarch.h b/src/layer/loongarch/quantize_loongarch.h index dcc0d8e09..4cfd255e7 100644 --- a/src/layer/loongarch/quantize_loongarch.h +++ b/src/layer/loongarch/quantize_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_QUANTIZE_LOONGARCH_H #define LAYER_QUANTIZE_LOONGARCH_H diff --git a/src/layer/loongarch/relu_loongarch.cpp b/src/layer/loongarch/relu_loongarch.cpp index eb478d3ae..f56283e3c 100644 --- a/src/layer/loongarch/relu_loongarch.cpp +++ b/src/layer/loongarch/relu_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "relu_loongarch.h" diff --git a/src/layer/loongarch/relu_loongarch.h b/src/layer/loongarch/relu_loongarch.h index 6ee6684fd..f513ca7d3 100644 --- a/src/layer/loongarch/relu_loongarch.h +++ b/src/layer/loongarch/relu_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RELU_LOONGARCH_H #define LAYER_RELU_LOONGARCH_H diff --git a/src/layer/loongarch/requantize_loongarch.cpp b/src/layer/loongarch/requantize_loongarch.cpp index 4bc46f7b1..eeb38b830 100644 --- a/src/layer/loongarch/requantize_loongarch.cpp +++ b/src/layer/loongarch/requantize_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "requantize_loongarch.h" diff --git a/src/layer/loongarch/requantize_loongarch.h b/src/layer/loongarch/requantize_loongarch.h index 4afaf9df3..dad36b122 100644 --- a/src/layer/loongarch/requantize_loongarch.h +++ b/src/layer/loongarch/requantize_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REQUANTIZE_LOONGARCH_H #define LAYER_REQUANTIZE_LOONGARCH_H diff --git a/src/layer/loongarch/sigmoid_loongarch.cpp b/src/layer/loongarch/sigmoid_loongarch.cpp index a5daa49e5..b429644b5 100644 --- a/src/layer/loongarch/sigmoid_loongarch.cpp +++ b/src/layer/loongarch/sigmoid_loongarch.cpp @@ -1,22 +1,15 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_loongarch.h" #if __loongarch_sx #include #include "lsx_mathfun.h" +#if __loongarch_asx +#include +#include "lasx_mathfun.h" +#endif // __loongarch_asx #endif // __loongarch_sx #include "loongarch_usability.h" @@ -46,15 +39,30 @@ int Sigmoid_loongarch::forward_inplace(Mat& bottom_top_blob, const Option& opt) int i = 0; #if __loongarch_sx - __m128 _one = (__m128)__lsx_vreplfr2vr_s(1.f); +#if __loongarch_asx + __m256 _one_lasx = (__m256)__lasx_xvreplfr2vr_s(1.f); + for (; i + 7 < size; i += 8) + { + __builtin_prefetch(ptr + 32); + __m256 _p = (__m256)__lasx_xvld(ptr, 0); + _p = (__m256)__lasx_xvbitrevi_w((__m256i)_p, 31); + _p = exp256_ps(_p); + _p = __lasx_xvfadd_s(_p, _one_lasx); + __m256 _outp = __lasx_xvfdiv_s(_one_lasx, _p); + __lasx_xvst(_outp, ptr, 0); + + ptr += 8; + } +#endif // __loongarch_lasx + __m128 _one_lsx = (__m128)__lsx_vreplfr2vr_s(1.f); for (; i + 3 < size; i += 4) { __builtin_prefetch(ptr + 16); __m128 _p = (__m128)__lsx_vld(ptr, 0); _p = (__m128)__lsx_vbitrevi_w((__m128i)_p, 31); _p = exp_ps(_p); - _p = __lsx_vfadd_s(_p, _one); - __m128 _outp = __lsx_vfdiv_s(_one, _p); + _p = __lsx_vfadd_s(_p, _one_lsx); + __m128 _outp = __lsx_vfdiv_s(_one_lsx, _p); __lsx_vst(_outp, ptr, 0); ptr += 4; diff --git a/src/layer/loongarch/sigmoid_loongarch.h b/src/layer/loongarch/sigmoid_loongarch.h index 02354d2a5..c06f6c6d3 100644 --- a/src/layer/loongarch/sigmoid_loongarch.h +++ b/src/layer/loongarch/sigmoid_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SIGMOID_LOONGARCH_H #define LAYER_SIGMOID_LOONGARCH_H diff --git a/src/layer/loongarch/slice_loongarch.cpp b/src/layer/loongarch/slice_loongarch.cpp index de998bb26..c98d49f32 100644 --- a/src/layer/loongarch/slice_loongarch.cpp +++ b/src/layer/loongarch/slice_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "slice_loongarch.h" diff --git a/src/layer/loongarch/slice_loongarch.h b/src/layer/loongarch/slice_loongarch.h index 2f5faed8c..ce6f5862d 100644 --- a/src/layer/loongarch/slice_loongarch.h +++ b/src/layer/loongarch/slice_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SLICE_LOONGARCH_H #define LAYER_SLICE_LOONGARCH_H diff --git a/src/layer/loongarch/softmax_loongarch.cpp b/src/layer/loongarch/softmax_loongarch.cpp index fe008e174..a85e1c205 100644 --- a/src/layer/loongarch/softmax_loongarch.cpp +++ b/src/layer/loongarch/softmax_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "softmax_loongarch.h" diff --git a/src/layer/loongarch/softmax_loongarch.h b/src/layer/loongarch/softmax_loongarch.h index baf930fcb..0b5f9ae49 100644 --- a/src/layer/loongarch/softmax_loongarch.h +++ b/src/layer/loongarch/softmax_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTMAX_LOONGARCH_H #define LAYER_SOFTMAX_LOONGARCH_H diff --git a/src/layer/loongarch/swish_loongarch.cpp b/src/layer/loongarch/swish_loongarch.cpp index 9aa589733..23f36bdd7 100644 --- a/src/layer/loongarch/swish_loongarch.cpp +++ b/src/layer/loongarch/swish_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "swish_loongarch.h" diff --git a/src/layer/loongarch/swish_loongarch.h b/src/layer/loongarch/swish_loongarch.h index 9b7d2ac85..1fdd9ff1d 100644 --- a/src/layer/loongarch/swish_loongarch.h +++ b/src/layer/loongarch/swish_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SWISH_LOONGARCH_H #define LAYER_SWISH_LOONGARCH_H diff --git a/src/layer/loongarch/tanh_loongarch.cpp b/src/layer/loongarch/tanh_loongarch.cpp index 7812dee2e..72a421d48 100644 --- a/src/layer/loongarch/tanh_loongarch.cpp +++ b/src/layer/loongarch/tanh_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_loongarch.h" diff --git a/src/layer/loongarch/tanh_loongarch.h b/src/layer/loongarch/tanh_loongarch.h index 74231eb56..6c81fc458 100644 --- a/src/layer/loongarch/tanh_loongarch.h +++ b/src/layer/loongarch/tanh_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TANH_LOONGARCH_H #define LAYER_TANH_LOONGARCH_H diff --git a/src/layer/loongarch/unaryop_loongarch.cpp b/src/layer/loongarch/unaryop_loongarch.cpp index c23478fcf..8bc906961 100644 --- a/src/layer/loongarch/unaryop_loongarch.cpp +++ b/src/layer/loongarch/unaryop_loongarch.cpp @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_loongarch.h" diff --git a/src/layer/loongarch/unaryop_loongarch.h b/src/layer/loongarch/unaryop_loongarch.h index f4210aeab..4c67b8e98 100644 --- a/src/layer/loongarch/unaryop_loongarch.h +++ b/src/layer/loongarch/unaryop_loongarch.h @@ -1,16 +1,5 @@ -// yala is pleased to support the open source community by making ncnn available. -// -// -// Copyright (C) 2022 yala ;. All rights reserved. -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 yala ; +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNARYOP_LOONGARCH_H #define LAYER_UNARYOP_LOONGARCH_H diff --git a/src/layer/lrn.cpp b/src/layer/lrn.cpp index c18f1def9..f4bef7ad0 100644 --- a/src/layer/lrn.cpp +++ b/src/layer/lrn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lrn.h" diff --git a/src/layer/lrn.h b/src/layer/lrn.h index 07c5f96f6..54fe50225 100644 --- a/src/layer/lrn.h +++ b/src/layer/lrn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LRN_H #define LAYER_LRN_H diff --git a/src/layer/lstm.cpp b/src/layer/lstm.cpp index 53f2ac25c..492c9242a 100644 --- a/src/layer/lstm.cpp +++ b/src/layer/lstm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lstm.h" diff --git a/src/layer/lstm.h b/src/layer/lstm.h index 5e4938d7b..3c364bb36 100644 --- a/src/layer/lstm.h +++ b/src/layer/lstm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LSTM_H #define LAYER_LSTM_H diff --git a/src/layer/matmul.cpp b/src/layer/matmul.cpp index 211f0ff30..a4c0dab9b 100644 --- a/src/layer/matmul.cpp +++ b/src/layer/matmul.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "matmul.h" diff --git a/src/layer/matmul.h b/src/layer/matmul.h index 153670961..6171b0cba 100644 --- a/src/layer/matmul.h +++ b/src/layer/matmul.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MATMUL_H #define LAYER_MATMUL_H diff --git a/src/layer/memorydata.cpp b/src/layer/memorydata.cpp index 02a0e0be0..665eeeed5 100644 --- a/src/layer/memorydata.cpp +++ b/src/layer/memorydata.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "memorydata.h" diff --git a/src/layer/memorydata.h b/src/layer/memorydata.h index d5175ad0d..24eade7e9 100644 --- a/src/layer/memorydata.h +++ b/src/layer/memorydata.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MEMORYDATA_H #define LAYER_MEMORYDATA_H diff --git a/src/layer/mips/absval_mips.cpp b/src/layer/mips/absval_mips.cpp index 0f987f424..00878c93e 100644 --- a/src/layer/mips/absval_mips.cpp +++ b/src/layer/mips/absval_mips.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 Leo . All rights reserved. -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Leo +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "absval_mips.h" diff --git a/src/layer/mips/absval_mips.h b/src/layer/mips/absval_mips.h index 95dca4d59..f2a0ec39a 100644 --- a/src/layer/mips/absval_mips.h +++ b/src/layer/mips/absval_mips.h @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Leo +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ABSVAL_MIPS_H #define LAYER_ABSVAL_MIPS_H diff --git a/src/layer/mips/batchnorm_mips.cpp b/src/layer/mips/batchnorm_mips.cpp index fbf412dfe..8c878dd6d 100644 --- a/src/layer/mips/batchnorm_mips.cpp +++ b/src/layer/mips/batchnorm_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_mips.h" diff --git a/src/layer/mips/batchnorm_mips.h b/src/layer/mips/batchnorm_mips.h index 6df49407a..ec7d3a704 100644 --- a/src/layer/mips/batchnorm_mips.h +++ b/src/layer/mips/batchnorm_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BATCHNORM_MIPS_H #define LAYER_BATCHNORM_MIPS_H diff --git a/src/layer/mips/bias_mips.cpp b/src/layer/mips/bias_mips.cpp index 74753be67..5f558aa28 100644 --- a/src/layer/mips/bias_mips.cpp +++ b/src/layer/mips/bias_mips.cpp @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Leo +// SPDX-License-Identifier: BSD-3-Clause #include "bias_mips.h" diff --git a/src/layer/mips/bias_mips.h b/src/layer/mips/bias_mips.h index dfef2159b..08a01ae7f 100644 --- a/src/layer/mips/bias_mips.h +++ b/src/layer/mips/bias_mips.h @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Leo +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BIAS_MIPS_H #define LAYER_BIAS_MIPS_H diff --git a/src/layer/mips/binaryop_mips.cpp b/src/layer/mips/binaryop_mips.cpp index 6e10a7512..b734adf4d 100644 --- a/src/layer/mips/binaryop_mips.cpp +++ b/src/layer/mips/binaryop_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_mips.h" diff --git a/src/layer/mips/binaryop_mips.h b/src/layer/mips/binaryop_mips.h index e682373ba..fc72fa8f8 100644 --- a/src/layer/mips/binaryop_mips.h +++ b/src/layer/mips/binaryop_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BINARYOP_MIPS_H #define LAYER_BINARYOP_MIPS_H diff --git a/src/layer/mips/cast_mips.cpp b/src/layer/mips/cast_mips.cpp index aa5b13ad0..deb74834e 100644 --- a/src/layer/mips/cast_mips.cpp +++ b/src/layer/mips/cast_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cast_mips.h" diff --git a/src/layer/mips/cast_mips.h b/src/layer/mips/cast_mips.h index adabee5f8..0bc7dbc48 100644 --- a/src/layer/mips/cast_mips.h +++ b/src/layer/mips/cast_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CAST_MIPS_H #define LAYER_CAST_MIPS_H diff --git a/src/layer/mips/clip_mips.cpp b/src/layer/mips/clip_mips.cpp index 2edccc5a5..75c99c4b4 100644 --- a/src/layer/mips/clip_mips.cpp +++ b/src/layer/mips/clip_mips.cpp @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Leo +// SPDX-License-Identifier: BSD-3-Clause #include "clip_mips.h" diff --git a/src/layer/mips/clip_mips.h b/src/layer/mips/clip_mips.h index 5db94bc54..e7c477391 100644 --- a/src/layer/mips/clip_mips.h +++ b/src/layer/mips/clip_mips.h @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Leo +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CLIP_MIPS_H #define LAYER_CLIP_MIPS_H diff --git a/src/layer/mips/concat_mips.cpp b/src/layer/mips/concat_mips.cpp index 1e123c57c..43bb93e4e 100644 --- a/src/layer/mips/concat_mips.cpp +++ b/src/layer/mips/concat_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "concat_mips.h" diff --git a/src/layer/mips/concat_mips.h b/src/layer/mips/concat_mips.h index c4ab84f30..445b9a0a2 100644 --- a/src/layer/mips/concat_mips.h +++ b/src/layer/mips/concat_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONCAT_MIPS_H #define LAYER_CONCAT_MIPS_H diff --git a/src/layer/mips/convolution1d_mips.cpp b/src/layer/mips/convolution1d_mips.cpp index 02a008e70..fc8c46083 100644 --- a/src/layer/mips/convolution1d_mips.cpp +++ b/src/layer/mips/convolution1d_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_mips.h" diff --git a/src/layer/mips/convolution1d_mips.h b/src/layer/mips/convolution1d_mips.h index dcc9bd4de..ce50e437c 100644 --- a/src/layer/mips/convolution1d_mips.h +++ b/src/layer/mips/convolution1d_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION1D_MIPS_H #define LAYER_CONVOLUTION1D_MIPS_H diff --git a/src/layer/mips/convolution_1x1.h b/src/layer/mips/convolution_1x1.h index cb36e999f..58c482c07 100644 --- a/src/layer/mips/convolution_1x1.h +++ b/src/layer/mips/convolution_1x1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_1x1_int8.h b/src/layer/mips/convolution_1x1_int8.h index 8730041f6..14cec5e91 100644 --- a/src/layer/mips/convolution_1x1_int8.h +++ b/src/layer/mips/convolution_1x1_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_int8_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/mips/convolution_1x1_pack1to4_int8.h b/src/layer/mips/convolution_1x1_pack1to4_int8.h index 928e16336..b1b74c53a 100644 --- a/src/layer/mips/convolution_1x1_pack1to4_int8.h +++ b/src/layer/mips/convolution_1x1_pack1to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack1to4_int8_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/mips/convolution_1x1_pack4.h b/src/layer/mips/convolution_1x1_pack4.h index 0116c9be5..2e50993a7 100644 --- a/src/layer/mips/convolution_1x1_pack4.h +++ b/src/layer/mips/convolution_1x1_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_1x1_pack4to1.h b/src/layer/mips/convolution_1x1_pack4to1.h index 72125f08a..6e5be8bea 100644 --- a/src/layer/mips/convolution_1x1_pack4to1.h +++ b/src/layer/mips/convolution_1x1_pack4to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack4to1_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_1x1_pack8to1_int8.h b/src/layer/mips/convolution_1x1_pack8to1_int8.h index 398f85e23..d61f9d899 100644 --- a/src/layer/mips/convolution_1x1_pack8to1_int8.h +++ b/src/layer/mips/convolution_1x1_pack8to1_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack8to1_int8_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/mips/convolution_1x1_pack8to4_int8.h b/src/layer/mips/convolution_1x1_pack8to4_int8.h index aa38542e4..dd87568f2 100644 --- a/src/layer/mips/convolution_1x1_pack8to4_int8.h +++ b/src/layer/mips/convolution_1x1_pack8to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack8to4_int8_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/mips/convolution_3x3.h b/src/layer/mips/convolution_3x3.h index 4b21d20f9..fc20a0793 100644 --- a/src/layer/mips/convolution_3x3.h +++ b/src/layer/mips/convolution_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd23_transform_kernel_msa(const Mat& kernel, Mat& kernel_tm2, int inch, int outch, const Option& opt) { diff --git a/src/layer/mips/convolution_3x3_int8.h b/src/layer/mips/convolution_3x3_int8.h index 3958b12b5..8b340b67a 100644 --- a/src/layer/mips/convolution_3x3_int8.h +++ b/src/layer/mips/convolution_3x3_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_MMI && !__mips_msa && !__mips_loongson_mmi void conv3x3s1_winograd43_transform_kernel_int8_loongson_mmi(const Mat& kernel, Mat& kernel_tm_packed, int inch, int outch, const Option& opt); diff --git a/src/layer/mips/convolution_3x3_pack1to4.h b/src/layer/mips/convolution_3x3_pack1to4.h index 409afeaab..4b93f5bbf 100644 --- a/src/layer/mips/convolution_3x3_pack1to4.h +++ b/src/layer/mips/convolution_3x3_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_3x3_pack4.h b/src/layer/mips/convolution_3x3_pack4.h index 2f257f19f..139e9774b 100644 --- a/src/layer/mips/convolution_3x3_pack4.h +++ b/src/layer/mips/convolution_3x3_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_kernel_pack4_msa(const Mat& kernel, Mat& kernel_tm_pack4, int inch, int outch, const Option& opt) { diff --git a/src/layer/mips/convolution_3x3_pack8to1_int8.h b/src/layer/mips/convolution_3x3_pack8to1_int8.h index 986afc607..b9411f25f 100644 --- a/src/layer/mips/convolution_3x3_pack8to1_int8.h +++ b/src/layer/mips/convolution_3x3_pack8to1_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_kernel_pack8to1_int8_msa(const Mat& kernel, Mat& kernel_tm_pack8to1, int inch, int outch, const Option& opt) { diff --git a/src/layer/mips/convolution_3x3_pack8to4_int8.h b/src/layer/mips/convolution_3x3_pack8to4_int8.h index c77ae4d16..e13b24d50 100644 --- a/src/layer/mips/convolution_3x3_pack8to4_int8.h +++ b/src/layer/mips/convolution_3x3_pack8to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_kernel_pack8to4_int8_msa(const Mat& kernel, Mat& kernel_tm_pack8, int inch, int outch, const Option& opt) { diff --git a/src/layer/mips/convolution_7x7_pack1to4.h b/src/layer/mips/convolution_7x7_pack1to4.h index 8cff5dd05..57a913a0e 100644 --- a/src/layer/mips/convolution_7x7_pack1to4.h +++ b/src/layer/mips/convolution_7x7_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s2_pack1to4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_int8.h b/src/layer/mips/convolution_int8.h index 6b56d11eb..461d602c8 100644 --- a/src/layer/mips/convolution_int8.h +++ b/src/layer/mips/convolution_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_int8(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/mips/convolution_mips.cpp b/src/layer/mips/convolution_mips.cpp index 48b174244..04a0d31ef 100644 --- a/src/layer/mips/convolution_mips.cpp +++ b/src/layer/mips/convolution_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_mips.h" diff --git a/src/layer/mips/convolution_mips.h b/src/layer/mips/convolution_mips.h index 8401c6dfd..59f5f3ada 100644 --- a/src/layer/mips/convolution_mips.h +++ b/src/layer/mips/convolution_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION_MIPS_H #define LAYER_CONVOLUTION_MIPS_H diff --git a/src/layer/mips/convolution_mips_mmi.cpp b/src/layer/mips/convolution_mips_mmi.cpp index 230a44c77..7c7cf4a29 100644 --- a/src/layer/mips/convolution_mips_mmi.cpp +++ b/src/layer/mips/convolution_mips_mmi.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/mips/convolution_pack1to4.h b/src/layer/mips/convolution_pack1to4.h index 2d72eaf7a..3eb425370 100644 --- a/src/layer/mips/convolution_pack1to4.h +++ b/src/layer/mips/convolution_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack1to4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack1ton, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/mips/convolution_pack1to4_int8.h b/src/layer/mips/convolution_pack1to4_int8.h index b752bda0b..7cd7e2b46 100644 --- a/src/layer/mips/convolution_pack1to4_int8.h +++ b/src/layer/mips/convolution_pack1to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack1to4_int8_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/mips/convolution_pack4.h b/src/layer/mips/convolution_pack4.h index 2da1a6905..55671b429 100644 --- a/src/layer/mips/convolution_pack4.h +++ b/src/layer/mips/convolution_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/mips/convolution_pack4to1.h b/src/layer/mips/convolution_pack4to1.h index 8269860b2..992c0c1fd 100644 --- a/src/layer/mips/convolution_pack4to1.h +++ b/src/layer/mips/convolution_pack4to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack4to1_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4to1, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/mips/convolution_pack8to1_int8.h b/src/layer/mips/convolution_pack8to1_int8.h index 1f9ad5a6c..0f3d38af5 100644 --- a/src/layer/mips/convolution_pack8to1_int8.h +++ b/src/layer/mips/convolution_pack8to1_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack8to1_int8_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/mips/convolution_pack8to4_int8.h b/src/layer/mips/convolution_pack8to4_int8.h index 50636f82d..db6109894 100644 --- a/src/layer/mips/convolution_pack8to4_int8.h +++ b/src/layer/mips/convolution_pack8to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack8to4_int8_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_int8, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt) { diff --git a/src/layer/mips/convolution_sgemm.h b/src/layer/mips/convolution_sgemm.h index 2a0324912..8f6262e2b 100644 --- a/src/layer/mips/convolution_sgemm.h +++ b/src/layer/mips/convolution_sgemm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_msa(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_sgemm_int8.h b/src/layer/mips/convolution_sgemm_int8.h index ab1b1a6bc..ded18b4c5 100644 --- a/src/layer/mips/convolution_sgemm_int8.h +++ b/src/layer/mips/convolution_sgemm_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_MMI && !__mips_msa && !__mips_loongson_mmi void im2col_sgemm_int8_loongson_mmi(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt); diff --git a/src/layer/mips/convolution_sgemm_pack1to4_int8.h b/src/layer/mips/convolution_sgemm_pack1to4_int8.h index 55dd7ecdb..1979ca586 100644 --- a/src/layer/mips/convolution_sgemm_pack1to4_int8.h +++ b/src/layer/mips/convolution_sgemm_pack1to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack1to4_int8_msa(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/mips/convolution_sgemm_pack4.h b/src/layer/mips/convolution_sgemm_pack4.h index a9cbeb18b..9cbb68101 100644 --- a/src/layer/mips/convolution_sgemm_pack4.h +++ b/src/layer/mips/convolution_sgemm_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack4_msa(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_sgemm_pack4to1.h b/src/layer/mips/convolution_sgemm_pack4to1.h index 494726806..79c52d9f0 100644 --- a/src/layer/mips/convolution_sgemm_pack4to1.h +++ b/src/layer/mips/convolution_sgemm_pack4to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack4to1_msa(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolution_sgemm_pack8to1_int8.h b/src/layer/mips/convolution_sgemm_pack8to1_int8.h index 6d8e08eb9..3e86edc8b 100644 --- a/src/layer/mips/convolution_sgemm_pack8to1_int8.h +++ b/src/layer/mips/convolution_sgemm_pack8to1_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack8to1_int8_msa(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/mips/convolution_sgemm_pack8to4_int8.h b/src/layer/mips/convolution_sgemm_pack8to4_int8.h index 0c24a4118..e3d7118da 100644 --- a/src/layer/mips/convolution_sgemm_pack8to4_int8.h +++ b/src/layer/mips/convolution_sgemm_pack8to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack8to4_int8_msa(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_dot.h b/src/layer/mips/convolution_winograd_dot.h index c4bede4b2..d1051f18c 100644 --- a/src/layer/mips/convolution_winograd_dot.h +++ b/src/layer/mips/convolution_winograd_dot.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_msa(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_dot_int8.h b/src/layer/mips/convolution_winograd_dot_int8.h index 1d5e6928c..b39dff7bc 100644 --- a/src/layer/mips/convolution_winograd_dot_int8.h +++ b/src/layer/mips/convolution_winograd_dot_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_MMI && !__mips_msa && !__mips_loongson_mmi void convolution_winograd_dot_int8_loongson_mmi(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt); diff --git a/src/layer/mips/convolution_winograd_dot_pack4.h b/src/layer/mips/convolution_winograd_dot_pack4.h index 2d64ea7b4..fe7508b6d 100644 --- a/src/layer/mips/convolution_winograd_dot_pack4.h +++ b/src/layer/mips/convolution_winograd_dot_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_pack4_msa(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_dot_pack8to1_int8.h b/src/layer/mips/convolution_winograd_dot_pack8to1_int8.h index e293f3928..57d80355d 100644 --- a/src/layer/mips/convolution_winograd_dot_pack8to1_int8.h +++ b/src/layer/mips/convolution_winograd_dot_pack8to1_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_pack8to1_int8_msa(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_dot_pack8to4_int8.h b/src/layer/mips/convolution_winograd_dot_pack8to4_int8.h index 5f58ca4d7..d09bbe72c 100644 --- a/src/layer/mips/convolution_winograd_dot_pack8to4_int8.h +++ b/src/layer/mips/convolution_winograd_dot_pack8to4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_pack8to4_int8_msa(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_transform.h b/src/layer/mips/convolution_winograd_transform.h index 14578df51..5cd274b23 100644 --- a/src/layer/mips/convolution_winograd_transform.h +++ b/src/layer/mips/convolution_winograd_transform.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_input_msa(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_transform_int8.h b/src/layer/mips/convolution_winograd_transform_int8.h index 7bcb8b94e..c722c652e 100644 --- a/src/layer/mips/convolution_winograd_transform_int8.h +++ b/src/layer/mips/convolution_winograd_transform_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_input_int8_msa(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_transform_pack4.h b/src/layer/mips/convolution_winograd_transform_pack4.h index 353dd9304..492dd83fe 100644 --- a/src/layer/mips/convolution_winograd_transform_pack4.h +++ b/src/layer/mips/convolution_winograd_transform_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_input_pack4_msa(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_transform_pack4_int8.h b/src/layer/mips/convolution_winograd_transform_pack4_int8.h index a8d7db651..2aeea61d8 100644 --- a/src/layer/mips/convolution_winograd_transform_pack4_int8.h +++ b/src/layer/mips/convolution_winograd_transform_pack4_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_output_pack4_int8_msa(const Mat& top_blob_tm, Mat& top_blob, const Option& opt) { diff --git a/src/layer/mips/convolution_winograd_transform_pack8_int8.h b/src/layer/mips/convolution_winograd_transform_pack8_int8.h index 8b1882844..8cfd4c8ec 100644 --- a/src/layer/mips/convolution_winograd_transform_pack8_int8.h +++ b/src/layer/mips/convolution_winograd_transform_pack8_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_input_pack8_int8_msa(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/mips/convolutiondepthwise_3x3.h b/src/layer/mips/convolutiondepthwise_3x3.h index e487b0b35..95c4c402c 100644 --- a/src/layer/mips/convolutiondepthwise_3x3.h +++ b/src/layer/mips/convolutiondepthwise_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolutiondepthwise_3x3_pack4.h b/src/layer/mips/convolutiondepthwise_3x3_pack4.h index f25a44534..1bee98aaf 100644 --- a/src/layer/mips/convolutiondepthwise_3x3_pack4.h +++ b/src/layer/mips/convolutiondepthwise_3x3_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolutiondepthwise_5x5_pack4.h b/src/layer/mips/convolutiondepthwise_5x5_pack4.h index 3b524424c..ffde5428b 100644 --- a/src/layer/mips/convolutiondepthwise_5x5_pack4.h +++ b/src/layer/mips/convolutiondepthwise_5x5_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/mips/convolutiondepthwise_mips.cpp b/src/layer/mips/convolutiondepthwise_mips.cpp index 27799d9ac..39d5998b2 100644 --- a/src/layer/mips/convolutiondepthwise_mips.cpp +++ b/src/layer/mips/convolutiondepthwise_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_mips.h" diff --git a/src/layer/mips/convolutiondepthwise_mips.h b/src/layer/mips/convolutiondepthwise_mips.h index 24d1650b0..b4cefa3d1 100644 --- a/src/layer/mips/convolutiondepthwise_mips.h +++ b/src/layer/mips/convolutiondepthwise_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE_MIPS_H #define LAYER_CONVOLUTIONDEPTHWISE_MIPS_H diff --git a/src/layer/mips/crop_mips.cpp b/src/layer/mips/crop_mips.cpp index 70a3b96ca..5f5fae16e 100644 --- a/src/layer/mips/crop_mips.cpp +++ b/src/layer/mips/crop_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "crop_mips.h" diff --git a/src/layer/mips/crop_mips.h b/src/layer/mips/crop_mips.h index 77c077e71..aed518d3d 100644 --- a/src/layer/mips/crop_mips.h +++ b/src/layer/mips/crop_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CROP_MIPS_H #define LAYER_CROP_MIPS_H diff --git a/src/layer/mips/deconvolution_mips.cpp b/src/layer/mips/deconvolution_mips.cpp index 6efc3c5fe..435173eac 100644 --- a/src/layer/mips/deconvolution_mips.cpp +++ b/src/layer/mips/deconvolution_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_mips.h" diff --git a/src/layer/mips/deconvolution_mips.h b/src/layer/mips/deconvolution_mips.h index b7c0d2e75..8c053914d 100644 --- a/src/layer/mips/deconvolution_mips.h +++ b/src/layer/mips/deconvolution_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION_MIPS_H #define LAYER_DECONVOLUTION_MIPS_H diff --git a/src/layer/mips/deconvolution_pack1to4.h b/src/layer/mips/deconvolution_pack1to4.h index b9ea4ef2f..17d2584a2 100644 --- a/src/layer/mips/deconvolution_pack1to4.h +++ b/src/layer/mips/deconvolution_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack1to4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack1ton, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/mips/deconvolution_pack4.h b/src/layer/mips/deconvolution_pack4.h index 5f07cc19c..a9d11092b 100644 --- a/src/layer/mips/deconvolution_pack4.h +++ b/src/layer/mips/deconvolution_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/mips/deconvolution_pack4to1.h b/src/layer/mips/deconvolution_pack4to1.h index b825e1469..91c47b836 100644 --- a/src/layer/mips/deconvolution_pack4to1.h +++ b/src/layer/mips/deconvolution_pack4to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4to1_msa(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack4to1, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/mips/deconvolutiondepthwise_mips.cpp b/src/layer/mips/deconvolutiondepthwise_mips.cpp index 456cc0778..bd4e29102 100644 --- a/src/layer/mips/deconvolutiondepthwise_mips.cpp +++ b/src/layer/mips/deconvolutiondepthwise_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_mips.h" diff --git a/src/layer/mips/deconvolutiondepthwise_mips.h b/src/layer/mips/deconvolutiondepthwise_mips.h index 24e7a481e..dadea0192 100644 --- a/src/layer/mips/deconvolutiondepthwise_mips.h +++ b/src/layer/mips/deconvolutiondepthwise_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE_MIPS_H #define LAYER_DECONVOLUTIONDEPTHWISE_MIPS_H diff --git a/src/layer/mips/dequantize_mips.cpp b/src/layer/mips/dequantize_mips.cpp index bfa887c36..2ddea6cbf 100644 --- a/src/layer/mips/dequantize_mips.cpp +++ b/src/layer/mips/dequantize_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dequantize_mips.h" diff --git a/src/layer/mips/dequantize_mips.h b/src/layer/mips/dequantize_mips.h index 8ae7e542c..fd318612b 100644 --- a/src/layer/mips/dequantize_mips.h +++ b/src/layer/mips/dequantize_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEQUANTIZE_MIPS_H #define LAYER_DEQUANTIZE_MIPS_H diff --git a/src/layer/mips/dropout_mips.cpp b/src/layer/mips/dropout_mips.cpp index d63fbf5d6..64ac668ac 100644 --- a/src/layer/mips/dropout_mips.cpp +++ b/src/layer/mips/dropout_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dropout_mips.h" diff --git a/src/layer/mips/dropout_mips.h b/src/layer/mips/dropout_mips.h index 05fa38463..42f0a88e3 100644 --- a/src/layer/mips/dropout_mips.h +++ b/src/layer/mips/dropout_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DROPOUT_MIPS_H #define LAYER_DROPOUT_MIPS_H diff --git a/src/layer/mips/eltwise_mips.cpp b/src/layer/mips/eltwise_mips.cpp index c1457aee0..ef4e8bf79 100644 --- a/src/layer/mips/eltwise_mips.cpp +++ b/src/layer/mips/eltwise_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_mips.h" diff --git a/src/layer/mips/eltwise_mips.h b/src/layer/mips/eltwise_mips.h index 9b4ac7731..de6023257 100644 --- a/src/layer/mips/eltwise_mips.h +++ b/src/layer/mips/eltwise_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELTWISE_MIPS_H #define LAYER_ELTWISE_MIPS_H diff --git a/src/layer/mips/flatten_mips.cpp b/src/layer/mips/flatten_mips.cpp index 7e4c96271..c7ae0c3e2 100644 --- a/src/layer/mips/flatten_mips.cpp +++ b/src/layer/mips/flatten_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "flatten_mips.h" diff --git a/src/layer/mips/flatten_mips.h b/src/layer/mips/flatten_mips.h index c9f33225f..5d7249890 100644 --- a/src/layer/mips/flatten_mips.h +++ b/src/layer/mips/flatten_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FLATTEN_MIPS_H #define LAYER_FLATTEN_MIPS_H diff --git a/src/layer/mips/hardsigmoid_mips.cpp b/src/layer/mips/hardsigmoid_mips.cpp index b3b3d54b6..2532a1688 100644 --- a/src/layer/mips/hardsigmoid_mips.cpp +++ b/src/layer/mips/hardsigmoid_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_mips.h" diff --git a/src/layer/mips/hardsigmoid_mips.h b/src/layer/mips/hardsigmoid_mips.h index 51cab8262..a315f0774 100644 --- a/src/layer/mips/hardsigmoid_mips.h +++ b/src/layer/mips/hardsigmoid_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSIGMOID_MIPS_H #define LAYER_HARDSIGMOID_MIPS_H diff --git a/src/layer/mips/hardswish_mips.cpp b/src/layer/mips/hardswish_mips.cpp index f1ee86c19..81f6e1e90 100644 --- a/src/layer/mips/hardswish_mips.cpp +++ b/src/layer/mips/hardswish_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_mips.h" diff --git a/src/layer/mips/hardswish_mips.h b/src/layer/mips/hardswish_mips.h index 8ace7fe79..d63123dba 100644 --- a/src/layer/mips/hardswish_mips.h +++ b/src/layer/mips/hardswish_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSWISH_MIPS_H #define LAYER_HARDSWISH_MIPS_H diff --git a/src/layer/mips/innerproduct_mips.cpp b/src/layer/mips/innerproduct_mips.cpp index ad42accc1..03b0ecb32 100644 --- a/src/layer/mips/innerproduct_mips.cpp +++ b/src/layer/mips/innerproduct_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_mips.h" diff --git a/src/layer/mips/innerproduct_mips.h b/src/layer/mips/innerproduct_mips.h index c96db3f93..49aeae033 100644 --- a/src/layer/mips/innerproduct_mips.h +++ b/src/layer/mips/innerproduct_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INNERPRODUCT_MIPS_H #define LAYER_INNERPRODUCT_MIPS_H diff --git a/src/layer/mips/interp_bicubic.h b/src/layer/mips/interp_bicubic.h index efff2d4db..4b477af5b 100644 --- a/src/layer/mips/interp_bicubic.h +++ b/src/layer/mips/interp_bicubic.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static inline void interpolate_cubic(float fx, float* coeffs) { diff --git a/src/layer/mips/interp_bicubic_pack4.h b/src/layer/mips/interp_bicubic_pack4.h index 22a07e164..2d12e2297 100644 --- a/src/layer/mips/interp_bicubic_pack4.h +++ b/src/layer/mips/interp_bicubic_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/mips/interp_bilinear.h b/src/layer/mips/interp_bilinear.h index eba057149..de4962bbe 100644 --- a/src/layer/mips/interp_bilinear.h +++ b/src/layer/mips/interp_bilinear.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void linear_coeffs(int w, int outw, int* xofs, float* alpha, int align_corner) { diff --git a/src/layer/mips/interp_bilinear_pack4.h b/src/layer/mips/interp_bilinear_pack4.h index 500e8648a..0cc4bb9ba 100644 --- a/src/layer/mips/interp_bilinear_pack4.h +++ b/src/layer/mips/interp_bilinear_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/mips/interp_mips.cpp b/src/layer/mips/interp_mips.cpp index 4ffaf51ca..091f30b84 100644 --- a/src/layer/mips/interp_mips.cpp +++ b/src/layer/mips/interp_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp_mips.h" diff --git a/src/layer/mips/interp_mips.h b/src/layer/mips/interp_mips.h index baff10b4e..c772a9d8b 100644 --- a/src/layer/mips/interp_mips.h +++ b/src/layer/mips/interp_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INTERP_MIPS_H #define LAYER_INTERP_MIPS_H diff --git a/src/layer/mips/loongson_mmi.h b/src/layer/mips/loongson_mmi.h index 9ea577851..411fb54b0 100644 --- a/src/layer/mips/loongson_mmi.h +++ b/src/layer/mips/loongson_mmi.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright(C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License(the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef _MIPS_LOONGSON_MMI_H #define _MIPS_LOONGSON_MMI_H diff --git a/src/layer/mips/mips_activation.h b/src/layer/mips/mips_activation.h index 4f4ad2352..f43849e36 100644 --- a/src/layer/mips/mips_activation.h +++ b/src/layer/mips/mips_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef MIPS_ACTIVATION_H #define MIPS_ACTIVATION_H diff --git a/src/layer/mips/mips_usability.h b/src/layer/mips/mips_usability.h index 662320ee7..78e04eb17 100644 --- a/src/layer/mips/mips_usability.h +++ b/src/layer/mips/mips_usability.h @@ -1,17 +1,6 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 Leo . All rights reserved. -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Leo +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef MIPS_USABILITY_H #define MIPS_USABILITY_H diff --git a/src/layer/mips/mish_mips.cpp b/src/layer/mips/mish_mips.cpp index 7d4040640..d776876ba 100644 --- a/src/layer/mips/mish_mips.cpp +++ b/src/layer/mips/mish_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish_mips.h" diff --git a/src/layer/mips/mish_mips.h b/src/layer/mips/mish_mips.h index 33342a4f5..f213f6657 100644 --- a/src/layer/mips/mish_mips.h +++ b/src/layer/mips/mish_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MISH_MIPS_H #define LAYER_MISH_MIPS_H diff --git a/src/layer/mips/packing_mips.cpp b/src/layer/mips/packing_mips.cpp index 12b94e18c..a4cea20e1 100644 --- a/src/layer/mips/packing_mips.cpp +++ b/src/layer/mips/packing_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "packing_mips.h" diff --git a/src/layer/mips/packing_mips.h b/src/layer/mips/packing_mips.h index ccc57f8af..4caccd608 100644 --- a/src/layer/mips/packing_mips.h +++ b/src/layer/mips/packing_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PACKING_MIPS_H #define LAYER_PACKING_MIPS_H diff --git a/src/layer/mips/padding_mips.cpp b/src/layer/mips/padding_mips.cpp index 09e12e6a2..e35407db0 100644 --- a/src/layer/mips/padding_mips.cpp +++ b/src/layer/mips/padding_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "padding_mips.h" diff --git a/src/layer/mips/padding_mips.h b/src/layer/mips/padding_mips.h index 6d4ae8c2f..2b76ec6ef 100644 --- a/src/layer/mips/padding_mips.h +++ b/src/layer/mips/padding_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PADDING_MIPS_H #define LAYER_PADDING_MIPS_H diff --git a/src/layer/mips/padding_pack4.h b/src/layer/mips/padding_pack4.h index 9121a56b6..958350bdf 100644 --- a/src/layer/mips/padding_pack4.h +++ b/src/layer/mips/padding_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack4_msa(const Mat& src, Mat& dst, int top, int bottom, int left, int right, v4f32 v) { diff --git a/src/layer/mips/padding_pack8_int8.h b/src/layer/mips/padding_pack8_int8.h index 88fc52c86..1bd649460 100644 --- a/src/layer/mips/padding_pack8_int8.h +++ b/src/layer/mips/padding_pack8_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack8_int8_msa(const Mat& src, Mat& dst, int top, int bottom, int left, int right, int64_t _v) { diff --git a/src/layer/mips/pooling_mips.cpp b/src/layer/mips/pooling_mips.cpp index 64380f7c1..9b79910df 100644 --- a/src/layer/mips/pooling_mips.cpp +++ b/src/layer/mips/pooling_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_mips.h" diff --git a/src/layer/mips/pooling_mips.h b/src/layer/mips/pooling_mips.h index ec17a06a9..53c4f4a4b 100644 --- a/src/layer/mips/pooling_mips.h +++ b/src/layer/mips/pooling_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING_MIPS_H #define LAYER_POOLING_MIPS_H diff --git a/src/layer/mips/prelu_mips.cpp b/src/layer/mips/prelu_mips.cpp index 9f6629a86..f9f7b9f4f 100644 --- a/src/layer/mips/prelu_mips.cpp +++ b/src/layer/mips/prelu_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_mips.h" diff --git a/src/layer/mips/prelu_mips.h b/src/layer/mips/prelu_mips.h index 6174c2570..84187b6fc 100644 --- a/src/layer/mips/prelu_mips.h +++ b/src/layer/mips/prelu_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRELU_MIPS_H #define LAYER_PRELU_MIPS_H diff --git a/src/layer/mips/quantize_mips.cpp b/src/layer/mips/quantize_mips.cpp index 0b9ec9db6..2dbf44290 100644 --- a/src/layer/mips/quantize_mips.cpp +++ b/src/layer/mips/quantize_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "quantize_mips.h" diff --git a/src/layer/mips/quantize_mips.h b/src/layer/mips/quantize_mips.h index 220d73af1..a4161ece7 100644 --- a/src/layer/mips/quantize_mips.h +++ b/src/layer/mips/quantize_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_QUANTIZE_MIPS_H #define LAYER_QUANTIZE_MIPS_H diff --git a/src/layer/mips/relu_mips.cpp b/src/layer/mips/relu_mips.cpp index a63244e44..8e718cc91 100644 --- a/src/layer/mips/relu_mips.cpp +++ b/src/layer/mips/relu_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "relu_mips.h" diff --git a/src/layer/mips/relu_mips.h b/src/layer/mips/relu_mips.h index 74e55a6be..638a5209e 100644 --- a/src/layer/mips/relu_mips.h +++ b/src/layer/mips/relu_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RELU_MIPS_H #define LAYER_RELU_MIPS_H diff --git a/src/layer/mips/requantize_mips.cpp b/src/layer/mips/requantize_mips.cpp index 70b1fd6c5..8b0a89aeb 100644 --- a/src/layer/mips/requantize_mips.cpp +++ b/src/layer/mips/requantize_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "requantize_mips.h" diff --git a/src/layer/mips/requantize_mips.h b/src/layer/mips/requantize_mips.h index 6ba740895..e469a2e5d 100644 --- a/src/layer/mips/requantize_mips.h +++ b/src/layer/mips/requantize_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REQUANTIZE_MIPS_H #define LAYER_REQUANTIZE_MIPS_H diff --git a/src/layer/mips/sigmoid_mips.cpp b/src/layer/mips/sigmoid_mips.cpp index e987ab118..54ddcdd77 100644 --- a/src/layer/mips/sigmoid_mips.cpp +++ b/src/layer/mips/sigmoid_mips.cpp @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Leo +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_mips.h" diff --git a/src/layer/mips/sigmoid_mips.h b/src/layer/mips/sigmoid_mips.h index 2bf166e95..ccc3ee59f 100644 --- a/src/layer/mips/sigmoid_mips.h +++ b/src/layer/mips/sigmoid_mips.h @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Leo +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SIGMOID_MIPS_H #define LAYER_SIGMOID_MIPS_H diff --git a/src/layer/mips/slice_mips.cpp b/src/layer/mips/slice_mips.cpp index 46f4028e2..645039ac2 100644 --- a/src/layer/mips/slice_mips.cpp +++ b/src/layer/mips/slice_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "slice_mips.h" diff --git a/src/layer/mips/slice_mips.h b/src/layer/mips/slice_mips.h index 73274d867..2628068ac 100644 --- a/src/layer/mips/slice_mips.h +++ b/src/layer/mips/slice_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SLICE_MIPS_H #define LAYER_SLICE_MIPS_H diff --git a/src/layer/mips/softmax_mips.cpp b/src/layer/mips/softmax_mips.cpp index 9a071be07..6baf5a665 100644 --- a/src/layer/mips/softmax_mips.cpp +++ b/src/layer/mips/softmax_mips.cpp @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Leo +// SPDX-License-Identifier: BSD-3-Clause #include "softmax_mips.h" diff --git a/src/layer/mips/softmax_mips.h b/src/layer/mips/softmax_mips.h index 91437c13f..d2d89accb 100644 --- a/src/layer/mips/softmax_mips.h +++ b/src/layer/mips/softmax_mips.h @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Leo +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTMAX_MIPS_H #define LAYER_SOFTMAX_MIPS_H diff --git a/src/layer/mips/swish_mips.cpp b/src/layer/mips/swish_mips.cpp index 1f2cbac05..276064897 100644 --- a/src/layer/mips/swish_mips.cpp +++ b/src/layer/mips/swish_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish_mips.h" diff --git a/src/layer/mips/swish_mips.h b/src/layer/mips/swish_mips.h index 1dc6753a3..bfc6edde5 100644 --- a/src/layer/mips/swish_mips.h +++ b/src/layer/mips/swish_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SWISH_MIPS_H #define LAYER_SWISH_MIPS_H diff --git a/src/layer/mips/tanh_mips.cpp b/src/layer/mips/tanh_mips.cpp index 13b9fc5c6..636c74b47 100644 --- a/src/layer/mips/tanh_mips.cpp +++ b/src/layer/mips/tanh_mips.cpp @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Leo +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_mips.h" diff --git a/src/layer/mips/tanh_mips.h b/src/layer/mips/tanh_mips.h index 12e38d07f..cfcce8c4a 100644 --- a/src/layer/mips/tanh_mips.h +++ b/src/layer/mips/tanh_mips.h @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Leo +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TANH_MIPS_H #define LAYER_TANH_MIPS_H diff --git a/src/layer/mips/unaryop_mips.cpp b/src/layer/mips/unaryop_mips.cpp index f53e60dce..b6c43dd05 100644 --- a/src/layer/mips/unaryop_mips.cpp +++ b/src/layer/mips/unaryop_mips.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_mips.h" diff --git a/src/layer/mips/unaryop_mips.h b/src/layer/mips/unaryop_mips.h index 800d028bb..63b465e04 100644 --- a/src/layer/mips/unaryop_mips.h +++ b/src/layer/mips/unaryop_mips.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNARYOP_MIPS_H #define LAYER_UNARYOP_MIPS_H diff --git a/src/layer/mish.cpp b/src/layer/mish.cpp index f27d112f4..2e5b78bc7 100644 --- a/src/layer/mish.cpp +++ b/src/layer/mish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish.h" diff --git a/src/layer/mish.h b/src/layer/mish.h index e35b8cebb..e80debd90 100644 --- a/src/layer/mish.h +++ b/src/layer/mish.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MISH_H #define LAYER_MISH_H diff --git a/src/layer/multiheadattention.cpp b/src/layer/multiheadattention.cpp index 253ea4786..9097c615c 100644 --- a/src/layer/multiheadattention.cpp +++ b/src/layer/multiheadattention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "multiheadattention.h" diff --git a/src/layer/multiheadattention.h b/src/layer/multiheadattention.h index 6d32cfae2..ca0ba9cfd 100644 --- a/src/layer/multiheadattention.h +++ b/src/layer/multiheadattention.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MULTIHEADATTENTION_H #define LAYER_MULTIHEADATTENTION_H diff --git a/src/layer/mvn.cpp b/src/layer/mvn.cpp index 713fb1b41..af24d9b16 100644 --- a/src/layer/mvn.cpp +++ b/src/layer/mvn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mvn.h" diff --git a/src/layer/mvn.h b/src/layer/mvn.h index 90fb24608..1a24763d5 100644 --- a/src/layer/mvn.h +++ b/src/layer/mvn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MVN_H #define LAYER_MVN_H diff --git a/src/layer/noop.cpp b/src/layer/noop.cpp index b14f16ea8..efc096e26 100644 --- a/src/layer/noop.cpp +++ b/src/layer/noop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "noop.h" #include "cpu.h" diff --git a/src/layer/noop.h b/src/layer/noop.h index 75bbdd1a3..4619835f6 100644 --- a/src/layer/noop.h +++ b/src/layer/noop.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_NOOP_H #define LAYER_NOOP_H diff --git a/src/layer/normalize.cpp b/src/layer/normalize.cpp index a86851117..d956d36d5 100644 --- a/src/layer/normalize.cpp +++ b/src/layer/normalize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "normalize.h" diff --git a/src/layer/normalize.h b/src/layer/normalize.h index c4ff6964b..1b2a14a11 100644 --- a/src/layer/normalize.h +++ b/src/layer/normalize.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_NORMALIZE_H #define LAYER_NORMALIZE_H diff --git a/src/layer/packing.cpp b/src/layer/packing.cpp index 77c72a4b3..1ec3a332f 100644 --- a/src/layer/packing.cpp +++ b/src/layer/packing.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "packing.h" diff --git a/src/layer/packing.h b/src/layer/packing.h index bdb511da9..3d56e9a26 100644 --- a/src/layer/packing.h +++ b/src/layer/packing.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PACKING_H #define LAYER_PACKING_H diff --git a/src/layer/padding.cpp b/src/layer/padding.cpp index 5e46bb8e8..fc9883f86 100644 --- a/src/layer/padding.cpp +++ b/src/layer/padding.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "padding.h" diff --git a/src/layer/padding.h b/src/layer/padding.h index 36c5be140..33bd235a4 100644 --- a/src/layer/padding.h +++ b/src/layer/padding.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PADDING_H #define LAYER_PADDING_H diff --git a/src/layer/permute.cpp b/src/layer/permute.cpp index 8ff16fbce..1b8b0219f 100644 --- a/src/layer/permute.cpp +++ b/src/layer/permute.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "permute.h" diff --git a/src/layer/permute.h b/src/layer/permute.h index 963aa5f20..5dbb4e5e1 100644 --- a/src/layer/permute.h +++ b/src/layer/permute.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PERMUTE_H #define LAYER_PERMUTE_H diff --git a/src/layer/pixelshuffle.cpp b/src/layer/pixelshuffle.cpp index d349f0ec9..e64d01f77 100644 --- a/src/layer/pixelshuffle.cpp +++ b/src/layer/pixelshuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pixelshuffle.h" diff --git a/src/layer/pixelshuffle.h b/src/layer/pixelshuffle.h index 728dc5f06..224878299 100644 --- a/src/layer/pixelshuffle.h +++ b/src/layer/pixelshuffle.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PIXELSHUFFLE_H #define LAYER_PIXELSHUFFLE_H diff --git a/src/layer/pooling.cpp b/src/layer/pooling.cpp index 8c8b33f0f..2b0c3dced 100644 --- a/src/layer/pooling.cpp +++ b/src/layer/pooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling.h" diff --git a/src/layer/pooling.h b/src/layer/pooling.h index 919127d88..64521104f 100644 --- a/src/layer/pooling.h +++ b/src/layer/pooling.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING_H #define LAYER_POOLING_H diff --git a/src/layer/pooling1d.cpp b/src/layer/pooling1d.cpp index 6ed958549..ddc37c7fc 100644 --- a/src/layer/pooling1d.cpp +++ b/src/layer/pooling1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling1d.h" diff --git a/src/layer/pooling1d.h b/src/layer/pooling1d.h index 38a2e6597..644bdeca4 100644 --- a/src/layer/pooling1d.h +++ b/src/layer/pooling1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING1D_H #define LAYER_POOLING1D_H diff --git a/src/layer/pooling3d.cpp b/src/layer/pooling3d.cpp index 843db0223..640b4592e 100644 --- a/src/layer/pooling3d.cpp +++ b/src/layer/pooling3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling3d.h" diff --git a/src/layer/pooling3d.h b/src/layer/pooling3d.h index 9e8bcf496..f19203fb1 100644 --- a/src/layer/pooling3d.h +++ b/src/layer/pooling3d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING3D_H #define LAYER_POOLING3D_H diff --git a/src/layer/power.cpp b/src/layer/power.cpp index 8e4ef2585..bbb501a2f 100644 --- a/src/layer/power.cpp +++ b/src/layer/power.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "power.h" diff --git a/src/layer/power.h b/src/layer/power.h index 8a54cc637..667b6ec6d 100644 --- a/src/layer/power.h +++ b/src/layer/power.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POWER_H #define LAYER_POWER_H diff --git a/src/layer/prelu.cpp b/src/layer/prelu.cpp index 7870b7752..a5bfd7070 100644 --- a/src/layer/prelu.cpp +++ b/src/layer/prelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "prelu.h" diff --git a/src/layer/prelu.h b/src/layer/prelu.h index ca155d6e4..22d8e7f75 100644 --- a/src/layer/prelu.h +++ b/src/layer/prelu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRELU_H #define LAYER_PRELU_H diff --git a/src/layer/priorbox.cpp b/src/layer/priorbox.cpp index 6e54ba016..09a3a67ec 100644 --- a/src/layer/priorbox.cpp +++ b/src/layer/priorbox.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "priorbox.h" diff --git a/src/layer/priorbox.h b/src/layer/priorbox.h index 5e734e1b4..62439e4d6 100644 --- a/src/layer/priorbox.h +++ b/src/layer/priorbox.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRIORBOX_H #define LAYER_PRIORBOX_H diff --git a/src/layer/proposal.cpp b/src/layer/proposal.cpp index a7dce35f6..588337eff 100644 --- a/src/layer/proposal.cpp +++ b/src/layer/proposal.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "proposal.h" diff --git a/src/layer/proposal.h b/src/layer/proposal.h index ac23ec094..480c33d25 100644 --- a/src/layer/proposal.h +++ b/src/layer/proposal.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PROPOSAL_H #define LAYER_PROPOSAL_H diff --git a/src/layer/psroipooling.cpp b/src/layer/psroipooling.cpp index c576e3116..35177501c 100644 --- a/src/layer/psroipooling.cpp +++ b/src/layer/psroipooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "psroipooling.h" diff --git a/src/layer/psroipooling.h b/src/layer/psroipooling.h index 41ab8e7a6..c42346b34 100644 --- a/src/layer/psroipooling.h +++ b/src/layer/psroipooling.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PSROIPOOLING_H #define LAYER_PSROIPOOLING_H diff --git a/src/layer/quantize.cpp b/src/layer/quantize.cpp index c2770dcfb..7313a3eec 100644 --- a/src/layer/quantize.cpp +++ b/src/layer/quantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "quantize.h" diff --git a/src/layer/quantize.h b/src/layer/quantize.h index bfafd628f..95c1fbdb6 100644 --- a/src/layer/quantize.h +++ b/src/layer/quantize.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_QUANTIZE_H #define LAYER_QUANTIZE_H diff --git a/src/layer/reduction.cpp b/src/layer/reduction.cpp index dc51b894f..1519c5442 100644 --- a/src/layer/reduction.cpp +++ b/src/layer/reduction.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reduction.h" diff --git a/src/layer/reduction.h b/src/layer/reduction.h index 209f6b7eb..d265a8262 100644 --- a/src/layer/reduction.h +++ b/src/layer/reduction.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REDUCTION_H #define LAYER_REDUCTION_H diff --git a/src/layer/relu.cpp b/src/layer/relu.cpp index 563ca912b..0c253dc4f 100644 --- a/src/layer/relu.cpp +++ b/src/layer/relu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "relu.h" diff --git a/src/layer/relu.h b/src/layer/relu.h index 9460bcdcb..561e93cd6 100644 --- a/src/layer/relu.h +++ b/src/layer/relu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RELU_H #define LAYER_RELU_H diff --git a/src/layer/reorg.cpp b/src/layer/reorg.cpp index 59acd41f3..ed770c405 100644 --- a/src/layer/reorg.cpp +++ b/src/layer/reorg.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reorg.h" diff --git a/src/layer/reorg.h b/src/layer/reorg.h index deb303217..e4a8a283e 100644 --- a/src/layer/reorg.h +++ b/src/layer/reorg.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REORG_H #define LAYER_REORG_H diff --git a/src/layer/requantize.cpp b/src/layer/requantize.cpp index 79502de08..100569fac 100644 --- a/src/layer/requantize.cpp +++ b/src/layer/requantize.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "requantize.h" #include "fused_activation.h" diff --git a/src/layer/requantize.h b/src/layer/requantize.h index 4bf87bc9b..113da1466 100644 --- a/src/layer/requantize.h +++ b/src/layer/requantize.h @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REQUANTIZE_H #define LAYER_REQUANTIZE_H @@ -54,4 +43,4 @@ public: } // namespace ncnn -#endif // LAYER_REQUANTIZE_H \ No newline at end of file +#endif // LAYER_REQUANTIZE_H diff --git a/src/layer/reshape.cpp b/src/layer/reshape.cpp index e88f0d448..8bef267f3 100644 --- a/src/layer/reshape.cpp +++ b/src/layer/reshape.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reshape.h" diff --git a/src/layer/reshape.h b/src/layer/reshape.h index 67f489a0e..27304adc8 100644 --- a/src/layer/reshape.h +++ b/src/layer/reshape.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RESHAPE_H #define LAYER_RESHAPE_H diff --git a/src/layer/riscv/absval_riscv.cpp b/src/layer/riscv/absval_riscv.cpp index 805fe8f54..2af2ee984 100644 --- a/src/layer/riscv/absval_riscv.cpp +++ b/src/layer/riscv/absval_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "absval_riscv.h" diff --git a/src/layer/riscv/absval_riscv.h b/src/layer/riscv/absval_riscv.h index ca9bde067..4d2365e9e 100644 --- a/src/layer/riscv/absval_riscv.h +++ b/src/layer/riscv/absval_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ABSVAL_RISCV_H #define LAYER_ABSVAL_RISCV_H diff --git a/src/layer/riscv/absval_riscv_zfh.cpp b/src/layer/riscv/absval_riscv_zfh.cpp index 43bb6a2b0..7bdb5f266 100644 --- a/src/layer/riscv/absval_riscv_zfh.cpp +++ b/src/layer/riscv/absval_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "absval_riscv.h" diff --git a/src/layer/riscv/batchnorm_riscv.cpp b/src/layer/riscv/batchnorm_riscv.cpp index e6e5af890..d6bc220c3 100644 --- a/src/layer/riscv/batchnorm_riscv.cpp +++ b/src/layer/riscv/batchnorm_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_riscv.h" diff --git a/src/layer/riscv/batchnorm_riscv.h b/src/layer/riscv/batchnorm_riscv.h index 9f9b105ca..51f98fe5a 100644 --- a/src/layer/riscv/batchnorm_riscv.h +++ b/src/layer/riscv/batchnorm_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BATCHNORM_RISCV_H #define LAYER_BATCHNORM_RISCV_H diff --git a/src/layer/riscv/batchnorm_riscv_zfh.cpp b/src/layer/riscv/batchnorm_riscv_zfh.cpp index bd2a9be28..ad6180943 100644 --- a/src/layer/riscv/batchnorm_riscv_zfh.cpp +++ b/src/layer/riscv/batchnorm_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_riscv.h" diff --git a/src/layer/riscv/bias_riscv.cpp b/src/layer/riscv/bias_riscv.cpp index cfcaf8ebb..146893d51 100644 --- a/src/layer/riscv/bias_riscv.cpp +++ b/src/layer/riscv/bias_riscv.cpp @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #include "bias_riscv.h" diff --git a/src/layer/riscv/bias_riscv.h b/src/layer/riscv/bias_riscv.h index 2f29f74ed..455f3fe7a 100644 --- a/src/layer/riscv/bias_riscv.h +++ b/src/layer/riscv/bias_riscv.h @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BIAS_RISCV_H #define LAYER_BIAS_RISCV_H diff --git a/src/layer/riscv/bias_riscv_zfh.cpp b/src/layer/riscv/bias_riscv_zfh.cpp index 49483a9ea..84d3540b0 100644 --- a/src/layer/riscv/bias_riscv_zfh.cpp +++ b/src/layer/riscv/bias_riscv_zfh.cpp @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #include "bias_riscv.h" diff --git a/src/layer/riscv/binaryop_riscv.cpp b/src/layer/riscv/binaryop_riscv.cpp index 93bf8519a..7d57c5b89 100644 --- a/src/layer/riscv/binaryop_riscv.cpp +++ b/src/layer/riscv/binaryop_riscv.cpp @@ -1,19 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making -// ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_riscv.h" diff --git a/src/layer/riscv/binaryop_riscv.h b/src/layer/riscv/binaryop_riscv.h index 9a2d473c5..28dad428e 100644 --- a/src/layer/riscv/binaryop_riscv.h +++ b/src/layer/riscv/binaryop_riscv.h @@ -1,18 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BINARYOP_RISCV_H #define LAYER_BINARYOP_RISCV_H diff --git a/src/layer/riscv/binaryop_riscv_zfh.cpp b/src/layer/riscv/binaryop_riscv_zfh.cpp index 46daf1afe..7287798af 100644 --- a/src/layer/riscv/binaryop_riscv_zfh.cpp +++ b/src/layer/riscv/binaryop_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_riscv.h" diff --git a/src/layer/riscv/bnll_riscv.cpp b/src/layer/riscv/bnll_riscv.cpp index f426abb2b..2dcf6b86b 100644 --- a/src/layer/riscv/bnll_riscv.cpp +++ b/src/layer/riscv/bnll_riscv.cpp @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #include "bnll_riscv.h" diff --git a/src/layer/riscv/bnll_riscv.h b/src/layer/riscv/bnll_riscv.h index 1de7d423c..8aa6d98c6 100644 --- a/src/layer/riscv/bnll_riscv.h +++ b/src/layer/riscv/bnll_riscv.h @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BNLL_RISCV_H #define LAYER_BNLL_RISCV_H diff --git a/src/layer/riscv/bnll_riscv_zfh.cpp b/src/layer/riscv/bnll_riscv_zfh.cpp index 2ffed544d..a924b2a53 100644 --- a/src/layer/riscv/bnll_riscv_zfh.cpp +++ b/src/layer/riscv/bnll_riscv_zfh.cpp @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #include "bnll_riscv.h" diff --git a/src/layer/riscv/cast_riscv.cpp b/src/layer/riscv/cast_riscv.cpp index 9b01dd5a9..da4e74f24 100644 --- a/src/layer/riscv/cast_riscv.cpp +++ b/src/layer/riscv/cast_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cast_riscv.h" diff --git a/src/layer/riscv/cast_riscv.h b/src/layer/riscv/cast_riscv.h index 4d4d4d3b4..4435586cc 100644 --- a/src/layer/riscv/cast_riscv.h +++ b/src/layer/riscv/cast_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CAST_RISCV_H #define LAYER_CAST_RISCV_H diff --git a/src/layer/riscv/cast_riscv_zfh.cpp b/src/layer/riscv/cast_riscv_zfh.cpp index cb95eebf9..103e8bd48 100644 --- a/src/layer/riscv/cast_riscv_zfh.cpp +++ b/src/layer/riscv/cast_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cast_riscv.h" diff --git a/src/layer/riscv/celu_riscv.cpp b/src/layer/riscv/celu_riscv.cpp index 5edd68dcd..3284697c1 100644 --- a/src/layer/riscv/celu_riscv.cpp +++ b/src/layer/riscv/celu_riscv.cpp @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #include "celu_riscv.h" #if __riscv_vector diff --git a/src/layer/riscv/celu_riscv.h b/src/layer/riscv/celu_riscv.h index 309b13d62..2fdea0719 100644 --- a/src/layer/riscv/celu_riscv.h +++ b/src/layer/riscv/celu_riscv.h @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CELU_RISCV_H #define LAYER_CELU_RISCV_H diff --git a/src/layer/riscv/celu_riscv_zfh.cpp b/src/layer/riscv/celu_riscv_zfh.cpp index 535340e1a..502eee52d 100644 --- a/src/layer/riscv/celu_riscv_zfh.cpp +++ b/src/layer/riscv/celu_riscv_zfh.cpp @@ -1,14 +1,5 @@ -// Copyright (C) 2025 AtomAlpaca . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 AtomAlpaca +// SPDX-License-Identifier: BSD-3-Clause #include "celu_riscv.h" diff --git a/src/layer/riscv/clip_riscv.cpp b/src/layer/riscv/clip_riscv.cpp index 52a82fe9b..92a1b8619 100644 --- a/src/layer/riscv/clip_riscv.cpp +++ b/src/layer/riscv/clip_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "clip_riscv.h" diff --git a/src/layer/riscv/clip_riscv.h b/src/layer/riscv/clip_riscv.h index 241a249a2..6b195a3d7 100644 --- a/src/layer/riscv/clip_riscv.h +++ b/src/layer/riscv/clip_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CLIP_RISCV_H #define LAYER_CLIP_RISCV_H diff --git a/src/layer/riscv/clip_riscv_zfh.cpp b/src/layer/riscv/clip_riscv_zfh.cpp index feeca5147..779edce78 100644 --- a/src/layer/riscv/clip_riscv_zfh.cpp +++ b/src/layer/riscv/clip_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "clip_riscv.h" diff --git a/src/layer/riscv/concat_riscv.cpp b/src/layer/riscv/concat_riscv.cpp index ae991d925..3a37a2f17 100644 --- a/src/layer/riscv/concat_riscv.cpp +++ b/src/layer/riscv/concat_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "concat_riscv.h" diff --git a/src/layer/riscv/concat_riscv.h b/src/layer/riscv/concat_riscv.h index 230293403..027b8790e 100644 --- a/src/layer/riscv/concat_riscv.h +++ b/src/layer/riscv/concat_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONCAT_RISCV_H #define LAYER_CONCAT_RISCV_H diff --git a/src/layer/riscv/convolution1d_riscv.cpp b/src/layer/riscv/convolution1d_riscv.cpp index 70fc019d2..e4b9e3c00 100644 --- a/src/layer/riscv/convolution1d_riscv.cpp +++ b/src/layer/riscv/convolution1d_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_riscv.h" diff --git a/src/layer/riscv/convolution1d_riscv.h b/src/layer/riscv/convolution1d_riscv.h index 98a21be00..161005ebb 100644 --- a/src/layer/riscv/convolution1d_riscv.h +++ b/src/layer/riscv/convolution1d_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION1D_RISCV_H #define LAYER_CONVOLUTION1D_RISCV_H diff --git a/src/layer/riscv/convolution1d_riscv_zfh.cpp b/src/layer/riscv/convolution1d_riscv_zfh.cpp index 47a9e7a5a..aafe72306 100644 --- a/src/layer/riscv/convolution1d_riscv_zfh.cpp +++ b/src/layer/riscv/convolution1d_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_riscv.h" diff --git a/src/layer/riscv/convolution_1x1.h b/src/layer/riscv/convolution_1x1.h index 5566d5437..cb622390b 100644 --- a/src/layer/riscv/convolution_1x1.h +++ b/src/layer/riscv/convolution_1x1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_1x1_fp16s.h b/src/layer/riscv/convolution_1x1_fp16s.h index 2b652eecb..75acec08c 100644 --- a/src/layer/riscv/convolution_1x1_fp16s.h +++ b/src/layer/riscv/convolution_1x1_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_1x1_pack1ton.h b/src/layer/riscv/convolution_1x1_pack1ton.h index e53083aa8..977945e65 100644 --- a/src/layer/riscv/convolution_1x1_pack1ton.h +++ b/src/layer/riscv/convolution_1x1_pack1ton.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack1ton_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_1x1_pack1ton_fp16s.h b/src/layer/riscv/convolution_1x1_pack1ton_fp16s.h index 87d510195..e60664825 100644 --- a/src/layer/riscv/convolution_1x1_pack1ton_fp16s.h +++ b/src/layer/riscv/convolution_1x1_pack1ton_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_pack1ton_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_1x1_packn.h b/src/layer/riscv/convolution_1x1_packn.h index 3876923a6..0021939d9 100644 --- a/src/layer/riscv/convolution_1x1_packn.h +++ b/src/layer/riscv/convolution_1x1_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_packn_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_1x1_packn_fp16s.h b/src/layer/riscv/convolution_1x1_packn_fp16s.h index f707b32d8..78ec3eea6 100644 --- a/src/layer/riscv/convolution_1x1_packn_fp16s.h +++ b/src/layer/riscv/convolution_1x1_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_packn_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_1x1_packnto1.h b/src/layer/riscv/convolution_1x1_packnto1.h index 3e425813e..1e669aa23 100644 --- a/src/layer/riscv/convolution_1x1_packnto1.h +++ b/src/layer/riscv/convolution_1x1_packnto1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_packnto1_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_1x1_packnto1_fp16s.h b/src/layer/riscv/convolution_1x1_packnto1_fp16s.h index f53ec8724..882c24c9e 100644 --- a/src/layer/riscv/convolution_1x1_packnto1_fp16s.h +++ b/src/layer/riscv/convolution_1x1_packnto1_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sgemm_packnto1_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_3x3.h b/src/layer/riscv/convolution_3x3.h index 115a299be..58d154435 100644 --- a/src/layer/riscv/convolution_3x3.h +++ b/src/layer/riscv/convolution_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd23_transform_kernel_rvv(const Mat& kernel, Mat& kernel_tm2, int inch, int outch, const Option& opt) { diff --git a/src/layer/riscv/convolution_3x3_pack1ton.h b/src/layer/riscv/convolution_3x3_pack1ton.h index fe7f82670..46000ddd9 100644 --- a/src/layer/riscv/convolution_3x3_pack1ton.h +++ b/src/layer/riscv/convolution_3x3_pack1ton.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1ton_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_3x3_pack1ton_fp16s.h b/src/layer/riscv/convolution_3x3_pack1ton_fp16s.h index 100751d6d..b5648bfd1 100644 --- a/src/layer/riscv/convolution_3x3_pack1ton_fp16s.h +++ b/src/layer/riscv/convolution_3x3_pack1ton_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1ton_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_3x3_packn.h b/src/layer/riscv/convolution_3x3_packn.h index 8734f0164..fa45f4e53 100644 --- a/src/layer/riscv/convolution_3x3_packn.h +++ b/src/layer/riscv/convolution_3x3_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_kernel_packn_rvv(const Mat& kernel, Mat& kernel_tm_packn, int inch, int outch, const Option& opt) { diff --git a/src/layer/riscv/convolution_3x3_packn_fp16s.h b/src/layer/riscv/convolution_3x3_packn_fp16s.h index 022e00ffe..988ab7922 100644 --- a/src/layer/riscv/convolution_3x3_packn_fp16s.h +++ b/src/layer/riscv/convolution_3x3_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_kernel_packn_fp16sa_rvv(const Mat& kernel, Mat& kernel_tm_packn, int inch, int outch, const Option& opt) { diff --git a/src/layer/riscv/convolution_7x7_pack1ton.h b/src/layer/riscv/convolution_7x7_pack1ton.h index 709230a0f..2627c266d 100644 --- a/src/layer/riscv/convolution_7x7_pack1ton.h +++ b/src/layer/riscv/convolution_7x7_pack1ton.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s2_pack1ton_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_7x7_pack1ton_fp16s.h b/src/layer/riscv/convolution_7x7_pack1ton_fp16s.h index bccd01b42..0d94d5941 100644 --- a/src/layer/riscv/convolution_7x7_pack1ton_fp16s.h +++ b/src/layer/riscv/convolution_7x7_pack1ton_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv7x7s2_pack1ton_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_fp16s.h b/src/layer/riscv/convolution_fp16s.h index 7b08a9852..7551baa34 100644 --- a/src/layer/riscv/convolution_fp16s.h +++ b/src/layer/riscv/convolution_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_fp16s(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/convolution_pack1ton.h b/src/layer/riscv/convolution_pack1ton.h index fd223b713..aa5968914 100644 --- a/src/layer/riscv/convolution_pack1ton.h +++ b/src/layer/riscv/convolution_pack1ton.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack1ton_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack1ton, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/convolution_pack1ton_fp16s.h b/src/layer/riscv/convolution_pack1ton_fp16s.h index 307e00ad8..a9450289a 100644 --- a/src/layer/riscv/convolution_pack1ton_fp16s.h +++ b/src/layer/riscv/convolution_pack1ton_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_pack1ton_fp16s_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/convolution_packn.h b/src/layer/riscv/convolution_packn.h index 4f89c9dad..97452e5af 100644 --- a/src/layer/riscv/convolution_packn.h +++ b/src/layer/riscv/convolution_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_packn_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packn, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/convolution_packn_fp16s.h b/src/layer/riscv/convolution_packn_fp16s.h index 9f5e25c25..bb2cab09c 100644 --- a/src/layer/riscv/convolution_packn_fp16s.h +++ b/src/layer/riscv/convolution_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_packn_fp16s_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/convolution_packnto1.h b/src/layer/riscv/convolution_packnto1.h index 79c46daaa..026c59ef2 100644 --- a/src/layer/riscv/convolution_packnto1.h +++ b/src/layer/riscv/convolution_packnto1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_packnto1_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packnto1, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/convolution_packnto1_fp16s.h b/src/layer/riscv/convolution_packnto1_fp16s.h index 87c1ad807..b49c53e20 100644 --- a/src/layer/riscv/convolution_packnto1_fp16s.h +++ b/src/layer/riscv/convolution_packnto1_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_packnto1_fp16s_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/convolution_riscv.cpp b/src/layer/riscv/convolution_riscv.cpp index a9251baba..ce3bfeca1 100644 --- a/src/layer/riscv/convolution_riscv.cpp +++ b/src/layer/riscv/convolution_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_riscv.h" diff --git a/src/layer/riscv/convolution_riscv.h b/src/layer/riscv/convolution_riscv.h index 4add71086..57eec5db0 100644 --- a/src/layer/riscv/convolution_riscv.h +++ b/src/layer/riscv/convolution_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION_RISCV_H #define LAYER_CONVOLUTION_RISCV_H diff --git a/src/layer/riscv/convolution_riscv_zfh.cpp b/src/layer/riscv/convolution_riscv_zfh.cpp index 861510f1e..00ff5af75 100644 --- a/src/layer/riscv/convolution_riscv_zfh.cpp +++ b/src/layer/riscv/convolution_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_riscv.h" diff --git a/src/layer/riscv/convolution_sgemm.h b/src/layer/riscv/convolution_sgemm.h index f9034fadf..2b7432b29 100644 --- a/src/layer/riscv/convolution_sgemm.h +++ b/src/layer/riscv/convolution_sgemm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_sgemm_fp16s.h b/src/layer/riscv/convolution_sgemm_fp16s.h index 6354b3836..3bcb89fb3 100644 --- a/src/layer/riscv/convolution_sgemm_fp16s.h +++ b/src/layer/riscv/convolution_sgemm_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_fp16sa_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_sgemm_pack1ton.h b/src/layer/riscv/convolution_sgemm_pack1ton.h index c230be6c6..12278d01c 100644 --- a/src/layer/riscv/convolution_sgemm_pack1ton.h +++ b/src/layer/riscv/convolution_sgemm_pack1ton.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack1ton_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_sgemm_pack1ton_fp16s.h b/src/layer/riscv/convolution_sgemm_pack1ton_fp16s.h index 07f32cd34..49ddd2081 100644 --- a/src/layer/riscv/convolution_sgemm_pack1ton_fp16s.h +++ b/src/layer/riscv/convolution_sgemm_pack1ton_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_pack1ton_fp16sa_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_sgemm_packn.h b/src/layer/riscv/convolution_sgemm_packn.h index d955a1b01..54c842d9e 100644 --- a/src/layer/riscv/convolution_sgemm_packn.h +++ b/src/layer/riscv/convolution_sgemm_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_packn_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_sgemm_packn_fp16s.h b/src/layer/riscv/convolution_sgemm_packn_fp16s.h index 8d728aa10..c8fbd53e2 100644 --- a/src/layer/riscv/convolution_sgemm_packn_fp16s.h +++ b/src/layer/riscv/convolution_sgemm_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_packn_fp16sa_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_sgemm_packnto1.h b/src/layer/riscv/convolution_sgemm_packnto1.h index 869e2b6a2..910b19bbb 100644 --- a/src/layer/riscv/convolution_sgemm_packnto1.h +++ b/src/layer/riscv/convolution_sgemm_packnto1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_packnto1_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_sgemm_packnto1_fp16s.h b/src/layer/riscv/convolution_sgemm_packnto1_fp16s.h index 76d153fd4..0423ccfa7 100644 --- a/src/layer/riscv/convolution_sgemm_packnto1_fp16s.h +++ b/src/layer/riscv/convolution_sgemm_packnto1_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void im2col_sgemm_packnto1_fp16sa_rvv(const Mat& bottom_im2col, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolution_winograd_dot.h b/src/layer/riscv/convolution_winograd_dot.h index 9670bb8c7..95c3058ac 100644 --- a/src/layer/riscv/convolution_winograd_dot.h +++ b/src/layer/riscv/convolution_winograd_dot.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_rvv(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/riscv/convolution_winograd_dot_packn.h b/src/layer/riscv/convolution_winograd_dot_packn.h index 84c38aaec..252b52394 100644 --- a/src/layer/riscv/convolution_winograd_dot_packn.h +++ b/src/layer/riscv/convolution_winograd_dot_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_packn_rvv(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/riscv/convolution_winograd_dot_packn_fp16s.h b/src/layer/riscv/convolution_winograd_dot_packn_fp16s.h index dd3e0b9af..fed43f8e6 100644 --- a/src/layer/riscv/convolution_winograd_dot_packn_fp16s.h +++ b/src/layer/riscv/convolution_winograd_dot_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_winograd_dot_packn_fp16sa_rvv(Mat& bottom_blob_tm, int outch, const Mat& kernel_tm, Mat& top_blob_tm, const Option& opt) { diff --git a/src/layer/riscv/convolution_winograd_transform.h b/src/layer/riscv/convolution_winograd_transform.h index e286df54f..521bc88dc 100644 --- a/src/layer/riscv/convolution_winograd_transform.h +++ b/src/layer/riscv/convolution_winograd_transform.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd43_transform_input_rvv(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/riscv/convolution_winograd_transform_packn.h b/src/layer/riscv/convolution_winograd_transform_packn.h index 9c97d184f..6cc8967b1 100644 --- a/src/layer/riscv/convolution_winograd_transform_packn.h +++ b/src/layer/riscv/convolution_winograd_transform_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_input_packn_rvv(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/riscv/convolution_winograd_transform_packn_fp16s.h b/src/layer/riscv/convolution_winograd_transform_packn_fp16s.h index 3119f665d..c450a6006 100644 --- a/src/layer/riscv/convolution_winograd_transform_packn_fp16s.h +++ b/src/layer/riscv/convolution_winograd_transform_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_winograd63_transform_input_packn_fp16sa_rvv(const Mat& bottom_blob, Mat& bottom_blob_tm, const Option& opt) { diff --git a/src/layer/riscv/convolutiondepthwise_3x3.h b/src/layer/riscv/convolutiondepthwise_3x3.h index 1e8dad3ea..8e44409a7 100644 --- a/src/layer/riscv/convolutiondepthwise_3x3.h +++ b/src/layer/riscv/convolutiondepthwise_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolutiondepthwise_3x3_packn.h b/src/layer/riscv/convolutiondepthwise_3x3_packn.h index a2f273537..09c609d25 100644 --- a/src/layer/riscv/convolutiondepthwise_3x3_packn.h +++ b/src/layer/riscv/convolutiondepthwise_3x3_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_packn_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolutiondepthwise_3x3_packn_fp16s.h b/src/layer/riscv/convolutiondepthwise_3x3_packn_fp16s.h index 6493c50c0..567f03234 100644 --- a/src/layer/riscv/convolutiondepthwise_3x3_packn_fp16s.h +++ b/src/layer/riscv/convolutiondepthwise_3x3_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_packn_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolutiondepthwise_5x5_packn.h b/src/layer/riscv/convolutiondepthwise_5x5_packn.h index 371d077f7..17d367a2e 100644 --- a/src/layer/riscv/convolutiondepthwise_5x5_packn.h +++ b/src/layer/riscv/convolutiondepthwise_5x5_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_packn_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolutiondepthwise_5x5_packn_fp16s.h b/src/layer/riscv/convolutiondepthwise_5x5_packn_fp16s.h index 8169d8429..64aaa69a3 100644 --- a/src/layer/riscv/convolutiondepthwise_5x5_packn_fp16s.h +++ b/src/layer/riscv/convolutiondepthwise_5x5_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_packn_fp16sa_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/riscv/convolutiondepthwise_riscv.cpp b/src/layer/riscv/convolutiondepthwise_riscv.cpp index d6fa4bef0..a1cc206c2 100644 --- a/src/layer/riscv/convolutiondepthwise_riscv.cpp +++ b/src/layer/riscv/convolutiondepthwise_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_riscv.h" diff --git a/src/layer/riscv/convolutiondepthwise_riscv.h b/src/layer/riscv/convolutiondepthwise_riscv.h index 7f2c66d8e..6fa938d7a 100644 --- a/src/layer/riscv/convolutiondepthwise_riscv.h +++ b/src/layer/riscv/convolutiondepthwise_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE_RISCV_H #define LAYER_CONVOLUTIONDEPTHWISE_RISCV_H diff --git a/src/layer/riscv/convolutiondepthwise_riscv_zfh.cpp b/src/layer/riscv/convolutiondepthwise_riscv_zfh.cpp index 9764166ca..7136d1992 100644 --- a/src/layer/riscv/convolutiondepthwise_riscv_zfh.cpp +++ b/src/layer/riscv/convolutiondepthwise_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_riscv.h" diff --git a/src/layer/riscv/crop_riscv.cpp b/src/layer/riscv/crop_riscv.cpp index ec4f2edc6..c7984ac23 100644 --- a/src/layer/riscv/crop_riscv.cpp +++ b/src/layer/riscv/crop_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "crop_riscv.h" diff --git a/src/layer/riscv/crop_riscv.h b/src/layer/riscv/crop_riscv.h index 404022faf..92dc8b312 100644 --- a/src/layer/riscv/crop_riscv.h +++ b/src/layer/riscv/crop_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CROP_RISCV_H #define LAYER_CROP_RISCV_H diff --git a/src/layer/riscv/deconvolution_fp16s.h b/src/layer/riscv/deconvolution_fp16s.h index bf4e89aeb..19fb319e8 100644 --- a/src/layer/riscv/deconvolution_fp16s.h +++ b/src/layer/riscv/deconvolution_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_fp16s(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/deconvolution_pack1ton.h b/src/layer/riscv/deconvolution_pack1ton.h index d96f1991e..88e76f3af 100644 --- a/src/layer/riscv/deconvolution_pack1ton.h +++ b/src/layer/riscv/deconvolution_pack1ton.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack1ton_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_pack1ton, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/deconvolution_pack1ton_fp16s.h b/src/layer/riscv/deconvolution_pack1ton_fp16s.h index 91ca4cf39..45755f460 100644 --- a/src/layer/riscv/deconvolution_pack1ton_fp16s.h +++ b/src/layer/riscv/deconvolution_pack1ton_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack1ton_fp16s_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/deconvolution_packn.h b/src/layer/riscv/deconvolution_packn.h index a02e58ab6..8e585f6d3 100644 --- a/src/layer/riscv/deconvolution_packn.h +++ b/src/layer/riscv/deconvolution_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_packn_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packn, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/deconvolution_packn_fp16s.h b/src/layer/riscv/deconvolution_packn_fp16s.h index b4bd5f80d..1695aaa01 100644 --- a/src/layer/riscv/deconvolution_packn_fp16s.h +++ b/src/layer/riscv/deconvolution_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_packn_fp16s_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/deconvolution_packnto1.h b/src/layer/riscv/deconvolution_packnto1.h index 9fcffcae8..7ba6154d9 100644 --- a/src/layer/riscv/deconvolution_packnto1.h +++ b/src/layer/riscv/deconvolution_packnto1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_packnto1_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packnto1, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/deconvolution_packnto1_fp16s.h b/src/layer/riscv/deconvolution_packnto1_fp16s.h index 59d1935cb..4ed9f9ff9 100644 --- a/src/layer/riscv/deconvolution_packnto1_fp16s.h +++ b/src/layer/riscv/deconvolution_packnto1_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_packnto1_fp16s_rvv(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_fp16, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/riscv/deconvolution_riscv.cpp b/src/layer/riscv/deconvolution_riscv.cpp index d0db90d48..4a9a88685 100644 --- a/src/layer/riscv/deconvolution_riscv.cpp +++ b/src/layer/riscv/deconvolution_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_riscv.h" diff --git a/src/layer/riscv/deconvolution_riscv.h b/src/layer/riscv/deconvolution_riscv.h index 96233bd79..9bc4c24cb 100644 --- a/src/layer/riscv/deconvolution_riscv.h +++ b/src/layer/riscv/deconvolution_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION_RISCV_H #define LAYER_DECONVOLUTION_RISCV_H diff --git a/src/layer/riscv/deconvolution_riscv_zfh.cpp b/src/layer/riscv/deconvolution_riscv_zfh.cpp index 80d59a93c..a0026b6f6 100644 --- a/src/layer/riscv/deconvolution_riscv_zfh.cpp +++ b/src/layer/riscv/deconvolution_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_riscv.h" diff --git a/src/layer/riscv/deconvolutiondepthwise_riscv.cpp b/src/layer/riscv/deconvolutiondepthwise_riscv.cpp index 507789a40..8686325af 100644 --- a/src/layer/riscv/deconvolutiondepthwise_riscv.cpp +++ b/src/layer/riscv/deconvolutiondepthwise_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_riscv.h" diff --git a/src/layer/riscv/deconvolutiondepthwise_riscv.h b/src/layer/riscv/deconvolutiondepthwise_riscv.h index a965b5a46..05f234f93 100644 --- a/src/layer/riscv/deconvolutiondepthwise_riscv.h +++ b/src/layer/riscv/deconvolutiondepthwise_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE_RISCV_H #define LAYER_DECONVOLUTIONDEPTHWISE_RISCV_H diff --git a/src/layer/riscv/deconvolutiondepthwise_riscv_zfh.cpp b/src/layer/riscv/deconvolutiondepthwise_riscv_zfh.cpp index 69f9d5b4c..b055c4363 100644 --- a/src/layer/riscv/deconvolutiondepthwise_riscv_zfh.cpp +++ b/src/layer/riscv/deconvolutiondepthwise_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_riscv.h" diff --git a/src/layer/riscv/dropout_riscv.cpp b/src/layer/riscv/dropout_riscv.cpp index 4a1ddc0cf..63fbaa959 100644 --- a/src/layer/riscv/dropout_riscv.cpp +++ b/src/layer/riscv/dropout_riscv.cpp @@ -1,19 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making -// ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "dropout_riscv.h" diff --git a/src/layer/riscv/dropout_riscv.h b/src/layer/riscv/dropout_riscv.h index 9c28d8672..5ba6c1d07 100644 --- a/src/layer/riscv/dropout_riscv.h +++ b/src/layer/riscv/dropout_riscv.h @@ -1,19 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making -// ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DROPOUT_RISCV_H #define LAYER_DROPOUT_RISCV_H diff --git a/src/layer/riscv/eltwise_riscv.cpp b/src/layer/riscv/eltwise_riscv.cpp index aa04c935b..e0152e514 100644 --- a/src/layer/riscv/eltwise_riscv.cpp +++ b/src/layer/riscv/eltwise_riscv.cpp @@ -1,17 +1,5 @@ -// -// Copyright (C) 2025 xiaofan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2025 xiaofan +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_riscv.h" diff --git a/src/layer/riscv/eltwise_riscv.h b/src/layer/riscv/eltwise_riscv.h index 10c158a13..659e28866 100644 --- a/src/layer/riscv/eltwise_riscv.h +++ b/src/layer/riscv/eltwise_riscv.h @@ -1,17 +1,5 @@ -// -// Copyright (C) 2025 xiaofan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2025 xiaofan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELTWISE_RISCV_H #define LAYER_ELTWISE_RISCV_H diff --git a/src/layer/riscv/eltwise_riscv_zfh.cpp b/src/layer/riscv/eltwise_riscv_zfh.cpp index 8ff4c8570..76df65b04 100644 --- a/src/layer/riscv/eltwise_riscv_zfh.cpp +++ b/src/layer/riscv/eltwise_riscv_zfh.cpp @@ -1,17 +1,5 @@ -// -// Copyright (C) 2025 xiaofan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2025 xiaofan +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_riscv.h" diff --git a/src/layer/riscv/flatten_riscv.cpp b/src/layer/riscv/flatten_riscv.cpp index 52674f5dd..cf12a96bc 100644 --- a/src/layer/riscv/flatten_riscv.cpp +++ b/src/layer/riscv/flatten_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "flatten_riscv.h" diff --git a/src/layer/riscv/flatten_riscv.h b/src/layer/riscv/flatten_riscv.h index 318603402..f2b139784 100644 --- a/src/layer/riscv/flatten_riscv.h +++ b/src/layer/riscv/flatten_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FLATTEN_RISCV_H #define LAYER_FLATTEN_RISCV_H diff --git a/src/layer/riscv/gelu_riscv.cpp b/src/layer/riscv/gelu_riscv.cpp index 34b292126..0bcbc8855 100644 --- a/src/layer/riscv/gelu_riscv.cpp +++ b/src/layer/riscv/gelu_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "gelu_riscv.h" diff --git a/src/layer/riscv/gelu_riscv.h b/src/layer/riscv/gelu_riscv.h index 8a2e9492c..6ec24541b 100644 --- a/src/layer/riscv/gelu_riscv.h +++ b/src/layer/riscv/gelu_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GELU_RISCV_H #define LAYER_GELU_RISCV_H diff --git a/src/layer/riscv/gemm_riscv.cpp b/src/layer/riscv/gemm_riscv.cpp index 0c9862d55..216219d7b 100644 --- a/src/layer/riscv/gemm_riscv.cpp +++ b/src/layer/riscv/gemm_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm_riscv.h" @@ -43,7 +32,7 @@ static void pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("pack_A_tile %d", elempack); @@ -139,7 +128,7 @@ static void transpose_pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("transpose_pack_A_tile %d", elempack); @@ -250,7 +239,7 @@ static void pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int k, int max #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("pack_B_tile %d", elempack); @@ -346,7 +335,7 @@ static void transpose_pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("transpose_pack_B_tile %d", elempack); @@ -457,7 +446,7 @@ static void transpose_unpack_output_tile(const Mat& topT, Mat& top_blob, int i, #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; // NCNN_LOGE("transpose_unpack_output_tile %d", out_elempack); @@ -564,7 +553,7 @@ static void gemm_transB_packed_tile(const Mat& AT_tile, const Mat& BT_tile, cons #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const float* pAT = AT_tile; const float* pBT = BT_tile; diff --git a/src/layer/riscv/gemm_riscv.h b/src/layer/riscv/gemm_riscv.h index 967a9ee12..55b9befd3 100644 --- a/src/layer/riscv/gemm_riscv.h +++ b/src/layer/riscv/gemm_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GEMM_RISCV_H #define LAYER_GEMM_RISCV_H diff --git a/src/layer/riscv/gru_riscv.cpp b/src/layer/riscv/gru_riscv.cpp index ca8136d8d..0d9987c4d 100644 --- a/src/layer/riscv/gru_riscv.cpp +++ b/src/layer/riscv/gru_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "gru_riscv.h" diff --git a/src/layer/riscv/gru_riscv.h b/src/layer/riscv/gru_riscv.h index a9434f830..ff830b3b8 100644 --- a/src/layer/riscv/gru_riscv.h +++ b/src/layer/riscv/gru_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GRU_RISCV_H #define LAYER_GRU_RISCV_H diff --git a/src/layer/riscv/gru_riscv_zfh.cpp b/src/layer/riscv/gru_riscv_zfh.cpp index 4c19af8a9..cc3c4fd56 100644 --- a/src/layer/riscv/gru_riscv_zfh.cpp +++ b/src/layer/riscv/gru_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gru_riscv.h" diff --git a/src/layer/riscv/hardsigmoid_riscv.cpp b/src/layer/riscv/hardsigmoid_riscv.cpp index 370f623e9..797fe28fc 100644 --- a/src/layer/riscv/hardsigmoid_riscv.cpp +++ b/src/layer/riscv/hardsigmoid_riscv.cpp @@ -1,19 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making -// ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_riscv.h" diff --git a/src/layer/riscv/hardsigmoid_riscv.h b/src/layer/riscv/hardsigmoid_riscv.h index 088342210..0bb53f4dc 100644 --- a/src/layer/riscv/hardsigmoid_riscv.h +++ b/src/layer/riscv/hardsigmoid_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSIGMOID_RISCV_H #define LAYER_HARDSIGMOID_RISCV_H diff --git a/src/layer/riscv/hardsigmoid_riscv_zfh.cpp b/src/layer/riscv/hardsigmoid_riscv_zfh.cpp index f1f8ab6f6..2f02d79ed 100644 --- a/src/layer/riscv/hardsigmoid_riscv_zfh.cpp +++ b/src/layer/riscv/hardsigmoid_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_riscv.h" diff --git a/src/layer/riscv/hardswish_riscv.cpp b/src/layer/riscv/hardswish_riscv.cpp index 5de9b943a..8092eb2ae 100644 --- a/src/layer/riscv/hardswish_riscv.cpp +++ b/src/layer/riscv/hardswish_riscv.cpp @@ -1,19 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making -// ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_riscv.h" diff --git a/src/layer/riscv/hardswish_riscv.h b/src/layer/riscv/hardswish_riscv.h index b882487ba..f06dca84d 100644 --- a/src/layer/riscv/hardswish_riscv.h +++ b/src/layer/riscv/hardswish_riscv.h @@ -1,19 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making -// ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSWISH_RISCV_H #define LAYER_HARDSWISH_RISCV_H diff --git a/src/layer/riscv/hardswish_riscv_zfh.cpp b/src/layer/riscv/hardswish_riscv_zfh.cpp index 2afdf07d9..114e9a95a 100644 --- a/src/layer/riscv/hardswish_riscv_zfh.cpp +++ b/src/layer/riscv/hardswish_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_riscv.h" diff --git a/src/layer/riscv/innerproduct_riscv.cpp b/src/layer/riscv/innerproduct_riscv.cpp index 8b113b3ea..fa64c1396 100644 --- a/src/layer/riscv/innerproduct_riscv.cpp +++ b/src/layer/riscv/innerproduct_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_riscv.h" diff --git a/src/layer/riscv/innerproduct_riscv.h b/src/layer/riscv/innerproduct_riscv.h index 17be502d0..57b39801e 100644 --- a/src/layer/riscv/innerproduct_riscv.h +++ b/src/layer/riscv/innerproduct_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INNERPRODUCT_RISCV_H #define LAYER_INNERPRODUCT_RISCV_H diff --git a/src/layer/riscv/innerproduct_riscv_zfh.cpp b/src/layer/riscv/innerproduct_riscv_zfh.cpp index 347cca0a6..79fc0f4cb 100644 --- a/src/layer/riscv/innerproduct_riscv_zfh.cpp +++ b/src/layer/riscv/innerproduct_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_riscv.h" diff --git a/src/layer/riscv/instancenorm_riscv.cpp b/src/layer/riscv/instancenorm_riscv.cpp index fccc61543..ffa372f89 100644 --- a/src/layer/riscv/instancenorm_riscv.cpp +++ b/src/layer/riscv/instancenorm_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "instancenorm_riscv.h" diff --git a/src/layer/riscv/instancenorm_riscv.h b/src/layer/riscv/instancenorm_riscv.h index 006b8bfc1..df795c7f4 100644 --- a/src/layer/riscv/instancenorm_riscv.h +++ b/src/layer/riscv/instancenorm_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INSTANCENORM_RISCV_H #define LAYER_INSTANCENORM_RISCV_H diff --git a/src/layer/riscv/instancenorm_riscv_zfh.cpp b/src/layer/riscv/instancenorm_riscv_zfh.cpp index d3ad2cf15..5cad74b13 100644 --- a/src/layer/riscv/instancenorm_riscv_zfh.cpp +++ b/src/layer/riscv/instancenorm_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "instancenorm_riscv.h" diff --git a/src/layer/riscv/interp_bicubic.h b/src/layer/riscv/interp_bicubic.h index efff2d4db..4b477af5b 100644 --- a/src/layer/riscv/interp_bicubic.h +++ b/src/layer/riscv/interp_bicubic.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static inline void interpolate_cubic(float fx, float* coeffs) { diff --git a/src/layer/riscv/interp_bicubic_fp16s.h b/src/layer/riscv/interp_bicubic_fp16s.h index be3e8159d..97a99e48a 100644 --- a/src/layer/riscv/interp_bicubic_fp16s.h +++ b/src/layer/riscv/interp_bicubic_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static inline void interpolate_cubic_fp16sa(float fx, __fp16* coeffs) { diff --git a/src/layer/riscv/interp_bicubic_packn.h b/src/layer/riscv/interp_bicubic_packn.h index c53eb74ab..1262fc42a 100644 --- a/src/layer/riscv/interp_bicubic_packn.h +++ b/src/layer/riscv/interp_bicubic_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_packn(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/riscv/interp_bicubic_packn_fp16s.h b/src/layer/riscv/interp_bicubic_packn_fp16s.h index 7e9c1dc02..bfa3036fa 100644 --- a/src/layer/riscv/interp_bicubic_packn_fp16s.h +++ b/src/layer/riscv/interp_bicubic_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_packn_fp16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/riscv/interp_bilinear.h b/src/layer/riscv/interp_bilinear.h index 03ae612a0..4d1c0e6b0 100644 --- a/src/layer/riscv/interp_bilinear.h +++ b/src/layer/riscv/interp_bilinear.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void linear_coeffs(int w, int outw, int* xofs, float* alpha, int align_corner) { diff --git a/src/layer/riscv/interp_bilinear_fp16s.h b/src/layer/riscv/interp_bilinear_fp16s.h index d0fcde656..9af1daab0 100644 --- a/src/layer/riscv/interp_bilinear_fp16s.h +++ b/src/layer/riscv/interp_bilinear_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void linear_coeffs_fp16sa(int w, int outw, int* xofs, __fp16* alpha, int align_corner) { diff --git a/src/layer/riscv/interp_bilinear_packn.h b/src/layer/riscv/interp_bilinear_packn.h index d55377383..9ecbb7de1 100644 --- a/src/layer/riscv/interp_bilinear_packn.h +++ b/src/layer/riscv/interp_bilinear_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_packn(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/riscv/interp_bilinear_packn_fp16s.h b/src/layer/riscv/interp_bilinear_packn_fp16s.h index b2c195d46..3b2fa7446 100644 --- a/src/layer/riscv/interp_bilinear_packn_fp16s.h +++ b/src/layer/riscv/interp_bilinear_packn_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_packn_fp16s(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/riscv/interp_riscv.cpp b/src/layer/riscv/interp_riscv.cpp index 074171f69..03c67ecb4 100644 --- a/src/layer/riscv/interp_riscv.cpp +++ b/src/layer/riscv/interp_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp_riscv.h" diff --git a/src/layer/riscv/interp_riscv.h b/src/layer/riscv/interp_riscv.h index e9510c4af..c88a4107c 100644 --- a/src/layer/riscv/interp_riscv.h +++ b/src/layer/riscv/interp_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INTERP_RISCV_H #define LAYER_INTERP_RISCV_H diff --git a/src/layer/riscv/interp_riscv_zfh.cpp b/src/layer/riscv/interp_riscv_zfh.cpp index 928961254..6261353cc 100644 --- a/src/layer/riscv/interp_riscv_zfh.cpp +++ b/src/layer/riscv/interp_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp_riscv.h" diff --git a/src/layer/riscv/mish_riscv.cpp b/src/layer/riscv/mish_riscv.cpp index a95bda333..21037ab46 100644 --- a/src/layer/riscv/mish_riscv.cpp +++ b/src/layer/riscv/mish_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish_riscv.h" diff --git a/src/layer/riscv/mish_riscv.h b/src/layer/riscv/mish_riscv.h index a7dc62018..853a5a4e9 100644 --- a/src/layer/riscv/mish_riscv.h +++ b/src/layer/riscv/mish_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MISH_RISCV_H #define LAYER_MISH_RISCV_H diff --git a/src/layer/riscv/mish_riscv_zfh.cpp b/src/layer/riscv/mish_riscv_zfh.cpp index cc24932f4..d47e14e92 100644 --- a/src/layer/riscv/mish_riscv_zfh.cpp +++ b/src/layer/riscv/mish_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish_riscv.h" diff --git a/src/layer/riscv/packing_riscv.cpp b/src/layer/riscv/packing_riscv.cpp index cf1c9451e..d1e51d504 100644 --- a/src/layer/riscv/packing_riscv.cpp +++ b/src/layer/riscv/packing_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "packing_riscv.h" diff --git a/src/layer/riscv/packing_riscv.h b/src/layer/riscv/packing_riscv.h index 097d77499..004a4171a 100644 --- a/src/layer/riscv/packing_riscv.h +++ b/src/layer/riscv/packing_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PACKING_RISCV_H #define LAYER_PACKING_RISCV_H diff --git a/src/layer/riscv/padding_packn.h b/src/layer/riscv/padding_packn.h index 3b057a985..7f4b77a8b 100644 --- a/src/layer/riscv/padding_packn.h +++ b/src/layer/riscv/padding_packn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #define _PADDING_PACKN_RVV(SEW, TSEW, LMUL, T, VT) \ static void padding_constant_packn_##VT##_rvv(const Mat& src, Mat& dst, int top, int bottom, int left, int right, v##VT##m##LMUL##_t v) \ diff --git a/src/layer/riscv/padding_riscv.cpp b/src/layer/riscv/padding_riscv.cpp index 87a9ef2e8..699613e9c 100644 --- a/src/layer/riscv/padding_riscv.cpp +++ b/src/layer/riscv/padding_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "padding_riscv.h" diff --git a/src/layer/riscv/padding_riscv.h b/src/layer/riscv/padding_riscv.h index 43de3d2e5..e3cad9b73 100644 --- a/src/layer/riscv/padding_riscv.h +++ b/src/layer/riscv/padding_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PADDING_RISCV_H #define LAYER_PADDING_RISCV_H diff --git a/src/layer/riscv/pooling_riscv.cpp b/src/layer/riscv/pooling_riscv.cpp index 92f0521bb..e7447080d 100644 --- a/src/layer/riscv/pooling_riscv.cpp +++ b/src/layer/riscv/pooling_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_riscv.h" diff --git a/src/layer/riscv/pooling_riscv.h b/src/layer/riscv/pooling_riscv.h index 8f14df8fa..ad1db9844 100644 --- a/src/layer/riscv/pooling_riscv.h +++ b/src/layer/riscv/pooling_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING_RISCV_H #define LAYER_POOLING_RISCV_H diff --git a/src/layer/riscv/pooling_riscv_zfh.cpp b/src/layer/riscv/pooling_riscv_zfh.cpp index 8da0afbb7..66b99067a 100644 --- a/src/layer/riscv/pooling_riscv_zfh.cpp +++ b/src/layer/riscv/pooling_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_riscv.h" diff --git a/src/layer/riscv/prelu_riscv.cpp b/src/layer/riscv/prelu_riscv.cpp index dcf9b84c6..7527c87c6 100644 --- a/src/layer/riscv/prelu_riscv.cpp +++ b/src/layer/riscv/prelu_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_riscv.h" diff --git a/src/layer/riscv/prelu_riscv.h b/src/layer/riscv/prelu_riscv.h index 4f56f8ce1..ed49b247a 100644 --- a/src/layer/riscv/prelu_riscv.h +++ b/src/layer/riscv/prelu_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRELU_RISCV_H #define LAYER_PRELU_RISCV_H diff --git a/src/layer/riscv/prelu_riscv_zfh.cpp b/src/layer/riscv/prelu_riscv_zfh.cpp index 7dec88df6..560ee3bd7 100644 --- a/src/layer/riscv/prelu_riscv_zfh.cpp +++ b/src/layer/riscv/prelu_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_riscv.h" diff --git a/src/layer/riscv/relu_riscv.cpp b/src/layer/riscv/relu_riscv.cpp index fe4291331..e5b42f6b2 100644 --- a/src/layer/riscv/relu_riscv.cpp +++ b/src/layer/riscv/relu_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "relu_riscv.h" diff --git a/src/layer/riscv/relu_riscv.h b/src/layer/riscv/relu_riscv.h index 7fae384ab..f27ae1500 100644 --- a/src/layer/riscv/relu_riscv.h +++ b/src/layer/riscv/relu_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RELU_RISCV_H #define LAYER_RELU_RISCV_H diff --git a/src/layer/riscv/relu_riscv_zfh.cpp b/src/layer/riscv/relu_riscv_zfh.cpp index b45034217..15a92d5a4 100644 --- a/src/layer/riscv/relu_riscv_zfh.cpp +++ b/src/layer/riscv/relu_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "relu_riscv.h" diff --git a/src/layer/riscv/riscv_activation.h b/src/layer/riscv/riscv_activation.h index 1d0f74763..5cf84edb4 100644 --- a/src/layer/riscv/riscv_activation.h +++ b/src/layer/riscv/riscv_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef RISCV_ACTIVATION_H #define RISCV_ACTIVATION_H diff --git a/src/layer/riscv/riscv_usability.h b/src/layer/riscv/riscv_usability.h index 168966015..16c7ebc08 100644 --- a/src/layer/riscv/riscv_usability.h +++ b/src/layer/riscv/riscv_usability.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef RISCV_USABILITY_H #define RISCV_USABILITY_H diff --git a/src/layer/riscv/rvv_mathfun.h b/src/layer/riscv/rvv_mathfun.h index 10e13bf8d..4dc3244aa 100644 --- a/src/layer/riscv/rvv_mathfun.h +++ b/src/layer/riscv/rvv_mathfun.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef RVV_MATHFUN_H #define RVV_MATHFUN_H diff --git a/src/layer/riscv/rvv_mathfun_fp16s.h b/src/layer/riscv/rvv_mathfun_fp16s.h index d0f0b13b8..e0068264d 100644 --- a/src/layer/riscv/rvv_mathfun_fp16s.h +++ b/src/layer/riscv/rvv_mathfun_fp16s.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef RVV_MATHFUN_FP16S_H #define RVV_MATHFUN_FP16S_H diff --git a/src/layer/riscv/selu_riscv.cpp b/src/layer/riscv/selu_riscv.cpp index f131d4ac4..ce70e7a03 100644 --- a/src/layer/riscv/selu_riscv.cpp +++ b/src/layer/riscv/selu_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "selu_riscv.h" diff --git a/src/layer/riscv/selu_riscv.h b/src/layer/riscv/selu_riscv.h index 185b7f5b2..6d4a40cc8 100644 --- a/src/layer/riscv/selu_riscv.h +++ b/src/layer/riscv/selu_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SELU_RISCV_H #define LAYER_SELU_RISCV_H diff --git a/src/layer/riscv/sigmoid_riscv.cpp b/src/layer/riscv/sigmoid_riscv.cpp index 1a39240ad..57c33f2f8 100644 --- a/src/layer/riscv/sigmoid_riscv.cpp +++ b/src/layer/riscv/sigmoid_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_riscv.h" diff --git a/src/layer/riscv/sigmoid_riscv.h b/src/layer/riscv/sigmoid_riscv.h index 673784867..70b06d0bf 100644 --- a/src/layer/riscv/sigmoid_riscv.h +++ b/src/layer/riscv/sigmoid_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SIGMOID_RISCV_H #define LAYER_SIGMOID_RISCV_H diff --git a/src/layer/riscv/sigmoid_riscv_zfh.cpp b/src/layer/riscv/sigmoid_riscv_zfh.cpp index 239bf02cf..0e7c3f775 100644 --- a/src/layer/riscv/sigmoid_riscv_zfh.cpp +++ b/src/layer/riscv/sigmoid_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_riscv.h" diff --git a/src/layer/riscv/softmax_riscv.cpp b/src/layer/riscv/softmax_riscv.cpp index 0b512fd75..1431a7dfb 100644 --- a/src/layer/riscv/softmax_riscv.cpp +++ b/src/layer/riscv/softmax_riscv.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "softmax_riscv.h" #include @@ -219,7 +208,7 @@ static void softmax(float* _ptr, int elemcount, int elempack) } #if __riscv_vector -static void softmax_packn(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_packn(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { const size_t vlm8 = __riscv_vsetvlmax_e32m8(); const size_t vlm4 = __riscv_vsetvlmax_e32m4(); @@ -487,7 +476,7 @@ static void softmax_packn(float* _ptr, int elemcount, int stride, int size1, flo } #endif // __riscv_vector -static void softmax_pack1(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_pack1(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -608,7 +597,7 @@ static void softmax_pack1(float* _ptr, int elemcount, int stride, int size1, flo } } -static void softmax(float* _ptr, int elemcount, int elempack, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax(float* _ptr, int elemcount, int elempack, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max { @@ -691,7 +680,7 @@ int Softmax_riscv::forward_inplace(Mat& bottom_top_blob, const Option& opt) cons { const int size = w; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = w * elempack; + const size_t stride = (size_t)w * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) @@ -729,7 +718,7 @@ int Softmax_riscv::forward_inplace(Mat& bottom_top_blob, const Option& opt) cons { const int size = w * h * d; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = bottom_top_blob.cstep * elempack; + const size_t stride = bottom_top_blob.cstep * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) diff --git a/src/layer/riscv/softmax_riscv.h b/src/layer/riscv/softmax_riscv.h index f93dc3022..a2a781751 100644 --- a/src/layer/riscv/softmax_riscv.h +++ b/src/layer/riscv/softmax_riscv.h @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTMAX_RISCV_H #define LAYER_SOFTMAX_RISCV_H diff --git a/src/layer/riscv/swish_riscv.cpp b/src/layer/riscv/swish_riscv.cpp index 92c3f17f8..b93d24bff 100644 --- a/src/layer/riscv/swish_riscv.cpp +++ b/src/layer/riscv/swish_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish_riscv.h" diff --git a/src/layer/riscv/swish_riscv.h b/src/layer/riscv/swish_riscv.h index 971b5cb2b..262fd3285 100644 --- a/src/layer/riscv/swish_riscv.h +++ b/src/layer/riscv/swish_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SWISH_RISCV_H #define LAYER_SWISH_RISCV_H diff --git a/src/layer/riscv/swish_riscv_zfh.cpp b/src/layer/riscv/swish_riscv_zfh.cpp index 873a7fb19..5cb8ff3ee 100644 --- a/src/layer/riscv/swish_riscv_zfh.cpp +++ b/src/layer/riscv/swish_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish_riscv.h" diff --git a/src/layer/riscv/tanh_riscv.cpp b/src/layer/riscv/tanh_riscv.cpp index a41307fe5..cacc4e857 100644 --- a/src/layer/riscv/tanh_riscv.cpp +++ b/src/layer/riscv/tanh_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_riscv.h" diff --git a/src/layer/riscv/tanh_riscv.h b/src/layer/riscv/tanh_riscv.h index 69cb0d4e7..24faf9f80 100644 --- a/src/layer/riscv/tanh_riscv.h +++ b/src/layer/riscv/tanh_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TANH_RISCV_H #define LAYER_TANH_RISCV_H diff --git a/src/layer/riscv/tanh_riscv_zfh.cpp b/src/layer/riscv/tanh_riscv_zfh.cpp index 61bdddfaf..cc5b42d9c 100644 --- a/src/layer/riscv/tanh_riscv_zfh.cpp +++ b/src/layer/riscv/tanh_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_riscv.h" diff --git a/src/layer/riscv/unaryop_riscv.cpp b/src/layer/riscv/unaryop_riscv.cpp index bd9ae6996..5cdc80ebb 100644 --- a/src/layer/riscv/unaryop_riscv.cpp +++ b/src/layer/riscv/unaryop_riscv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_riscv.h" diff --git a/src/layer/riscv/unaryop_riscv.h b/src/layer/riscv/unaryop_riscv.h index c3db29bb4..8ddb1b467 100644 --- a/src/layer/riscv/unaryop_riscv.h +++ b/src/layer/riscv/unaryop_riscv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNARYOP_RISCV_H #define LAYER_UNARYOP_RISCV_H diff --git a/src/layer/riscv/unaryop_riscv_zfh.cpp b/src/layer/riscv/unaryop_riscv_zfh.cpp index 0a361d833..1c7b03b73 100644 --- a/src/layer/riscv/unaryop_riscv_zfh.cpp +++ b/src/layer/riscv/unaryop_riscv_zfh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_riscv.h" diff --git a/src/layer/rmsnorm.cpp b/src/layer/rmsnorm.cpp index 77c74c6bc..33caf8930 100644 --- a/src/layer/rmsnorm.cpp +++ b/src/layer/rmsnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rmsnorm.h" diff --git a/src/layer/rmsnorm.h b/src/layer/rmsnorm.h index 4a09f2548..811ca5863 100644 --- a/src/layer/rmsnorm.h +++ b/src/layer/rmsnorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RMSNORM_H #define LAYER_RMSNORM_H diff --git a/src/layer/rnn.cpp b/src/layer/rnn.cpp index 49af3b300..0a3614218 100644 --- a/src/layer/rnn.cpp +++ b/src/layer/rnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rnn.h" diff --git a/src/layer/rnn.h b/src/layer/rnn.h index 7a99ef51b..cdb8a0a64 100644 --- a/src/layer/rnn.h +++ b/src/layer/rnn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RNN_H #define LAYER_RNN_H diff --git a/src/layer/roialign.cpp b/src/layer/roialign.cpp index a344f67f7..bd3d4a186 100644 --- a/src/layer/roialign.cpp +++ b/src/layer/roialign.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "roialign.h" diff --git a/src/layer/roialign.h b/src/layer/roialign.h index 410ad02fe..c25e99ff5 100644 --- a/src/layer/roialign.h +++ b/src/layer/roialign.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ROIALIGN_H #define LAYER_ROIALIGN_H diff --git a/src/layer/roipooling.cpp b/src/layer/roipooling.cpp index 9fd843737..1bea3e570 100644 --- a/src/layer/roipooling.cpp +++ b/src/layer/roipooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "roipooling.h" diff --git a/src/layer/roipooling.h b/src/layer/roipooling.h index 3f73bf31f..708cf3b8b 100644 --- a/src/layer/roipooling.h +++ b/src/layer/roipooling.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ROIPOOLING_H #define LAYER_ROIPOOLING_H diff --git a/src/layer/scale.cpp b/src/layer/scale.cpp index dafadc301..6ccb16367 100644 --- a/src/layer/scale.cpp +++ b/src/layer/scale.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "scale.h" diff --git a/src/layer/scale.h b/src/layer/scale.h index 3ca87950f..e26d60430 100644 --- a/src/layer/scale.h +++ b/src/layer/scale.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SCALE_H #define LAYER_SCALE_H diff --git a/src/layer/selu.cpp b/src/layer/selu.cpp index 42a4ff2a8..2aab1e931 100644 --- a/src/layer/selu.cpp +++ b/src/layer/selu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "selu.h" diff --git a/src/layer/selu.h b/src/layer/selu.h index dc4de694a..f2e74df15 100644 --- a/src/layer/selu.h +++ b/src/layer/selu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SELU_H #define LAYER_SELU_H diff --git a/src/layer/shrink.cpp b/src/layer/shrink.cpp index 4410ac767..9cdb610b3 100644 --- a/src/layer/shrink.cpp +++ b/src/layer/shrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "shrink.h" diff --git a/src/layer/shrink.h b/src/layer/shrink.h index 26ef68839..bbeca08e3 100644 --- a/src/layer/shrink.h +++ b/src/layer/shrink.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SHRINK_H #define LAYER_SHRINK_H diff --git a/src/layer/shufflechannel.cpp b/src/layer/shufflechannel.cpp index 58b9c285a..08359742e 100644 --- a/src/layer/shufflechannel.cpp +++ b/src/layer/shufflechannel.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "shufflechannel.h" diff --git a/src/layer/shufflechannel.h b/src/layer/shufflechannel.h index 09631b4ef..125e05cd2 100644 --- a/src/layer/shufflechannel.h +++ b/src/layer/shufflechannel.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SHUFFLECHANNEL_H #define LAYER_SHUFFLECHANNEL_H diff --git a/src/layer/sigmoid.cpp b/src/layer/sigmoid.cpp index 4ed0dab5e..fd800c6cc 100644 --- a/src/layer/sigmoid.cpp +++ b/src/layer/sigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid.h" diff --git a/src/layer/sigmoid.h b/src/layer/sigmoid.h index 4403441ee..ff7435f63 100644 --- a/src/layer/sigmoid.h +++ b/src/layer/sigmoid.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SIGMOID_H #define LAYER_SIGMOID_H diff --git a/src/layer/slice.cpp b/src/layer/slice.cpp index cf7a2a376..6f1601294 100644 --- a/src/layer/slice.cpp +++ b/src/layer/slice.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "slice.h" @@ -119,7 +108,7 @@ int Slice::forward(const std::vector& bottom_blobs, std::vector& top_b if (top_blob.empty()) return -100; - int size = w * slice; + size_t size = (size_t)w * slice; const unsigned char* ptr = bottom_blob.row(q); unsigned char* outptr = top_blob; @@ -221,7 +210,7 @@ int Slice::forward(const std::vector& bottom_blobs, std::vector& top_b top_blob.dims = dims; - int size = static_cast(bottom_blob.cstep * slice); + size_t size = bottom_blob.cstep * slice; const unsigned char* ptr = bottom_blob.channel(q); unsigned char* outptr = top_blob; @@ -278,7 +267,7 @@ int Slice::forward(const std::vector& bottom_blobs, std::vector& top_b { for (int j = 0; j < d; j++) { - int size = w * slice; + size_t size = (size_t)w * slice; unsigned char* outptr = top_blob.channel(p).depth(j); const unsigned char* ptr = bottom_blob.channel(p).depth(j).row(q); @@ -397,7 +386,7 @@ int Slice::forward(const std::vector& bottom_blobs, std::vector& top_b #pragma omp parallel for num_threads(opt.num_threads) for (int p = 0; p < channels; p++) { - int size = w * h * slice; + size_t size = (size_t)w * h * slice; unsigned char* outptr = top_blob.channel(p); const unsigned char* ptr = bottom_blob.channel(p).depth(q); diff --git a/src/layer/slice.h b/src/layer/slice.h index c3bcacb95..e97e2d687 100644 --- a/src/layer/slice.h +++ b/src/layer/slice.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SLICE_H #define LAYER_SLICE_H diff --git a/src/layer/softmax.cpp b/src/layer/softmax.cpp index c691bf936..b102aa72a 100644 --- a/src/layer/softmax.cpp +++ b/src/layer/softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "softmax.h" diff --git a/src/layer/softmax.h b/src/layer/softmax.h index a40237cbf..742e3278b 100644 --- a/src/layer/softmax.h +++ b/src/layer/softmax.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTMAX_H #define LAYER_SOFTMAX_H diff --git a/src/layer/softplus.cpp b/src/layer/softplus.cpp index 4910aad29..8f5128cee 100644 --- a/src/layer/softplus.cpp +++ b/src/layer/softplus.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "softplus.h" diff --git a/src/layer/softplus.h b/src/layer/softplus.h index 415ad5025..ca3b47f2e 100644 --- a/src/layer/softplus.h +++ b/src/layer/softplus.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTPLUS_H #define LAYER_SOFTPLUS_H diff --git a/src/layer/spectrogram.cpp b/src/layer/spectrogram.cpp index f61613157..2ac655f44 100644 --- a/src/layer/spectrogram.cpp +++ b/src/layer/spectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "spectrogram.h" diff --git a/src/layer/spectrogram.h b/src/layer/spectrogram.h index 712dadafd..62c48dc7f 100644 --- a/src/layer/spectrogram.h +++ b/src/layer/spectrogram.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SPECTROGRAM_H #define LAYER_SPECTROGRAM_H diff --git a/src/layer/split.cpp b/src/layer/split.cpp index b5b24f8b3..1b28435f4 100644 --- a/src/layer/split.cpp +++ b/src/layer/split.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "split.h" #include "cpu.h" diff --git a/src/layer/split.h b/src/layer/split.h index 53686f82b..f2b7bb70f 100644 --- a/src/layer/split.h +++ b/src/layer/split.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SPLIT_H #define LAYER_SPLIT_H diff --git a/src/layer/spp.cpp b/src/layer/spp.cpp index b7070955c..6bbb8d5fc 100644 --- a/src/layer/spp.cpp +++ b/src/layer/spp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "spp.h" diff --git a/src/layer/spp.h b/src/layer/spp.h index 4161abf44..b6fcdbf61 100644 --- a/src/layer/spp.h +++ b/src/layer/spp.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SPP_H #define LAYER_SPP_H diff --git a/src/layer/squeeze.cpp b/src/layer/squeeze.cpp index 7f9de8933..c4e2722a4 100644 --- a/src/layer/squeeze.cpp +++ b/src/layer/squeeze.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "squeeze.h" diff --git a/src/layer/squeeze.h b/src/layer/squeeze.h index 536a3b976..bfbca9a5a 100644 --- a/src/layer/squeeze.h +++ b/src/layer/squeeze.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SQUEEZE_H #define LAYER_SQUEEZE_H diff --git a/src/layer/statisticspooling.cpp b/src/layer/statisticspooling.cpp index 9ed6d22f4..0509c97b4 100644 --- a/src/layer/statisticspooling.cpp +++ b/src/layer/statisticspooling.cpp @@ -1,14 +1,5 @@ // Copyright 2016 SoundAI Technology Co., Ltd. (author: Charles Wang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// SPDX-License-Identifier: BSD-3-Clause #include "statisticspooling.h" diff --git a/src/layer/statisticspooling.h b/src/layer/statisticspooling.h index c7000a553..c27208d95 100644 --- a/src/layer/statisticspooling.h +++ b/src/layer/statisticspooling.h @@ -1,14 +1,5 @@ // Copyright 2016 SoundAI Technology Co., Ltd. (author: Charles Wang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_STATISTICSPOOLING_H #define LAYER_STATISTICSPOOLING_H diff --git a/src/layer/swish.cpp b/src/layer/swish.cpp index 2816230c1..25e7ebb8b 100644 --- a/src/layer/swish.cpp +++ b/src/layer/swish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish.h" diff --git a/src/layer/swish.h b/src/layer/swish.h index 40b29af71..6cbb0c12e 100644 --- a/src/layer/swish.h +++ b/src/layer/swish.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SWISH_H #define LAYER_SWISH_H diff --git a/src/layer/tanh.cpp b/src/layer/tanh.cpp index c4b68352a..77018278f 100644 --- a/src/layer/tanh.cpp +++ b/src/layer/tanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tanh.h" diff --git a/src/layer/tanh.h b/src/layer/tanh.h index 479cf7e36..a0ff33ff3 100644 --- a/src/layer/tanh.h +++ b/src/layer/tanh.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TANH_H #define LAYER_TANH_H diff --git a/src/layer/threshold.cpp b/src/layer/threshold.cpp index 9fd0a1777..5283172e8 100644 --- a/src/layer/threshold.cpp +++ b/src/layer/threshold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "threshold.h" diff --git a/src/layer/threshold.h b/src/layer/threshold.h index f49f3ec23..b1b7b5024 100644 --- a/src/layer/threshold.h +++ b/src/layer/threshold.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_THRESHOLD_H #define LAYER_THRESHOLD_H diff --git a/src/layer/tile.cpp b/src/layer/tile.cpp index cce0dcfcb..0fd4923c5 100644 --- a/src/layer/tile.cpp +++ b/src/layer/tile.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tile.h" diff --git a/src/layer/tile.h b/src/layer/tile.h index c3e65085b..7fc9ae630 100644 --- a/src/layer/tile.h +++ b/src/layer/tile.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TILE_H #define LAYER_TILE_H diff --git a/src/layer/unaryop.cpp b/src/layer/unaryop.cpp index 6458acca3..771fbf7a3 100644 --- a/src/layer/unaryop.cpp +++ b/src/layer/unaryop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop.h" diff --git a/src/layer/unaryop.h b/src/layer/unaryop.h index 3a6926ce0..04583a3c9 100644 --- a/src/layer/unaryop.h +++ b/src/layer/unaryop.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNARYOP_H #define LAYER_UNARYOP_H diff --git a/src/layer/unfold.cpp b/src/layer/unfold.cpp index f747a169c..861ab2bec 100644 --- a/src/layer/unfold.cpp +++ b/src/layer/unfold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unfold.h" diff --git a/src/layer/unfold.h b/src/layer/unfold.h index ff7860b7f..3d27ab27d 100644 --- a/src/layer/unfold.h +++ b/src/layer/unfold.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNFOLD_H #define LAYER_UNFOLD_H diff --git a/src/layer/vulkan/absval_vulkan.cpp b/src/layer/vulkan/absval_vulkan.cpp index aa8e6fa8f..b4da6818a 100644 --- a/src/layer/vulkan/absval_vulkan.cpp +++ b/src/layer/vulkan/absval_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "absval_vulkan.h" @@ -29,8 +18,31 @@ int AbsVal_vulkan::create_pipeline(const Option& opt) { const Mat& shape = top_shapes.empty() ? Mat() : top_shapes[0]; + const int dims = shape.dims; + + int elempack = 0; + if (dims == 1) elempack = opt.use_shader_pack8 && shape.w % 8 == 0 ? 8 : shape.w % 4 == 0 ? 4 : 1; + if (dims == 2) elempack = opt.use_shader_pack8 && shape.h % 8 == 0 ? 8 : shape.h % 4 == 0 ? 4 : 1; + if (dims == 3 || dims == 4) elempack = opt.use_shader_pack8 && shape.c % 8 == 0 ? 8 : shape.c % 4 == 0 ? 4 : 1; + + size_t elemsize; + if (opt.use_fp16_storage || opt.use_fp16_packed) + { + elemsize = elempack * 2u; + } + else + { + elemsize = elempack * 4u; + } + + Mat shape_packed; + if (dims == 1) shape_packed = Mat(shape.w / elempack, (void*)0, elemsize, elempack); + if (dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); + if (dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); + if (dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); + std::vector specializations(1); - specializations[0].u32 = shape.total() / 4; + specializations[0].u32 = shape_packed.total() * elempack / 4; const int local_size_x = vkdev->info.subgroup_size(); diff --git a/src/layer/vulkan/absval_vulkan.h b/src/layer/vulkan/absval_vulkan.h index 0f9660acd..87ebe7547 100644 --- a/src/layer/vulkan/absval_vulkan.h +++ b/src/layer/vulkan/absval_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ABSVAL_VULKAN_H #define LAYER_ABSVAL_VULKAN_H diff --git a/src/layer/vulkan/batchnorm_vulkan.cpp b/src/layer/vulkan/batchnorm_vulkan.cpp index f2371eaa3..ce58f569c 100644 --- a/src/layer/vulkan/batchnorm_vulkan.cpp +++ b/src/layer/vulkan/batchnorm_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_vulkan.h" diff --git a/src/layer/vulkan/batchnorm_vulkan.h b/src/layer/vulkan/batchnorm_vulkan.h index d30aeeff9..ded8d3706 100644 --- a/src/layer/vulkan/batchnorm_vulkan.h +++ b/src/layer/vulkan/batchnorm_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BATCHNORM_VULKAN_H #define LAYER_BATCHNORM_VULKAN_H diff --git a/src/layer/vulkan/binaryop_vulkan.cpp b/src/layer/vulkan/binaryop_vulkan.cpp index 822e1d782..de480ea59 100644 --- a/src/layer/vulkan/binaryop_vulkan.cpp +++ b/src/layer/vulkan/binaryop_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_vulkan.h" diff --git a/src/layer/vulkan/binaryop_vulkan.h b/src/layer/vulkan/binaryop_vulkan.h index c5cdff70b..1d94c4f62 100644 --- a/src/layer/vulkan/binaryop_vulkan.h +++ b/src/layer/vulkan/binaryop_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BINARYOP_VULKAN_H #define LAYER_BINARYOP_VULKAN_H diff --git a/src/layer/vulkan/cast_vulkan.cpp b/src/layer/vulkan/cast_vulkan.cpp index 1f2bcf72f..9b0797a83 100644 --- a/src/layer/vulkan/cast_vulkan.cpp +++ b/src/layer/vulkan/cast_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cast_vulkan.h" diff --git a/src/layer/vulkan/cast_vulkan.h b/src/layer/vulkan/cast_vulkan.h index 9f4446cf8..92002c280 100644 --- a/src/layer/vulkan/cast_vulkan.h +++ b/src/layer/vulkan/cast_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CAST_VULKAN_H #define LAYER_CAST_VULKAN_H diff --git a/src/layer/vulkan/celu_vulkan.cpp b/src/layer/vulkan/celu_vulkan.cpp index c90e57169..176b56c8a 100644 --- a/src/layer/vulkan/celu_vulkan.cpp +++ b/src/layer/vulkan/celu_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "celu_vulkan.h" @@ -23,8 +12,6 @@ CELU_vulkan::CELU_vulkan() support_vulkan = true; pipeline_celu = 0; - pipeline_celu_pack4 = 0; - pipeline_celu_pack8 = 0; } int CELU_vulkan::create_pipeline(const Option& opt) @@ -52,63 +39,15 @@ int CELU_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(1 + 5); + std::vector specializations(1 + 1); specializations[0].f = alpha; - specializations[1 + 0].i = shape_packed.dims; - specializations[1 + 1].i = shape_packed.w; - specializations[1 + 2].i = shape_packed.h * shape_packed.d; - specializations[1 + 3].i = shape_packed.c; - specializations[1 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_celu = new Pipeline(vkdev); - pipeline_celu->set_optimal_local_size_xyz(local_size_xyz); - pipeline_celu->create(LayerShaderType::celu, opt, specializations); - } + specializations[1 + 0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_celu_pack4 = new Pipeline(vkdev); - pipeline_celu_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_celu_pack4->create(LayerShaderType::celu_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_celu_pack8 = new Pipeline(vkdev); - pipeline_celu_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_celu_pack8->create(LayerShaderType::celu_pack8, opt, specializations); - } + pipeline_celu = new Pipeline(vkdev); + pipeline_celu->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_celu->create(LayerShaderType::celu, opt, specializations); return 0; } @@ -118,34 +57,24 @@ int CELU_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_celu; pipeline_celu = 0; - delete pipeline_celu_pack4; - pipeline_celu_pack4 = 0; - - delete pipeline_celu_pack8; - pipeline_celu_pack8 = 0; - return 0; } int CELU_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_celu_pack8 - : elempack == 4 ? pipeline_celu_pack4 - : pipeline_celu; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_celu, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/celu_vulkan.h b/src/layer/vulkan/celu_vulkan.h index e64ef0b4c..f8a51271b 100644 --- a/src/layer/vulkan/celu_vulkan.h +++ b/src/layer/vulkan/celu_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CELU_VULKAN_H #define LAYER_CELU_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_celu; - Pipeline* pipeline_celu_pack4; - Pipeline* pipeline_celu_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/clip_vulkan.cpp b/src/layer/vulkan/clip_vulkan.cpp index 25e963e8e..445896e23 100644 --- a/src/layer/vulkan/clip_vulkan.cpp +++ b/src/layer/vulkan/clip_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "clip_vulkan.h" @@ -23,8 +12,6 @@ Clip_vulkan::Clip_vulkan() support_vulkan = true; pipeline_clip = 0; - pipeline_clip_pack4 = 0; - pipeline_clip_pack8 = 0; } int Clip_vulkan::create_pipeline(const Option& opt) @@ -52,64 +39,16 @@ int Clip_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(2 + 5); + std::vector specializations(2 + 1); specializations[0].f = min; specializations[1].f = max; - specializations[2 + 0].i = shape_packed.dims; - specializations[2 + 1].i = shape_packed.w; - specializations[2 + 2].i = shape_packed.h * shape_packed.d; - specializations[2 + 3].i = shape_packed.c; - specializations[2 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_clip = new Pipeline(vkdev); - pipeline_clip->set_optimal_local_size_xyz(local_size_xyz); - pipeline_clip->create(LayerShaderType::clip, opt, specializations); - } + specializations[2 + 0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_clip_pack4 = new Pipeline(vkdev); - pipeline_clip_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_clip_pack4->create(LayerShaderType::clip_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_clip_pack8 = new Pipeline(vkdev); - pipeline_clip_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_clip_pack8->create(LayerShaderType::clip_pack8, opt, specializations); - } + pipeline_clip = new Pipeline(vkdev); + pipeline_clip->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_clip->create(LayerShaderType::clip, opt, specializations); return 0; } @@ -119,34 +58,24 @@ int Clip_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_clip; pipeline_clip = 0; - delete pipeline_clip_pack4; - pipeline_clip_pack4 = 0; - - delete pipeline_clip_pack8; - pipeline_clip_pack8 = 0; - return 0; } int Clip_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_clip_pack8 - : elempack == 4 ? pipeline_clip_pack4 - : pipeline_clip; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_clip, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/clip_vulkan.h b/src/layer/vulkan/clip_vulkan.h index f9611dd0f..de513d848 100644 --- a/src/layer/vulkan/clip_vulkan.h +++ b/src/layer/vulkan/clip_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CLIP_VULKAN_H #define LAYER_CLIP_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_clip; - Pipeline* pipeline_clip_pack4; - Pipeline* pipeline_clip_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/concat_vulkan.cpp b/src/layer/vulkan/concat_vulkan.cpp index c12caab81..d57a28ff5 100644 --- a/src/layer/vulkan/concat_vulkan.cpp +++ b/src/layer/vulkan/concat_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "concat_vulkan.h" diff --git a/src/layer/vulkan/concat_vulkan.h b/src/layer/vulkan/concat_vulkan.h index 275ddd653..5c36c23b4 100644 --- a/src/layer/vulkan/concat_vulkan.h +++ b/src/layer/vulkan/concat_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONCAT_VULKAN_H #define LAYER_CONCAT_VULKAN_H diff --git a/src/layer/vulkan/convolution1d_vulkan.cpp b/src/layer/vulkan/convolution1d_vulkan.cpp index ef57fca0c..92b2ea23e 100644 --- a/src/layer/vulkan/convolution1d_vulkan.cpp +++ b/src/layer/vulkan/convolution1d_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_vulkan.h" diff --git a/src/layer/vulkan/convolution1d_vulkan.h b/src/layer/vulkan/convolution1d_vulkan.h index 7c2a368f7..adca3bbc1 100644 --- a/src/layer/vulkan/convolution1d_vulkan.h +++ b/src/layer/vulkan/convolution1d_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION1D_VULKAN_H #define LAYER_CONVOLUTION1D_VULKAN_H diff --git a/src/layer/vulkan/convolution_vulkan.cpp b/src/layer/vulkan/convolution_vulkan.cpp index 3bbeec439..795c705b0 100644 --- a/src/layer/vulkan/convolution_vulkan.cpp +++ b/src/layer/vulkan/convolution_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_vulkan.h" @@ -40,6 +29,16 @@ Convolution_vulkan::Convolution_vulkan() reshape_1x1xw = 0; reshape_w = 0; + + use_cooperative_matrix = false; + coopmat_M = 0; + coopmat_N = 0; + coopmat_K = 0; + UNROLL_SG_M = 1; + UNROLL_SG_N = 1; + UNROLL_SG_K = 1; + UNROLL_WG_M = 1; + UNROLL_WG_N = 1; } int Convolution_vulkan::load_param(const ParamDict& pd) @@ -179,12 +178,31 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) if (opt.use_winograd_convolution && (opt.use_winograd23_convolution || opt.use_winograd43_convolution) && is_conv3x3s1d1 && num_input >= 16 && num_output >= 16) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) + use_cooperative_matrix = vkdev->info.support_cooperative_matrix() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && (opt.use_fp16_storage || opt.use_fp16_packed); + + if (use_cooperative_matrix) { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; + int size = 1024; + // f43 and f23 share the same size parameter, set zero for dynamic dispatch + // if (out_shape.dims != 0) + // { + // int block_x = (out_shape.w + 3) / 4; + // int block_y = (out_shape.h + 3) / 4; + // int block_x = (out_shape.w + 1) / 2; + // int block_y = (out_shape.h + 1) / 2; + // size = block_x * block_y; + // } + + vkdev->info.get_optimal_cooperative_matrix_mnk(size, num_output, num_input, VK_COMPONENT_TYPE_FLOAT16_KHR, opt.use_fp16_arithmetic ? VK_COMPONENT_TYPE_FLOAT16_KHR : VK_COMPONENT_TYPE_FLOAT32_KHR, VK_SCOPE_SUBGROUP_KHR, coopmat_M, coopmat_N, coopmat_K); + + // assert coopmat_M != 0 && coopmat_N != 0 && coopmat_K != 0 + + UNROLL_SG_M = std::min((size + coopmat_M - 1) / coopmat_M, 2); + UNROLL_SG_N = std::min((num_output + coopmat_N - 1) / coopmat_N, 2); + UNROLL_SG_K = std::min((num_input + coopmat_K - 1) / coopmat_K, 2); + + UNROLL_WG_M = std::min((size + coopmat_M * UNROLL_SG_M - 1) / (coopmat_M * UNROLL_SG_M), 2); + UNROLL_WG_N = std::min((num_output + coopmat_N * UNROLL_SG_N - 1) / (coopmat_N * UNROLL_SG_N), 2); } // winograd43 transform kernel @@ -238,54 +256,123 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) } } - if (use_cooperative_matrix_16_8_8) + if (use_cooperative_matrix) { - // src = 36-inch-outch - // dst = 8b-8a-inch/8a-outch/8b-36 - weight_winograd43_data_packed.create(num_input / 8, num_output / 8, 36, (size_t)4 * 8 * 8, 8 * 8); - + // from 36-inch-outch to inch-outch-36 + Mat weight_data_tm_r2(num_input, num_output, 36); for (int k = 0; k < 36; k++) { - float* g00 = weight_winograd43_data_packed.channel(k); + float* g00 = weight_data_tm_r2.channel(k); - for (int q = 0; q + (8 - 1) < num_output; q += 8) + for (int q = 0; q < num_output; q++) { - for (int p = 0; p + (8 - 1) < num_input; p += 8) + for (int p = 0; p < num_input; p++) { - for (int i = 0; i < 8; i++) - { - for (int j = 0; j < 8; j++) - { - const float* k00 = weight_data_tm.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; - } - } + *g00++ = weight_data_tm[(q * num_input + p) * 36 + k]; } } } - } - else if (use_cooperative_matrix_16_16_16) - { - // src = 36-inch-outch - // dst = 16b-16a-inch/16a-outch/16b-36 - weight_winograd43_data_packed.create(num_input / 16, num_output / 16, 36, (size_t)4 * 16 * 16, 16 * 16); - for (int k = 0; k < 36; k++) + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + const int blocks_n = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + // const int blocks_k = (num_input + coopmat_K * UNROLL_SG_K - 1) / (coopmat_K * UNROLL_SG_K); + const int kk = (num_input + coopmat_K - 1) / coopmat_K; + + weight_winograd43_data_packed.create(coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n, 36); + for (int b = 0; b < 36; b++) { - float* g00 = weight_winograd43_data_packed.channel(k); - - for (int q = 0; q + (16 - 1) < num_output; q += 16) + for (int bn = 0; bn < blocks_n; bn++) { - for (int p = 0; p + (16 - 1) < num_input; p += 16) + float* p = weight_winograd43_data_packed.channel(b).row(bn); + + int k = 0; + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) { - for (int i = 0; i < 16; i++) + // const int ki = k * coopmat_K; + + for (int wn = 0; wn < UNROLL_WG_N; wn++) { - for (int j = 0; j < 16; j++) + for (int zk = 0; zk < UNROLL_SG_K; zk++) { - const float* k00 = weight_data_tm.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; + for (int zn = 0; zn < UNROLL_SG_N; zn++) + { + for (int i = 0; i < coopmat_K; i++) + { + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + const int gki = (k + zk) * coopmat_K + i; + + if (gni < num_output && gki < num_input) + { + *p++ = weight_data_tm_r2.channel(b)[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } + } + } + } + } + } + for (; k < kk; k++) + { + // const int ki = k * coopmat_K; + + for (int wn = 0; wn < UNROLL_WG_N; wn++) + { + // for (int zk = 0; zk < UNROLL_SG_K; zk++) + { + for (int zn = 0; zn < UNROLL_SG_N; zn++) + { + for (int i = 0; i < coopmat_K; i++) + { + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + // const int gki = (k + zk) * coopmat_K + i; + const int gki = k * coopmat_K + i; + + if (gni < num_output && gki < num_input) + { + *p++ = weight_data_tm_r2.channel(b)[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } + } + } } } } @@ -335,26 +422,26 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) if (out_shape.dims != 0) { - int block_x = (out_shape.w + 3) / 4; - int block_y = (out_shape.h + 3) / 4; + block_x = (out_shape.w + 3) / 4; + block_y = (out_shape.h + 3) / 4; - shape_winograd_input_transformed = Mat(block_x * block_y, shape.c, 36, (void*)0); - shape_winograd_gemm = Mat(block_x * block_y, out_shape.c, 36, (void*)0); + shape_winograd_input_transformed = Mat(block_x * block_y, 1, shape.c * 36, (void*)0); + shape_winograd_gemm = Mat(block_x * block_y, 1, out_shape.c * 36, (void*)0); } - if (shape_winograd_input_transformed.dims == 3) shape_winograd_input_transformed_packed = Mat(shape_winograd_input_transformed.w, shape_winograd_input_transformed.h / elempack, 36, (void*)0, elemsize, elempack); + if (shape_winograd_input_transformed.dims == 3) shape_winograd_input_transformed_packed = Mat(shape_winograd_input_transformed.w, 1, shape_winograd_input_transformed.h / elempack * 36, (void*)0, elemsize, elempack); - if (shape_winograd_gemm.dims == 3) shape_winograd_gemm_packed = Mat(shape_winograd_gemm.w, shape_winograd_gemm.h / out_elempack, 36, (void*)0, out_elemsize, out_elempack); + if (shape_winograd_gemm.dims == 3) shape_winograd_gemm_packed = Mat(shape_winograd_gemm.w, 1, shape_winograd_gemm.h / out_elempack * 36, (void*)0, out_elemsize, out_elempack); { - std::vector specializations(0 + 7); - specializations[0 + 0].i = shape_bordered_packed.w; - specializations[0 + 1].i = shape_bordered_packed.h; - specializations[0 + 2].i = shape_bordered_packed.c; - specializations[0 + 3].i = shape_bordered_packed.cstep; - specializations[0 + 4].i = shape_winograd_input_transformed_packed.cstep; - specializations[0 + 5].i = block_x; - specializations[0 + 6].i = block_y; + std::vector specializations(1 + 6); + specializations[0].i = num_input / elempack; + specializations[1 + 0].i = shape_bordered_packed.w; + specializations[1 + 1].i = shape_bordered_packed.h; + specializations[1 + 2].i = shape_bordered_packed.cstep; + specializations[1 + 3].i = shape_winograd_input_transformed_packed.cstep; + specializations[1 + 4].i = block_x; + specializations[1 + 5].i = block_y; int shader_type_index = -1; if (elempack == 1) shader_type_index = LayerShaderType::convolution_3x3s1d1_winograd43_transform_input; @@ -366,14 +453,45 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) pipeline_convolution_3x3s1d1_winograd43_transform_input->create(shader_type_index, opt, specializations); } + if (use_cooperative_matrix) + { + Mat weight_winograd43_data_packed_fp16 = Mat(weight_winograd43_data_packed.w, weight_winograd43_data_packed.h, weight_winograd43_data_packed.c, (void*)0, 2u, 1); + + std::vector specializations(14 + 3); + specializations[0].u32 = 36; //batch + specializations[1].u32 = coopmat_M; + specializations[2].u32 = coopmat_N; + specializations[3].u32 = coopmat_K; + specializations[4].u32 = UNROLL_SG_M; + specializations[5].u32 = UNROLL_SG_N; + specializations[6].u32 = UNROLL_SG_K; + specializations[7].u32 = UNROLL_WG_M; + specializations[8].u32 = UNROLL_WG_N; + specializations[9].u32 = num_input; + specializations[10].u32 = num_output; + specializations[11].u32 = elempack; + specializations[12].u32 = out_elempack; + specializations[13].u32 = weight_winograd43_data_packed_fp16.cstep; + specializations[14 + 0].u32 = shape_winograd_input_transformed_packed.w; + specializations[14 + 1].u32 = shape_winograd_input_transformed_packed.cstep; + specializations[14 + 2].u32 = shape_winograd_gemm_packed.cstep; + + const int subgroup_size = vkdev->info.subgroup_size(); + + pipeline_convolution_3x3s1d1_winograd43_gemm = new Pipeline(vkdev); + pipeline_convolution_3x3s1d1_winograd43_gemm->set_subgroup_size(subgroup_size); + pipeline_convolution_3x3s1d1_winograd43_gemm->set_local_size_xyz(subgroup_size * UNROLL_WG_M * UNROLL_WG_N, 1, 1); + pipeline_convolution_3x3s1d1_winograd43_gemm->create(LayerShaderType::convolution_winograd_gemm_cm, opt, specializations); + } + else { - std::vector specializations(1 + 5); + std::vector specializations(3 + 3); specializations[0].i = 36; - specializations[1 + 0].i = shape_winograd_input_transformed_packed.h; - specializations[1 + 1].i = shape_winograd_input_transformed_packed.cstep; - specializations[1 + 2].i = shape_winograd_gemm_packed.w; - specializations[1 + 3].i = shape_winograd_gemm_packed.h; - specializations[1 + 4].i = shape_winograd_gemm_packed.cstep; + specializations[1].i = num_input / elempack; + specializations[2].i = num_output / out_elempack; + specializations[3 + 0].i = shape_winograd_input_transformed_packed.cstep; + specializations[3 + 1].i = shape_winograd_gemm_packed.w; + specializations[3 + 2].i = shape_winograd_gemm_packed.cstep; int shader_type_index = -1; if (elempack == 1 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_3x3s1d1_winograd_gemm; @@ -386,27 +504,8 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) if (elempack == 4 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack4to8_3x3s1d1_winograd_gemm; if (elempack == 8 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack8to4_3x3s1d1_winograd_gemm; - if (use_cooperative_matrix_16_8_8) - { - shader_type_index = LayerShaderType::convolution_pack4_3x3s1d1_winograd_gemm_cm_16_8_8; - } - else if (use_cooperative_matrix_16_16_16) - { - shader_type_index = LayerShaderType::convolution_pack4_3x3s1d1_winograd_gemm_cm_16_16_16; - } - pipeline_convolution_3x3s1d1_winograd43_gemm = new Pipeline(vkdev); - if (use_cooperative_matrix_16_8_8) - { - pipeline_convolution_3x3s1d1_winograd43_gemm->set_subgroup_size(32); - pipeline_convolution_3x3s1d1_winograd43_gemm->set_local_size_xyz(32, 1, 1); - } - else if (use_cooperative_matrix_16_16_16) - { - pipeline_convolution_3x3s1d1_winograd43_gemm->set_subgroup_size(32); - pipeline_convolution_3x3s1d1_winograd43_gemm->set_local_size_xyz(32, 1, 1); - } - else if (opt.use_shader_local_memory) + if (opt.use_shader_local_memory) { pipeline_convolution_3x3s1d1_winograd43_gemm->set_local_size_xyz(8, 8, 1); } @@ -418,18 +517,18 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) } { - std::vector specializations(4 + 7); + std::vector specializations(5 + 6); specializations[0].i = bias_term; specializations[1].i = activation_type; specializations[2].f = activation_params.w >= 1 ? activation_params[0] : 0.f; specializations[3].f = activation_params.w == 2 ? activation_params[1] : 0.f; - specializations[4 + 0].i = shape_winograd_gemm_packed.h; - specializations[4 + 1].i = shape_winograd_gemm_packed.cstep; - specializations[4 + 2].i = block_x; - specializations[4 + 3].i = block_y; - specializations[4 + 4].i = out_shape_packed.w; - specializations[4 + 5].i = out_shape_packed.h; - specializations[4 + 6].i = out_shape_packed.cstep; + specializations[4].i = num_output / out_elempack; + specializations[5 + 0].i = shape_winograd_gemm_packed.cstep; + specializations[5 + 1].i = block_x; + specializations[5 + 2].i = block_y; + specializations[5 + 3].i = out_shape_packed.w; + specializations[5 + 4].i = out_shape_packed.h; + specializations[5 + 5].i = out_shape_packed.cstep; int shader_type_index = -1; if (out_elempack == 1) shader_type_index = LayerShaderType::convolution_3x3s1d1_winograd43_transform_output; @@ -491,54 +590,123 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) } } - if (use_cooperative_matrix_16_8_8) + if (use_cooperative_matrix) { - // src = 16-inch-outch - // dst = 8b-8a-inch/8a-outch/8b-16 - weight_winograd23_data_packed.create(num_input / 8, num_output / 8, 16, (size_t)4 * 8 * 8, 8 * 8); - + // from 16-inch-outch to inch-outch-16 + Mat weight_data_tm_r2(num_input, num_output, 16); for (int k = 0; k < 16; k++) { - float* g00 = weight_winograd23_data_packed.channel(k); + float* g00 = weight_data_tm_r2.channel(k); - for (int q = 0; q + (8 - 1) < num_output; q += 8) + for (int q = 0; q < num_output; q++) { - for (int p = 0; p + (8 - 1) < num_input; p += 8) + for (int p = 0; p < num_input; p++) { - for (int i = 0; i < 8; i++) - { - for (int j = 0; j < 8; j++) - { - const float* k00 = weight_data_tm.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; - } - } + *g00++ = weight_data_tm[(q * num_input + p) * 16 + k]; } } } - } - else if (use_cooperative_matrix_16_16_16) - { - // src = 16-inch-outch - // dst = 16b-16a-inch/16a-outch/16b-16 - weight_winograd23_data_packed.create(num_input / 16, num_output / 16, 16, (size_t)4 * 16 * 16, 16 * 16); - for (int k = 0; k < 16; k++) + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + const int blocks_n = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + // const int blocks_k = (num_input + coopmat_K * UNROLL_SG_K - 1) / (coopmat_K * UNROLL_SG_K); + const int kk = (num_input + coopmat_K - 1) / coopmat_K; + + weight_winograd23_data_packed.create(coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n, 16); + for (int b = 0; b < 16; b++) { - float* g00 = weight_winograd23_data_packed.channel(k); - - for (int q = 0; q + (16 - 1) < num_output; q += 16) + for (int bn = 0; bn < blocks_n; bn++) { - for (int p = 0; p + (16 - 1) < num_input; p += 16) + float* p = weight_winograd23_data_packed.channel(b).row(bn); + + int k = 0; + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) { - for (int i = 0; i < 16; i++) + // const int ki = k * coopmat_K; + + for (int wn = 0; wn < UNROLL_WG_N; wn++) { - for (int j = 0; j < 16; j++) + for (int zk = 0; zk < UNROLL_SG_K; zk++) { - const float* k00 = weight_data_tm.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; + for (int zn = 0; zn < UNROLL_SG_N; zn++) + { + for (int i = 0; i < coopmat_K; i++) + { + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + const int gki = (k + zk) * coopmat_K + i; + + if (gni < num_output && gki < num_input) + { + *p++ = weight_data_tm_r2.channel(b)[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } + } + } + } + } + } + for (; k < kk; k++) + { + // const int ki = k * coopmat_K; + + for (int wn = 0; wn < UNROLL_WG_N; wn++) + { + // for (int zk = 0; zk < UNROLL_SG_K; zk++) + { + for (int zn = 0; zn < UNROLL_SG_N; zn++) + { + for (int i = 0; i < coopmat_K; i++) + { + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + // const int gki = (k + zk) * coopmat_K + i; + const int gki = k * coopmat_K + i; + + if (gni < num_output && gki < num_input) + { + *p++ = weight_data_tm_r2.channel(b)[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } + } + } } } } @@ -588,26 +756,26 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) if (out_shape.dims != 0) { - int block_x = (out_shape.w + 1) / 2; - int block_y = (out_shape.h + 1) / 2; + block_x = (out_shape.w + 1) / 2; + block_y = (out_shape.h + 1) / 2; - shape_winograd_input_transformed = Mat(block_x * block_y, shape.c, 16, (void*)0); - shape_winograd_gemm = Mat(block_x * block_y, out_shape.c, 16, (void*)0); + shape_winograd_input_transformed = Mat(block_x * block_y, 1, shape.c * 16, (void*)0); + shape_winograd_gemm = Mat(block_x * block_y, 1, out_shape.c * 16, (void*)0); } - if (shape_winograd_input_transformed.dims == 3) shape_winograd_input_transformed_packed = Mat(shape_winograd_input_transformed.w, shape_winograd_input_transformed.h / elempack, 16, (void*)0, elemsize, elempack); + if (shape_winograd_input_transformed.dims == 3) shape_winograd_input_transformed_packed = Mat(shape_winograd_input_transformed.w, 1, shape_winograd_input_transformed.h / elempack * 16, (void*)0, elemsize, elempack); - if (shape_winograd_gemm.dims == 3) shape_winograd_gemm_packed = Mat(shape_winograd_gemm.w, shape_winograd_gemm.h / out_elempack, 16, (void*)0, out_elemsize, out_elempack); + if (shape_winograd_gemm.dims == 3) shape_winograd_gemm_packed = Mat(shape_winograd_gemm.w, 1, shape_winograd_gemm.h / out_elempack * 16, (void*)0, out_elemsize, out_elempack); { - std::vector specializations(0 + 7); - specializations[0 + 0].i = shape_bordered_packed.w; - specializations[0 + 1].i = shape_bordered_packed.h; - specializations[0 + 2].i = shape_bordered_packed.c; - specializations[0 + 3].i = shape_bordered_packed.cstep; - specializations[0 + 4].i = shape_winograd_input_transformed_packed.cstep; - specializations[0 + 5].i = block_x; - specializations[0 + 6].i = block_y; + std::vector specializations(1 + 6); + specializations[0].i = num_input / elempack; + specializations[1 + 0].i = shape_bordered_packed.w; + specializations[1 + 1].i = shape_bordered_packed.h; + specializations[1 + 2].i = shape_bordered_packed.cstep; + specializations[1 + 3].i = shape_winograd_input_transformed_packed.cstep; + specializations[1 + 4].i = block_x; + specializations[1 + 5].i = block_y; int shader_type_index = -1; if (elempack == 1) shader_type_index = LayerShaderType::convolution_3x3s1d1_winograd23_transform_input; @@ -619,14 +787,45 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) pipeline_convolution_3x3s1d1_winograd23_transform_input->create(shader_type_index, opt, specializations); } + if (use_cooperative_matrix) { - std::vector specializations(1 + 5); + Mat weight_winograd23_data_packed_fp16 = Mat(weight_winograd23_data_packed.w, weight_winograd23_data_packed.h, weight_winograd23_data_packed.c, (void*)0, 2u, 1); + + std::vector specializations(14 + 3); + specializations[0].u32 = 16; //batch + specializations[1].u32 = coopmat_M; + specializations[2].u32 = coopmat_N; + specializations[3].u32 = coopmat_K; + specializations[4].u32 = UNROLL_SG_M; + specializations[5].u32 = UNROLL_SG_N; + specializations[6].u32 = UNROLL_SG_K; + specializations[7].u32 = UNROLL_WG_M; + specializations[8].u32 = UNROLL_WG_N; + specializations[9].u32 = num_input; + specializations[10].u32 = num_output; + specializations[11].u32 = elempack; + specializations[12].u32 = out_elempack; + specializations[13].u32 = weight_winograd23_data_packed_fp16.cstep; + specializations[14 + 0].u32 = shape_winograd_input_transformed_packed.w; + specializations[14 + 1].u32 = shape_winograd_input_transformed_packed.cstep; + specializations[14 + 2].u32 = shape_winograd_gemm_packed.cstep; + + const int subgroup_size = vkdev->info.subgroup_size(); + + pipeline_convolution_3x3s1d1_winograd23_gemm = new Pipeline(vkdev); + pipeline_convolution_3x3s1d1_winograd23_gemm->set_subgroup_size(subgroup_size); + pipeline_convolution_3x3s1d1_winograd23_gemm->set_local_size_xyz(subgroup_size * UNROLL_WG_M * UNROLL_WG_N, 1, 1); + pipeline_convolution_3x3s1d1_winograd23_gemm->create(LayerShaderType::convolution_winograd_gemm_cm, opt, specializations); + } + else + { + std::vector specializations(3 + 3); specializations[0].i = 16; - specializations[1 + 0].i = shape_winograd_input_transformed_packed.h; - specializations[1 + 1].i = shape_winograd_input_transformed_packed.cstep; - specializations[1 + 2].i = shape_winograd_gemm_packed.w; - specializations[1 + 3].i = shape_winograd_gemm_packed.h; - specializations[1 + 4].i = shape_winograd_gemm_packed.cstep; + specializations[1].i = num_input / elempack; + specializations[2].i = num_output / out_elempack; + specializations[3 + 0].i = shape_winograd_input_transformed_packed.cstep; + specializations[3 + 1].i = shape_winograd_gemm_packed.w; + specializations[3 + 2].i = shape_winograd_gemm_packed.cstep; int shader_type_index = -1; if (elempack == 1 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_3x3s1d1_winograd_gemm; @@ -639,27 +838,8 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) if (elempack == 4 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack4to8_3x3s1d1_winograd_gemm; if (elempack == 8 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack8to4_3x3s1d1_winograd_gemm; - if (use_cooperative_matrix_16_8_8) - { - shader_type_index = LayerShaderType::convolution_pack4_3x3s1d1_winograd_gemm_cm_16_8_8; - } - else if (use_cooperative_matrix_16_16_16) - { - shader_type_index = LayerShaderType::convolution_pack4_3x3s1d1_winograd_gemm_cm_16_16_16; - } - pipeline_convolution_3x3s1d1_winograd23_gemm = new Pipeline(vkdev); - if (use_cooperative_matrix_16_8_8) - { - pipeline_convolution_3x3s1d1_winograd23_gemm->set_subgroup_size(32); - pipeline_convolution_3x3s1d1_winograd23_gemm->set_local_size_xyz(32, 1, 1); - } - else if (use_cooperative_matrix_16_16_16) - { - pipeline_convolution_3x3s1d1_winograd23_gemm->set_subgroup_size(32); - pipeline_convolution_3x3s1d1_winograd23_gemm->set_local_size_xyz(32, 1, 1); - } - else if (opt.use_shader_local_memory) + if (opt.use_shader_local_memory) { pipeline_convolution_3x3s1d1_winograd23_gemm->set_local_size_xyz(8, 8, 1); } @@ -671,18 +851,18 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) } { - std::vector specializations(4 + 7); + std::vector specializations(5 + 6); specializations[0].i = bias_term; specializations[1].i = activation_type; specializations[2].f = activation_params.w >= 1 ? activation_params[0] : 0.f; specializations[3].f = activation_params.w == 2 ? activation_params[1] : 0.f; - specializations[4 + 0].i = shape_winograd_gemm_packed.h; - specializations[4 + 1].i = shape_winograd_gemm_packed.cstep; - specializations[4 + 2].i = block_x; - specializations[4 + 3].i = block_y; - specializations[4 + 4].i = out_shape_packed.w; - specializations[4 + 5].i = out_shape_packed.h; - specializations[4 + 6].i = out_shape_packed.cstep; + specializations[4].i = num_output / out_elempack; + specializations[5 + 0].i = shape_winograd_gemm_packed.cstep; + specializations[5 + 1].i = block_x; + specializations[5 + 2].i = block_y; + specializations[5 + 3].i = out_shape_packed.w; + specializations[5 + 4].i = out_shape_packed.h; + specializations[5 + 5].i = out_shape_packed.cstep; int shader_type_index = -1; if (out_elempack == 1) shader_type_index = LayerShaderType::convolution_3x3s1d1_winograd23_transform_output; @@ -695,99 +875,148 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) } } } - else + else if (opt.use_sgemm_convolution && !is_conv1x1s1d1 && num_input * maxk >= 8 && num_output >= 8) { - // src = kw-kh-inch-outch - // dst = pa-pb-kw-kh-inch/pa-outch/pb - if (opt.use_sgemm_convolution && !is_conv1x1s1d1 && num_input >= 16 && num_output >= 16) + use_cooperative_matrix = vkdev->info.support_cooperative_matrix() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && (opt.use_fp16_storage || opt.use_fp16_packed); + + if (use_cooperative_matrix) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) - { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; - } + int size = 1024; + if (out_shape_packed.dims == 3) + size = out_shape_packed.w * out_shape_packed.h; - if (use_cooperative_matrix_16_8_8) - { - // dst = 8b-8a-maxk-inch/8a-outch/8b - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); + vkdev->info.get_optimal_cooperative_matrix_mnk(size, num_output, num_input * maxk, VK_COMPONENT_TYPE_FLOAT16_KHR, opt.use_fp16_arithmetic ? VK_COMPONENT_TYPE_FLOAT16_KHR : VK_COMPONENT_TYPE_FLOAT32_KHR, VK_SCOPE_SUBGROUP_KHR, coopmat_M, coopmat_N, coopmat_K); - weight_data_packed.create(maxk * num_input / 8, num_output / 8, (size_t)4 * 8 * 8, 8 * 8); + // assert coopmat_M != 0 && coopmat_N != 0 && coopmat_K != 0 - for (int q = 0; q + 7 < num_output; q += 8) - { - float* g00 = weight_data_packed.row(q / 8); + UNROLL_SG_M = std::min((size + coopmat_M - 1) / coopmat_M, 2); + UNROLL_SG_N = std::min((num_output + coopmat_N - 1) / coopmat_N, 2); + UNROLL_SG_K = std::min((num_input * maxk + coopmat_K - 1) / coopmat_K, 2); - for (int p = 0; p + 7 < num_input; p += 8) + UNROLL_WG_M = std::min((size + coopmat_M * UNROLL_SG_M - 1) / (coopmat_M * UNROLL_SG_M), 2); + UNROLL_WG_N = std::min((num_output + coopmat_N * UNROLL_SG_N - 1) / (coopmat_N * UNROLL_SG_N), 2); + + Mat weight_data_r2; + + if (elempack == 4) + { + // from maxk-inch-outch to 4-maxk-inch/4-outch + weight_data_r2.create(4 * maxk * (num_input / 4) * num_output); + for (int i = 0; i < num_output; i++) + { + for (int j = 0; j < num_input / 4; j++) { for (int k = 0; k < maxk; k++) { - for (int i = 0; i < 8; i++) - { - for (int j = 0; j < 8; j++) - { - const float* k00 = weight_data_r2.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; - } - } + weight_data_r2[((i * (num_input / 4) + j) * maxk + k) * 4] = weight_data[(i * num_input + j * 4) * maxk + k]; + weight_data_r2[((i * (num_input / 4) + j) * maxk + k) * 4 + 1] = weight_data[(i * num_input + j * 4 + 1) * maxk + k]; + weight_data_r2[((i * (num_input / 4) + j) * maxk + k) * 4 + 2] = weight_data[(i * num_input + j * 4 + 2) * maxk + k]; + weight_data_r2[((i * (num_input / 4) + j) * maxk + k) * 4 + 3] = weight_data[(i * num_input + j * 4 + 3) * maxk + k]; } } } } - else if (use_cooperative_matrix_16_16_16) + else { - // dst = 16b-16a-maxk-inch/16a-outch/16b - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); + weight_data_r2 = weight_data; + } - weight_data_packed.create(maxk * num_input / 16, num_output / 16, (size_t)4 * 16 * 16, 16 * 16); + const int blocks_n = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + // const int blocks_k = (num_input / 4 * maxk + coopmat_K * UNROLL_SG_K - 1) / (coopmat_K * UNROLL_SG_K); + const int kk = (num_input * maxk + coopmat_K - 1) / coopmat_K; - for (int q = 0; q + 15 < num_output; q += 16) + weight_data_packed.create(coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n); + for (int bn = 0; bn < blocks_n; bn++) + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + float* p = weight_data_packed.row(bn); + + int k = 0; + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) { - float* g00 = weight_data_packed.row(q / 16); + // const int ki = k * coopmat_K; - for (int p = 0; p + 15 < num_input; p += 16) + for (int wn = 0; wn < UNROLL_WG_N; wn++) { - for (int k = 0; k < maxk; k++) + for (int zk = 0; zk < UNROLL_SG_K; zk++) { - for (int i = 0; i < 16; i++) + for (int zn = 0; zn < UNROLL_SG_N; zn++) { - for (int j = 0; j < 16; j++) + for (int i = 0; i < coopmat_K; i++) { - const float* k00 = weight_data_r2.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + const int gki = (k + zk) * coopmat_K + i; + + if (gni < num_output && gki < num_input * maxk) + { + *p++ = weight_data_r2[gni * num_input * maxk + gki]; + } + else + { + *p++ = 0.f; + } + } } } } } } - } - else - { - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); - - weight_data_packed.create(maxk * num_input / elempack, num_output / out_elempack, (size_t)4 * elempack * out_elempack, elempack * out_elempack); - - for (int q = 0; q + (out_elempack - 1) < num_output; q += out_elempack) + for (; k < kk; k++) { - float* g00 = weight_data_packed.row(q / out_elempack); + // const int ki = k * coopmat_K; - for (int p = 0; p + (elempack - 1) < num_input; p += elempack) + for (int wn = 0; wn < UNROLL_WG_N; wn++) { - for (int k = 0; k < maxk; k++) + // for (int zk = 0; zk < UNROLL_SG_K; zk++) { - for (int i = 0; i < out_elempack; i++) + for (int zn = 0; zn < UNROLL_SG_N; zn++) { - const Mat k0 = weight_data_r2.channel(q + i); - - for (int j = 0; j < elempack; j++) + for (int i = 0; i < coopmat_K; i++) { - const float* k00 = k0.row(p + j); - g00[0] = k00[k]; - g00++; + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + // const int gki = (k + zk) * coopmat_K + i; + const int gki = k * coopmat_K + i; + + if (gni < num_output && gki < num_input * maxk) + { + *p++ = weight_data_r2[gni * num_input * maxk + gki]; + } + else + { + *p++ = 0.f; + } + } } } } @@ -797,94 +1026,181 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) } else { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && is_conv1x1s1d1 && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && is_conv1x1s1d1 && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) + Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); + + weight_data_packed.create(maxk * num_input / elempack, num_output / out_elempack, (size_t)4 * elempack * out_elempack, elempack * out_elempack); + + for (int q = 0; q + (out_elempack - 1) < num_output; q += out_elempack) { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; + float* g00 = weight_data_packed.row(q / out_elempack); + + for (int p = 0; p + (elempack - 1) < num_input; p += elempack) + { + for (int k = 0; k < maxk; k++) + { + for (int i = 0; i < out_elempack; i++) + { + const Mat k0 = weight_data_r2.channel(q + i); + + for (int j = 0; j < elempack; j++) + { + const float* k00 = k0.row(p + j); + g00[0] = k00[k]; + g00++; + } + } + } + } } + } + } + else if (is_conv1x1s1d1) + { + use_cooperative_matrix = vkdev->info.support_cooperative_matrix() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && (opt.use_fp16_storage || opt.use_fp16_packed) && num_input >= 8 && num_output >= 8; - if (use_cooperative_matrix_16_8_8) + if (use_cooperative_matrix) + { + int size = 1024; + if (shape_bordered_packed.dims == 3) + size = shape_bordered_packed.w * shape_bordered_packed.h; + + vkdev->info.get_optimal_cooperative_matrix_mnk(size, num_output, num_input, VK_COMPONENT_TYPE_FLOAT16_KHR, opt.use_fp16_arithmetic ? VK_COMPONENT_TYPE_FLOAT16_KHR : VK_COMPONENT_TYPE_FLOAT32_KHR, VK_SCOPE_SUBGROUP_KHR, coopmat_M, coopmat_N, coopmat_K); + + // assert coopmat_M != 0 && coopmat_N != 0 && coopmat_K != 0 + + UNROLL_SG_M = std::min((size + coopmat_M - 1) / coopmat_M, 2); + UNROLL_SG_N = std::min((num_output + coopmat_N - 1) / coopmat_N, 2); + UNROLL_SG_K = std::min((num_input + coopmat_K - 1) / coopmat_K, 2); + + UNROLL_WG_M = std::min((size + coopmat_M * UNROLL_SG_M - 1) / (coopmat_M * UNROLL_SG_M), 2); + UNROLL_WG_N = std::min((num_output + coopmat_N * UNROLL_SG_N - 1) / (coopmat_N * UNROLL_SG_N), 2); + + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + const int blocks_n = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + // const int blocks_k = (num_input + coopmat_K * UNROLL_SG_K - 1) / (coopmat_K * UNROLL_SG_K); + const int kk = (num_input + coopmat_K - 1) / coopmat_K; + + weight_data_packed.create(coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n); + for (int bn = 0; bn < blocks_n; bn++) { - // dst = 8b-8a-inch/8a-outch/8b - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); + float* p = weight_data_packed.row(bn); - weight_data_packed.create(maxk, num_input / 8, num_output / 8, (size_t)4 * 8 * 8, 8 * 8); - - for (int q = 0; q + 7 < num_output; q += 8) + int k = 0; + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) { - float* g00 = weight_data_packed.channel(q / 8); + // const int ki = k * coopmat_K; - for (int p = 0; p + 7 < num_input; p += 8) + for (int wn = 0; wn < UNROLL_WG_N; wn++) { - for (int k = 0; k < maxk; k++) + for (int zk = 0; zk < UNROLL_SG_K; zk++) { - for (int i = 0; i < 8; i++) + for (int zn = 0; zn < UNROLL_SG_N; zn++) { - for (int j = 0; j < 8; j++) + for (int i = 0; i < coopmat_K; i++) { - const float* k00 = weight_data_r2.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + const int gki = (k + zk) * coopmat_K + i; + + if (gni < num_output && gki < num_input) + { + *p++ = weight_data[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } } } } } } - } - else if (use_cooperative_matrix_16_16_16) - { - // dst = 16b-16a-inch/16a-outch/16b - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); - - weight_data_packed.create(maxk, num_input / 16, num_output / 16, (size_t)4 * 16 * 16, 16 * 16); - - for (int q = 0; q + 15 < num_output; q += 16) + for (; k < kk; k++) { - float* g00 = weight_data_packed.channel(q / 16); + // const int ki = k * coopmat_K; - for (int p = 0; p + 15 < num_input; p += 16) + for (int wn = 0; wn < UNROLL_WG_N; wn++) { - for (int k = 0; k < maxk; k++) + // for (int zk = 0; zk < UNROLL_SG_K; zk++) { - for (int i = 0; i < 16; i++) + for (int zn = 0; zn < UNROLL_SG_N; zn++) { - for (int j = 0; j < 16; j++) + for (int i = 0; i < coopmat_K; i++) { - const float* k00 = weight_data_r2.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + // const int gki = (k + zk) * coopmat_K + i; + const int gki = k * coopmat_K + i; + + if (gni < num_output && gki < num_input) + { + *p++ = weight_data[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } } } } } } } - else - { - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); + } + else + { + Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); - weight_data_packed.create(maxk, num_input / elempack, num_output / out_elempack, (size_t)4 * elempack * out_elempack, elempack * out_elempack); + weight_data_packed.create(maxk, num_input / elempack, num_output / out_elempack, (size_t)4 * elempack * out_elempack, elempack * out_elempack); - for (int q = 0; q + (out_elempack - 1) < num_output; q += out_elempack) - { - float* g00 = weight_data_packed.channel(q / out_elempack); + for (int q = 0; q + (out_elempack - 1) < num_output; q += out_elempack) + { + float* g00 = weight_data_packed.channel(q / out_elempack); - for (int p = 0; p + (elempack - 1) < num_input; p += elempack) + for (int p = 0; p + (elempack - 1) < num_input; p += elempack) + { + for (int k = 0; k < maxk; k++) { - for (int k = 0; k < maxk; k++) + for (int i = 0; i < out_elempack; i++) { - for (int i = 0; i < out_elempack; i++) - { - const Mat k0 = weight_data_r2.channel(q + i); + const Mat k0 = weight_data_r2.channel(q + i); - for (int j = 0; j < elempack; j++) - { - const float* k00 = k0.row(p + j); - g00[0] = k00[k]; - g00++; - } + for (int j = 0; j < elempack; j++) + { + const float* k00 = k0.row(p + j); + g00[0] = k00[k]; + g00++; } } } @@ -892,6 +1208,35 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) } } } + else + { + Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); + + weight_data_packed.create(maxk, num_input / elempack, num_output / out_elempack, (size_t)4 * elempack * out_elempack, elempack * out_elempack); + + for (int q = 0; q + (out_elempack - 1) < num_output; q += out_elempack) + { + float* g00 = weight_data_packed.channel(q / out_elempack); + + for (int p = 0; p + (elempack - 1) < num_input; p += elempack) + { + for (int k = 0; k < maxk; k++) + { + for (int i = 0; i < out_elempack; i++) + { + const Mat k0 = weight_data_r2.channel(q + i); + + for (int j = 0; j < elempack; j++) + { + const float* k00 = k0.row(p + j); + g00[0] = k00[k]; + g00++; + } + } + } + } + } + } if (bias_term) { @@ -902,148 +1247,169 @@ int Convolution_vulkan::create_pipeline(const Option& _opt) { // pass } - else if (opt.use_sgemm_convolution && !is_conv1x1s1d1 && num_input >= 16 && num_output >= 16) + else if (opt.use_sgemm_convolution && !is_conv1x1s1d1 && num_input * maxk >= 8 && num_output >= 8) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) + if (use_cooperative_matrix) { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; - } - - std::vector specializations(10 + 8); - specializations[0].i = kernel_w; - specializations[1].i = kernel_h; - specializations[2].i = dilation_w; - specializations[3].i = dilation_h; - specializations[4].i = stride_w; - specializations[5].i = stride_h; - specializations[6].i = bias_term; - specializations[7].i = activation_type; - specializations[8].f = activation_params.w >= 1 ? activation_params[0] : 0.f; - specializations[9].f = activation_params.w == 2 ? activation_params[1] : 0.f; - specializations[10 + 0].i = shape_bordered_packed.w; - specializations[10 + 1].i = shape_bordered_packed.h; - specializations[10 + 2].i = shape_bordered_packed.c; - specializations[10 + 3].i = shape_bordered_packed.cstep; - specializations[10 + 4].i = out_shape_packed.w; - specializations[10 + 5].i = out_shape_packed.h; - specializations[10 + 6].i = out_shape_packed.c; - specializations[10 + 7].i = out_shape_packed.cstep; - - Mat local_size_xyz(16, std::min(4, num_output / out_elempack), 1, (void*)0); - if (out_shape_packed.dims != 0) - { - local_size_xyz.w = std::min(16, out_shape_packed.w * out_shape_packed.h); - local_size_xyz.h = std::min(4, out_shape_packed.c); - } - - int shader_type_index = -1; - if (elempack == 1 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_gemm; - if (elempack == 4 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack4_gemm; - if (elempack == 1 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack1to4_gemm; - if (elempack == 4 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack4to1_gemm; - if (elempack == 8 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack8_gemm; - if (elempack == 1 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack1to8_gemm; - if (elempack == 8 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack8to1_gemm; - if (elempack == 4 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack4to8_gemm; - if (elempack == 8 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack8to4_gemm; - - if (use_cooperative_matrix_16_8_8) - { - shader_type_index = LayerShaderType::convolution_pack4_gemm_cm_16_8_8; - } - else if (use_cooperative_matrix_16_16_16) - { - shader_type_index = LayerShaderType::convolution_pack4_gemm_cm_16_16_16; - } - - pipeline_convolution_gemm = new Pipeline(vkdev); - if (use_cooperative_matrix_16_8_8) - { - pipeline_convolution_gemm->set_subgroup_size(32); - pipeline_convolution_gemm->set_local_size_xyz(32, 1, 1); // 16_8_8 - } - else if (use_cooperative_matrix_16_16_16) - { - pipeline_convolution_gemm->set_subgroup_size(32); - pipeline_convolution_gemm->set_local_size_xyz(32, 1, 1); // 16_16_16 - } - else if (opt.use_shader_local_memory) - { - pipeline_convolution_gemm->set_local_size_xyz(8, 8, 1); + std::vector specializations(22 + 6); + specializations[0].u32 = kernel_w; + specializations[1].u32 = kernel_h; + specializations[2].u32 = dilation_w; + specializations[3].u32 = dilation_h; + specializations[4].u32 = stride_w; + specializations[5].u32 = stride_h; + specializations[6].i = bias_term; + specializations[7].i = activation_type; + specializations[8].f = activation_params.w >= 1 ? activation_params[0] : 0.f; + specializations[9].f = activation_params.w == 2 ? activation_params[1] : 0.f; + specializations[10].u32 = coopmat_M; + specializations[11].u32 = coopmat_N; + specializations[12].u32 = coopmat_K; + specializations[13].u32 = UNROLL_SG_M; + specializations[14].u32 = UNROLL_SG_N; + specializations[15].u32 = UNROLL_SG_K; + specializations[16].u32 = UNROLL_WG_M; + specializations[17].u32 = UNROLL_WG_N; + specializations[18].u32 = num_input; + specializations[19].u32 = num_output; + specializations[20].u32 = elempack; + specializations[21].u32 = out_elempack; + specializations[22 + 0].u32 = shape_bordered_packed.w; + specializations[22 + 1].u32 = shape_bordered_packed.h; + specializations[22 + 2].u32 = shape_bordered_packed.cstep; + specializations[22 + 3].u32 = out_shape_packed.w; + specializations[22 + 4].u32 = out_shape_packed.h; + specializations[22 + 5].u32 = out_shape_packed.cstep; + + const int subgroup_size = vkdev->info.subgroup_size(); + + pipeline_convolution_gemm = new Pipeline(vkdev); + pipeline_convolution_gemm->set_subgroup_size(subgroup_size); + pipeline_convolution_gemm->set_local_size_xyz(subgroup_size * UNROLL_WG_M * UNROLL_WG_N, 1, 1); + pipeline_convolution_gemm->create(LayerShaderType::convolution_gemm_cm, opt, specializations); } else { - pipeline_convolution_gemm->set_optimal_local_size_xyz(local_size_xyz); + std::vector specializations(10 + 8); + specializations[0].i = kernel_w; + specializations[1].i = kernel_h; + specializations[2].i = dilation_w; + specializations[3].i = dilation_h; + specializations[4].i = stride_w; + specializations[5].i = stride_h; + specializations[6].i = bias_term; + specializations[7].i = activation_type; + specializations[8].f = activation_params.w >= 1 ? activation_params[0] : 0.f; + specializations[9].f = activation_params.w == 2 ? activation_params[1] : 0.f; + specializations[10 + 0].i = shape_bordered_packed.w; + specializations[10 + 1].i = shape_bordered_packed.h; + specializations[10 + 2].i = shape_bordered_packed.c; + specializations[10 + 3].i = shape_bordered_packed.cstep; + specializations[10 + 4].i = out_shape_packed.w; + specializations[10 + 5].i = out_shape_packed.h; + specializations[10 + 6].i = out_shape_packed.c; + specializations[10 + 7].i = out_shape_packed.cstep; + + Mat local_size_xyz(16, std::min(4, num_output / out_elempack), 1, (void*)0); + if (out_shape_packed.dims != 0) + { + local_size_xyz.w = std::min(16, out_shape_packed.w * out_shape_packed.h); + local_size_xyz.h = std::min(4, out_shape_packed.c); + } + + int shader_type_index = -1; + if (elempack == 1 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_gemm; + if (elempack == 4 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack4_gemm; + if (elempack == 1 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack1to4_gemm; + if (elempack == 4 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack4to1_gemm; + if (elempack == 8 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack8_gemm; + if (elempack == 1 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack1to8_gemm; + if (elempack == 8 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack8to1_gemm; + if (elempack == 4 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack4to8_gemm; + if (elempack == 8 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack8to4_gemm; + + pipeline_convolution_gemm = new Pipeline(vkdev); + if (opt.use_shader_local_memory) + { + pipeline_convolution_gemm->set_local_size_xyz(8, 8, 1); + } + else + { + pipeline_convolution_gemm->set_optimal_local_size_xyz(local_size_xyz); + } + pipeline_convolution_gemm->create(shader_type_index, opt, specializations); } - pipeline_convolution_gemm->create(shader_type_index, opt, specializations); } else if (is_conv1x1s1d1) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) - { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; - } - - std::vector specializations(4 + 8); - specializations[0].i = bias_term; - specializations[1].i = activation_type; - specializations[2].f = activation_params.w >= 1 ? activation_params[0] : 0.f; - specializations[3].f = activation_params.w == 2 ? activation_params[1] : 0.f; - specializations[4 + 0].i = shape_bordered_packed.w; - specializations[4 + 1].i = shape_bordered_packed.h; - specializations[4 + 2].i = shape_bordered_packed.c; - specializations[4 + 3].i = shape_bordered_packed.cstep; - specializations[4 + 4].i = out_shape_packed.w; - specializations[4 + 5].i = out_shape_packed.h; - specializations[4 + 6].i = out_shape_packed.c; - specializations[4 + 7].i = out_shape_packed.cstep; - - int shader_type_index = -1; - if (elempack == 1 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_1x1s1d1; - if (elempack == 4 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack4_1x1s1d1; - if (elempack == 1 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack1to4_1x1s1d1; - if (elempack == 4 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack4to1_1x1s1d1; - if (elempack == 8 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack8_1x1s1d1; - if (elempack == 1 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack1to8_1x1s1d1; - if (elempack == 8 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack8to1_1x1s1d1; - if (elempack == 4 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack4to8_1x1s1d1; - if (elempack == 8 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack8to4_1x1s1d1; - - if (use_cooperative_matrix_16_8_8) - { - shader_type_index = LayerShaderType::convolution_pack4_1x1s1d1_cm_16_8_8; - } - else if (use_cooperative_matrix_16_16_16) + if (use_cooperative_matrix) { - shader_type_index = LayerShaderType::convolution_pack4_1x1s1d1_cm_16_16_16; - } - - pipeline_convolution_1x1s1d1 = new Pipeline(vkdev); - if (use_cooperative_matrix_16_8_8) - { - pipeline_convolution_1x1s1d1->set_subgroup_size(32); - pipeline_convolution_1x1s1d1->set_local_size_xyz(32, 1, 1); // 16_8_8 - } - else if (use_cooperative_matrix_16_16_16) - { - pipeline_convolution_1x1s1d1->set_subgroup_size(32); - pipeline_convolution_1x1s1d1->set_local_size_xyz(32, 1, 1); // 16_16_16 - } - else if (opt.use_shader_local_memory) - { - pipeline_convolution_1x1s1d1->set_local_size_xyz(8, 8, 1); + std::vector specializations(16 + 3); + specializations[0].i = bias_term; + specializations[1].i = activation_type; + specializations[2].f = activation_params.w >= 1 ? activation_params[0] : 0.f; + specializations[3].f = activation_params.w == 2 ? activation_params[1] : 0.f; + specializations[4].u32 = coopmat_M; + specializations[5].u32 = coopmat_N; + specializations[6].u32 = coopmat_K; + specializations[7].u32 = UNROLL_SG_M; + specializations[8].u32 = UNROLL_SG_N; + specializations[9].u32 = UNROLL_SG_K; + specializations[10].u32 = UNROLL_WG_M; + specializations[11].u32 = UNROLL_WG_N; + specializations[12].u32 = num_input; + specializations[13].u32 = num_output; + specializations[14].u32 = elempack; + specializations[15].u32 = out_elempack; + specializations[16 + 0].u32 = shape_bordered_packed.w * shape_bordered_packed.h; + specializations[16 + 1].u32 = shape_bordered_packed.cstep; + specializations[16 + 2].u32 = out_shape_packed.cstep; + + const int subgroup_size = vkdev->info.subgroup_size(); + + pipeline_convolution_1x1s1d1 = new Pipeline(vkdev); + pipeline_convolution_1x1s1d1->set_subgroup_size(subgroup_size); + pipeline_convolution_1x1s1d1->set_local_size_xyz(subgroup_size * UNROLL_WG_M * UNROLL_WG_N, 1, 1); + pipeline_convolution_1x1s1d1->create(LayerShaderType::convolution_1x1s1d1_cm, opt, specializations); } else { - pipeline_convolution_1x1s1d1->set_local_size_xyz(8, std::min(8, num_output / out_elempack), 1); + std::vector specializations(4 + 8); + specializations[0].i = bias_term; + specializations[1].i = activation_type; + specializations[2].f = activation_params.w >= 1 ? activation_params[0] : 0.f; + specializations[3].f = activation_params.w == 2 ? activation_params[1] : 0.f; + specializations[4 + 0].i = shape_bordered_packed.w; + specializations[4 + 1].i = shape_bordered_packed.h; + specializations[4 + 2].i = shape_bordered_packed.c; + specializations[4 + 3].i = shape_bordered_packed.cstep; + specializations[4 + 4].i = out_shape_packed.w; + specializations[4 + 5].i = out_shape_packed.h; + specializations[4 + 6].i = out_shape_packed.c; + specializations[4 + 7].i = out_shape_packed.cstep; + + int shader_type_index = -1; + if (elempack == 1 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_1x1s1d1; + if (elempack == 4 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack4_1x1s1d1; + if (elempack == 1 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack1to4_1x1s1d1; + if (elempack == 4 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack4to1_1x1s1d1; + if (elempack == 8 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack8_1x1s1d1; + if (elempack == 1 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack1to8_1x1s1d1; + if (elempack == 8 && out_elempack == 1) shader_type_index = LayerShaderType::convolution_pack8to1_1x1s1d1; + if (elempack == 4 && out_elempack == 8) shader_type_index = LayerShaderType::convolution_pack4to8_1x1s1d1; + if (elempack == 8 && out_elempack == 4) shader_type_index = LayerShaderType::convolution_pack8to4_1x1s1d1; + + pipeline_convolution_1x1s1d1 = new Pipeline(vkdev); + if (opt.use_shader_local_memory) + { + pipeline_convolution_1x1s1d1->set_local_size_xyz(8, 8, 1); + } + else + { + pipeline_convolution_1x1s1d1->set_local_size_xyz(8, std::min(8, num_output / out_elempack), 1); + } + pipeline_convolution_1x1s1d1->create(shader_type_index, opt, specializations); } - pipeline_convolution_1x1s1d1->create(shader_type_index, opt, specializations); } else { @@ -1149,6 +1515,16 @@ int Convolution_vulkan::destroy_pipeline(const Option& opt) reshape_w = 0; } + use_cooperative_matrix = false; + coopmat_M = 0; + coopmat_N = 0; + coopmat_K = 0; + UNROLL_SG_M = 1; + UNROLL_SG_N = 1; + UNROLL_SG_K = 1; + UNROLL_WG_M = 1; + UNROLL_WG_N = 1; + return 0; } @@ -1307,19 +1683,14 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom int out_elempack = opt.use_shader_pack8 && num_output % 8 == 0 ? 8 : num_output % 4 == 0 ? 4 : 1; size_t out_elemsize = elemsize / elempack * out_elempack; + const int maxk = kernel_w * kernel_h; + const int num_input = channels * elempack; + bool is_conv1x1s1d1 = kernel_w == 1 && kernel_h == 1 && stride_w == 1 && stride_h == 1 && dilation_w == 1 && dilation_h == 1; bool is_conv3x3s1d1 = kernel_w == 3 && kernel_h == 3 && stride_w == 1 && stride_h == 1 && dilation_w == 1 && dilation_h == 1; - if (opt.use_winograd_convolution && (opt.use_winograd23_convolution || opt.use_winograd43_convolution) && is_conv3x3s1d1 && channels * elempack >= 16 && num_output >= 16) + if (opt.use_winograd_convolution && (opt.use_winograd23_convolution || opt.use_winograd43_convolution) && is_conv3x3s1d1 && num_input >= 16 && num_output >= 16) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) - { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; - } - bool pre_winograd43 = opt.use_winograd43_convolution; if (opt.use_winograd23_convolution) { @@ -1328,9 +1699,7 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom if (vkdev->info.type() != 0 && (w <= 12 && h <= 12)) pre_winograd43 = false; - if (use_cooperative_matrix_16_8_8 && (w <= 18 && h <= 18)) - pre_winograd43 = false; - else if (use_cooperative_matrix_16_16_16 && (w <= 18 && h <= 18)) + if (use_cooperative_matrix && (w <= 18 && h <= 18)) pre_winograd43 = false; } @@ -1343,7 +1712,7 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom // transform input VkMat bottom_tm_blob; { - bottom_tm_blob.create(block_x * block_y, channels, 36, elemsize, elempack, opt.workspace_vkallocator); + bottom_tm_blob.create(block_x * block_y, 1, channels * 36, elemsize, elempack, opt.workspace_vkallocator); if (bottom_tm_blob.empty()) return -100; @@ -1351,19 +1720,18 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom bindings[0] = bottom_blob_bordered; bindings[1] = bottom_tm_blob; - std::vector constants(7); + std::vector constants(6); constants[0].i = bottom_blob_bordered.w; constants[1].i = bottom_blob_bordered.h; - constants[2].i = bottom_blob_bordered.c; - constants[3].i = bottom_blob_bordered.cstep; - constants[4].i = bottom_tm_blob.cstep; - constants[5].i = block_x; - constants[6].i = block_y; + constants[2].i = bottom_blob_bordered.cstep; + constants[3].i = bottom_tm_blob.cstep; + constants[4].i = block_x; + constants[5].i = block_y; VkMat dispatcher; dispatcher.w = block_x; dispatcher.h = block_y; - dispatcher.c = bottom_tm_blob.h; + dispatcher.c = channels; cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd43_transform_input, bindings, constants, dispatcher); } @@ -1371,41 +1739,53 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom // gemm VkMat top_tm_blob; { - top_tm_blob.create(block_x * block_y, num_output / out_elempack, 36, out_elemsize, out_elempack, opt.workspace_vkallocator); + top_tm_blob.create(block_x * block_y, 1, num_output / out_elempack * 36, out_elemsize, out_elempack, opt.workspace_vkallocator); if (top_tm_blob.empty()) return -100; - std::vector bindings(3); - bindings[0] = bottom_tm_blob; - bindings[1] = top_tm_blob; - bindings[2] = weight_data_gpu_tm_winograd43; + if (use_cooperative_matrix) + { + std::vector bindings(3); + bindings[0] = bottom_tm_blob; + bindings[1] = top_tm_blob; + bindings[2] = weight_data_gpu_tm_winograd43; - std::vector constants(5); - constants[0].i = bottom_tm_blob.h; - constants[1].i = bottom_tm_blob.cstep; - constants[2].i = top_tm_blob.w; - constants[3].i = top_tm_blob.h; - constants[4].i = top_tm_blob.cstep; + std::vector constants(3); + constants[0].i = bottom_tm_blob.w; + constants[1].i = bottom_tm_blob.cstep; + constants[2].i = top_tm_blob.cstep; - VkMat dispatcher; - dispatcher.w = (top_tm_blob.w + 3) / 4; - dispatcher.h = top_tm_blob.h; - dispatcher.c = 36; + const int blocks_x = (bottom_tm_blob.w + coopmat_M * UNROLL_SG_M * UNROLL_WG_M - 1) / (coopmat_M * UNROLL_SG_M * UNROLL_WG_M); + const int blocks_y = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); - if (use_cooperative_matrix_16_8_8) - { - dispatcher.w = ((top_tm_blob.w + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_tm_blob.h + 1) / 2 + 3) / 4; + const int subgroup_size = vkdev->info.subgroup_size(); + + VkMat dispatcher; + dispatcher.w = (blocks_x * blocks_y) * (subgroup_size * UNROLL_WG_M * UNROLL_WG_N); + dispatcher.h = 1; dispatcher.c = 36; + + cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd43_gemm, bindings, constants, dispatcher); } - else if (use_cooperative_matrix_16_16_16) + else { - dispatcher.w = ((top_tm_blob.w + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_tm_blob.h + 3) / 4 + 1) / 2; + std::vector bindings(3); + bindings[0] = bottom_tm_blob; + bindings[1] = top_tm_blob; + bindings[2] = weight_data_gpu_tm_winograd43; + + std::vector constants(3); + constants[0].i = bottom_tm_blob.cstep; + constants[1].i = top_tm_blob.w; + constants[2].i = top_tm_blob.cstep; + + VkMat dispatcher; + dispatcher.w = (top_tm_blob.w + 3) / 4; + dispatcher.h = num_output / out_elempack; dispatcher.c = 36; - } - cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd43_gemm, bindings, constants, dispatcher); + cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd43_gemm, bindings, constants, dispatcher); + } } // transform output @@ -1419,14 +1799,13 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom bindings[1] = top_blob; bindings[2] = bias_data_gpu; - std::vector constants(7); - constants[0].i = top_tm_blob.h; - constants[1].i = top_tm_blob.cstep; - constants[2].i = block_x; - constants[3].i = block_y; - constants[4].i = top_blob.w; - constants[5].i = top_blob.h; - constants[6].i = top_blob.cstep; + std::vector constants(6); + constants[0].i = top_tm_blob.cstep; + constants[1].i = block_x; + constants[2].i = block_y; + constants[3].i = top_blob.w; + constants[4].i = top_blob.h; + constants[5].i = top_blob.cstep; VkMat dispatcher; dispatcher.w = block_x; @@ -1445,7 +1824,7 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom // transform input VkMat bottom_tm_blob; { - bottom_tm_blob.create(block_x * block_y, channels, 16, elemsize, elempack, opt.workspace_vkallocator); + bottom_tm_blob.create(block_x * block_y, 1, channels * 16, elemsize, elempack, opt.workspace_vkallocator); if (bottom_tm_blob.empty()) return -100; @@ -1453,19 +1832,18 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom bindings[0] = bottom_blob_bordered; bindings[1] = bottom_tm_blob; - std::vector constants(7); + std::vector constants(6); constants[0].i = bottom_blob_bordered.w; constants[1].i = bottom_blob_bordered.h; - constants[2].i = bottom_blob_bordered.c; - constants[3].i = bottom_blob_bordered.cstep; - constants[4].i = bottom_tm_blob.cstep; - constants[5].i = block_x; - constants[6].i = block_y; + constants[2].i = bottom_blob_bordered.cstep; + constants[3].i = bottom_tm_blob.cstep; + constants[4].i = block_x; + constants[5].i = block_y; VkMat dispatcher; dispatcher.w = block_x; dispatcher.h = block_y; - dispatcher.c = bottom_tm_blob.h; + dispatcher.c = channels; cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd23_transform_input, bindings, constants, dispatcher); } @@ -1473,41 +1851,53 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom // gemm VkMat top_tm_blob; { - top_tm_blob.create(block_x * block_y, num_output / out_elempack, 16, out_elemsize, out_elempack, opt.workspace_vkallocator); + top_tm_blob.create(block_x * block_y, 1, num_output / out_elempack * 16, out_elemsize, out_elempack, opt.workspace_vkallocator); if (top_tm_blob.empty()) return -100; - std::vector bindings(3); - bindings[0] = bottom_tm_blob; - bindings[1] = top_tm_blob; - bindings[2] = weight_data_gpu_tm_winograd23; + if (use_cooperative_matrix) + { + std::vector bindings(3); + bindings[0] = bottom_tm_blob; + bindings[1] = top_tm_blob; + bindings[2] = weight_data_gpu_tm_winograd23; - std::vector constants(5); - constants[0].i = bottom_tm_blob.h; - constants[1].i = bottom_tm_blob.cstep; - constants[2].i = top_tm_blob.w; - constants[3].i = top_tm_blob.h; - constants[4].i = top_tm_blob.cstep; + std::vector constants(3); + constants[0].i = bottom_tm_blob.w; + constants[1].i = bottom_tm_blob.cstep; + constants[2].i = top_tm_blob.cstep; - VkMat dispatcher; - dispatcher.w = (top_tm_blob.w + 3) / 4; - dispatcher.h = top_tm_blob.h; - dispatcher.c = 16; + const int blocks_x = (bottom_tm_blob.w + coopmat_M * UNROLL_SG_M * UNROLL_WG_M - 1) / (coopmat_M * UNROLL_SG_M * UNROLL_WG_M); + const int blocks_y = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); - if (use_cooperative_matrix_16_8_8) - { - dispatcher.w = ((top_tm_blob.w + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_tm_blob.h + 1) / 2 + 3) / 4; + const int subgroup_size = vkdev->info.subgroup_size(); + + VkMat dispatcher; + dispatcher.w = (blocks_x * blocks_y) * (subgroup_size * UNROLL_WG_M * UNROLL_WG_N); + dispatcher.h = 1; dispatcher.c = 16; + + cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd23_gemm, bindings, constants, dispatcher); } - else if (use_cooperative_matrix_16_16_16) + else { - dispatcher.w = ((top_tm_blob.w + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_tm_blob.h + 3) / 4 + 1) / 2; + std::vector bindings(3); + bindings[0] = bottom_tm_blob; + bindings[1] = top_tm_blob; + bindings[2] = weight_data_gpu_tm_winograd23; + + std::vector constants(3); + constants[0].i = bottom_tm_blob.cstep; + constants[1].i = top_tm_blob.w; + constants[2].i = top_tm_blob.cstep; + + VkMat dispatcher; + dispatcher.w = (top_tm_blob.w + 3) / 4; + dispatcher.h = num_output / out_elempack; dispatcher.c = 16; - } - cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd23_gemm, bindings, constants, dispatcher); + cmd.record_pipeline(pipeline_convolution_3x3s1d1_winograd23_gemm, bindings, constants, dispatcher); + } } // transform output @@ -1521,14 +1911,13 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom bindings[1] = top_blob; bindings[2] = bias_data_gpu; - std::vector constants(7); - constants[0].i = top_tm_blob.h; - constants[1].i = top_tm_blob.cstep; - constants[2].i = block_x; - constants[3].i = block_y; - constants[4].i = top_blob.w; - constants[5].i = top_blob.h; - constants[6].i = top_blob.cstep; + std::vector constants(6); + constants[0].i = top_tm_blob.cstep; + constants[1].i = block_x; + constants[2].i = block_y; + constants[3].i = top_blob.w; + constants[4].i = top_blob.h; + constants[5].i = top_blob.cstep; VkMat dispatcher; dispatcher.w = block_x; @@ -1541,108 +1930,125 @@ int Convolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCom return 0; } - if (opt.use_sgemm_convolution && !is_conv1x1s1d1 && channels * elempack >= 16 && num_output >= 16) + if (opt.use_sgemm_convolution && !is_conv1x1s1d1 && num_input * maxk >= 8 && num_output >= 8) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) - { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; - } - // gemm top_blob.create(outw, outh, num_output / out_elempack, out_elemsize, out_elempack, opt.blob_vkallocator); if (top_blob.empty()) return -100; - std::vector bindings(4); - bindings[0] = bottom_blob_bordered; - bindings[1] = top_blob; - bindings[2] = weight_data_gpu; - bindings[3] = bias_data_gpu; - - std::vector constants(8); - constants[0].i = bottom_blob_bordered.w; - constants[1].i = bottom_blob_bordered.h; - constants[2].i = bottom_blob_bordered.c; - constants[3].i = bottom_blob_bordered.cstep; - constants[4].i = top_blob.w; - constants[5].i = top_blob.h; - constants[6].i = top_blob.c; - constants[7].i = top_blob.cstep; - - VkMat dispatcher; - dispatcher.w = (top_blob.w * top_blob.h + 3) / 4; - dispatcher.h = top_blob.c; - dispatcher.c = 1; - - if (use_cooperative_matrix_16_8_8) + if (use_cooperative_matrix) { - dispatcher.w = ((top_blob.w * top_blob.h + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_blob.c + 1) / 2 + 3) / 4; + std::vector bindings(4); + bindings[0] = bottom_blob_bordered; + bindings[1] = top_blob; + bindings[2] = weight_data_gpu; + bindings[3] = bias_data_gpu; + + std::vector constants(6); + constants[0].u32 = bottom_blob_bordered.w; + constants[1].u32 = bottom_blob_bordered.h; + constants[2].u32 = bottom_blob_bordered.cstep; + constants[3].u32 = top_blob.w; + constants[4].u32 = top_blob.h; + constants[5].u32 = top_blob.cstep; + + const int blocks_x = (top_blob.w * top_blob.h + coopmat_M * UNROLL_SG_M * UNROLL_WG_M - 1) / (coopmat_M * UNROLL_SG_M * UNROLL_WG_M); + const int blocks_y = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + + const int subgroup_size = vkdev->info.subgroup_size(); + + VkMat dispatcher; + dispatcher.w = (blocks_x * blocks_y) * (subgroup_size * UNROLL_WG_M * UNROLL_WG_N); + dispatcher.h = 1; dispatcher.c = 1; + + cmd.record_pipeline(pipeline_convolution_gemm, bindings, constants, dispatcher); } - else if (use_cooperative_matrix_16_16_16) + else { - dispatcher.w = ((top_blob.w * top_blob.h + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_blob.c + 3) / 4 + 1) / 2; + std::vector bindings(4); + bindings[0] = bottom_blob_bordered; + bindings[1] = top_blob; + bindings[2] = weight_data_gpu; + bindings[3] = bias_data_gpu; + + std::vector constants(8); + constants[0].i = bottom_blob_bordered.w; + constants[1].i = bottom_blob_bordered.h; + constants[2].i = bottom_blob_bordered.c; + constants[3].i = bottom_blob_bordered.cstep; + constants[4].i = top_blob.w; + constants[5].i = top_blob.h; + constants[6].i = top_blob.c; + constants[7].i = top_blob.cstep; + + VkMat dispatcher; + dispatcher.w = (top_blob.w * top_blob.h + 3) / 4; + dispatcher.h = top_blob.c; dispatcher.c = 1; - } - cmd.record_pipeline(pipeline_convolution_gemm, bindings, constants, dispatcher); + cmd.record_pipeline(pipeline_convolution_gemm, bindings, constants, dispatcher); + } return 0; } - if (is_conv1x1s1d1) + else if (is_conv1x1s1d1) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) - { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; - } - top_blob.create(outw, outh, num_output / out_elempack, out_elemsize, out_elempack, opt.blob_vkallocator); if (top_blob.empty()) return -100; - std::vector bindings(4); - bindings[0] = bottom_blob_bordered; - bindings[1] = top_blob; - bindings[2] = weight_data_gpu; - bindings[3] = bias_data_gpu; - - std::vector constants(8); - constants[0].i = bottom_blob_bordered.w; - constants[1].i = bottom_blob_bordered.h; - constants[2].i = bottom_blob_bordered.c; - constants[3].i = bottom_blob_bordered.cstep; - constants[4].i = top_blob.w; - constants[5].i = top_blob.h; - constants[6].i = top_blob.c; - constants[7].i = top_blob.cstep; - - VkMat dispatcher; - dispatcher.w = (top_blob.w * top_blob.h + 3) / 4; - dispatcher.h = top_blob.c; - dispatcher.c = 1; - - if (use_cooperative_matrix_16_8_8) + if (use_cooperative_matrix) { - dispatcher.w = ((top_blob.w * top_blob.h + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_blob.c + 1) / 2 + 3) / 4; + std::vector bindings(4); + bindings[0] = bottom_blob_bordered; + bindings[1] = top_blob; + bindings[2] = weight_data_gpu; + bindings[3] = bias_data_gpu; + + std::vector constants(3); + constants[0].u32 = bottom_blob_bordered.w * bottom_blob_bordered.h; + constants[1].u32 = bottom_blob_bordered.cstep; + constants[2].u32 = top_blob.cstep; + + const int blocks_x = (top_blob.w * top_blob.h + coopmat_M * UNROLL_SG_M * UNROLL_WG_M - 1) / (coopmat_M * UNROLL_SG_M * UNROLL_WG_M); + const int blocks_y = (num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + + const int subgroup_size = vkdev->info.subgroup_size(); + + VkMat dispatcher; + dispatcher.w = (blocks_x * blocks_y) * (subgroup_size * UNROLL_WG_M * UNROLL_WG_N); + dispatcher.h = 1; dispatcher.c = 1; + + cmd.record_pipeline(pipeline_convolution_1x1s1d1, bindings, constants, dispatcher); } - else if (use_cooperative_matrix_16_16_16) + else { - dispatcher.w = ((top_blob.w * top_blob.h + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_blob.c + 3) / 4 + 1) / 2; + std::vector bindings(4); + bindings[0] = bottom_blob_bordered; + bindings[1] = top_blob; + bindings[2] = weight_data_gpu; + bindings[3] = bias_data_gpu; + + std::vector constants(8); + constants[0].i = bottom_blob_bordered.w; + constants[1].i = bottom_blob_bordered.h; + constants[2].i = bottom_blob_bordered.c; + constants[3].i = bottom_blob_bordered.cstep; + constants[4].i = top_blob.w; + constants[5].i = top_blob.h; + constants[6].i = top_blob.c; + constants[7].i = top_blob.cstep; + + VkMat dispatcher; + dispatcher.w = (top_blob.w * top_blob.h + 3) / 4; + dispatcher.h = top_blob.c; dispatcher.c = 1; - } - cmd.record_pipeline(pipeline_convolution_1x1s1d1, bindings, constants, dispatcher); + cmd.record_pipeline(pipeline_convolution_1x1s1d1, bindings, constants, dispatcher); + } return 0; } diff --git a/src/layer/vulkan/convolution_vulkan.h b/src/layer/vulkan/convolution_vulkan.h index 462aad0f0..aeb353735 100644 --- a/src/layer/vulkan/convolution_vulkan.h +++ b/src/layer/vulkan/convolution_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION_VULKAN_H #define LAYER_CONVOLUTION_VULKAN_H @@ -64,6 +53,17 @@ public: // convolution as fc ncnn::Layer* reshape_1x1xw; ncnn::Layer* reshape_w; + + // cooperative matrix + bool use_cooperative_matrix; + int coopmat_M; + int coopmat_N; + int coopmat_K; + int UNROLL_SG_M; + int UNROLL_SG_N; + int UNROLL_SG_K; + int UNROLL_WG_M; + int UNROLL_WG_N; }; } // namespace ncnn diff --git a/src/layer/vulkan/convolutiondepthwise_vulkan.cpp b/src/layer/vulkan/convolutiondepthwise_vulkan.cpp index 3decb23e8..843099800 100644 --- a/src/layer/vulkan/convolutiondepthwise_vulkan.cpp +++ b/src/layer/vulkan/convolutiondepthwise_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_vulkan.h" diff --git a/src/layer/vulkan/convolutiondepthwise_vulkan.h b/src/layer/vulkan/convolutiondepthwise_vulkan.h index cdd619c1f..f5cadafbb 100644 --- a/src/layer/vulkan/convolutiondepthwise_vulkan.h +++ b/src/layer/vulkan/convolutiondepthwise_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE_VULKAN_H #define LAYER_CONVOLUTIONDEPTHWISE_VULKAN_H diff --git a/src/layer/vulkan/crop_vulkan.cpp b/src/layer/vulkan/crop_vulkan.cpp index 82384571b..2c678e832 100644 --- a/src/layer/vulkan/crop_vulkan.cpp +++ b/src/layer/vulkan/crop_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "crop_vulkan.h" diff --git a/src/layer/vulkan/crop_vulkan.h b/src/layer/vulkan/crop_vulkan.h index 3c248be62..8d23b9005 100644 --- a/src/layer/vulkan/crop_vulkan.h +++ b/src/layer/vulkan/crop_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CROP_VULKAN_H #define LAYER_CROP_VULKAN_H diff --git a/src/layer/vulkan/deconvolution_vulkan.cpp b/src/layer/vulkan/deconvolution_vulkan.cpp index 77e46420c..ab47bf54f 100644 --- a/src/layer/vulkan/deconvolution_vulkan.cpp +++ b/src/layer/vulkan/deconvolution_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_vulkan.h" @@ -30,6 +19,16 @@ Deconvolution_vulkan::Deconvolution_vulkan() pipeline_deconvolution_gemm = 0; pipeline_deconvolution_col2im = 0; + + use_cooperative_matrix = false; + coopmat_M = 0; + coopmat_N = 0; + coopmat_K = 0; + UNROLL_SG_M = 1; + UNROLL_SG_N = 1; + UNROLL_SG_K = 1; + UNROLL_WG_M = 1; + UNROLL_WG_N = 1; } int Deconvolution_vulkan::load_param(const ParamDict& pd) @@ -135,73 +134,198 @@ int Deconvolution_vulkan::create_pipeline(const Option& _opt) convert_packing(bias_data, bias_data_packed, out_elempack, opt); } - if (opt.use_sgemm_convolution) + if (opt.use_sgemm_convolution && num_input >= 8 && maxk * num_output >= 8) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && num_input % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) + Mat out_shape_col; + if (shape.dims != 0 && out_shape.dims != 0) { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; + out_shape_col = Mat(shape.w * shape.h, 1, maxk * out_shape.c, (void*)0); } - // src = kw-kh-inch-outch - // dst = pa-pb-inch/pa-kw-kh-outch/pb (sgemm) - if (use_cooperative_matrix_16_8_8) - { - // dst = 8a-8b-inch/8a-maxk-outch/8b - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); + Mat out_shape_col_packed; + if (out_shape_col.dims == 3) out_shape_col_packed = Mat(out_shape_col.w, out_shape_col.h, out_shape_col.c / out_elempack, (void*)0, out_elemsize, out_elempack); - weight_data_packed.create(num_input / 8, maxk * num_output / 8, (size_t)4 * 8 * 8, 8 * 8); + use_cooperative_matrix = vkdev->info.support_cooperative_matrix() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && (opt.use_fp16_storage || opt.use_fp16_packed); - for (int q = 0; q + 7 < num_output; q += 8) + if (use_cooperative_matrix) + { + int size = 1024; + if (shape_packed.dims == 3) + size = shape_packed.w * shape_packed.h; + + vkdev->info.get_optimal_cooperative_matrix_mnk(size, maxk * num_output, num_input, VK_COMPONENT_TYPE_FLOAT16_KHR, opt.use_fp16_arithmetic ? VK_COMPONENT_TYPE_FLOAT16_KHR : VK_COMPONENT_TYPE_FLOAT32_KHR, VK_SCOPE_SUBGROUP_KHR, coopmat_M, coopmat_N, coopmat_K); + + // assert coopmat_M != 0 && coopmat_N != 0 && coopmat_K != 0 + + UNROLL_SG_M = std::min((size + coopmat_M - 1) / coopmat_M, 2); + UNROLL_SG_N = std::min((maxk * num_output + coopmat_N - 1) / coopmat_N, 2); + UNROLL_SG_K = std::min((num_input + coopmat_K - 1) / coopmat_K, 2); + + UNROLL_WG_M = std::min((size + coopmat_M * UNROLL_SG_M - 1) / (coopmat_M * UNROLL_SG_M), 2); + UNROLL_WG_N = std::min((maxk * num_output + coopmat_N * UNROLL_SG_N - 1) / (coopmat_N * UNROLL_SG_N), 2); + + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + const int blocks_n = (maxk * num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + // const int blocks_k = (num_input + coopmat_K * UNROLL_SG_K - 1) / (coopmat_K * UNROLL_SG_K); + const int kk = (num_input + coopmat_K - 1) / coopmat_K; + + Mat weight_data_r2; + + if (out_elempack == 4) { - for (int k = 0; k < maxk; k++) + // from maxk-inch-outch to inch-4*maxk-outch/4 + weight_data_r2.create(num_input * 4 * maxk * (num_output / 4)); + for (int i = 0; i < num_output / 4; i++) { - float* g00 = weight_data_packed.row(q / 8 * maxk + k); - - for (int p = 0; p + 7 < num_input; p += 8) + for (int j = 0; j < maxk; j++) { - for (int i = 0; i < 8; i++) + for (int ii = 0; ii < 4; ii++) { - for (int j = 0; j < 8; j++) + for (int k = 0; k < num_input; k++) { - const float* k00 = weight_data_r2.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; + weight_data_r2[((i * maxk + j) * 4 + ii) * num_input + k] = weight_data[((i * 4 + ii) * num_input + k) * maxk + j]; } } } } } - } - else if (use_cooperative_matrix_16_16_16) - { - // dst = 16a-16b-inch/16a-maxk-outch/16b - Mat weight_data_r2 = weight_data.reshape(maxk, num_input, num_output); - - weight_data_packed.create(num_input / 16, maxk * num_output / 16, (size_t)4 * 16 * 16, 16 * 16); + else + { + // from maxk-inch-outch to inch-maxk-outch + weight_data_r2.create(num_input * maxk * num_output); + for (int i = 0; i < num_output; i++) + { + for (int j = 0; j < maxk; j++) + { + for (int k = 0; k < num_input; k++) + { + weight_data_r2[(i * maxk + j) * num_input + k] = weight_data[(i * num_input + k) * maxk + j]; + } + } + } + } - for (int q = 0; q + 15 < num_output; q += 16) + weight_data_packed.create(coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n); + for (int bn = 0; bn < blocks_n; bn++) { - for (int k = 0; k < maxk; k++) + float* p = weight_data_packed.row(bn); + + int k = 0; + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) { - float* g00 = weight_data_packed.row(q / 16 * maxk + k); + // const int ki = k * coopmat_K; - for (int p = 0; p + 15 < num_input; p += 16) + for (int wn = 0; wn < UNROLL_WG_N; wn++) { - for (int i = 0; i < 16; i++) + for (int zk = 0; zk < UNROLL_SG_K; zk++) { - for (int j = 0; j < 16; j++) + for (int zn = 0; zn < UNROLL_SG_N; zn++) { - const float* k00 = weight_data_r2.channel(q + j).row(p + i); - g00[0] = k00[k]; - g00++; + for (int i = 0; i < coopmat_K; i++) + { + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + const int gki = (k + zk) * coopmat_K + i; + + if (gni < maxk * num_output && gki < num_input) + { + *p++ = weight_data_r2[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } + } + } + } + } + } + for (; k < kk; k++) + { + // const int ki = k * coopmat_K; + + for (int wn = 0; wn < UNROLL_WG_N; wn++) + { + // for (int zk = 0; zk < UNROLL_SG_K; zk++) + { + for (int zn = 0; zn < UNROLL_SG_N; zn++) + { + for (int i = 0; i < coopmat_K; i++) + { + for (int j = 0; j < coopmat_N; j++) + { + const int gni = ((bn * UNROLL_WG_N + wn) * UNROLL_SG_N + zn) * coopmat_N + j; + // const int gki = (k + zk) * coopmat_K + i; + const int gki = k * coopmat_K + i; + + if (gni < maxk * num_output && gki < num_input) + { + *p++ = weight_data_r2[gni * num_input + gki]; + } + else + { + *p++ = 0.f; + } + } + } } } } } } + + std::vector specializations(12 + 3); + specializations[0].u32 = coopmat_M; + specializations[1].u32 = coopmat_N; + specializations[2].u32 = coopmat_K; + specializations[3].u32 = UNROLL_SG_M; + specializations[4].u32 = UNROLL_SG_N; + specializations[5].u32 = UNROLL_SG_K; + specializations[6].u32 = UNROLL_WG_M; + specializations[7].u32 = UNROLL_WG_N; + specializations[8].u32 = num_input; + specializations[9].u32 = maxk * num_output; + specializations[10].u32 = elempack; + specializations[11].u32 = out_elempack; + specializations[12 + 0].u32 = shape_packed.w * shape_packed.h; + specializations[12 + 1].u32 = shape_packed.cstep; + specializations[12 + 2].u32 = out_shape_col_packed.cstep; + + const int subgroup_size = vkdev->info.subgroup_size(); + + pipeline_deconvolution_gemm = new Pipeline(vkdev); + pipeline_deconvolution_gemm->set_subgroup_size(subgroup_size); + pipeline_deconvolution_gemm->set_local_size_xyz(subgroup_size * UNROLL_WG_M * UNROLL_WG_N, 1, 1); + pipeline_deconvolution_gemm->create(LayerShaderType::deconvolution_gemm_cm, opt, specializations); } else { @@ -231,32 +355,21 @@ int Deconvolution_vulkan::create_pipeline(const Option& _opt) } } } - } - - Mat out_shape_col; - if (shape.dims != 0 && out_shape.dims != 0) - { - out_shape_col = Mat(shape.w * shape.h, maxk * out_shape.c, (void*)0); - } - Mat out_shape_col_packed; - if (out_shape_col.dims == 2) out_shape_col_packed = Mat(out_shape_col.w, out_shape_col.h / out_elempack, (void*)0, out_elemsize, out_elempack); - - { std::vector specializations(1 + 6); specializations[0].i = maxk; specializations[1 + 0].i = shape_packed.w; specializations[1 + 1].i = shape_packed.h; specializations[1 + 2].i = shape_packed.c; specializations[1 + 3].i = shape_packed.cstep; - specializations[1 + 4].i = out_shape_col_packed.w; - specializations[1 + 5].i = out_shape_col_packed.h; + specializations[1 + 4].i = out_shape_col_packed.cstep; + specializations[1 + 5].i = out_shape_col_packed.c; Mat local_size_xyz(8, std::min(4, num_output / out_elempack), 1, (void*)0); if (out_shape_col_packed.dims != 0) { local_size_xyz.w = std::min(8, out_shape_col_packed.w); - local_size_xyz.h = std::min(4, out_shape_col_packed.h); + local_size_xyz.h = std::min(4, out_shape_col_packed.c); } int shader_type_index = -1; @@ -270,27 +383,8 @@ int Deconvolution_vulkan::create_pipeline(const Option& _opt) if (elempack == 4 && out_elempack == 8) shader_type_index = LayerShaderType::deconvolution_pack4to8_gemm; if (elempack == 8 && out_elempack == 4) shader_type_index = LayerShaderType::deconvolution_pack8to4_gemm; - if (use_cooperative_matrix_16_8_8) - { - shader_type_index = LayerShaderType::deconvolution_pack4_gemm_cm_16_8_8; - } - else if (use_cooperative_matrix_16_16_16) - { - shader_type_index = LayerShaderType::deconvolution_pack4_gemm_cm_16_16_16; - } - pipeline_deconvolution_gemm = new Pipeline(vkdev); - if (use_cooperative_matrix_16_8_8) - { - pipeline_deconvolution_gemm->set_subgroup_size(32); - pipeline_deconvolution_gemm->set_local_size_xyz(32, 1, 1); // 16_8_8 - } - else if (use_cooperative_matrix_16_16_16) - { - pipeline_deconvolution_gemm->set_subgroup_size(32); - pipeline_deconvolution_gemm->set_local_size_xyz(32, 1, 1); // 16_16_16 - } - else if (opt.use_shader_local_memory) + if (opt.use_shader_local_memory) { pipeline_deconvolution_gemm->set_local_size_xyz(8, 8, 1); } @@ -302,7 +396,7 @@ int Deconvolution_vulkan::create_pipeline(const Option& _opt) } { - std::vector specializations(10 + 6); + std::vector specializations(11 + 6); specializations[0].i = kernel_w; specializations[1].i = kernel_h; specializations[2].i = dilation_w; @@ -313,12 +407,13 @@ int Deconvolution_vulkan::create_pipeline(const Option& _opt) specializations[7].i = activation_type; specializations[8].f = activation_params.w >= 1 ? activation_params[0] : 0.f; specializations[9].f = activation_params.w == 2 ? activation_params[1] : 0.f; - specializations[10 + 0].i = shape_packed.w; - specializations[10 + 1].i = shape_packed.h; - specializations[10 + 2].i = out_shape_bordered_packed.w; - specializations[10 + 3].i = out_shape_bordered_packed.h; - specializations[10 + 4].i = out_shape_bordered_packed.c; - specializations[10 + 5].i = out_shape_bordered_packed.cstep; + specializations[10].i = num_output / out_elempack; + specializations[11 + 0].i = shape_packed.w; + specializations[11 + 1].i = shape_packed.h; + specializations[11 + 2].i = out_shape_col_packed.cstep; + specializations[11 + 3].i = out_shape_bordered_packed.w; + specializations[11 + 4].i = out_shape_bordered_packed.h; + specializations[11 + 5].i = out_shape_bordered_packed.cstep; Mat local_size_xyz(8, 8, std::min(4, num_output / out_elempack), (void*)0); if (out_shape_bordered_packed.dims != 0) @@ -474,6 +569,16 @@ int Deconvolution_vulkan::destroy_pipeline(const Option& opt) delete pipeline_deconvolution_col2im; pipeline_deconvolution_col2im = 0; + use_cooperative_matrix = false; + coopmat_M = 0; + coopmat_N = 0; + coopmat_K = 0; + UNROLL_SG_M = 1; + UNROLL_SG_N = 1; + UNROLL_SG_K = 1; + UNROLL_WG_M = 1; + UNROLL_WG_N = 1; + return 0; } @@ -519,58 +624,67 @@ int Deconvolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkC int out_elempack = opt.use_shader_pack8 && num_output % 8 == 0 ? 8 : num_output % 4 == 0 ? 4 : 1; size_t out_elemsize = elemsize / elempack * out_elempack; + const int num_input = channels * elempack; + const int maxk = kernel_w * kernel_h; + VkMat top_blob_bordered; - if (opt.use_sgemm_convolution) + if (opt.use_sgemm_convolution && num_input >= 8 && maxk * num_output >= 8) { - bool use_cooperative_matrix_16_8_8 = vkdev->info.support_cooperative_matrix_16_8_8() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 8 == 0 && num_output % 8 == 0; - bool use_cooperative_matrix_16_16_16 = vkdev->info.support_cooperative_matrix_16_16_16() && opt.use_cooperative_matrix && !opt.use_shader_pack8 && opt.use_fp16_storage && channels * elempack % 16 == 0 && num_output % 16 == 0; - if (vkdev->info.subgroup_size() != 32 && (!vkdev->info.support_subgroup_size_control() || vkdev->info.min_subgroup_size() > 32 || vkdev->info.max_subgroup_size() < 32)) - { - use_cooperative_matrix_16_8_8 = false; - use_cooperative_matrix_16_16_16 = false; - } - - const int maxk = kernel_w * kernel_h; - // gemm VkMat top_blob_col; { - top_blob_col.create(w * h, maxk * num_output / out_elempack, out_elemsize, out_elempack, opt.workspace_vkallocator); + top_blob_col.create(w * h, 1, maxk * num_output / out_elempack, out_elemsize, out_elempack, opt.workspace_vkallocator); if (top_blob_col.empty()) return -100; - std::vector bindings(3); - bindings[0] = bottom_blob; - bindings[1] = top_blob_col; - bindings[2] = weight_data_gpu; - - std::vector constants(6); - constants[0].i = bottom_blob.w; - constants[1].i = bottom_blob.h; - constants[2].i = bottom_blob.c; - constants[3].i = bottom_blob.cstep; - constants[4].i = top_blob_col.w; - constants[5].i = top_blob_col.h; - - VkMat dispatcher; - dispatcher.w = (top_blob_col.w + 3) / 4; - dispatcher.h = top_blob_col.h; - dispatcher.c = 1; - - if (use_cooperative_matrix_16_8_8) + if (use_cooperative_matrix) { - dispatcher.w = ((top_blob_col.w + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_blob_col.h + 1) / 2 + 3) / 4; + const int size = w * h; + + std::vector bindings(3); + bindings[0] = bottom_blob; + bindings[1] = top_blob_col; + bindings[2] = weight_data_gpu; + + std::vector constants(3); + constants[0].u32 = size; + constants[1].u32 = bottom_blob.cstep; + constants[2].u32 = top_blob_col.cstep; + + const int blocks_x = (size + coopmat_M * UNROLL_SG_M * UNROLL_WG_M - 1) / (coopmat_M * UNROLL_SG_M * UNROLL_WG_M); + const int blocks_y = (maxk * num_output + coopmat_N * UNROLL_SG_N * UNROLL_WG_N - 1) / (coopmat_N * UNROLL_SG_N * UNROLL_WG_N); + + const int subgroup_size = vkdev->info.subgroup_size(); + + VkMat dispatcher; + dispatcher.w = (blocks_x * blocks_y) * (subgroup_size * UNROLL_WG_M * UNROLL_WG_N); + dispatcher.h = 1; dispatcher.c = 1; + + cmd.record_pipeline(pipeline_deconvolution_gemm, bindings, constants, dispatcher); } - else if (use_cooperative_matrix_16_16_16) + else { - dispatcher.w = ((top_blob_col.w + 15) / 16 + 1) / 2 * 32; - dispatcher.h = ((top_blob_col.h + 3) / 4 + 1) / 2; + std::vector bindings(3); + bindings[0] = bottom_blob; + bindings[1] = top_blob_col; + bindings[2] = weight_data_gpu; + + std::vector constants(6); + constants[0].i = bottom_blob.w; + constants[1].i = bottom_blob.h; + constants[2].i = bottom_blob.c; + constants[3].i = bottom_blob.cstep; + constants[4].i = top_blob_col.cstep; + constants[5].i = top_blob_col.c; + + VkMat dispatcher; + dispatcher.w = (top_blob_col.cstep + 3) / 4; + dispatcher.h = top_blob_col.c; dispatcher.c = 1; - } - cmd.record_pipeline(pipeline_deconvolution_gemm, bindings, constants, dispatcher); + cmd.record_pipeline(pipeline_deconvolution_gemm, bindings, constants, dispatcher); + } } // col2im @@ -594,9 +708,9 @@ int Deconvolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkC std::vector constants(6); constants[0].i = w; constants[1].i = h; - constants[2].i = top_blob_bordered.w; - constants[3].i = top_blob_bordered.h; - constants[4].i = top_blob_bordered.c; + constants[2].i = top_blob_col.cstep; + constants[3].i = top_blob_bordered.w; + constants[4].i = top_blob_bordered.h; constants[5].i = top_blob_bordered.cstep; cmd.record_pipeline(pipeline_deconvolution_col2im, bindings, constants, top_blob_bordered); diff --git a/src/layer/vulkan/deconvolution_vulkan.h b/src/layer/vulkan/deconvolution_vulkan.h index c946ec6f1..1d367771f 100644 --- a/src/layer/vulkan/deconvolution_vulkan.h +++ b/src/layer/vulkan/deconvolution_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION_VULKAN_H #define LAYER_DECONVOLUTION_VULKAN_H @@ -48,6 +37,17 @@ public: Pipeline* pipeline_deconvolution_gemm; Pipeline* pipeline_deconvolution_col2im; + + // cooperative matrix + bool use_cooperative_matrix; + int coopmat_M; + int coopmat_N; + int coopmat_K; + int UNROLL_SG_M; + int UNROLL_SG_N; + int UNROLL_SG_K; + int UNROLL_WG_M; + int UNROLL_WG_N; }; } // namespace ncnn diff --git a/src/layer/vulkan/deconvolutiondepthwise_vulkan.cpp b/src/layer/vulkan/deconvolutiondepthwise_vulkan.cpp index ff5cfb0be..1e5cbddd1 100644 --- a/src/layer/vulkan/deconvolutiondepthwise_vulkan.cpp +++ b/src/layer/vulkan/deconvolutiondepthwise_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_vulkan.h" diff --git a/src/layer/vulkan/deconvolutiondepthwise_vulkan.h b/src/layer/vulkan/deconvolutiondepthwise_vulkan.h index ab7f5b2fa..dc307c5a2 100644 --- a/src/layer/vulkan/deconvolutiondepthwise_vulkan.h +++ b/src/layer/vulkan/deconvolutiondepthwise_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE_VULKAN_H #define LAYER_DECONVOLUTIONDEPTHWISE_VULKAN_H diff --git a/src/layer/vulkan/deepcopy_vulkan.cpp b/src/layer/vulkan/deepcopy_vulkan.cpp index 465d7a8ad..a5e0ffcf3 100644 --- a/src/layer/vulkan/deepcopy_vulkan.cpp +++ b/src/layer/vulkan/deepcopy_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deepcopy_vulkan.h" diff --git a/src/layer/vulkan/deepcopy_vulkan.h b/src/layer/vulkan/deepcopy_vulkan.h index fc6d37299..255eab6e2 100644 --- a/src/layer/vulkan/deepcopy_vulkan.h +++ b/src/layer/vulkan/deepcopy_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEEPCOPY_VULKAN_H #define LAYER_DEEPCOPY_VULKAN_H diff --git a/src/layer/vulkan/dequantize_vulkan.cpp b/src/layer/vulkan/dequantize_vulkan.cpp index 6ffccbc9e..189a42f2e 100644 --- a/src/layer/vulkan/dequantize_vulkan.cpp +++ b/src/layer/vulkan/dequantize_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dequantize_vulkan.h" diff --git a/src/layer/vulkan/dequantize_vulkan.h b/src/layer/vulkan/dequantize_vulkan.h index 08ee83fc5..af79c1e41 100644 --- a/src/layer/vulkan/dequantize_vulkan.h +++ b/src/layer/vulkan/dequantize_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEQUANTIZE_VULKAN_H #define LAYER_DEQUANTIZE_VULKAN_H diff --git a/src/layer/vulkan/dropout_vulkan.cpp b/src/layer/vulkan/dropout_vulkan.cpp index b522bbac0..5911fe992 100644 --- a/src/layer/vulkan/dropout_vulkan.cpp +++ b/src/layer/vulkan/dropout_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dropout_vulkan.h" @@ -23,8 +12,6 @@ Dropout_vulkan::Dropout_vulkan() support_vulkan = true; pipeline_dropout = 0; - pipeline_dropout_pack4 = 0; - pipeline_dropout_pack8 = 0; } int Dropout_vulkan::create_pipeline(const Option& opt) @@ -51,57 +38,15 @@ int Dropout_vulkan::create_pipeline(const Option& opt) if (shape.dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(1 + 5); + std::vector specializations(1 + 1); specializations[0].f = scale; - specializations[1 + 0].i = shape_packed.dims; - specializations[1 + 1].i = shape_packed.w; - specializations[1 + 2].i = shape_packed.h; - specializations[1 + 3].i = shape_packed.c; - specializations[1 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_dropout = new Pipeline(vkdev); - pipeline_dropout->set_optimal_local_size_xyz(local_size_xyz); - pipeline_dropout->create(LayerShaderType::dropout, opt, specializations); - } + specializations[1 + 0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_dropout_pack4 = new Pipeline(vkdev); - pipeline_dropout_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_dropout_pack4->create(LayerShaderType::dropout_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_dropout_pack8 = new Pipeline(vkdev); - pipeline_dropout_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_dropout_pack8->create(LayerShaderType::dropout_pack8, opt, specializations); - } + pipeline_dropout = new Pipeline(vkdev); + pipeline_dropout->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_dropout->create(LayerShaderType::dropout, opt, specializations); return 0; } @@ -111,12 +56,6 @@ int Dropout_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_dropout; pipeline_dropout = 0; - delete pipeline_dropout_pack4; - pipeline_dropout_pack4 = 0; - - delete pipeline_dropout_pack8; - pipeline_dropout_pack8 = 0; - return 0; } @@ -127,23 +66,19 @@ int Dropout_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, cons return 0; } - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_dropout_pack8 - : elempack == 4 ? pipeline_dropout_pack4 - : pipeline_dropout; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_dropout, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/dropout_vulkan.h b/src/layer/vulkan/dropout_vulkan.h index 66c0bc947..eb82601bd 100644 --- a/src/layer/vulkan/dropout_vulkan.h +++ b/src/layer/vulkan/dropout_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DROPOUT_VULKAN_H #define LAYER_DROPOUT_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_dropout; - Pipeline* pipeline_dropout_pack4; - Pipeline* pipeline_dropout_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/eltwise_vulkan.cpp b/src/layer/vulkan/eltwise_vulkan.cpp index 9bbdd611b..03069fc2f 100644 --- a/src/layer/vulkan/eltwise_vulkan.cpp +++ b/src/layer/vulkan/eltwise_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_vulkan.h" diff --git a/src/layer/vulkan/eltwise_vulkan.h b/src/layer/vulkan/eltwise_vulkan.h index d96dc84e0..ed47c35e4 100644 --- a/src/layer/vulkan/eltwise_vulkan.h +++ b/src/layer/vulkan/eltwise_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELTWISE_VULKAN_H #define LAYER_ELTWISE_VULKAN_H diff --git a/src/layer/vulkan/elu_vulkan.cpp b/src/layer/vulkan/elu_vulkan.cpp index 57559a294..a5e0007a4 100644 --- a/src/layer/vulkan/elu_vulkan.cpp +++ b/src/layer/vulkan/elu_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "elu_vulkan.h" @@ -23,8 +12,6 @@ ELU_vulkan::ELU_vulkan() support_vulkan = true; pipeline_elu = 0; - pipeline_elu_pack4 = 0; - pipeline_elu_pack8 = 0; } int ELU_vulkan::create_pipeline(const Option& opt) @@ -52,63 +39,15 @@ int ELU_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(1 + 5); + std::vector specializations(1 + 1); specializations[0].f = alpha; - specializations[1 + 0].i = shape_packed.dims; - specializations[1 + 1].i = shape_packed.w; - specializations[1 + 2].i = shape_packed.h * shape_packed.d; - specializations[1 + 3].i = shape_packed.c; - specializations[1 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_elu = new Pipeline(vkdev); - pipeline_elu->set_optimal_local_size_xyz(local_size_xyz); - pipeline_elu->create(LayerShaderType::elu, opt, specializations); - } + specializations[1 + 0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_elu_pack4 = new Pipeline(vkdev); - pipeline_elu_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_elu_pack4->create(LayerShaderType::elu_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_elu_pack8 = new Pipeline(vkdev); - pipeline_elu_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_elu_pack8->create(LayerShaderType::elu_pack8, opt, specializations); - } + pipeline_elu = new Pipeline(vkdev); + pipeline_elu->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_elu->create(LayerShaderType::elu, opt, specializations); return 0; } @@ -118,34 +57,24 @@ int ELU_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_elu; pipeline_elu = 0; - delete pipeline_elu_pack4; - pipeline_elu_pack4 = 0; - - delete pipeline_elu_pack8; - pipeline_elu_pack8 = 0; - return 0; } int ELU_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_elu_pack8 - : elempack == 4 ? pipeline_elu_pack4 - : pipeline_elu; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_elu, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/elu_vulkan.h b/src/layer/vulkan/elu_vulkan.h index 1b9a42de6..edf046ad1 100644 --- a/src/layer/vulkan/elu_vulkan.h +++ b/src/layer/vulkan/elu_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELU_VULKAN_H #define LAYER_ELU_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_elu; - Pipeline* pipeline_elu_pack4; - Pipeline* pipeline_elu_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/erf_vulkan.cpp b/src/layer/vulkan/erf_vulkan.cpp index 7082b426e..1321dcad4 100644 --- a/src/layer/vulkan/erf_vulkan.cpp +++ b/src/layer/vulkan/erf_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "erf_vulkan.h" @@ -23,8 +12,6 @@ Erf_vulkan::Erf_vulkan() support_vulkan = true; pipeline_erf = 0; - pipeline_erf_pack4 = 0; - pipeline_erf_pack8 = 0; } int Erf_vulkan::create_pipeline(const Option& opt) @@ -51,56 +38,14 @@ int Erf_vulkan::create_pipeline(const Option& opt) if (shape.dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(0 + 5); - specializations[0 + 0].i = shape_packed.dims; - specializations[0 + 1].i = shape_packed.w; - specializations[0 + 2].i = shape_packed.h; - specializations[0 + 3].i = shape_packed.c; - specializations[0 + 4].i = shape_packed.cstep; + std::vector specializations(1); + specializations[0].u32 = shape_packed.total() * elempack / 4; - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_erf = new Pipeline(vkdev); - pipeline_erf->set_optimal_local_size_xyz(local_size_xyz); - pipeline_erf->create(LayerShaderType::erf, opt, specializations); - } - - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_erf_pack4 = new Pipeline(vkdev); - pipeline_erf_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_erf_pack4->create(LayerShaderType::erf_pack4, opt, specializations); - } - - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_erf_pack8 = new Pipeline(vkdev); - pipeline_erf_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_erf_pack8->create(LayerShaderType::erf_pack8, opt, specializations); - } + pipeline_erf = new Pipeline(vkdev); + pipeline_erf->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_erf->create(LayerShaderType::erf, opt, specializations); return 0; } @@ -110,34 +55,24 @@ int Erf_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_erf; pipeline_erf = 0; - delete pipeline_erf_pack4; - pipeline_erf_pack4 = 0; - - delete pipeline_erf_pack8; - pipeline_erf_pack8 = 0; - return 0; } int Erf_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_erf_pack8 - : elempack == 4 ? pipeline_erf_pack4 - : pipeline_erf; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_erf, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/erf_vulkan.h b/src/layer/vulkan/erf_vulkan.h index c63261a9a..de20f1b76 100644 --- a/src/layer/vulkan/erf_vulkan.h +++ b/src/layer/vulkan/erf_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ERF_VULKAN_H #define LAYER_ERF_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_erf; - Pipeline* pipeline_erf_pack4; - Pipeline* pipeline_erf_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/flatten_vulkan.cpp b/src/layer/vulkan/flatten_vulkan.cpp index 03dca4c97..508764f0d 100644 --- a/src/layer/vulkan/flatten_vulkan.cpp +++ b/src/layer/vulkan/flatten_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "flatten_vulkan.h" diff --git a/src/layer/vulkan/flatten_vulkan.h b/src/layer/vulkan/flatten_vulkan.h index 0123e5907..c5704865a 100644 --- a/src/layer/vulkan/flatten_vulkan.h +++ b/src/layer/vulkan/flatten_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FLATTEN_VULKAN_H #define LAYER_FLATTEN_VULKAN_H diff --git a/src/layer/vulkan/gelu_vulkan.cpp b/src/layer/vulkan/gelu_vulkan.cpp index 9a354e8bb..9823ff849 100644 --- a/src/layer/vulkan/gelu_vulkan.cpp +++ b/src/layer/vulkan/gelu_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gelu_vulkan.h" @@ -23,8 +12,6 @@ GELU_vulkan::GELU_vulkan() support_vulkan = true; pipeline_gelu = 0; - pipeline_gelu_pack4 = 0; - pipeline_gelu_pack8 = 0; } int GELU_vulkan::create_pipeline(const Option& opt) @@ -52,62 +39,14 @@ int GELU_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(0 + 5); - specializations[0 + 0].i = shape_packed.dims; - specializations[0 + 1].i = shape_packed.w; - specializations[0 + 2].i = shape_packed.h * shape_packed.d; - specializations[0 + 3].i = shape_packed.c; - specializations[0 + 4].i = shape_packed.cstep; + std::vector specializations(1); + specializations[0].u32 = shape_packed.total() * elempack / 4; - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_gelu = new Pipeline(vkdev); - pipeline_gelu->set_optimal_local_size_xyz(local_size_xyz); - pipeline_gelu->create(LayerShaderType::gelu, opt, specializations); - } - - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_gelu_pack4 = new Pipeline(vkdev); - pipeline_gelu_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_gelu_pack4->create(LayerShaderType::gelu_pack4, opt, specializations); - } - - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_gelu_pack8 = new Pipeline(vkdev); - pipeline_gelu_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_gelu_pack8->create(LayerShaderType::gelu_pack8, opt, specializations); - } + pipeline_gelu = new Pipeline(vkdev); + pipeline_gelu->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_gelu->create(LayerShaderType::gelu, opt, specializations); return 0; } @@ -117,34 +56,24 @@ int GELU_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_gelu; pipeline_gelu = 0; - delete pipeline_gelu_pack4; - pipeline_gelu_pack4 = 0; - - delete pipeline_gelu_pack8; - pipeline_gelu_pack8 = 0; - return 0; } int GELU_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_gelu_pack8 - : elempack == 4 ? pipeline_gelu_pack4 - : pipeline_gelu; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_gelu, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/gelu_vulkan.h b/src/layer/vulkan/gelu_vulkan.h index 1af274ea6..1c3eb98d2 100644 --- a/src/layer/vulkan/gelu_vulkan.h +++ b/src/layer/vulkan/gelu_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GELU_VULKAN_H #define LAYER_GELU_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_gelu; - Pipeline* pipeline_gelu_pack4; - Pipeline* pipeline_gelu_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/gemm_vulkan.cpp b/src/layer/vulkan/gemm_vulkan.cpp index 5aad8826f..5424770b2 100644 --- a/src/layer/vulkan/gemm_vulkan.cpp +++ b/src/layer/vulkan/gemm_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm_vulkan.h" diff --git a/src/layer/vulkan/gemm_vulkan.h b/src/layer/vulkan/gemm_vulkan.h index f6c5f03a6..166af7fdc 100644 --- a/src/layer/vulkan/gemm_vulkan.h +++ b/src/layer/vulkan/gemm_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GEMM_VULKAN_H #define LAYER_GEMM_VULKAN_H diff --git a/src/layer/vulkan/hardsigmoid_vulkan.cpp b/src/layer/vulkan/hardsigmoid_vulkan.cpp index 431799993..3617b2fae 100644 --- a/src/layer/vulkan/hardsigmoid_vulkan.cpp +++ b/src/layer/vulkan/hardsigmoid_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_vulkan.h" @@ -23,8 +12,6 @@ HardSigmoid_vulkan::HardSigmoid_vulkan() support_vulkan = true; pipeline_hardsigmoid = 0; - pipeline_hardsigmoid_pack4 = 0; - pipeline_hardsigmoid_pack8 = 0; } int HardSigmoid_vulkan::create_pipeline(const Option& opt) @@ -51,58 +38,16 @@ int HardSigmoid_vulkan::create_pipeline(const Option& opt) if (shape.dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(2 + 5); + std::vector specializations(2 + 1); specializations[0].f = alpha; specializations[1].f = beta; - specializations[2 + 0].i = shape_packed.dims; - specializations[2 + 1].i = shape_packed.w; - specializations[2 + 2].i = shape_packed.h; - specializations[2 + 3].i = shape_packed.c; - specializations[2 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_hardsigmoid = new Pipeline(vkdev); - pipeline_hardsigmoid->set_optimal_local_size_xyz(local_size_xyz); - pipeline_hardsigmoid->create(LayerShaderType::hardsigmoid, opt, specializations); - } + specializations[2 + 0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_hardsigmoid_pack4 = new Pipeline(vkdev); - pipeline_hardsigmoid_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_hardsigmoid_pack4->create(LayerShaderType::hardsigmoid_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_hardsigmoid_pack8 = new Pipeline(vkdev); - pipeline_hardsigmoid_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_hardsigmoid_pack8->create(LayerShaderType::hardsigmoid_pack8, opt, specializations); - } + pipeline_hardsigmoid = new Pipeline(vkdev); + pipeline_hardsigmoid->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_hardsigmoid->create(LayerShaderType::hardsigmoid, opt, specializations); return 0; } @@ -112,34 +57,24 @@ int HardSigmoid_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_hardsigmoid; pipeline_hardsigmoid = 0; - delete pipeline_hardsigmoid_pack4; - pipeline_hardsigmoid_pack4 = 0; - - delete pipeline_hardsigmoid_pack8; - pipeline_hardsigmoid_pack8 = 0; - return 0; } int HardSigmoid_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_hardsigmoid_pack8 - : elempack == 4 ? pipeline_hardsigmoid_pack4 - : pipeline_hardsigmoid; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_hardsigmoid, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/hardsigmoid_vulkan.h b/src/layer/vulkan/hardsigmoid_vulkan.h index 7a3838b0b..432460b89 100644 --- a/src/layer/vulkan/hardsigmoid_vulkan.h +++ b/src/layer/vulkan/hardsigmoid_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSIGMOID_VULKAN_H #define LAYER_HARDSIGMOID_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_hardsigmoid; - Pipeline* pipeline_hardsigmoid_pack4; - Pipeline* pipeline_hardsigmoid_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/hardswish_vulkan.cpp b/src/layer/vulkan/hardswish_vulkan.cpp index c656271b0..4e6234eca 100644 --- a/src/layer/vulkan/hardswish_vulkan.cpp +++ b/src/layer/vulkan/hardswish_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_vulkan.h" @@ -23,8 +12,6 @@ HardSwish_vulkan::HardSwish_vulkan() support_vulkan = true; pipeline_hardswish = 0; - pipeline_hardswish_pack4 = 0; - pipeline_hardswish_pack8 = 0; } int HardSwish_vulkan::create_pipeline(const Option& opt) @@ -51,58 +38,16 @@ int HardSwish_vulkan::create_pipeline(const Option& opt) if (shape.dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(2 + 5); + std::vector specializations(2 + 1); specializations[0].f = alpha; specializations[1].f = beta; - specializations[2 + 0].i = shape_packed.dims; - specializations[2 + 1].i = shape_packed.w; - specializations[2 + 2].i = shape_packed.h; - specializations[2 + 3].i = shape_packed.c; - specializations[2 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_hardswish = new Pipeline(vkdev); - pipeline_hardswish->set_optimal_local_size_xyz(local_size_xyz); - pipeline_hardswish->create(LayerShaderType::hardswish, opt, specializations); - } + specializations[2 + 0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_hardswish_pack4 = new Pipeline(vkdev); - pipeline_hardswish_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_hardswish_pack4->create(LayerShaderType::hardswish_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_hardswish_pack8 = new Pipeline(vkdev); - pipeline_hardswish_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_hardswish_pack8->create(LayerShaderType::hardswish_pack8, opt, specializations); - } + pipeline_hardswish = new Pipeline(vkdev); + pipeline_hardswish->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_hardswish->create(LayerShaderType::hardswish, opt, specializations); return 0; } @@ -112,34 +57,24 @@ int HardSwish_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_hardswish; pipeline_hardswish = 0; - delete pipeline_hardswish_pack4; - pipeline_hardswish_pack4 = 0; - - delete pipeline_hardswish_pack8; - pipeline_hardswish_pack8 = 0; - return 0; } int HardSwish_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_hardswish_pack8 - : elempack == 4 ? pipeline_hardswish_pack4 - : pipeline_hardswish; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_hardswish, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/hardswish_vulkan.h b/src/layer/vulkan/hardswish_vulkan.h index 7b150f3b2..b67e860e6 100644 --- a/src/layer/vulkan/hardswish_vulkan.h +++ b/src/layer/vulkan/hardswish_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSWISH_VULKAN_H #define LAYER_HARDSWISH_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_hardswish; - Pipeline* pipeline_hardswish_pack4; - Pipeline* pipeline_hardswish_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/innerproduct_vulkan.cpp b/src/layer/vulkan/innerproduct_vulkan.cpp index cd29dedf6..0771e37c2 100644 --- a/src/layer/vulkan/innerproduct_vulkan.cpp +++ b/src/layer/vulkan/innerproduct_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_vulkan.h" diff --git a/src/layer/vulkan/innerproduct_vulkan.h b/src/layer/vulkan/innerproduct_vulkan.h index 8f3dd9842..c06b74ce8 100644 --- a/src/layer/vulkan/innerproduct_vulkan.h +++ b/src/layer/vulkan/innerproduct_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INNERPRODUCT_VULKAN_H #define LAYER_INNERPRODUCT_VULKAN_H diff --git a/src/layer/vulkan/instancenorm_vulkan.cpp b/src/layer/vulkan/instancenorm_vulkan.cpp index 9fc3b31a4..c2ea1d285 100644 --- a/src/layer/vulkan/instancenorm_vulkan.cpp +++ b/src/layer/vulkan/instancenorm_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "instancenorm_vulkan.h" diff --git a/src/layer/vulkan/instancenorm_vulkan.h b/src/layer/vulkan/instancenorm_vulkan.h index e28617ffc..69db3f25d 100644 --- a/src/layer/vulkan/instancenorm_vulkan.h +++ b/src/layer/vulkan/instancenorm_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INSTANCENORM_VULKAN_H #define LAYER_INSTANCENORM_VULKAN_H diff --git a/src/layer/vulkan/interp_vulkan.cpp b/src/layer/vulkan/interp_vulkan.cpp index b8c004b58..7387888b6 100644 --- a/src/layer/vulkan/interp_vulkan.cpp +++ b/src/layer/vulkan/interp_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp_vulkan.h" diff --git a/src/layer/vulkan/interp_vulkan.h b/src/layer/vulkan/interp_vulkan.h index 962f5d82a..02cb11571 100644 --- a/src/layer/vulkan/interp_vulkan.h +++ b/src/layer/vulkan/interp_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INTERP_VULKAN_H #define LAYER_INTERP_VULKAN_H diff --git a/src/layer/vulkan/lrn_vulkan.cpp b/src/layer/vulkan/lrn_vulkan.cpp index 4045eec1a..cfcebaed9 100644 --- a/src/layer/vulkan/lrn_vulkan.cpp +++ b/src/layer/vulkan/lrn_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lrn_vulkan.h" diff --git a/src/layer/vulkan/lrn_vulkan.h b/src/layer/vulkan/lrn_vulkan.h index 51c530e4e..c20f87666 100644 --- a/src/layer/vulkan/lrn_vulkan.h +++ b/src/layer/vulkan/lrn_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LRN_VULKAN_H #define LAYER_LRN_VULKAN_H diff --git a/src/layer/vulkan/memorydata_vulkan.cpp b/src/layer/vulkan/memorydata_vulkan.cpp index 42fa7992e..5a034f0d8 100644 --- a/src/layer/vulkan/memorydata_vulkan.cpp +++ b/src/layer/vulkan/memorydata_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "memorydata_vulkan.h" diff --git a/src/layer/vulkan/memorydata_vulkan.h b/src/layer/vulkan/memorydata_vulkan.h index 0de457029..46f9b4871 100644 --- a/src/layer/vulkan/memorydata_vulkan.h +++ b/src/layer/vulkan/memorydata_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MEMORYDATA_VULKAN_H #define LAYER_MEMORYDATA_VULKAN_H diff --git a/src/layer/vulkan/mish_vulkan.cpp b/src/layer/vulkan/mish_vulkan.cpp index 0797cf69d..6aa268d09 100644 --- a/src/layer/vulkan/mish_vulkan.cpp +++ b/src/layer/vulkan/mish_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish_vulkan.h" @@ -23,8 +12,6 @@ Mish_vulkan::Mish_vulkan() support_vulkan = true; pipeline_mish = 0; - pipeline_mish_pack4 = 0; - pipeline_mish_pack8 = 0; } int Mish_vulkan::create_pipeline(const Option& opt) @@ -52,62 +39,14 @@ int Mish_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(0 + 5); - specializations[0 + 0].i = shape_packed.dims; - specializations[0 + 1].i = shape_packed.w; - specializations[0 + 2].i = shape_packed.h * shape_packed.d; - specializations[0 + 3].i = shape_packed.c; - specializations[0 + 4].i = shape_packed.cstep; + std::vector specializations(1); + specializations[0].u32 = shape_packed.total() * elempack / 4; - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_mish = new Pipeline(vkdev); - pipeline_mish->set_optimal_local_size_xyz(local_size_xyz); - pipeline_mish->create(LayerShaderType::mish, opt, specializations); - } - - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_mish_pack4 = new Pipeline(vkdev); - pipeline_mish_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_mish_pack4->create(LayerShaderType::mish_pack4, opt, specializations); - } - - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_mish_pack8 = new Pipeline(vkdev); - pipeline_mish_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_mish_pack8->create(LayerShaderType::mish_pack8, opt, specializations); - } + pipeline_mish = new Pipeline(vkdev); + pipeline_mish->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_mish->create(LayerShaderType::mish, opt, specializations); return 0; } @@ -117,34 +56,24 @@ int Mish_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_mish; pipeline_mish = 0; - delete pipeline_mish_pack4; - pipeline_mish_pack4 = 0; - - delete pipeline_mish_pack8; - pipeline_mish_pack8 = 0; - return 0; } int Mish_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_mish_pack8 - : elempack == 4 ? pipeline_mish_pack4 - : pipeline_mish; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_mish, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/mish_vulkan.h b/src/layer/vulkan/mish_vulkan.h index c1d65161c..57f90b811 100644 --- a/src/layer/vulkan/mish_vulkan.h +++ b/src/layer/vulkan/mish_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MISH_VULKAN_H #define LAYER_MISH_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_mish; - Pipeline* pipeline_mish_pack4; - Pipeline* pipeline_mish_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/multiheadattention_vulkan.cpp b/src/layer/vulkan/multiheadattention_vulkan.cpp index 814e07d5b..fc60b0624 100644 --- a/src/layer/vulkan/multiheadattention_vulkan.cpp +++ b/src/layer/vulkan/multiheadattention_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "multiheadattention_vulkan.h" diff --git a/src/layer/vulkan/multiheadattention_vulkan.h b/src/layer/vulkan/multiheadattention_vulkan.h index 503f6624a..7e3f3ebc4 100644 --- a/src/layer/vulkan/multiheadattention_vulkan.h +++ b/src/layer/vulkan/multiheadattention_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MULTIHEADATTENTION_VULKAN_H #define LAYER_MULTIHEADATTENTION_VULKAN_H diff --git a/src/layer/vulkan/noop_vulkan.cpp b/src/layer/vulkan/noop_vulkan.cpp index 92b4b1ea7..4b135951a 100644 --- a/src/layer/vulkan/noop_vulkan.cpp +++ b/src/layer/vulkan/noop_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "noop_vulkan.h" diff --git a/src/layer/vulkan/noop_vulkan.h b/src/layer/vulkan/noop_vulkan.h index 8e45d643f..a9f0034ac 100644 --- a/src/layer/vulkan/noop_vulkan.h +++ b/src/layer/vulkan/noop_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_NOOP_VULKAN_H #define LAYER_NOOP_VULKAN_H diff --git a/src/layer/vulkan/normalize_vulkan.cpp b/src/layer/vulkan/normalize_vulkan.cpp index 254fa40ee..225046e92 100644 --- a/src/layer/vulkan/normalize_vulkan.cpp +++ b/src/layer/vulkan/normalize_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "normalize_vulkan.h" diff --git a/src/layer/vulkan/normalize_vulkan.h b/src/layer/vulkan/normalize_vulkan.h index 5357eb5d3..4c72607ce 100644 --- a/src/layer/vulkan/normalize_vulkan.h +++ b/src/layer/vulkan/normalize_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_NORMALIZE_VULKAN_H #define LAYER_NORMALIZE_VULKAN_H diff --git a/src/layer/vulkan/packing_vulkan.cpp b/src/layer/vulkan/packing_vulkan.cpp index aba9c6557..8a8d2386b 100644 --- a/src/layer/vulkan/packing_vulkan.cpp +++ b/src/layer/vulkan/packing_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "packing_vulkan.h" diff --git a/src/layer/vulkan/packing_vulkan.h b/src/layer/vulkan/packing_vulkan.h index 69c6ddcef..0e8f1ad78 100644 --- a/src/layer/vulkan/packing_vulkan.h +++ b/src/layer/vulkan/packing_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PACKING_VULKAN_H #define LAYER_PACKING_VULKAN_H diff --git a/src/layer/vulkan/padding_vulkan.cpp b/src/layer/vulkan/padding_vulkan.cpp index eb386bd31..3d270ae98 100644 --- a/src/layer/vulkan/padding_vulkan.cpp +++ b/src/layer/vulkan/padding_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "padding_vulkan.h" diff --git a/src/layer/vulkan/padding_vulkan.h b/src/layer/vulkan/padding_vulkan.h index 44fb5e246..d64864bbf 100644 --- a/src/layer/vulkan/padding_vulkan.h +++ b/src/layer/vulkan/padding_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PADDING_VULKAN_H #define LAYER_PADDING_VULKAN_H diff --git a/src/layer/vulkan/permute_vulkan.cpp b/src/layer/vulkan/permute_vulkan.cpp index 9886b7694..900676737 100644 --- a/src/layer/vulkan/permute_vulkan.cpp +++ b/src/layer/vulkan/permute_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "permute_vulkan.h" diff --git a/src/layer/vulkan/permute_vulkan.h b/src/layer/vulkan/permute_vulkan.h index 6f75c5037..91d4e01bb 100644 --- a/src/layer/vulkan/permute_vulkan.h +++ b/src/layer/vulkan/permute_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PERMUTE_VULKAN_H #define LAYER_PERMUTE_VULKAN_H diff --git a/src/layer/vulkan/pixelshuffle_vulkan.cpp b/src/layer/vulkan/pixelshuffle_vulkan.cpp index e9f2f43cf..4fbeee954 100644 --- a/src/layer/vulkan/pixelshuffle_vulkan.cpp +++ b/src/layer/vulkan/pixelshuffle_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pixelshuffle_vulkan.h" diff --git a/src/layer/vulkan/pixelshuffle_vulkan.h b/src/layer/vulkan/pixelshuffle_vulkan.h index 742515953..ed207f41b 100644 --- a/src/layer/vulkan/pixelshuffle_vulkan.h +++ b/src/layer/vulkan/pixelshuffle_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PIXELSHUFFLE_VULKAN_H #define LAYER_PIXELSHUFFLE_VULKAN_H diff --git a/src/layer/vulkan/pooling_vulkan.cpp b/src/layer/vulkan/pooling_vulkan.cpp index 73d870fd3..10c0393aa 100644 --- a/src/layer/vulkan/pooling_vulkan.cpp +++ b/src/layer/vulkan/pooling_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_vulkan.h" diff --git a/src/layer/vulkan/pooling_vulkan.h b/src/layer/vulkan/pooling_vulkan.h index 1d6f9775e..dfd8246aa 100644 --- a/src/layer/vulkan/pooling_vulkan.h +++ b/src/layer/vulkan/pooling_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING_VULKAN_H #define LAYER_POOLING_VULKAN_H diff --git a/src/layer/vulkan/prelu_vulkan.cpp b/src/layer/vulkan/prelu_vulkan.cpp index aaa485645..19b05343d 100644 --- a/src/layer/vulkan/prelu_vulkan.cpp +++ b/src/layer/vulkan/prelu_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_vulkan.h" diff --git a/src/layer/vulkan/prelu_vulkan.h b/src/layer/vulkan/prelu_vulkan.h index 89fce0e23..4bf14c0ba 100644 --- a/src/layer/vulkan/prelu_vulkan.h +++ b/src/layer/vulkan/prelu_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRELU_VULKAN_H #define LAYER_PRELU_VULKAN_H diff --git a/src/layer/vulkan/priorbox_vulkan.cpp b/src/layer/vulkan/priorbox_vulkan.cpp index cbf843abd..2eb3bd3f1 100644 --- a/src/layer/vulkan/priorbox_vulkan.cpp +++ b/src/layer/vulkan/priorbox_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "priorbox_vulkan.h" diff --git a/src/layer/vulkan/priorbox_vulkan.h b/src/layer/vulkan/priorbox_vulkan.h index 394b12d0f..93f6936e2 100644 --- a/src/layer/vulkan/priorbox_vulkan.h +++ b/src/layer/vulkan/priorbox_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRIORBOX_VULKAN_H #define LAYER_PRIORBOX_VULKAN_H diff --git a/src/layer/vulkan/quantize_vulkan.cpp b/src/layer/vulkan/quantize_vulkan.cpp index 8ad860147..40ed559ef 100644 --- a/src/layer/vulkan/quantize_vulkan.cpp +++ b/src/layer/vulkan/quantize_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "quantize_vulkan.h" diff --git a/src/layer/vulkan/quantize_vulkan.h b/src/layer/vulkan/quantize_vulkan.h index 9a1963932..bbea82699 100644 --- a/src/layer/vulkan/quantize_vulkan.h +++ b/src/layer/vulkan/quantize_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_QUANTIZE_VULKAN_H #define LAYER_QUANTIZE_VULKAN_H diff --git a/src/layer/vulkan/relu_vulkan.cpp b/src/layer/vulkan/relu_vulkan.cpp index dc5c8ed96..61ca1e528 100644 --- a/src/layer/vulkan/relu_vulkan.cpp +++ b/src/layer/vulkan/relu_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "relu_vulkan.h" @@ -23,8 +12,6 @@ ReLU_vulkan::ReLU_vulkan() support_vulkan = true; pipeline_relu = 0; - pipeline_relu_pack4 = 0; - pipeline_relu_pack8 = 0; } int ReLU_vulkan::create_pipeline(const Option& opt) @@ -52,63 +39,15 @@ int ReLU_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(1 + 5); + std::vector specializations(1 + 1); specializations[0].f = slope; - specializations[1 + 0].i = shape_packed.dims; - specializations[1 + 1].i = shape_packed.w; - specializations[1 + 2].i = shape_packed.h * shape_packed.d; - specializations[1 + 3].i = shape_packed.c; - specializations[1 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_relu = new Pipeline(vkdev); - pipeline_relu->set_optimal_local_size_xyz(local_size_xyz); - pipeline_relu->create(LayerShaderType::relu, opt, specializations); - } + specializations[1 + 0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_relu_pack4 = new Pipeline(vkdev); - pipeline_relu_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_relu_pack4->create(LayerShaderType::relu_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_relu_pack8 = new Pipeline(vkdev); - pipeline_relu_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_relu_pack8->create(LayerShaderType::relu_pack8, opt, specializations); - } + pipeline_relu = new Pipeline(vkdev); + pipeline_relu->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_relu->create(LayerShaderType::relu, opt, specializations); return 0; } @@ -118,34 +57,24 @@ int ReLU_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_relu; pipeline_relu = 0; - delete pipeline_relu_pack4; - pipeline_relu_pack4 = 0; - - delete pipeline_relu_pack8; - pipeline_relu_pack8 = 0; - return 0; } int ReLU_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_relu_pack8 - : elempack == 4 ? pipeline_relu_pack4 - : pipeline_relu; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_relu, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/relu_vulkan.h b/src/layer/vulkan/relu_vulkan.h index 1d886302e..c84d975d9 100644 --- a/src/layer/vulkan/relu_vulkan.h +++ b/src/layer/vulkan/relu_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RELU_VULKAN_H #define LAYER_RELU_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_relu; - Pipeline* pipeline_relu_pack4; - Pipeline* pipeline_relu_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/reorg_vulkan.cpp b/src/layer/vulkan/reorg_vulkan.cpp index b60bca7bc..b06f27201 100644 --- a/src/layer/vulkan/reorg_vulkan.cpp +++ b/src/layer/vulkan/reorg_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reorg_vulkan.h" diff --git a/src/layer/vulkan/reorg_vulkan.h b/src/layer/vulkan/reorg_vulkan.h index 360dfe6fa..b75c71ce9 100644 --- a/src/layer/vulkan/reorg_vulkan.h +++ b/src/layer/vulkan/reorg_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REORG_VULKAN_H #define LAYER_REORG_VULKAN_H diff --git a/src/layer/vulkan/requantize_vulkan.cpp b/src/layer/vulkan/requantize_vulkan.cpp index e85743c4e..5c64746a4 100644 --- a/src/layer/vulkan/requantize_vulkan.cpp +++ b/src/layer/vulkan/requantize_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "requantize_vulkan.h" diff --git a/src/layer/vulkan/requantize_vulkan.h b/src/layer/vulkan/requantize_vulkan.h index c0a86199e..03d439582 100644 --- a/src/layer/vulkan/requantize_vulkan.h +++ b/src/layer/vulkan/requantize_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REQUANTIZE_VULKAN_H #define LAYER_REQUANTIZE_VULKAN_H diff --git a/src/layer/vulkan/reshape_vulkan.cpp b/src/layer/vulkan/reshape_vulkan.cpp index 637a8a16a..2d83b8a86 100644 --- a/src/layer/vulkan/reshape_vulkan.cpp +++ b/src/layer/vulkan/reshape_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reshape_vulkan.h" diff --git a/src/layer/vulkan/reshape_vulkan.h b/src/layer/vulkan/reshape_vulkan.h index bf529f482..267fd285d 100644 --- a/src/layer/vulkan/reshape_vulkan.h +++ b/src/layer/vulkan/reshape_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RESHAPE_VULKAN_H #define LAYER_RESHAPE_VULKAN_H diff --git a/src/layer/vulkan/scale_vulkan.cpp b/src/layer/vulkan/scale_vulkan.cpp index 0f83cede9..edffcd921 100644 --- a/src/layer/vulkan/scale_vulkan.cpp +++ b/src/layer/vulkan/scale_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "scale_vulkan.h" diff --git a/src/layer/vulkan/scale_vulkan.h b/src/layer/vulkan/scale_vulkan.h index 72423c48f..5fc6e97f2 100644 --- a/src/layer/vulkan/scale_vulkan.h +++ b/src/layer/vulkan/scale_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SCALE_VULKAN_H #define LAYER_SCALE_VULKAN_H diff --git a/src/layer/vulkan/shader/absval.comp b/src/layer/vulkan/shader/absval.comp index d1d2546e8..989415929 100644 --- a/src/layer/vulkan/shader/absval.comp +++ b/src/layer/vulkan/shader/absval.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/batchnorm.comp b/src/layer/vulkan/shader/batchnorm.comp index 137da74a5..4fb14f14a 100644 --- a/src/layer/vulkan/shader/batchnorm.comp +++ b/src/layer/vulkan/shader/batchnorm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/batchnorm_pack4.comp b/src/layer/vulkan/shader/batchnorm_pack4.comp index 4a16e0202..f87f6c384 100644 --- a/src/layer/vulkan/shader/batchnorm_pack4.comp +++ b/src/layer/vulkan/shader/batchnorm_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/batchnorm_pack8.comp b/src/layer/vulkan/shader/batchnorm_pack8.comp index d43ac0b58..c3e564453 100644 --- a/src/layer/vulkan/shader/batchnorm_pack8.comp +++ b/src/layer/vulkan/shader/batchnorm_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop.comp b/src/layer/vulkan/shader/binaryop.comp index 8f04c9238..f3efddfa7 100644 --- a/src/layer/vulkan/shader/binaryop.comp +++ b/src/layer/vulkan/shader/binaryop.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop_broadcast.comp b/src/layer/vulkan/shader/binaryop_broadcast.comp index d03917ccd..8d7a04b33 100644 --- a/src/layer/vulkan/shader/binaryop_broadcast.comp +++ b/src/layer/vulkan/shader/binaryop_broadcast.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop_broadcast_pack1to4.comp b/src/layer/vulkan/shader/binaryop_broadcast_pack1to4.comp index 0d46118cd..63178b725 100644 --- a/src/layer/vulkan/shader/binaryop_broadcast_pack1to4.comp +++ b/src/layer/vulkan/shader/binaryop_broadcast_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop_broadcast_pack1to8.comp b/src/layer/vulkan/shader/binaryop_broadcast_pack1to8.comp index d854c7467..68fb4575e 100644 --- a/src/layer/vulkan/shader/binaryop_broadcast_pack1to8.comp +++ b/src/layer/vulkan/shader/binaryop_broadcast_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop_broadcast_pack4.comp b/src/layer/vulkan/shader/binaryop_broadcast_pack4.comp index 66837fbdc..8346da74f 100644 --- a/src/layer/vulkan/shader/binaryop_broadcast_pack4.comp +++ b/src/layer/vulkan/shader/binaryop_broadcast_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop_broadcast_pack8.comp b/src/layer/vulkan/shader/binaryop_broadcast_pack8.comp index 090fb1cac..83c754891 100644 --- a/src/layer/vulkan/shader/binaryop_broadcast_pack8.comp +++ b/src/layer/vulkan/shader/binaryop_broadcast_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop_pack4.comp b/src/layer/vulkan/shader/binaryop_pack4.comp index a0b42a303..367fb25f8 100644 --- a/src/layer/vulkan/shader/binaryop_pack4.comp +++ b/src/layer/vulkan/shader/binaryop_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/binaryop_pack8.comp b/src/layer/vulkan/shader/binaryop_pack8.comp index 5b3ba25e7..f916921d7 100644 --- a/src/layer/vulkan/shader/binaryop_pack8.comp +++ b/src/layer/vulkan/shader/binaryop_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/cast_fp16_to_fp32.comp b/src/layer/vulkan/shader/cast_fp16_to_fp32.comp index 165f00c86..694d9c382 100644 --- a/src/layer/vulkan/shader/cast_fp16_to_fp32.comp +++ b/src/layer/vulkan/shader/cast_fp16_to_fp32.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/cast_fp16_to_fp32_pack4.comp b/src/layer/vulkan/shader/cast_fp16_to_fp32_pack4.comp index ee6124b18..1295df252 100644 --- a/src/layer/vulkan/shader/cast_fp16_to_fp32_pack4.comp +++ b/src/layer/vulkan/shader/cast_fp16_to_fp32_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/cast_fp16_to_fp32_pack8.comp b/src/layer/vulkan/shader/cast_fp16_to_fp32_pack8.comp index c817f8e1e..8e4cea9a4 100644 --- a/src/layer/vulkan/shader/cast_fp16_to_fp32_pack8.comp +++ b/src/layer/vulkan/shader/cast_fp16_to_fp32_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/cast_fp32_to_fp16.comp b/src/layer/vulkan/shader/cast_fp32_to_fp16.comp index 0e26ae7f4..ea9c40316 100644 --- a/src/layer/vulkan/shader/cast_fp32_to_fp16.comp +++ b/src/layer/vulkan/shader/cast_fp32_to_fp16.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/cast_fp32_to_fp16_pack4.comp b/src/layer/vulkan/shader/cast_fp32_to_fp16_pack4.comp index 0f1d66b36..1141333f1 100644 --- a/src/layer/vulkan/shader/cast_fp32_to_fp16_pack4.comp +++ b/src/layer/vulkan/shader/cast_fp32_to_fp16_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/cast_fp32_to_fp16_pack8.comp b/src/layer/vulkan/shader/cast_fp32_to_fp16_pack8.comp index ccc02fa2a..8ab9d40a9 100644 --- a/src/layer/vulkan/shader/cast_fp32_to_fp16_pack8.comp +++ b/src/layer/vulkan/shader/cast_fp32_to_fp16_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/celu.comp b/src/layer/vulkan/shader/celu.comp index 6b4d5003e..612a44a91 100644 --- a/src/layer/vulkan/shader/celu.comp +++ b/src/layer/vulkan/shader/celu.comp @@ -1,53 +1,30 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const float alpha = 0; #define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + const uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - afp v = buffer_ld1(bottom_top_blob_data, gi); + v = max(v, afpvec4(0.0f)) + min(alpha * (exp(v / afpvec4(alpha)) - afpvec4(1.0f)), afpvec4(0.0f)); - v = max(v, afp(0.0f)) + min(alpha * (exp(v / alpha) - 1.0f), afp(0.0f)); - - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/celu_pack4.comp b/src/layer/vulkan/shader/celu_pack4.comp deleted file mode 100644 index 1e641e619..000000000 --- a/src/layer/vulkan/shader/celu_pack4.comp +++ /dev/null @@ -1,53 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = max(v, afp(0.0f)) + min(alpha * (exp(v / alpha) - 1.0f), afp(0.0f)); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/celu_pack8.comp b/src/layer/vulkan/shader/celu_pack8.comp deleted file mode 100644 index 31974c91e..000000000 --- a/src/layer/vulkan/shader/celu_pack8.comp +++ /dev/null @@ -1,54 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = max(v[0], afp(0.0f)) + min(alpha * (exp(v[0] / alpha) - 1.0f), afp(0.0f)); - v[1] = max(v[1], afp(0.0f)) + min(alpha*(exp(v[1]/alpha)-1), afp(0.0f)); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/clip.comp b/src/layer/vulkan/shader/clip.comp index 8c676fe6c..a768be169 100644 --- a/src/layer/vulkan/shader/clip.comp +++ b/src/layer/vulkan/shader/clip.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -18,37 +7,25 @@ layout (constant_id = 0) const float const_min = 0; layout (constant_id = 1) const float const_max = 0; #define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + const uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; + if (gi >= psc(n)) + return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - afp v = buffer_ld1(bottom_top_blob_data, gi); + v = clamp(v, afpvec4(const_min), afpvec4(const_max)); - v = clamp(v, afp(const_min), afp(const_max)); - - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/clip_pack4.comp b/src/layer/vulkan/shader/clip_pack4.comp deleted file mode 100644 index 360485194..000000000 --- a/src/layer/vulkan/shader/clip_pack4.comp +++ /dev/null @@ -1,54 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float const_min = 0; -layout (constant_id = 1) const float const_max = 0; - -#define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = clamp(v, afp(const_min), afp(const_max)); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/clip_pack8.comp b/src/layer/vulkan/shader/clip_pack8.comp deleted file mode 100644 index 7cc7b0eb4..000000000 --- a/src/layer/vulkan/shader/clip_pack8.comp +++ /dev/null @@ -1,55 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float const_min = 0; -layout (constant_id = 1) const float const_max = 0; - -#define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = clamp(v[0], afp(const_min), afp(const_max)); - v[1] = clamp(v[1], afp(const_min), afp(const_max)); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/concat.comp b/src/layer/vulkan/shader/concat.comp index 6b53832ff..5fe6ceae9 100644 --- a/src/layer/vulkan/shader/concat.comp +++ b/src/layer/vulkan/shader/concat.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/concat_pack4.comp b/src/layer/vulkan/shader/concat_pack4.comp index 3775facb7..b85cce564 100644 --- a/src/layer/vulkan/shader/concat_pack4.comp +++ b/src/layer/vulkan/shader/concat_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/concat_pack4to1.comp b/src/layer/vulkan/shader/concat_pack4to1.comp index 71c4ce0a5..da5d18d4c 100644 --- a/src/layer/vulkan/shader/concat_pack4to1.comp +++ b/src/layer/vulkan/shader/concat_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/concat_pack8.comp b/src/layer/vulkan/shader/concat_pack8.comp index c7a51f905..b694a8a2a 100644 --- a/src/layer/vulkan/shader/concat_pack8.comp +++ b/src/layer/vulkan/shader/concat_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/concat_pack8to1.comp b/src/layer/vulkan/shader/concat_pack8to1.comp index 11daca81e..a530df4ce 100644 --- a/src/layer/vulkan/shader/concat_pack8to1.comp +++ b/src/layer/vulkan/shader/concat_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/concat_pack8to4.comp b/src/layer/vulkan/shader/concat_pack8to4.comp index e9c930bdf..ebb7e9f6b 100644 --- a/src/layer/vulkan/shader/concat_pack8to4.comp +++ b/src/layer/vulkan/shader/concat_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution.comp b/src/layer/vulkan/shader/convolution.comp index 7f7023d35..6e09c872c 100644 --- a/src/layer/vulkan/shader/convolution.comp +++ b/src/layer/vulkan/shader/convolution.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d.comp b/src/layer/vulkan/shader/convolution1d.comp index 7c22460ae..268691d19 100644 --- a/src/layer/vulkan/shader/convolution1d.comp +++ b/src/layer/vulkan/shader/convolution1d.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack1to4.comp b/src/layer/vulkan/shader/convolution1d_pack1to4.comp index 9ed0a13d8..ef03652fc 100644 --- a/src/layer/vulkan/shader/convolution1d_pack1to4.comp +++ b/src/layer/vulkan/shader/convolution1d_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack1to8.comp b/src/layer/vulkan/shader/convolution1d_pack1to8.comp index 2599ce596..dbe4cf253 100644 --- a/src/layer/vulkan/shader/convolution1d_pack1to8.comp +++ b/src/layer/vulkan/shader/convolution1d_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack4.comp b/src/layer/vulkan/shader/convolution1d_pack4.comp index 0257a36ca..f9a8173cb 100644 --- a/src/layer/vulkan/shader/convolution1d_pack4.comp +++ b/src/layer/vulkan/shader/convolution1d_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack4to1.comp b/src/layer/vulkan/shader/convolution1d_pack4to1.comp index f73113632..3762075f9 100644 --- a/src/layer/vulkan/shader/convolution1d_pack4to1.comp +++ b/src/layer/vulkan/shader/convolution1d_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack4to8.comp b/src/layer/vulkan/shader/convolution1d_pack4to8.comp index efe0af49e..9c6f1457e 100644 --- a/src/layer/vulkan/shader/convolution1d_pack4to8.comp +++ b/src/layer/vulkan/shader/convolution1d_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack8.comp b/src/layer/vulkan/shader/convolution1d_pack8.comp index be59da3b5..98b058e38 100644 --- a/src/layer/vulkan/shader/convolution1d_pack8.comp +++ b/src/layer/vulkan/shader/convolution1d_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack8to1.comp b/src/layer/vulkan/shader/convolution1d_pack8to1.comp index 73b6cef9a..dbc641cfd 100644 --- a/src/layer/vulkan/shader/convolution1d_pack8to1.comp +++ b/src/layer/vulkan/shader/convolution1d_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution1d_pack8to4.comp b/src/layer/vulkan/shader/convolution1d_pack8to4.comp index 851d4bf13..7efc25482 100644 --- a/src/layer/vulkan/shader/convolution1d_pack8to4.comp +++ b/src/layer/vulkan/shader/convolution1d_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_1x1s1d1.comp index 22c586d55..e22a44921 100644 --- a/src/layer/vulkan/shader/convolution_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_1x1s1d1_cm.comp b/src/layer/vulkan/shader/convolution_1x1s1d1_cm.comp new file mode 100644 index 000000000..ac003a7cb --- /dev/null +++ b/src/layer/vulkan/shader/convolution_1x1s1d1_cm.comp @@ -0,0 +1,1237 @@ +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause + +#version 450 + +#extension GL_GOOGLE_include_directive: require +#include "vulkan_activation.comp" + +#extension GL_EXT_control_flow_attributes: require + +#extension GL_KHR_shader_subgroup_basic: require + +#extension GL_KHR_memory_scope_semantics: require +#extension GL_EXT_shader_explicit_arithmetic_types: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#if ncnn_VK_KHR_cooperative_matrix +#extension GL_KHR_cooperative_matrix: require +#elif ncnn_VK_NV_cooperative_matrix +#extension GL_NV_cooperative_matrix: require +#endif + +layout (constant_id = 0) const int bias_term = 0; +layout (constant_id = 1) const int activation_type = 0; +layout (constant_id = 2) const float activation_param_0 = 0; +layout (constant_id = 3) const float activation_param_1 = 0; +layout (constant_id = 4) const uint M = 1; +layout (constant_id = 5) const uint N = 1; +layout (constant_id = 6) const uint K = 1; +layout (constant_id = 7) const uint UNROLL_SG_M = 2; +layout (constant_id = 8) const uint UNROLL_SG_N = 2; +layout (constant_id = 9) const uint UNROLL_SG_K = 2; +layout (constant_id = 10) const uint UNROLL_WG_M = 2; +layout (constant_id = 11) const uint UNROLL_WG_N = 2; +layout (constant_id = 12) const uint inch = 1; +layout (constant_id = 13) const uint outch = 1; +layout (constant_id = 14) const uint elempack = 1; +layout (constant_id = 15) const uint out_elempack = 1; + +#define shape_constant_id_offset 16 +layout (constant_id = shape_constant_id_offset + 0) const uint size = 0; +layout (constant_id = shape_constant_id_offset + 1) const uint cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const uint outcstep = 0; + +layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; +layout (binding = 1) writeonly buffer top_blob { uvec2 top_blob_data[]; }; +layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; +layout (binding = 3) readonly buffer bias_blob { uvec2 bias_data[]; }; + +layout (push_constant) uniform parameter +{ + uint size; + uint cstep; + uint outcstep; +} p; + +shared uvec2 tmp_v[UNROLL_WG_M][UNROLL_SG_M * UNROLL_SG_K * M * K / 4]; + +shared uvec2 tmp_k[UNROLL_WG_N][UNROLL_SG_N * UNROLL_SG_K * K * N / 4]; + +shared uvec2 tmp_o[UNROLL_WG_N * UNROLL_WG_M][UNROLL_SG_N * UNROLL_SG_M * M * N / 4]; + +void main() +{ + // assert gl_WorkGroupSize.x == gl_SubgroupSize + // but neither gl_SubgroupSize nor gl_WorkGroupSize.x is a constant + const uint local_size = ncnn_subgroupSize * UNROLL_WG_M * UNROLL_WG_N; + + // [ WG_UN * WG_UM * [ SG_UN * SG_UM * subgroup ] ] + + // <----WG_UN----> + // +---N--+-SG_UN+------+------+ + // | | | |XXXXXX| + // M | XXXX<----coopmat + // | | | |XXXXXX| + // +-- --SG0-- --+-- --SG2-- --+ + // | | | | | + // SG_UM | | + // | | | | | + // ^ +------+--WORKGROUP--+------+ + // | | | | | | + // | | | | + // | | | | | | + // WG_UM+-- --SG1-- --+-- --SG3-- --+ + // | | | | | | + // | | | | + // | | | | | | + // v +------+------+------+------+ + // + + const uint wgi = gl_WorkGroupID.x; + const uint sgi = gl_SubgroupID; + + const uint wgmm = (psc(size) + M * UNROLL_SG_M * UNROLL_WG_M - 1) / (M * UNROLL_SG_M * UNROLL_WG_M); + const uint wgnn = (outch + N * UNROLL_SG_N * UNROLL_WG_N - 1) / (N * UNROLL_SG_N * UNROLL_WG_N); + + const uint wgmi = wgi / wgnn; + const uint wgni = wgi % wgnn; + + const uint sgmi = sgi / UNROLL_WG_N; + const uint sgni = sgi % UNROLL_WG_N; + +// const uint mm = (psc(size) + M - 1) / M; +// const uint nn = (outch + N - 1) / N; + const uint kk = (inch + K - 1) / K; + + if (wgmi >= wgmm) + return; + + const uint li = gl_LocalInvocationID.x; + const uint si = gl_SubgroupInvocationID; + + const uint Md4 = M / 4; + const uint Nd4 = N / 4; + const uint Kd4 = K / 4; + + const uint ni = (wgni * UNROLL_WG_N + sgni) * UNROLL_SG_N; + const uint mi = (wgmi * UNROLL_WG_M + sgmi) * UNROLL_SG_M; + +#if ncnn_VK_KHR_cooperative_matrix + coopmat sum[UNROLL_SG_N][UNROLL_SG_M]; +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#else + fcoopmatNV<32, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#endif +#endif + + if (bias_term == 1) + { + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopmat bias; + coopMatLoad(bias, bias_data, ((wgni* UNROLL_WG_N + sgni) * UNROLL_SG_N + zn) * Nd4, 0, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, N> bias; + coopMatLoadNV(bias, bias_data, ((wgni* UNROLL_WG_N + sgni) * UNROLL_SG_N + zn) * Nd4, 0, false); +#endif + + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if NCNN_fp16_arithmetic + sum[zn][zm] = bias; +#else +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopmat(bias); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = fcoopmatNV<32, gl_ScopeSubgroup, M, N>(bias); +#endif +#endif + } + } + } + else + { + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopmat(0.f); +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + sum[zn][zm] = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(0.f); +#else + sum[zn][zm] = fcoopmatNV<32, gl_ScopeSubgroup, M, N>(0.f); +#endif +#endif + } + } + } + + uint k = 0; + + if (kk >= UNROLL_SG_K * 2) + { + // local stack and shared memory ping-pong + + // prefetch + uvec2 prefetch_tmp_v[(UNROLL_SG_M * UNROLL_SG_K * M * K / 4 + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N)]; + uvec2 prefetch_tmp_k[(UNROLL_SG_N * UNROLL_SG_K * K * N / 4 + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M)]; + + // prefetch the very first + { + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_data[w_offset + siq]; + } + } + } + } + + k += UNROLL_SG_K; + + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) + { + barrier(); + + // copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + + // prefetch the next + { + const uint ki = k * K; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_data[w_offset + siq]; + } + } + } + } + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + + barrier(); + + // the last copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + else if (kk >= UNROLL_SG_K) + { + // no ping-pong version + + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = weight_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + k += UNROLL_SG_K; + } + + for (; k < kk; k++) + { + const uint ki = k * K; + + barrier(); + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM = Md4 * K * UNROLL_SG_M; + const uint Md4_K_USGM_d_subgroupsize = (Md4_K_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM) + { + const uint zm = siq / (Md4 * K); + const uint ij = siq % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM = Kd4 * M * UNROLL_SG_M; + const uint Kd4_M_USGM_d_subgroupsize = (Kd4_M_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM) + { + const uint zmi = siq / Kd4; + const uint j = siq % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + + const uint w_offset = ((wgni * kk + k) * UNROLL_WG_N + sgni) * Nd4_K_USGN; + + const uint Nd4_K_USGN_d_subgroupsize = (Nd4_K_USGN + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN) + { + tmp_k[sgni][siq] = weight_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (out_elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#endif +#endif + } + else // if (out_elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#endif +#endif + } + } + } + + barrier(); + + // store top_blob + { + if (out_elempack == 1) + { + // +-M-+ + // N | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UN+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +- -+ + // | | | + // | +- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint outcstepd4 = psc(outcstep) / 4; + + const uint Md4_N_USGM_USGN = Md4 * N * UNROLL_SG_M * UNROLL_SG_N; + const uint Md4_N_USGM_USGN_d_subgroupsize = (Md4_N_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Md4_N_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Md4_N_USGM_USGN % ncnn_subgroupSize == 0 || siq < Md4_N_USGM_USGN) + { + const uint zn = siq / (Md4 * N * UNROLL_SG_M); + const uint zmij = siq % (Md4 * N * UNROLL_SG_M); + const uint zm = zmij / (Md4 * N); + const uint ij = zmij % (Md4 * N); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gn = (ni + zn) * N + i; + const uint gm = (mi + zm) * Md4 + j; + + if (gn < outch && gm < outcstepd4) + { + uvec2 sum = tmp_o[sgi][siq]; + + if (activation_type == 0) + { + top_blob_data[gn * outcstepd4 + gm] = sum; + } + else + { + afpvec4 v = afpvec4(unpackHalf2x16(sum.r), unpackHalf2x16(sum.g)); + + v = activation_afpvec4(v, activation_type, activation_param_0, activation_param_1); + + top_blob_data[gn * outcstepd4 + gm] = uvec2(packHalf2x16(vec4(v).rg), packHalf2x16(vec4(v).ba)); + } + } + } + } + } + else // if (out_elempack == 4) + { + // +-N-+ + // M | + // +---+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UN+---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // v +---+ + + const uint outchd4 = outch / 4; + + const uint Nd4_M_USGM_USGN = Nd4 * M * UNROLL_SG_M * UNROLL_SG_N; + const uint Nd4_M_USGM_USGN_d_subgroupsize = (Nd4_M_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Nd4_M_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Nd4_M_USGM_USGN % ncnn_subgroupSize == 0 || siq < Nd4_M_USGM_USGN) + { + const uint zn = siq / (Nd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Nd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Nd4; + const uint j = zmij % Nd4; + + const uint gn = (ni + zn) * Nd4 + j; + const uint gm = mi * M + zmi; + + if (gn < outchd4 && gm < psc(outcstep)) + { + uvec2 sum = tmp_o[sgi][siq]; + + if (activation_type == 0) + { + top_blob_data[gn * psc(outcstep) + gm] = sum; + } + else + { + afpvec4 v = afpvec4(unpackHalf2x16(sum.r), unpackHalf2x16(sum.g)); + + v = activation_afpvec4(v, activation_type, activation_param_0, activation_param_1); + + top_blob_data[gn * psc(outcstep) + gm] = uvec2(packHalf2x16(vec4(v).rg), packHalf2x16(vec4(v).ba)); + } + } + } + } + } + } +} diff --git a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_input.comp b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_input.comp index f43093eed..acbb45da3 100644 --- a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_input.comp +++ b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_input.comp @@ -1,29 +1,19 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 +layout (constant_id = 0) const int c = 0; + +#define shape_constant_id_offset 1 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outcstep = 0; -layout (constant_id = shape_constant_id_offset + 5) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 6) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 4) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 5) const int block_y = 0; layout (binding = 0) readonly buffer bottom_blob { sfp bottom_blob_data[]; }; layout (binding = 1) writeonly buffer bottom_tm_blob { sfp bottom_tm_blob_data[]; }; @@ -32,7 +22,6 @@ layout (push_constant) uniform parameter { int w; int h; - int c; int cstep; int outcstep; @@ -47,7 +36,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 4x4 @@ -126,22 +115,22 @@ void main() v33 = m33 - m31; // store 16 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - buffer_st1(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep), v00); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep), v01); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep), v02); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep), v03); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep), v10); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep), v11); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep), v12); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep), v13); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep), v20); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep), v21); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep), v22); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep), v23); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep), v30); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep), v31); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep), v32); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep), v33); + int v_tm_offset = gz * psc(outcstep) + gy * psc(block_x) + gx; + + buffer_st1(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep) * c, v00); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep) * c, v01); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep) * c, v02); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep) * c, v03); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep) * c, v10); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep) * c, v11); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep) * c, v12); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep) * c, v13); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep) * c, v20); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep) * c, v21); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep) * c, v22); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep) * c, v23); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep) * c, v30); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep) * c, v31); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep) * c, v32); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep) * c, v33); } diff --git a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_output.comp b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_output.comp index 2dfb98b11..5e970635d 100644 --- a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_output.comp +++ b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd23_transform_output.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -21,17 +10,17 @@ layout (constant_id = 0) const int bias_term = 0; layout (constant_id = 1) const int activation_type = 0; layout (constant_id = 2) const float activation_param_0 = 0; layout (constant_id = 3) const float activation_param_1 = 0; +layout (constant_id = 4) const int c = 0; -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; +#define shape_constant_id_offset 5 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 3) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 1) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 2) const int block_y = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer top_tm_blob { sfp top_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_blob { sfp top_blob_data[]; }; @@ -39,7 +28,6 @@ layout (binding = 2) readonly buffer bias_blob { sfp bias_data[]; }; layout (push_constant) uniform parameter { - int c; int cstep; int block_x; @@ -56,28 +44,28 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 16 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - afp v00 = buffer_ld1(top_tm_blob_data, v_tm_offset + 0 * psc(cstep)); - afp v01 = buffer_ld1(top_tm_blob_data, v_tm_offset + 1 * psc(cstep)); - afp v02 = buffer_ld1(top_tm_blob_data, v_tm_offset + 2 * psc(cstep)); - afp v03 = buffer_ld1(top_tm_blob_data, v_tm_offset + 3 * psc(cstep)); - afp v10 = buffer_ld1(top_tm_blob_data, v_tm_offset + 4 * psc(cstep)); - afp v11 = buffer_ld1(top_tm_blob_data, v_tm_offset + 5 * psc(cstep)); - afp v12 = buffer_ld1(top_tm_blob_data, v_tm_offset + 6 * psc(cstep)); - afp v13 = buffer_ld1(top_tm_blob_data, v_tm_offset + 7 * psc(cstep)); - afp v20 = buffer_ld1(top_tm_blob_data, v_tm_offset + 8 * psc(cstep)); - afp v21 = buffer_ld1(top_tm_blob_data, v_tm_offset + 9 * psc(cstep)); - afp v22 = buffer_ld1(top_tm_blob_data, v_tm_offset + 10 * psc(cstep)); - afp v23 = buffer_ld1(top_tm_blob_data, v_tm_offset + 11 * psc(cstep)); - afp v30 = buffer_ld1(top_tm_blob_data, v_tm_offset + 12 * psc(cstep)); - afp v31 = buffer_ld1(top_tm_blob_data, v_tm_offset + 13 * psc(cstep)); - afp v32 = buffer_ld1(top_tm_blob_data, v_tm_offset + 14 * psc(cstep)); - afp v33 = buffer_ld1(top_tm_blob_data, v_tm_offset + 15 * psc(cstep)); + int v_tm_offset = gz * psc(cstep) + gy * psc(block_x) + gx; + + afp v00 = buffer_ld1(top_tm_blob_data, v_tm_offset + 0 * psc(cstep) * c); + afp v01 = buffer_ld1(top_tm_blob_data, v_tm_offset + 1 * psc(cstep) * c); + afp v02 = buffer_ld1(top_tm_blob_data, v_tm_offset + 2 * psc(cstep) * c); + afp v03 = buffer_ld1(top_tm_blob_data, v_tm_offset + 3 * psc(cstep) * c); + afp v10 = buffer_ld1(top_tm_blob_data, v_tm_offset + 4 * psc(cstep) * c); + afp v11 = buffer_ld1(top_tm_blob_data, v_tm_offset + 5 * psc(cstep) * c); + afp v12 = buffer_ld1(top_tm_blob_data, v_tm_offset + 6 * psc(cstep) * c); + afp v13 = buffer_ld1(top_tm_blob_data, v_tm_offset + 7 * psc(cstep) * c); + afp v20 = buffer_ld1(top_tm_blob_data, v_tm_offset + 8 * psc(cstep) * c); + afp v21 = buffer_ld1(top_tm_blob_data, v_tm_offset + 9 * psc(cstep) * c); + afp v22 = buffer_ld1(top_tm_blob_data, v_tm_offset + 10 * psc(cstep) * c); + afp v23 = buffer_ld1(top_tm_blob_data, v_tm_offset + 11 * psc(cstep) * c); + afp v30 = buffer_ld1(top_tm_blob_data, v_tm_offset + 12 * psc(cstep) * c); + afp v31 = buffer_ld1(top_tm_blob_data, v_tm_offset + 13 * psc(cstep) * c); + afp v32 = buffer_ld1(top_tm_blob_data, v_tm_offset + 14 * psc(cstep) * c); + afp v33 = buffer_ld1(top_tm_blob_data, v_tm_offset + 15 * psc(cstep) * c); // const float itm[2][4] = { // {1.0f, 1.0f, 1.0f, 0.0f}, diff --git a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_input.comp b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_input.comp index b4a1de9b4..62478297e 100644 --- a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_input.comp +++ b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_input.comp @@ -1,29 +1,19 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 +layout (constant_id = 0) const int c = 0; + +#define shape_constant_id_offset 1 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outcstep = 0; -layout (constant_id = shape_constant_id_offset + 5) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 6) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 4) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 5) const int block_y = 0; layout (binding = 0) readonly buffer bottom_blob { sfp bottom_blob_data[]; }; layout (binding = 1) writeonly buffer bottom_tm_blob { sfp bottom_tm_blob_data[]; }; @@ -32,7 +22,6 @@ layout (push_constant) uniform parameter { int w; int h; - int c; int cstep; int outcstep; @@ -47,7 +36,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 6x6 @@ -198,42 +187,42 @@ void main() v55 = m51 - m53 * afp(2.5) + m55; // store 36 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - buffer_st1(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep), v00); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep), v01); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep), v02); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep), v03); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep), v04); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep), v05); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep), v10); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep), v11); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep), v12); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep), v13); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep), v14); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep), v15); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep), v20); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep), v21); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep), v22); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep), v23); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 16 * psc(outcstep), v24); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 17 * psc(outcstep), v25); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 18 * psc(outcstep), v30); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 19 * psc(outcstep), v31); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 20 * psc(outcstep), v32); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 21 * psc(outcstep), v33); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 22 * psc(outcstep), v34); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 23 * psc(outcstep), v35); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 24 * psc(outcstep), v40); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 25 * psc(outcstep), v41); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 26 * psc(outcstep), v42); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 27 * psc(outcstep), v43); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 28 * psc(outcstep), v44); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 29 * psc(outcstep), v45); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 30 * psc(outcstep), v50); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 31 * psc(outcstep), v51); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 32 * psc(outcstep), v52); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 33 * psc(outcstep), v53); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 34 * psc(outcstep), v54); - buffer_st1(bottom_tm_blob_data, v_tm_offset + 35 * psc(outcstep), v55); + int v_tm_offset = gz * psc(outcstep) + gy * psc(block_x) + gx; + + buffer_st1(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep) * c, v00); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep) * c, v01); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep) * c, v02); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep) * c, v03); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep) * c, v04); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep) * c, v05); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep) * c, v10); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep) * c, v11); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep) * c, v12); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep) * c, v13); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep) * c, v14); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep) * c, v15); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep) * c, v20); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep) * c, v21); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep) * c, v22); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep) * c, v23); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 16 * psc(outcstep) * c, v24); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 17 * psc(outcstep) * c, v25); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 18 * psc(outcstep) * c, v30); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 19 * psc(outcstep) * c, v31); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 20 * psc(outcstep) * c, v32); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 21 * psc(outcstep) * c, v33); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 22 * psc(outcstep) * c, v34); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 23 * psc(outcstep) * c, v35); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 24 * psc(outcstep) * c, v40); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 25 * psc(outcstep) * c, v41); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 26 * psc(outcstep) * c, v42); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 27 * psc(outcstep) * c, v43); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 28 * psc(outcstep) * c, v44); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 29 * psc(outcstep) * c, v45); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 30 * psc(outcstep) * c, v50); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 31 * psc(outcstep) * c, v51); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 32 * psc(outcstep) * c, v52); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 33 * psc(outcstep) * c, v53); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 34 * psc(outcstep) * c, v54); + buffer_st1(bottom_tm_blob_data, v_tm_offset + 35 * psc(outcstep) * c, v55); } diff --git a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_output.comp b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_output.comp index 5ed7696a6..914632cc3 100644 --- a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_output.comp +++ b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd43_transform_output.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -21,17 +10,17 @@ layout (constant_id = 0) const int bias_term = 0; layout (constant_id = 1) const int activation_type = 0; layout (constant_id = 2) const float activation_param_0 = 0; layout (constant_id = 3) const float activation_param_1 = 0; +layout (constant_id = 4) const int c = 0; -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; +#define shape_constant_id_offset 5 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 3) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 1) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 2) const int block_y = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer top_tm_blob { sfp top_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_blob { sfp top_blob_data[]; }; @@ -39,7 +28,6 @@ layout (binding = 2) readonly buffer bias_blob { sfp bias_data[]; }; layout (push_constant) uniform parameter { - int c; int cstep; int block_x; @@ -56,48 +44,48 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 36 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - afp v00 = buffer_ld1(top_tm_blob_data, v_tm_offset + 0 * psc(cstep)); - afp v01 = buffer_ld1(top_tm_blob_data, v_tm_offset + 1 * psc(cstep)); - afp v02 = buffer_ld1(top_tm_blob_data, v_tm_offset + 2 * psc(cstep)); - afp v03 = buffer_ld1(top_tm_blob_data, v_tm_offset + 3 * psc(cstep)); - afp v04 = buffer_ld1(top_tm_blob_data, v_tm_offset + 4 * psc(cstep)); - afp v05 = buffer_ld1(top_tm_blob_data, v_tm_offset + 5 * psc(cstep)); - afp v10 = buffer_ld1(top_tm_blob_data, v_tm_offset + 6 * psc(cstep)); - afp v11 = buffer_ld1(top_tm_blob_data, v_tm_offset + 7 * psc(cstep)); - afp v12 = buffer_ld1(top_tm_blob_data, v_tm_offset + 8 * psc(cstep)); - afp v13 = buffer_ld1(top_tm_blob_data, v_tm_offset + 9 * psc(cstep)); - afp v14 = buffer_ld1(top_tm_blob_data, v_tm_offset + 10 * psc(cstep)); - afp v15 = buffer_ld1(top_tm_blob_data, v_tm_offset + 11 * psc(cstep)); - afp v20 = buffer_ld1(top_tm_blob_data, v_tm_offset + 12 * psc(cstep)); - afp v21 = buffer_ld1(top_tm_blob_data, v_tm_offset + 13 * psc(cstep)); - afp v22 = buffer_ld1(top_tm_blob_data, v_tm_offset + 14 * psc(cstep)); - afp v23 = buffer_ld1(top_tm_blob_data, v_tm_offset + 15 * psc(cstep)); - afp v24 = buffer_ld1(top_tm_blob_data, v_tm_offset + 16 * psc(cstep)); - afp v25 = buffer_ld1(top_tm_blob_data, v_tm_offset + 17 * psc(cstep)); - afp v30 = buffer_ld1(top_tm_blob_data, v_tm_offset + 18 * psc(cstep)); - afp v31 = buffer_ld1(top_tm_blob_data, v_tm_offset + 19 * psc(cstep)); - afp v32 = buffer_ld1(top_tm_blob_data, v_tm_offset + 20 * psc(cstep)); - afp v33 = buffer_ld1(top_tm_blob_data, v_tm_offset + 21 * psc(cstep)); - afp v34 = buffer_ld1(top_tm_blob_data, v_tm_offset + 22 * psc(cstep)); - afp v35 = buffer_ld1(top_tm_blob_data, v_tm_offset + 23 * psc(cstep)); - afp v40 = buffer_ld1(top_tm_blob_data, v_tm_offset + 24 * psc(cstep)); - afp v41 = buffer_ld1(top_tm_blob_data, v_tm_offset + 25 * psc(cstep)); - afp v42 = buffer_ld1(top_tm_blob_data, v_tm_offset + 26 * psc(cstep)); - afp v43 = buffer_ld1(top_tm_blob_data, v_tm_offset + 27 * psc(cstep)); - afp v44 = buffer_ld1(top_tm_blob_data, v_tm_offset + 28 * psc(cstep)); - afp v45 = buffer_ld1(top_tm_blob_data, v_tm_offset + 29 * psc(cstep)); - afp v50 = buffer_ld1(top_tm_blob_data, v_tm_offset + 30 * psc(cstep)); - afp v51 = buffer_ld1(top_tm_blob_data, v_tm_offset + 31 * psc(cstep)); - afp v52 = buffer_ld1(top_tm_blob_data, v_tm_offset + 32 * psc(cstep)); - afp v53 = buffer_ld1(top_tm_blob_data, v_tm_offset + 33 * psc(cstep)); - afp v54 = buffer_ld1(top_tm_blob_data, v_tm_offset + 34 * psc(cstep)); - afp v55 = buffer_ld1(top_tm_blob_data, v_tm_offset + 35 * psc(cstep)); + int v_tm_offset = gz * psc(cstep) + gy * psc(block_x) + gx; + + afp v00 = buffer_ld1(top_tm_blob_data, v_tm_offset + 0 * psc(cstep) * c); + afp v01 = buffer_ld1(top_tm_blob_data, v_tm_offset + 1 * psc(cstep) * c); + afp v02 = buffer_ld1(top_tm_blob_data, v_tm_offset + 2 * psc(cstep) * c); + afp v03 = buffer_ld1(top_tm_blob_data, v_tm_offset + 3 * psc(cstep) * c); + afp v04 = buffer_ld1(top_tm_blob_data, v_tm_offset + 4 * psc(cstep) * c); + afp v05 = buffer_ld1(top_tm_blob_data, v_tm_offset + 5 * psc(cstep) * c); + afp v10 = buffer_ld1(top_tm_blob_data, v_tm_offset + 6 * psc(cstep) * c); + afp v11 = buffer_ld1(top_tm_blob_data, v_tm_offset + 7 * psc(cstep) * c); + afp v12 = buffer_ld1(top_tm_blob_data, v_tm_offset + 8 * psc(cstep) * c); + afp v13 = buffer_ld1(top_tm_blob_data, v_tm_offset + 9 * psc(cstep) * c); + afp v14 = buffer_ld1(top_tm_blob_data, v_tm_offset + 10 * psc(cstep) * c); + afp v15 = buffer_ld1(top_tm_blob_data, v_tm_offset + 11 * psc(cstep) * c); + afp v20 = buffer_ld1(top_tm_blob_data, v_tm_offset + 12 * psc(cstep) * c); + afp v21 = buffer_ld1(top_tm_blob_data, v_tm_offset + 13 * psc(cstep) * c); + afp v22 = buffer_ld1(top_tm_blob_data, v_tm_offset + 14 * psc(cstep) * c); + afp v23 = buffer_ld1(top_tm_blob_data, v_tm_offset + 15 * psc(cstep) * c); + afp v24 = buffer_ld1(top_tm_blob_data, v_tm_offset + 16 * psc(cstep) * c); + afp v25 = buffer_ld1(top_tm_blob_data, v_tm_offset + 17 * psc(cstep) * c); + afp v30 = buffer_ld1(top_tm_blob_data, v_tm_offset + 18 * psc(cstep) * c); + afp v31 = buffer_ld1(top_tm_blob_data, v_tm_offset + 19 * psc(cstep) * c); + afp v32 = buffer_ld1(top_tm_blob_data, v_tm_offset + 20 * psc(cstep) * c); + afp v33 = buffer_ld1(top_tm_blob_data, v_tm_offset + 21 * psc(cstep) * c); + afp v34 = buffer_ld1(top_tm_blob_data, v_tm_offset + 22 * psc(cstep) * c); + afp v35 = buffer_ld1(top_tm_blob_data, v_tm_offset + 23 * psc(cstep) * c); + afp v40 = buffer_ld1(top_tm_blob_data, v_tm_offset + 24 * psc(cstep) * c); + afp v41 = buffer_ld1(top_tm_blob_data, v_tm_offset + 25 * psc(cstep) * c); + afp v42 = buffer_ld1(top_tm_blob_data, v_tm_offset + 26 * psc(cstep) * c); + afp v43 = buffer_ld1(top_tm_blob_data, v_tm_offset + 27 * psc(cstep) * c); + afp v44 = buffer_ld1(top_tm_blob_data, v_tm_offset + 28 * psc(cstep) * c); + afp v45 = buffer_ld1(top_tm_blob_data, v_tm_offset + 29 * psc(cstep) * c); + afp v50 = buffer_ld1(top_tm_blob_data, v_tm_offset + 30 * psc(cstep) * c); + afp v51 = buffer_ld1(top_tm_blob_data, v_tm_offset + 31 * psc(cstep) * c); + afp v52 = buffer_ld1(top_tm_blob_data, v_tm_offset + 32 * psc(cstep) * c); + afp v53 = buffer_ld1(top_tm_blob_data, v_tm_offset + 33 * psc(cstep) * c); + afp v54 = buffer_ld1(top_tm_blob_data, v_tm_offset + 34 * psc(cstep) * c); + afp v55 = buffer_ld1(top_tm_blob_data, v_tm_offset + 35 * psc(cstep) * c); #define sq2 1.41421356237 #define sq2_m2 1.41421356237*2 diff --git a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd_gemm.comp index fed7a5f4c..b1f869086 100644 --- a/src/layer/vulkan/shader/convolution_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_3x3s1d1_winograd_gemm.comp @@ -1,30 +1,18 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 #define LOCAL_MEMORY_UNROLL_INCH 8 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfp bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfp top_tm_blob_data[]; }; @@ -32,11 +20,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfp weight_tm_data[]; }; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -52,7 +37,7 @@ void main() int gz = int(gl_GlobalInvocationID.z); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif @@ -61,21 +46,21 @@ void main() afp sum2 = afp(0.f); afp sum3 = afp(0.f); - int v_offset = gz * psc(cstep) + gx; - int w_offset = gz * psc(c) * psc(outc) + gy * psc(c); + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = gz * c * outc + gy * c; #if NCNN_shader_local_memory const int lx = int(gl_LocalInvocationID.x); const int ly = int(gl_LocalInvocationID.y); int z = 0; - for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < psc(c); z += LOCAL_MEMORY_UNROLL_INCH) + for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < c; z += LOCAL_MEMORY_UNROLL_INCH) { if (ly < 4) { for (int z4 = 0; z4 < LOCAL_MEMORY_UNROLL_INCH; z4++) { - tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(outw) + ly)); + tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(cstep) + ly)); } } @@ -104,21 +89,21 @@ void main() sum3 += v3 * k; } - v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(outw); + v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(cstep); w_offset += LOCAL_MEMORY_UNROLL_INCH; barrier(); } - if (z < psc(c)) + if (z < c) { - const int remain = psc(c) - z; + const int remain = c - z; if (ly < 4) { for (int z4 = 0; z4 < remain; z4++) { - tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(outw) + ly)); + tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(cstep) + ly)); } } @@ -148,7 +133,7 @@ void main() } } #else - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afp v0 = buffer_ld1(bottom_tm_blob_data, v_offset + 0); afp v1 = buffer_ld1(bottom_tm_blob_data, v_offset + 1); @@ -162,17 +147,17 @@ void main() sum2 += v2 * k; sum3 += v3 * k; - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 1; } #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st1(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st1(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_gemm.comp b/src/layer/vulkan/shader/convolution_gemm.comp index 43fb439c8..9ac179a1c 100644 --- a/src/layer/vulkan/shader/convolution_gemm.comp +++ b/src/layer/vulkan/shader/convolution_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_gemm_cm.comp b/src/layer/vulkan/shader/convolution_gemm_cm.comp new file mode 100644 index 000000000..322826259 --- /dev/null +++ b/src/layer/vulkan/shader/convolution_gemm_cm.comp @@ -0,0 +1,1405 @@ +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause + +#version 450 + +#extension GL_GOOGLE_include_directive: require +#include "vulkan_activation.comp" + +#extension GL_EXT_control_flow_attributes: require + +#extension GL_KHR_shader_subgroup_basic: require + +#extension GL_KHR_memory_scope_semantics: require +#extension GL_EXT_shader_explicit_arithmetic_types: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#if ncnn_VK_KHR_cooperative_matrix +#extension GL_KHR_cooperative_matrix: require +#elif ncnn_VK_NV_cooperative_matrix +#extension GL_NV_cooperative_matrix: require +#endif + +layout (constant_id = 0) const uint kernel_w = 1; +layout (constant_id = 1) const uint kernel_h = 1; +layout (constant_id = 2) const uint dilation_w = 1; +layout (constant_id = 3) const uint dilation_h = 1; +layout (constant_id = 4) const uint stride_w = 1; +layout (constant_id = 5) const uint stride_h = 1; +layout (constant_id = 6) const int bias_term = 0; +layout (constant_id = 7) const int activation_type = 0; +layout (constant_id = 8) const float activation_param_0 = 0; +layout (constant_id = 9) const float activation_param_1 = 0; +layout (constant_id = 10) const uint M = 1; +layout (constant_id = 11) const uint N = 1; +layout (constant_id = 12) const uint K = 1; +layout (constant_id = 13) const uint UNROLL_SG_M = 2; +layout (constant_id = 14) const uint UNROLL_SG_N = 2; +layout (constant_id = 15) const uint UNROLL_SG_K = 2; +layout (constant_id = 16) const uint UNROLL_WG_M = 2; +layout (constant_id = 17) const uint UNROLL_WG_N = 2; +layout (constant_id = 18) const uint inch = 1; +layout (constant_id = 19) const uint outch = 1; +layout (constant_id = 20) const uint elempack = 1; +layout (constant_id = 21) const uint out_elempack = 1; + +#define shape_constant_id_offset 22 +layout (constant_id = shape_constant_id_offset + 0) const uint w = 0; +layout (constant_id = shape_constant_id_offset + 1) const uint h = 0; +layout (constant_id = shape_constant_id_offset + 2) const uint cstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const uint outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const uint outh = 0; +layout (constant_id = shape_constant_id_offset + 5) const uint outcstep = 0; + +layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; +layout (binding = 1) writeonly buffer top_blob { uvec2 top_blob_data[]; }; +layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; +layout (binding = 3) readonly buffer bias_blob { uvec2 bias_data[]; }; + +layout (push_constant) uniform parameter +{ + uint w; + uint h; + uint cstep; + uint outw; + uint outh; + uint outcstep; +} p; + +shared uvec2 tmp_v[UNROLL_WG_M][UNROLL_SG_M * UNROLL_SG_K * M * K / 4]; + +shared uvec2 tmp_k[UNROLL_WG_N][UNROLL_SG_N * UNROLL_SG_K * K * N / 4]; + +shared uvec2 tmp_o[UNROLL_WG_N * UNROLL_WG_M][UNROLL_SG_N * UNROLL_SG_M * M * N / 4]; + +void main() +{ + // assert gl_WorkGroupSize.x == gl_SubgroupSize + // but neither gl_SubgroupSize nor gl_WorkGroupSize.x is a constant + const uint local_size = ncnn_subgroupSize * UNROLL_WG_M * UNROLL_WG_N; + + // [ WG_UN * WG_UM * [ SG_UN * SG_UM * subgroup ] ] + + // <----WG_UN----> + // +---N--+-SG_UN+------+------+ + // | | | |XXXXXX| + // M | XXXX<----coopmat + // | | | |XXXXXX| + // +-- --SG0-- --+-- --SG2-- --+ + // | | | | | + // SG_UM | | + // | | | | | + // ^ +------+--WORKGROUP--+------+ + // | | | | | | + // | | | | + // | | | | | | + // WG_UM+-- --SG1-- --+-- --SG3-- --+ + // | | | | | | + // | | | | + // | | | | | | + // v +------+------+------+------+ + // + + const uint wgi = gl_WorkGroupID.x; + const uint sgi = gl_SubgroupID; + + const uint wgmm = (psc(outw) * psc(outh) + M * UNROLL_SG_M * UNROLL_WG_M - 1) / (M * UNROLL_SG_M * UNROLL_WG_M); + const uint wgnn = (outch + N * UNROLL_SG_N * UNROLL_WG_N - 1) / (N * UNROLL_SG_N * UNROLL_WG_N); + + const uint wgmi = wgi / wgnn; + const uint wgni = wgi % wgnn; + + const uint sgmi = sgi / UNROLL_WG_N; + const uint sgni = sgi % UNROLL_WG_N; + + const uint maxk = kernel_w * kernel_h; + +// const uint mm = (psc(outw) * psc(outh) + M - 1) / M; +// const uint nn = (outch + N - 1) / N; + const uint kk = (inch * maxk + K - 1) / K; + + if (wgmi >= wgmm) + return; + + const uint li = gl_LocalInvocationID.x; + const uint si = gl_SubgroupInvocationID; + + const uint Md4 = M / 4; + const uint Nd4 = N / 4; + const uint Kd4 = K / 4; + + const uint ni = (wgni * UNROLL_WG_N + sgni) * UNROLL_SG_N; + const uint mi = (wgmi * UNROLL_WG_M + sgmi) * UNROLL_SG_M; + +#if ncnn_VK_KHR_cooperative_matrix + coopmat sum[UNROLL_SG_N][UNROLL_SG_M]; +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#else + fcoopmatNV<32, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#endif +#endif + + if (bias_term == 1) + { + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopmat bias; + coopMatLoad(bias, bias_data, ((wgni* UNROLL_WG_N + sgni) * UNROLL_SG_N + zn) * Nd4, 0, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, N> bias; + coopMatLoadNV(bias, bias_data, ((wgni* UNROLL_WG_N + sgni) * UNROLL_SG_N + zn) * Nd4, 0, false); +#endif + + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if NCNN_fp16_arithmetic + sum[zn][zm] = bias; +#else +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopmat(bias); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = fcoopmatNV<32, gl_ScopeSubgroup, M, N>(bias); +#endif +#endif + } + } + } + else + { + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopmat(0.f); +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + sum[zn][zm] = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(0.f); +#else + sum[zn][zm] = fcoopmatNV<32, gl_ScopeSubgroup, M, N>(0.f); +#endif +#endif + } + } + } + + uint k = 0; + + if (kk >= UNROLL_SG_K * 2) + { + // local stack and shared memory ping-pong + + // prefetch + uvec2 prefetch_tmp_v[(UNROLL_SG_M * UNROLL_SG_K * M * K / 4 + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N)]; + uvec2 prefetch_tmp_k[(UNROLL_SG_N * UNROLL_SG_K * K * N / 4 + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M)]; + + // prefetch the very first + { + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uvec4 gm4 = gm * 4 + uvec4(0, 1, 2, 3); + + const uvec4 sy = gm4 / psc(outw); + const uvec4 sx = gm4 % psc(outw); + + const uvec4 sxs = sx * stride_w; + const uvec4 sys = sy * stride_h; + + const uvec4 si4 = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + const uvec4 v_offset = sz * psc(cstep) + si4; + + const uvec4 v_offset_d4 = v_offset / 4; + const uvec4 v_offset_m4d2 = (v_offset % 4) / 2; + const uvec4 v_offset_m2 = v_offset % 2; + + vec4 v; + v.r = sz < inch && gm4.r < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.r][v_offset_m4d2.r])[v_offset_m2.r] : 0; + v.g = sz < inch && gm4.g < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.g][v_offset_m4d2.g])[v_offset_m2.g] : 0; + v.b = sz < inch && gm4.b < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.b][v_offset_m4d2.b])[v_offset_m2.b] : 0; + v.a = sz < inch && gm4.a < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.a][v_offset_m4d2.a])[v_offset_m2.a] : 0; + + prefetch_tmp_v[q] = uvec2(packHalf2x16(v.rg), packHalf2x16(v.ba)); + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uint sy = gm / psc(outw); + const uint sx = gm % psc(outw); + + const uint sxs = sx * stride_w; + const uint sys = sy * stride_h; + + const uint si = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + uvec2 v = sz < inchd4 && si < psc(cstep) ? bottom_blob_data[sz * psc(cstep) + si] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_data[w_offset + siq]; + } + } + } + } + + k += UNROLL_SG_K; + + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) + { + barrier(); + + // copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + + // prefetch the next + { + const uint ki = k * K; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uvec4 gm4 = gm * 4 + uvec4(0, 1, 2, 3); + + const uvec4 sy = gm4 / psc(outw); + const uvec4 sx = gm4 % psc(outw); + + const uvec4 sxs = sx * stride_w; + const uvec4 sys = sy * stride_h; + + const uvec4 si4 = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + const uvec4 v_offset = sz * psc(cstep) + si4; + + const uvec4 v_offset_d4 = v_offset / 4; + const uvec4 v_offset_m4d2 = (v_offset % 4) / 2; + const uvec4 v_offset_m2 = v_offset % 2; + + vec4 v; + v.r = sz < inch && gm4.r < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.r][v_offset_m4d2.r])[v_offset_m2.r] : 0; + v.g = sz < inch && gm4.g < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.g][v_offset_m4d2.g])[v_offset_m2.g] : 0; + v.b = sz < inch && gm4.b < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.b][v_offset_m4d2.b])[v_offset_m2.b] : 0; + v.a = sz < inch && gm4.a < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.a][v_offset_m4d2.a])[v_offset_m2.a] : 0; + + prefetch_tmp_v[q] = uvec2(packHalf2x16(v.rg), packHalf2x16(v.ba)); + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uint sy = gm / psc(outw); + const uint sx = gm % psc(outw); + + const uint sxs = sx * stride_w; + const uint sys = sy * stride_h; + + const uint si = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + uvec2 v = sz < inchd4 && si < psc(cstep) ? bottom_blob_data[sz * psc(cstep) + si] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_data[w_offset + siq]; + } + } + } + } + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + + barrier(); + + // the last copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + else if (kk >= UNROLL_SG_K) + { + // no ping-pong version + + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uvec4 gm4 = gm * 4 + uvec4(0, 1, 2, 3); + + const uvec4 sy = gm4 / psc(outw); + const uvec4 sx = gm4 % psc(outw); + + const uvec4 sxs = sx * stride_w; + const uvec4 sys = sy * stride_h; + + const uvec4 si4 = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + const uvec4 v_offset = sz * psc(cstep) + si4; + + const uvec4 v_offset_d4 = v_offset / 4; + const uvec4 v_offset_m4d2 = (v_offset % 4) / 2; + const uvec4 v_offset_m2 = v_offset % 2; + + vec4 v; + v.r = sz < inch && gm4.r < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.r][v_offset_m4d2.r])[v_offset_m2.r] : 0; + v.g = sz < inch && gm4.g < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.g][v_offset_m4d2.g])[v_offset_m2.g] : 0; + v.b = sz < inch && gm4.b < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.b][v_offset_m4d2.b])[v_offset_m2.b] : 0; + v.a = sz < inch && gm4.a < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.a][v_offset_m4d2.a])[v_offset_m2.a] : 0; + + tmp_v[sgmi][siq] = uvec2(packHalf2x16(v.rg), packHalf2x16(v.ba)); + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uint sy = gm / psc(outw); + const uint sx = gm % psc(outw); + + const uint sxs = sx * stride_w; + const uint sys = sy * stride_h; + + const uint si = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + uvec2 v = sz < inchd4 && si < psc(cstep) ? bottom_blob_data[sz * psc(cstep) + si] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = weight_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + k += UNROLL_SG_K; + } + + for (; k < kk; k++) + { + const uint ki = k * K; + + barrier(); + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint Md4_K_USGM = Md4 * K * UNROLL_SG_M; + const uint Md4_K_USGM_d_subgroupsize = (Md4_K_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM) + { + const uint zm = siq / (Md4 * K); + const uint ij = siq % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + i; + const uint gm = (mi + zm) * Md4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uvec4 gm4 = gm * 4 + uvec4(0, 1, 2, 3); + + const uvec4 sy = gm4 / psc(outw); + const uvec4 sx = gm4 % psc(outw); + + const uvec4 sxs = sx * stride_w; + const uvec4 sys = sy * stride_h; + + const uvec4 si4 = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + const uvec4 v_offset = sz * psc(cstep) + si4; + + const uvec4 v_offset_d4 = v_offset / 4; + const uvec4 v_offset_m4d2 = (v_offset % 4) / 2; + const uvec4 v_offset_m2 = v_offset % 2; + + vec4 v; + v.r = sz < inch && gm4.r < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.r][v_offset_m4d2.r])[v_offset_m2.r] : 0; + v.g = sz < inch && gm4.g < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.g][v_offset_m4d2.g])[v_offset_m2.g] : 0; + v.b = sz < inch && gm4.b < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.b][v_offset_m4d2.b])[v_offset_m2.b] : 0; + v.a = sz < inch && gm4.a < psc(outcstep) ? unpackHalf2x16(bottom_blob_data[v_offset_d4.a][v_offset_m4d2.a])[v_offset_m2.a] : 0; + + tmp_v[sgmi][siq] = uvec2(packHalf2x16(v.rg), packHalf2x16(v.ba)); + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM = Kd4 * M * UNROLL_SG_M; + const uint Kd4_M_USGM_d_subgroupsize = (Kd4_M_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM) + { + const uint zmi = siq / Kd4; + const uint j = siq % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + j; + + const uint sz = gk / maxk; + const uint kykx = gk % maxk; + + const uint ky = kykx / kernel_w; + const uint kx = kykx % kernel_w; + + const uint sy = gm / psc(outw); + const uint sx = gm % psc(outw); + + const uint sxs = sx * stride_w; + const uint sys = sy * stride_h; + + const uint si = (sys + ky * dilation_h) * psc(w) + sxs + kx * dilation_w; + + uvec2 v = sz < inchd4 && si < psc(cstep) ? bottom_blob_data[sz * psc(cstep) + si] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + + const uint w_offset = ((wgni * kk + k) * UNROLL_WG_N + sgni) * Nd4_K_USGN; + + const uint Nd4_K_USGN_d_subgroupsize = (Nd4_K_USGN + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN) + { + tmp_k[sgni][siq] = weight_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (out_elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#endif +#endif + } + else // if (out_elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#endif +#endif + } + } + } + + barrier(); + + // store top_blob + { + if (out_elempack == 1) + { + // +-M-+ + // N | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UN+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +- -+ + // | | | + // | +- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint outcstepd4 = psc(outcstep) / 4; + + const uint Md4_N_USGM_USGN = Md4 * N * UNROLL_SG_M * UNROLL_SG_N; + const uint Md4_N_USGM_USGN_d_subgroupsize = (Md4_N_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Md4_N_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Md4_N_USGM_USGN % ncnn_subgroupSize == 0 || siq < Md4_N_USGM_USGN) + { + const uint zn = siq / (Md4 * N * UNROLL_SG_M); + const uint zmij = siq % (Md4 * N * UNROLL_SG_M); + const uint zm = zmij / (Md4 * N); + const uint ij = zmij % (Md4 * N); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gn = (ni + zn) * N + i; + const uint gm = (mi + zm) * Md4 + j; + + if (gn < outch && gm < outcstepd4) + { + uvec2 sum = tmp_o[sgi][siq]; + + if (activation_type == 0) + { + top_blob_data[gn * outcstepd4 + gm] = sum; + } + else + { + afpvec4 v = afpvec4(unpackHalf2x16(sum.r), unpackHalf2x16(sum.g)); + + v = activation_afpvec4(v, activation_type, activation_param_0, activation_param_1); + + top_blob_data[gn * outcstepd4 + gm] = uvec2(packHalf2x16(vec4(v).rg), packHalf2x16(vec4(v).ba)); + } + } + } + } + } + else // if (out_elempack == 4) + { + // +-N-+ + // M | + // +---+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UN+---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // v +---+ + + const uint outchd4 = outch / 4; + + const uint Nd4_M_USGM_USGN = Nd4 * M * UNROLL_SG_M * UNROLL_SG_N; + const uint Nd4_M_USGM_USGN_d_subgroupsize = (Nd4_M_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Nd4_M_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Nd4_M_USGM_USGN % ncnn_subgroupSize == 0 || siq < Nd4_M_USGM_USGN) + { + const uint zn = siq / (Nd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Nd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Nd4; + const uint j = zmij % Nd4; + + const uint gn = (ni + zn) * Nd4 + j; + const uint gm = mi * M + zmi; + + if (gn < outchd4 && gm < psc(outcstep)) + { + uvec2 sum = tmp_o[sgi][siq]; + + if (activation_type == 0) + { + top_blob_data[gn * psc(outcstep) + gm] = sum; + } + else + { + afpvec4 v = afpvec4(unpackHalf2x16(sum.r), unpackHalf2x16(sum.g)); + + v = activation_afpvec4(v, activation_type, activation_param_0, activation_param_1); + + top_blob_data[gn * psc(outcstep) + gm] = uvec2(packHalf2x16(vec4(v).rg), packHalf2x16(vec4(v).ba)); + } + } + } + } + } + } +} diff --git a/src/layer/vulkan/shader/convolution_pack1to4.comp b/src/layer/vulkan/shader/convolution_pack1to4.comp index 32a45616c..e5c75bcaf 100644 --- a/src/layer/vulkan/shader/convolution_pack1to4.comp +++ b/src/layer/vulkan/shader/convolution_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack1to4_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack1to4_1x1s1d1.comp index bf6bf8d0c..27dd286f0 100644 --- a/src/layer/vulkan/shader/convolution_pack1to4_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack1to4_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack1to4_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack1to4_3x3s1d1_winograd_gemm.comp index b21f7dc73..ab2c3706d 100644 --- a/src/layer/vulkan/shader/convolution_pack1to4_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack1to4_3x3s1d1_winograd_gemm.comp @@ -1,30 +1,18 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 #define LOCAL_MEMORY_UNROLL_INCH 8 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfp bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfpvec4 top_tm_blob_data[]; }; @@ -32,11 +20,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec4 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -52,7 +37,7 @@ void main() int gz = int(gl_GlobalInvocationID.z); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif @@ -61,21 +46,21 @@ void main() afpvec4 sum2 = afpvec4(0.f); afpvec4 sum3 = afpvec4(0.f); - int v_offset = gz * psc(cstep) + gx; - int w_offset = gz * psc(c) * psc(outc) + gy * psc(c); + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = gz * c * outc + gy * c; #if NCNN_shader_local_memory const int lx = int(gl_LocalInvocationID.x); const int ly = int(gl_LocalInvocationID.y); int z = 0; - for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < psc(c); z += LOCAL_MEMORY_UNROLL_INCH) + for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < c; z += LOCAL_MEMORY_UNROLL_INCH) { if (ly < 4) { for (int z4 = 0; z4 < LOCAL_MEMORY_UNROLL_INCH; z4++) { - tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(outw) + ly)); + tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(cstep) + ly)); } } @@ -104,21 +89,21 @@ void main() sum3 += v3 * k; } - v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(outw); + v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(cstep); w_offset += LOCAL_MEMORY_UNROLL_INCH; barrier(); } - if (z < psc(c)) + if (z < c) { - const int remain = psc(c) - z; + const int remain = c - z; if (ly < 4) { for (int z4 = 0; z4 < remain; z4++) { - tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(outw) + ly)); + tmp_v[lx][z4][ly] = sfp2lfp(buffer_ld1(bottom_tm_blob_data, v_offset + z4 * psc(cstep) + ly)); } } @@ -148,7 +133,7 @@ void main() } } #else - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afp v0 = buffer_ld1(bottom_tm_blob_data, v_offset + 0); afp v1 = buffer_ld1(bottom_tm_blob_data, v_offset + 1); @@ -162,17 +147,17 @@ void main() sum2 += v2 * k; sum3 += v3 * k; - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 1; } #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st4(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st4(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack1to4_gemm.comp b/src/layer/vulkan/shader/convolution_pack1to4_gemm.comp index af40c889b..50d509016 100644 --- a/src/layer/vulkan/shader/convolution_pack1to4_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack1to4_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack1to8.comp b/src/layer/vulkan/shader/convolution_pack1to8.comp index 30d12f1e5..49c46bdc1 100644 --- a/src/layer/vulkan/shader/convolution_pack1to8.comp +++ b/src/layer/vulkan/shader/convolution_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack1to8_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack1to8_1x1s1d1.comp index cee21bac2..324828f77 100644 --- a/src/layer/vulkan/shader/convolution_pack1to8_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack1to8_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack1to8_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack1to8_3x3s1d1_winograd_gemm.comp index f0c0f7300..1bac0df03 100644 --- a/src/layer/vulkan/shader/convolution_pack1to8_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack1to8_3x3s1d1_winograd_gemm.comp @@ -1,28 +1,16 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfp bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfpvec8 top_tm_blob_data[]; }; @@ -30,11 +18,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec8 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -44,7 +29,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; afpvec8 sum0 = afpvec8(afpvec4(0.f), afpvec4(0.f)); @@ -52,10 +37,10 @@ void main() afpvec8 sum2 = afpvec8(afpvec4(0.f), afpvec4(0.f)); afpvec8 sum3 = afpvec8(afpvec4(0.f), afpvec4(0.f)); - int v_offset = gz * psc(cstep) + gx; - int w_offset = gz * psc(c) * psc(outc) + gy * psc(c); + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = gz * c * outc + gy * c; - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afp v0 = buffer_ld1(bottom_tm_blob_data, v_offset + 0); afp v1 = buffer_ld1(bottom_tm_blob_data, v_offset + 1); @@ -77,11 +62,11 @@ void main() sum3[0] += v3 * k[0]; sum3[1] += v3 * k[1]; - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 1; } - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st8(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st8(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack1to8_gemm.comp b/src/layer/vulkan/shader/convolution_pack1to8_gemm.comp index 43096fb83..a545c69bc 100644 --- a/src/layer/vulkan/shader/convolution_pack1to8_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack1to8_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4.comp b/src/layer/vulkan/shader/convolution_pack4.comp index 208994d41..b5ea37d8a 100644 --- a/src/layer/vulkan/shader/convolution_pack4.comp +++ b/src/layer/vulkan/shader/convolution_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack4_1x1s1d1.comp index 72897c8d0..837d35006 100644 --- a/src/layer/vulkan/shader/convolution_pack4_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack4_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4_1x1s1d1_cm_16_16_16.comp b/src/layer/vulkan/shader/convolution_pack4_1x1s1d1_cm_16_16_16.comp deleted file mode 100644 index ee9f69817..000000000 --- a/src/layer/vulkan/shader/convolution_pack4_1x1s1d1_cm_16_16_16.comp +++ /dev/null @@ -1,348 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_GOOGLE_include_directive: enable -#include "vulkan_activation.comp" - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int bias_term = 0; -layout (constant_id = 1) const int activation_type = 0; -layout (constant_id = 2) const float activation_param_0 = 0; -layout (constant_id = 3) const float activation_param_1 = 0; - -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int w = 0; -layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 7) const int outcstep = 0; - -layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; -layout (binding = 1) writeonly buffer top_blob { sfpvec4 top_blob_data[]; }; -layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; -layout (binding = 3) readonly buffer bias_blob { uvec2 bias_data[]; }; - -layout (push_constant) uniform parameter -{ - int w; - int h; - int c; - int cstep; - - int outw; - int outh; - int outc; - int outcstep; -} p; - -#define UNROLL_INCH 2 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k1[UNROLL_INCH * 16*4]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0; - coopmat sum1; - coopmat sum2; - coopmat sum3; -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum1; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum2; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum3; -#else - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum0; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum1; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum2; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum3; -#endif -#endif - - if (bias_term == 1) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat bias0; - coopmat bias1; - - coopMatLoad(bias0, bias_data, gy, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias1, bias_data, gy + 4, 0, gl_CooperativeMatrixLayoutRowMajor); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> bias0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> bias1; - - coopMatLoadNV(bias0, bias_data, gy, 0, false); - coopMatLoadNV(bias1, bias_data, gy + 4, 0, false); -#endif - -#if NCNN_fp16_arithmetic - sum0 = bias0; - sum1 = bias0; - sum2 = bias1; - sum3 = bias1; -#else -#if ncnn_VK_KHR_cooperative_matrix - sum0 = coopmat(bias0); - sum1 = coopmat(bias0); - sum2 = coopmat(bias1); - sum3 = coopmat(bias1); -#elif ncnn_VK_NV_cooperative_matrix - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias0); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias0); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias1); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias1); -#endif -#endif - } - else - { -#if ncnn_VK_KHR_cooperative_matrix - sum0 = coopmat(0.f); - sum1 = coopmat(0.f); - sum2 = coopmat(0.f); - sum3 = coopmat(0.f); -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - sum0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); - sum1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); - sum2 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); - sum3 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); -#else - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); -#endif -#endif - } - - const int N = psc(c) / 4; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int v_offset = ((z + lxd16) * 4 + j) * psc(outcstep) + (gx + lxm16); - - tmp_v0[tmp_i] = (gx + lxm16) < psc(outcstep) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v1[tmp_i] = (gx + lxm16 + 16) < psc(outcstep) ? bottom_blob_data[v_offset + 16] : uvec2(0); - - const int w_offset = gy * psc(c) * 4 + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_data[w_offset]; - tmp_k1[tmp_i] = weight_data[w_offset + psc(c) * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd16 == 0) - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int v_offset = ((z + lxd16) * 4 + j) * psc(outcstep) + (gx + lxm16); - - tmp_v0[tmp_i] = (gx + lxm16) < psc(outcstep) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v1[tmp_i] = (gx + lxm16 + 16) < psc(outcstep) ? bottom_blob_data[v_offset + 16] : uvec2(0); - - const int w_offset = gy * psc(c) * 4 + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_data[w_offset]; - tmp_k1[tmp_i] = weight_data[w_offset + psc(c) * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (gx >= psc(outcstep) || gy >= psc(outc)) - return; - -#if ncnn_VK_KHR_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStore(sum0, tmp_v0, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1, tmp_v1, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2, tmp_v0, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3, tmp_v1, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); -#else - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - - coopMatStore(sum0_fp16, tmp_v0, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); -#endif -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStoreNV(sum0, tmp_v0, 0, 4, false); - coopMatStoreNV(sum1, tmp_v1, 0, 4, false); - coopMatStoreNV(sum2, tmp_v0, 16*4, 4, false); - coopMatStoreNV(sum3, tmp_v1, 16*4, 4, false); -#else - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum3); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 4, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 4, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*4, 4, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*4, 4, false); -#endif -#endif - - barrier(); - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 4 + j + lxd16*16*4; - - uvec2 sum0_u2 = tmp_v0[tmp_vi]; - uvec2 sum1_u2 = tmp_v1[tmp_vi]; - - afpvec4 sum0 = afpvec4(unpackHalf2x16(sum0_u2.x), unpackHalf2x16(sum0_u2.y)); - afpvec4 sum1 = afpvec4(unpackHalf2x16(sum1_u2.x), unpackHalf2x16(sum1_u2.y)); - - sum0 = activation_afpvec4(sum0, activation_type, activation_param_0, activation_param_1); - sum1 = activation_afpvec4(sum1, activation_type, activation_param_0, activation_param_1); - - const int gi = (gy + lxd16 * 4 + j) * psc(outcstep) + (gx + lxm16); - - if (gy + lxd16 * 4 + j < psc(outc)) - { - if (gx + lxm16 < psc(outcstep)) buffer_st4(top_blob_data, gi, sum0); - if (gx + lxm16 + 16 < psc(outcstep)) buffer_st4(top_blob_data, gi + 16, sum1); - } - } - } -} diff --git a/src/layer/vulkan/shader/convolution_pack4_1x1s1d1_cm_16_8_8.comp b/src/layer/vulkan/shader/convolution_pack4_1x1s1d1_cm_16_8_8.comp deleted file mode 100644 index c36ba392f..000000000 --- a/src/layer/vulkan/shader/convolution_pack4_1x1s1d1_cm_16_8_8.comp +++ /dev/null @@ -1,467 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_GOOGLE_include_directive: enable -#include "vulkan_activation.comp" - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int bias_term = 0; -layout (constant_id = 1) const int activation_type = 0; -layout (constant_id = 2) const float activation_param_0 = 0; -layout (constant_id = 3) const float activation_param_1 = 0; - -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int w = 0; -layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 7) const int outcstep = 0; - -layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; -layout (binding = 1) writeonly buffer top_blob { sfpvec4 top_blob_data[]; }; -layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; -layout (binding = 3) readonly buffer bias_blob { uvec2 bias_data[]; }; - -layout (push_constant) uniform parameter -{ - int w; - int h; - int c; - int cstep; - - int outw; - int outh; - int outc; - int outcstep; -} p; - -#define UNROLL_INCH 4 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*2]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*2]; -shared uvec2 tmp_k0[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k1[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k2[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k3[UNROLL_INCH * 8*2]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd8 = lx / 8; // 0 1 2 3 - const int lxm8 = lx % 8; // 0 1 2 3 .... 7 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0; - coopmat sum1; - coopmat sum2; - coopmat sum3; - coopmat sum4; - coopmat sum5; - coopmat sum6; - coopmat sum7; -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum1; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum2; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum3; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum4; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum5; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum6; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum7; -#else - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum0; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum1; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum2; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum3; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum4; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum5; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum6; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum7; -#endif -#endif - - if (bias_term == 1) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat bias0; - coopmat bias1; - coopmat bias2; - coopmat bias3; - - coopMatLoad(bias0, bias_data, gy, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias1, bias_data, gy + 2, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias2, bias_data, gy + 4, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias3, bias_data, gy + 6, 0, gl_CooperativeMatrixLayoutRowMajor); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias1; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias2; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias3; - - coopMatLoadNV(bias0, bias_data, gy, 0, false); - coopMatLoadNV(bias1, bias_data, gy + 2, 0, false); - coopMatLoadNV(bias2, bias_data, gy + 4, 0, false); - coopMatLoadNV(bias3, bias_data, gy + 6, 0, false); -#endif - -#if NCNN_fp16_arithmetic - sum0 = bias0; - sum1 = bias0; - sum2 = bias1; - sum3 = bias1; - sum4 = bias2; - sum5 = bias2; - sum6 = bias3; - sum7 = bias3; -#else -#if ncnn_VK_KHR_cooperative_matrix - sum0 = coopmat(bias0); - sum1 = coopmat(bias0); - sum2 = coopmat(bias1); - sum3 = coopmat(bias1); - sum4 = coopmat(bias2); - sum5 = coopmat(bias2); - sum6 = coopmat(bias3); - sum7 = coopmat(bias3); -#elif ncnn_VK_NV_cooperative_matrix - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias0); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias0); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias1); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias1); - sum4 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias2); - sum5 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias2); - sum6 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias3); - sum7 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias3); -#endif -#endif - } - else - { -#if ncnn_VK_KHR_cooperative_matrix - sum0 = coopmat(0.f); - sum1 = coopmat(0.f); - sum2 = coopmat(0.f); - sum3 = coopmat(0.f); - sum4 = coopmat(0.f); - sum5 = coopmat(0.f); - sum6 = coopmat(0.f); - sum7 = coopmat(0.f); -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - sum0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - sum1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - sum2 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - sum3 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - sum4 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - sum5 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - sum6 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - sum7 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); -#else - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum4 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum5 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum6 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum7 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); -#endif -#endif - } - - const int N = psc(c) / 2; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - int v_offset = ((z + lxd8) * 2 + j) * psc(outcstep) + (gx + lxm8); - - tmp_v0[tmp_vi] = (gx + lxm8) < psc(outcstep) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v0[tmp_vi + 16] = (gx + lxm8 + 8) < psc(outcstep) ? bottom_blob_data[v_offset + 8] : uvec2(0); - tmp_v1[tmp_vi] = (gx + lxm8 + 16) < psc(outcstep) ? bottom_blob_data[v_offset + 16] : uvec2(0); - tmp_v1[tmp_vi + 16] = (gx + lxm8 + 24) < psc(outcstep) ? bottom_blob_data[v_offset + 24] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gy * psc(c) * 4 + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_data[w_offset]; - tmp_k1[tmp_ki] = weight_data[w_offset + psc(c) * 8]; - tmp_k2[tmp_ki] = weight_data[w_offset + psc(c) * 16]; - tmp_k3[tmp_ki] = weight_data[w_offset + psc(c) * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd8 < remain) - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - int v_offset = ((z + lxd8) * 2 + j) * psc(outcstep) + (gx + lxm8); - - tmp_v0[tmp_vi] = (gx + lxm8) < psc(outcstep) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v0[tmp_vi + 16] = (gx + lxm8 + 8) < psc(outcstep) ? bottom_blob_data[v_offset + 8] : uvec2(0); - tmp_v1[tmp_vi] = (gx + lxm8 + 16) < psc(outcstep) ? bottom_blob_data[v_offset + 16] : uvec2(0); - tmp_v1[tmp_vi + 16] = (gx + lxm8 + 24) < psc(outcstep) ? bottom_blob_data[v_offset + 24] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gy * psc(c) * 4 + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_data[w_offset]; - tmp_k1[tmp_ki] = weight_data[w_offset + psc(c) * 8]; - tmp_k2[tmp_ki] = weight_data[w_offset + psc(c) * 16]; - tmp_k3[tmp_ki] = weight_data[w_offset + psc(c) * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (gx >= psc(outcstep) || gy >= psc(outc)) - return; - -#if ncnn_VK_KHR_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStore(sum0, tmp_v0, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1, tmp_v1, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2, tmp_v0, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3, tmp_v1, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum4, tmp_v0, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum5, tmp_v1, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum6, tmp_v0, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum7, tmp_v1, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); -#else - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - coopmat sum4_fp16 = coopmat(sum4); - coopmat sum5_fp16 = coopmat(sum5); - coopmat sum6_fp16 = coopmat(sum6); - coopmat sum7_fp16 = coopmat(sum7); - - coopMatStore(sum0_fp16, tmp_v0, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum4_fp16, tmp_v0, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum5_fp16, tmp_v1, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum6_fp16, tmp_v0, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum7_fp16, tmp_v1, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); -#endif -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStoreNV(sum0, tmp_v0, 0, 2, false); - coopMatStoreNV(sum1, tmp_v1, 0, 2, false); - coopMatStoreNV(sum2, tmp_v0, 16*2, 2, false); - coopMatStoreNV(sum3, tmp_v1, 16*2, 2, false); - coopMatStoreNV(sum4, tmp_v0, 16*4, 2, false); - coopMatStoreNV(sum5, tmp_v1, 16*4, 2, false); - coopMatStoreNV(sum6, tmp_v0, 16*6, 2, false); - coopMatStoreNV(sum7, tmp_v1, 16*6, 2, false); -#else - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum3); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum4_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum4); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum5_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum5); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum6_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum6); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum7_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum7); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 2, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 2, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*2, 2, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*2, 2, false); - coopMatStoreNV(sum4_fp16, tmp_v0, 16*4, 2, false); - coopMatStoreNV(sum5_fp16, tmp_v1, 16*4, 2, false); - coopMatStoreNV(sum6_fp16, tmp_v0, 16*6, 2, false); - coopMatStoreNV(sum7_fp16, tmp_v1, 16*6, 2, false); -#endif -#endif - - barrier(); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 2 + lxd16 + j*16*2; - const int gi = (gy + lxd16 + j*2) * psc(outcstep) + (gx + lxm16); - - if (gy + j * 2 + lxd16 < psc(outc)) - { - if (gx + lxm16 < psc(outcstep)) - { - uvec2 sum0_u2 = tmp_v0[tmp_vi]; - afpvec4 sum0 = afpvec4(unpackHalf2x16(sum0_u2.x), unpackHalf2x16(sum0_u2.y)); - sum0 = activation_afpvec4(sum0, activation_type, activation_param_0, activation_param_1); - buffer_st4(top_blob_data, gi, sum0); - } - if (gx + lxm16 + 16 < psc(outcstep)) - { - uvec2 sum1_u2 = tmp_v1[tmp_vi]; - afpvec4 sum1 = afpvec4(unpackHalf2x16(sum1_u2.x), unpackHalf2x16(sum1_u2.y)); - sum1 = activation_afpvec4(sum1, activation_type, activation_param_0, activation_param_1); - buffer_st4(top_blob_data, gi + 16, sum1); - } - } - } - } -} diff --git a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_input.comp b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_input.comp index 732c03b16..da2b496a2 100644 --- a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_input.comp +++ b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_input.comp @@ -1,29 +1,19 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 +layout (constant_id = 0) const int c = 0; + +#define shape_constant_id_offset 1 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outcstep = 0; -layout (constant_id = shape_constant_id_offset + 5) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 6) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 4) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 5) const int block_y = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec4 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer bottom_tm_blob { sfpvec4 bottom_tm_blob_data[]; }; @@ -32,7 +22,6 @@ layout (push_constant) uniform parameter { int w; int h; - int c; int cstep; int outcstep; @@ -47,7 +36,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 4x4 @@ -126,22 +115,22 @@ void main() v33 = m33 - m31; // store 16 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - buffer_st4(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep), v00); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep), v01); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep), v02); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep), v03); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep), v10); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep), v11); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep), v12); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep), v13); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep), v20); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep), v21); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep), v22); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep), v23); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep), v30); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep), v31); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep), v32); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep), v33); + int v_tm_offset = gz * psc(outcstep) + gy * psc(block_x) + gx; + + buffer_st4(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep) * c, v00); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep) * c, v01); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep) * c, v02); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep) * c, v03); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep) * c, v10); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep) * c, v11); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep) * c, v12); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep) * c, v13); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep) * c, v20); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep) * c, v21); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep) * c, v22); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep) * c, v23); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep) * c, v30); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep) * c, v31); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep) * c, v32); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep) * c, v33); } diff --git a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_output.comp b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_output.comp index e2e1f2173..b4c6a3b74 100644 --- a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_output.comp +++ b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd23_transform_output.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -21,17 +10,17 @@ layout (constant_id = 0) const int bias_term = 0; layout (constant_id = 1) const int activation_type = 0; layout (constant_id = 2) const float activation_param_0 = 0; layout (constant_id = 3) const float activation_param_1 = 0; +layout (constant_id = 4) const int c = 0; -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; +#define shape_constant_id_offset 5 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 3) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 1) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 2) const int block_y = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer top_tm_blob { sfpvec4 top_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_blob { sfpvec4 top_blob_data[]; }; @@ -39,7 +28,6 @@ layout (binding = 2) readonly buffer bias_blob { sfpvec4 bias_data[]; }; layout (push_constant) uniform parameter { - int c; int cstep; int block_x; @@ -56,28 +44,28 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 16 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - afpvec4 v00 = buffer_ld4(top_tm_blob_data, v_tm_offset + 0 * psc(cstep)); - afpvec4 v01 = buffer_ld4(top_tm_blob_data, v_tm_offset + 1 * psc(cstep)); - afpvec4 v02 = buffer_ld4(top_tm_blob_data, v_tm_offset + 2 * psc(cstep)); - afpvec4 v03 = buffer_ld4(top_tm_blob_data, v_tm_offset + 3 * psc(cstep)); - afpvec4 v10 = buffer_ld4(top_tm_blob_data, v_tm_offset + 4 * psc(cstep)); - afpvec4 v11 = buffer_ld4(top_tm_blob_data, v_tm_offset + 5 * psc(cstep)); - afpvec4 v12 = buffer_ld4(top_tm_blob_data, v_tm_offset + 6 * psc(cstep)); - afpvec4 v13 = buffer_ld4(top_tm_blob_data, v_tm_offset + 7 * psc(cstep)); - afpvec4 v20 = buffer_ld4(top_tm_blob_data, v_tm_offset + 8 * psc(cstep)); - afpvec4 v21 = buffer_ld4(top_tm_blob_data, v_tm_offset + 9 * psc(cstep)); - afpvec4 v22 = buffer_ld4(top_tm_blob_data, v_tm_offset + 10 * psc(cstep)); - afpvec4 v23 = buffer_ld4(top_tm_blob_data, v_tm_offset + 11 * psc(cstep)); - afpvec4 v30 = buffer_ld4(top_tm_blob_data, v_tm_offset + 12 * psc(cstep)); - afpvec4 v31 = buffer_ld4(top_tm_blob_data, v_tm_offset + 13 * psc(cstep)); - afpvec4 v32 = buffer_ld4(top_tm_blob_data, v_tm_offset + 14 * psc(cstep)); - afpvec4 v33 = buffer_ld4(top_tm_blob_data, v_tm_offset + 15 * psc(cstep)); + int v_tm_offset = gz * psc(cstep) + gy * psc(block_x) + gx; + + afpvec4 v00 = buffer_ld4(top_tm_blob_data, v_tm_offset + 0 * psc(cstep) * c); + afpvec4 v01 = buffer_ld4(top_tm_blob_data, v_tm_offset + 1 * psc(cstep) * c); + afpvec4 v02 = buffer_ld4(top_tm_blob_data, v_tm_offset + 2 * psc(cstep) * c); + afpvec4 v03 = buffer_ld4(top_tm_blob_data, v_tm_offset + 3 * psc(cstep) * c); + afpvec4 v10 = buffer_ld4(top_tm_blob_data, v_tm_offset + 4 * psc(cstep) * c); + afpvec4 v11 = buffer_ld4(top_tm_blob_data, v_tm_offset + 5 * psc(cstep) * c); + afpvec4 v12 = buffer_ld4(top_tm_blob_data, v_tm_offset + 6 * psc(cstep) * c); + afpvec4 v13 = buffer_ld4(top_tm_blob_data, v_tm_offset + 7 * psc(cstep) * c); + afpvec4 v20 = buffer_ld4(top_tm_blob_data, v_tm_offset + 8 * psc(cstep) * c); + afpvec4 v21 = buffer_ld4(top_tm_blob_data, v_tm_offset + 9 * psc(cstep) * c); + afpvec4 v22 = buffer_ld4(top_tm_blob_data, v_tm_offset + 10 * psc(cstep) * c); + afpvec4 v23 = buffer_ld4(top_tm_blob_data, v_tm_offset + 11 * psc(cstep) * c); + afpvec4 v30 = buffer_ld4(top_tm_blob_data, v_tm_offset + 12 * psc(cstep) * c); + afpvec4 v31 = buffer_ld4(top_tm_blob_data, v_tm_offset + 13 * psc(cstep) * c); + afpvec4 v32 = buffer_ld4(top_tm_blob_data, v_tm_offset + 14 * psc(cstep) * c); + afpvec4 v33 = buffer_ld4(top_tm_blob_data, v_tm_offset + 15 * psc(cstep) * c); // const float itm[2][4] = { // {1.0f, 1.0f, 1.0f, 0.0f}, diff --git a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_input.comp b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_input.comp index c616760aa..8ad930d84 100644 --- a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_input.comp +++ b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_input.comp @@ -1,29 +1,19 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 +layout (constant_id = 0) const int c = 0; + +#define shape_constant_id_offset 1 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outcstep = 0; -layout (constant_id = shape_constant_id_offset + 5) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 6) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 4) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 5) const int block_y = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec4 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer bottom_tm_blob { sfpvec4 bottom_tm_blob_data[]; }; @@ -32,7 +22,6 @@ layout (push_constant) uniform parameter { int w; int h; - int c; int cstep; int outcstep; @@ -47,7 +36,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 6x6 @@ -198,42 +187,42 @@ void main() v55 = m51 - m53 * afp(2.5) + m55; // store 36 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - buffer_st4(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep), v00); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep), v01); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep), v02); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep), v03); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep), v04); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep), v05); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep), v10); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep), v11); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep), v12); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep), v13); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep), v14); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep), v15); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep), v20); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep), v21); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep), v22); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep), v23); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 16 * psc(outcstep), v24); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 17 * psc(outcstep), v25); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 18 * psc(outcstep), v30); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 19 * psc(outcstep), v31); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 20 * psc(outcstep), v32); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 21 * psc(outcstep), v33); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 22 * psc(outcstep), v34); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 23 * psc(outcstep), v35); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 24 * psc(outcstep), v40); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 25 * psc(outcstep), v41); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 26 * psc(outcstep), v42); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 27 * psc(outcstep), v43); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 28 * psc(outcstep), v44); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 29 * psc(outcstep), v45); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 30 * psc(outcstep), v50); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 31 * psc(outcstep), v51); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 32 * psc(outcstep), v52); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 33 * psc(outcstep), v53); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 34 * psc(outcstep), v54); - buffer_st4(bottom_tm_blob_data, v_tm_offset + 35 * psc(outcstep), v55); + int v_tm_offset = gz * psc(outcstep) + gy * psc(block_x) + gx; + + buffer_st4(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep) * c, v00); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep) * c, v01); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep) * c, v02); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep) * c, v03); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep) * c, v04); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep) * c, v05); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep) * c, v10); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep) * c, v11); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep) * c, v12); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep) * c, v13); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep) * c, v14); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep) * c, v15); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep) * c, v20); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep) * c, v21); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep) * c, v22); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep) * c, v23); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 16 * psc(outcstep) * c, v24); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 17 * psc(outcstep) * c, v25); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 18 * psc(outcstep) * c, v30); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 19 * psc(outcstep) * c, v31); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 20 * psc(outcstep) * c, v32); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 21 * psc(outcstep) * c, v33); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 22 * psc(outcstep) * c, v34); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 23 * psc(outcstep) * c, v35); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 24 * psc(outcstep) * c, v40); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 25 * psc(outcstep) * c, v41); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 26 * psc(outcstep) * c, v42); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 27 * psc(outcstep) * c, v43); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 28 * psc(outcstep) * c, v44); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 29 * psc(outcstep) * c, v45); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 30 * psc(outcstep) * c, v50); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 31 * psc(outcstep) * c, v51); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 32 * psc(outcstep) * c, v52); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 33 * psc(outcstep) * c, v53); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 34 * psc(outcstep) * c, v54); + buffer_st4(bottom_tm_blob_data, v_tm_offset + 35 * psc(outcstep) * c, v55); } diff --git a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_output.comp b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_output.comp index e7a121019..cae99013d 100644 --- a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_output.comp +++ b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd43_transform_output.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -21,17 +10,17 @@ layout (constant_id = 0) const int bias_term = 0; layout (constant_id = 1) const int activation_type = 0; layout (constant_id = 2) const float activation_param_0 = 0; layout (constant_id = 3) const float activation_param_1 = 0; +layout (constant_id = 4) const int c = 0; -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; +#define shape_constant_id_offset 5 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 3) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 1) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 2) const int block_y = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer top_tm_blob { sfpvec4 top_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_blob { sfpvec4 top_blob_data[]; }; @@ -39,7 +28,6 @@ layout (binding = 2) readonly buffer bias_blob { sfpvec4 bias_data[]; }; layout (push_constant) uniform parameter { - int c; int cstep; int block_x; @@ -56,48 +44,48 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 36 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - afpvec4 v00 = buffer_ld4(top_tm_blob_data, v_tm_offset + 0 * psc(cstep)); - afpvec4 v01 = buffer_ld4(top_tm_blob_data, v_tm_offset + 1 * psc(cstep)); - afpvec4 v02 = buffer_ld4(top_tm_blob_data, v_tm_offset + 2 * psc(cstep)); - afpvec4 v03 = buffer_ld4(top_tm_blob_data, v_tm_offset + 3 * psc(cstep)); - afpvec4 v04 = buffer_ld4(top_tm_blob_data, v_tm_offset + 4 * psc(cstep)); - afpvec4 v05 = buffer_ld4(top_tm_blob_data, v_tm_offset + 5 * psc(cstep)); - afpvec4 v10 = buffer_ld4(top_tm_blob_data, v_tm_offset + 6 * psc(cstep)); - afpvec4 v11 = buffer_ld4(top_tm_blob_data, v_tm_offset + 7 * psc(cstep)); - afpvec4 v12 = buffer_ld4(top_tm_blob_data, v_tm_offset + 8 * psc(cstep)); - afpvec4 v13 = buffer_ld4(top_tm_blob_data, v_tm_offset + 9 * psc(cstep)); - afpvec4 v14 = buffer_ld4(top_tm_blob_data, v_tm_offset + 10 * psc(cstep)); - afpvec4 v15 = buffer_ld4(top_tm_blob_data, v_tm_offset + 11 * psc(cstep)); - afpvec4 v20 = buffer_ld4(top_tm_blob_data, v_tm_offset + 12 * psc(cstep)); - afpvec4 v21 = buffer_ld4(top_tm_blob_data, v_tm_offset + 13 * psc(cstep)); - afpvec4 v22 = buffer_ld4(top_tm_blob_data, v_tm_offset + 14 * psc(cstep)); - afpvec4 v23 = buffer_ld4(top_tm_blob_data, v_tm_offset + 15 * psc(cstep)); - afpvec4 v24 = buffer_ld4(top_tm_blob_data, v_tm_offset + 16 * psc(cstep)); - afpvec4 v25 = buffer_ld4(top_tm_blob_data, v_tm_offset + 17 * psc(cstep)); - afpvec4 v30 = buffer_ld4(top_tm_blob_data, v_tm_offset + 18 * psc(cstep)); - afpvec4 v31 = buffer_ld4(top_tm_blob_data, v_tm_offset + 19 * psc(cstep)); - afpvec4 v32 = buffer_ld4(top_tm_blob_data, v_tm_offset + 20 * psc(cstep)); - afpvec4 v33 = buffer_ld4(top_tm_blob_data, v_tm_offset + 21 * psc(cstep)); - afpvec4 v34 = buffer_ld4(top_tm_blob_data, v_tm_offset + 22 * psc(cstep)); - afpvec4 v35 = buffer_ld4(top_tm_blob_data, v_tm_offset + 23 * psc(cstep)); - afpvec4 v40 = buffer_ld4(top_tm_blob_data, v_tm_offset + 24 * psc(cstep)); - afpvec4 v41 = buffer_ld4(top_tm_blob_data, v_tm_offset + 25 * psc(cstep)); - afpvec4 v42 = buffer_ld4(top_tm_blob_data, v_tm_offset + 26 * psc(cstep)); - afpvec4 v43 = buffer_ld4(top_tm_blob_data, v_tm_offset + 27 * psc(cstep)); - afpvec4 v44 = buffer_ld4(top_tm_blob_data, v_tm_offset + 28 * psc(cstep)); - afpvec4 v45 = buffer_ld4(top_tm_blob_data, v_tm_offset + 29 * psc(cstep)); - afpvec4 v50 = buffer_ld4(top_tm_blob_data, v_tm_offset + 30 * psc(cstep)); - afpvec4 v51 = buffer_ld4(top_tm_blob_data, v_tm_offset + 31 * psc(cstep)); - afpvec4 v52 = buffer_ld4(top_tm_blob_data, v_tm_offset + 32 * psc(cstep)); - afpvec4 v53 = buffer_ld4(top_tm_blob_data, v_tm_offset + 33 * psc(cstep)); - afpvec4 v54 = buffer_ld4(top_tm_blob_data, v_tm_offset + 34 * psc(cstep)); - afpvec4 v55 = buffer_ld4(top_tm_blob_data, v_tm_offset + 35 * psc(cstep)); + int v_tm_offset = gz * psc(cstep) + gy * psc(block_x) + gx; + + afpvec4 v00 = buffer_ld4(top_tm_blob_data, v_tm_offset + 0 * psc(cstep) * c); + afpvec4 v01 = buffer_ld4(top_tm_blob_data, v_tm_offset + 1 * psc(cstep) * c); + afpvec4 v02 = buffer_ld4(top_tm_blob_data, v_tm_offset + 2 * psc(cstep) * c); + afpvec4 v03 = buffer_ld4(top_tm_blob_data, v_tm_offset + 3 * psc(cstep) * c); + afpvec4 v04 = buffer_ld4(top_tm_blob_data, v_tm_offset + 4 * psc(cstep) * c); + afpvec4 v05 = buffer_ld4(top_tm_blob_data, v_tm_offset + 5 * psc(cstep) * c); + afpvec4 v10 = buffer_ld4(top_tm_blob_data, v_tm_offset + 6 * psc(cstep) * c); + afpvec4 v11 = buffer_ld4(top_tm_blob_data, v_tm_offset + 7 * psc(cstep) * c); + afpvec4 v12 = buffer_ld4(top_tm_blob_data, v_tm_offset + 8 * psc(cstep) * c); + afpvec4 v13 = buffer_ld4(top_tm_blob_data, v_tm_offset + 9 * psc(cstep) * c); + afpvec4 v14 = buffer_ld4(top_tm_blob_data, v_tm_offset + 10 * psc(cstep) * c); + afpvec4 v15 = buffer_ld4(top_tm_blob_data, v_tm_offset + 11 * psc(cstep) * c); + afpvec4 v20 = buffer_ld4(top_tm_blob_data, v_tm_offset + 12 * psc(cstep) * c); + afpvec4 v21 = buffer_ld4(top_tm_blob_data, v_tm_offset + 13 * psc(cstep) * c); + afpvec4 v22 = buffer_ld4(top_tm_blob_data, v_tm_offset + 14 * psc(cstep) * c); + afpvec4 v23 = buffer_ld4(top_tm_blob_data, v_tm_offset + 15 * psc(cstep) * c); + afpvec4 v24 = buffer_ld4(top_tm_blob_data, v_tm_offset + 16 * psc(cstep) * c); + afpvec4 v25 = buffer_ld4(top_tm_blob_data, v_tm_offset + 17 * psc(cstep) * c); + afpvec4 v30 = buffer_ld4(top_tm_blob_data, v_tm_offset + 18 * psc(cstep) * c); + afpvec4 v31 = buffer_ld4(top_tm_blob_data, v_tm_offset + 19 * psc(cstep) * c); + afpvec4 v32 = buffer_ld4(top_tm_blob_data, v_tm_offset + 20 * psc(cstep) * c); + afpvec4 v33 = buffer_ld4(top_tm_blob_data, v_tm_offset + 21 * psc(cstep) * c); + afpvec4 v34 = buffer_ld4(top_tm_blob_data, v_tm_offset + 22 * psc(cstep) * c); + afpvec4 v35 = buffer_ld4(top_tm_blob_data, v_tm_offset + 23 * psc(cstep) * c); + afpvec4 v40 = buffer_ld4(top_tm_blob_data, v_tm_offset + 24 * psc(cstep) * c); + afpvec4 v41 = buffer_ld4(top_tm_blob_data, v_tm_offset + 25 * psc(cstep) * c); + afpvec4 v42 = buffer_ld4(top_tm_blob_data, v_tm_offset + 26 * psc(cstep) * c); + afpvec4 v43 = buffer_ld4(top_tm_blob_data, v_tm_offset + 27 * psc(cstep) * c); + afpvec4 v44 = buffer_ld4(top_tm_blob_data, v_tm_offset + 28 * psc(cstep) * c); + afpvec4 v45 = buffer_ld4(top_tm_blob_data, v_tm_offset + 29 * psc(cstep) * c); + afpvec4 v50 = buffer_ld4(top_tm_blob_data, v_tm_offset + 30 * psc(cstep) * c); + afpvec4 v51 = buffer_ld4(top_tm_blob_data, v_tm_offset + 31 * psc(cstep) * c); + afpvec4 v52 = buffer_ld4(top_tm_blob_data, v_tm_offset + 32 * psc(cstep) * c); + afpvec4 v53 = buffer_ld4(top_tm_blob_data, v_tm_offset + 33 * psc(cstep) * c); + afpvec4 v54 = buffer_ld4(top_tm_blob_data, v_tm_offset + 34 * psc(cstep) * c); + afpvec4 v55 = buffer_ld4(top_tm_blob_data, v_tm_offset + 35 * psc(cstep) * c); #define sq2 1.41421356237 #define sq2_m2 1.41421356237*2 diff --git a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm.comp index b20fb8774..e0f35f1ef 100644 --- a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm.comp @@ -1,30 +1,18 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 #define LOCAL_MEMORY_UNROLL_INCH 8 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfpvec4 bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfpvec4 top_tm_blob_data[]; }; @@ -32,11 +20,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec4 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -52,7 +37,7 @@ void main() int gz = int(gl_GlobalInvocationID.z); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif @@ -61,21 +46,21 @@ void main() afpvec4 sum2 = afpvec4(0.f); afpvec4 sum3 = afpvec4(0.f); - int v_offset = gz * psc(cstep) + gx; - int w_offset = (gz * psc(c) * psc(outc) + gy * psc(c)) * 4; + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = (gz * c * outc + gy * c) * 4; #if NCNN_shader_local_memory const int lx = int(gl_LocalInvocationID.x); const int ly = int(gl_LocalInvocationID.y); int z = 0; - for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < psc(c); z += LOCAL_MEMORY_UNROLL_INCH) + for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < c; z += LOCAL_MEMORY_UNROLL_INCH) { if (ly < 4) { for (int z4 = 0; z4 < LOCAL_MEMORY_UNROLL_INCH; z4++) { - tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(outw) + ly]); + tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(cstep) + ly]); } } @@ -109,21 +94,21 @@ void main() sum3 += v3 * k; } - v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(outw); + v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(cstep); w_offset += LOCAL_MEMORY_UNROLL_INCH * 4; barrier(); } - if (z < psc(c)) + if (z < c) { - const int remain = psc(c) - z; + const int remain = c - z; if (ly < 4) { for (int z4 = 0; z4 < remain; z4++) { - tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(outw) + ly]); + tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(cstep) + ly]); } } @@ -158,7 +143,7 @@ void main() } } #else - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afpvec4 v0 = buffer_ld4(bottom_tm_blob_data, v_offset + 0); afpvec4 v1 = buffer_ld4(bottom_tm_blob_data, v_offset + 1); @@ -177,17 +162,17 @@ void main() sum2 += v2 * k; sum3 += v3 * k; - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 4; } #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st4(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st4(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm_cm_16_16_16.comp b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm_cm_16_16_16.comp deleted file mode 100644 index d8dcbb0b1..000000000 --- a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm_cm_16_16_16.comp +++ /dev/null @@ -1,269 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int batch = 1; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; - -layout (binding = 0) readonly buffer bottom_tm_blob { uvec2 bottom_tm_blob_data[]; }; -layout (binding = 1) writeonly buffer top_tm_blob { uvec2 top_tm_blob_data[]; }; -layout (binding = 2) readonly buffer weight_tm_blob { uvec2 weight_tm_data[]; }; - -layout (push_constant) uniform parameter -{ - int c; - int cstep; - - int outw; - int outc; - int outcstep; -} p; - -#define UNROLL_INCH 2 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k1[UNROLL_INCH * 16*4]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - int gz = int(gl_GlobalInvocationID.z); - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0 = coopmat(0.f); - coopmat sum1 = coopmat(0.f); - coopmat sum2 = coopmat(0.f); - coopmat sum3 = coopmat(0.f); -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum2 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum3 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(0.f); -#else - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); -#endif -#endif - - const int N = psc(c) / 4; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int v_offset = gz * psc(cstep) + ((z + lxd16) * 4 + j) * psc(outw) + (gx + lxm16); - - tmp_v0[tmp_i] = (gx + lxm16) < psc(outw) ? bottom_tm_blob_data[v_offset] : uvec2(0); - tmp_v1[tmp_i] = (gx + lxm16 + 16) < psc(outw) ? bottom_tm_blob_data[v_offset + 16] : uvec2(0); - - const int w_offset = gz * psc(outc) * psc(c) * 4 + gy * psc(c) * 4 + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_tm_data[w_offset]; - tmp_k1[tmp_i] = weight_tm_data[w_offset + psc(c) * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd16 == 0) - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int v_offset = gz * psc(cstep) + ((z + lxd16) * 4 + j) * psc(outw) + (gx + lxm16); - - tmp_v0[tmp_i] = (gx + lxm16) < psc(outw) ? bottom_tm_blob_data[v_offset] : uvec2(0); - tmp_v1[tmp_i] = (gx + lxm16 + 16) < psc(outw) ? bottom_tm_blob_data[v_offset + 16] : uvec2(0); - - const int w_offset = gz * psc(outc) * psc(c) * 4 + gy * psc(c) * 4 + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_tm_data[w_offset]; - tmp_k1[tmp_i] = weight_tm_data[w_offset + psc(c) * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) - return; - -#if ncnn_VK_KHR_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStore(sum0, tmp_v0, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1, tmp_v1, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2, tmp_v0, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3, tmp_v1, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); -#else - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - - coopMatStore(sum0_fp16, tmp_v0, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); -#endif -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStoreNV(sum0, tmp_v0, 0, 4, false); - coopMatStoreNV(sum1, tmp_v1, 0, 4, false); - coopMatStoreNV(sum2, tmp_v0, 16*4, 4, false); - coopMatStoreNV(sum3, tmp_v1, 16*4, 4, false); -#else - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum3); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 4, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 4, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*4, 4, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*4, 4, false); -#endif -#endif - - barrier(); - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 4 + j + lxd16*16*4; - const int gi = gz * psc(outcstep) + (gy + lxd16 * 4 + j) * psc(outw) + (gx + lxm16); - - if (gy + lxd16 * 4 + j < psc(outc)) - { - if (gx + lxm16 < psc(outw)) top_tm_blob_data[gi] = tmp_v0[tmp_vi]; - if (gx + lxm16 + 16 < psc(outw)) top_tm_blob_data[gi + 16] = tmp_v1[tmp_vi]; - } - } - } -} diff --git a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm_cm_16_8_8.comp b/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm_cm_16_8_8.comp deleted file mode 100644 index de95f5307..000000000 --- a/src/layer/vulkan/shader/convolution_pack4_3x3s1d1_winograd_gemm_cm_16_8_8.comp +++ /dev/null @@ -1,354 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int batch = 1; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; - -layout (binding = 0) readonly buffer bottom_tm_blob { uvec2 bottom_tm_blob_data[]; }; -layout (binding = 1) writeonly buffer top_tm_blob { uvec2 top_tm_blob_data[]; }; -layout (binding = 2) readonly buffer weight_tm_blob { uvec2 weight_tm_data[]; }; - -layout (push_constant) uniform parameter -{ - int c; - int cstep; - - int outw; - int outc; - int outcstep; -} p; - -#define UNROLL_INCH 4 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*2]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*2]; -shared uvec2 tmp_k0[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k1[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k2[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k3[UNROLL_INCH * 8*2]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - int gz = int(gl_GlobalInvocationID.z); - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd8 = lx / 8; // 0 1 2 3 - const int lxm8 = lx % 8; // 0 1 2 3 .... 7 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0 = coopmat(0.f); - coopmat sum1 = coopmat(0.f); - coopmat sum2 = coopmat(0.f); - coopmat sum3 = coopmat(0.f); - coopmat sum4 = coopmat(0.f); - coopmat sum5 = coopmat(0.f); - coopmat sum6 = coopmat(0.f); - coopmat sum7 = coopmat(0.f); -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum0 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum1 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum2 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum3 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum4 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum5 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum6 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum7 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(0.f); -#else - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum4 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum5 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum6 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum7 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); -#endif -#endif - - const int N = psc(c) / 2; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - int v_offset = gz * psc(cstep) + ((z + lxd8) * 2 + j) * psc(outw) + (gx + lxm8); - - tmp_v0[tmp_vi] = (gx + lxm8) < psc(outw) ? bottom_tm_blob_data[v_offset] : uvec2(0); - tmp_v0[tmp_vi + 16] = (gx + lxm8 + 8) < psc(outw) ? bottom_tm_blob_data[v_offset + 8] : uvec2(0); - tmp_v1[tmp_vi] = (gx + lxm8 + 16) < psc(outw) ? bottom_tm_blob_data[v_offset + 16] : uvec2(0); - tmp_v1[tmp_vi + 16] = (gx + lxm8 + 24) < psc(outw) ? bottom_tm_blob_data[v_offset + 24] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gz * psc(outc) * psc(c) * 4 + gy * psc(c) * 4 + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_tm_data[w_offset]; - tmp_k1[tmp_ki] = weight_tm_data[w_offset + psc(c) * 8]; - tmp_k2[tmp_ki] = weight_tm_data[w_offset + psc(c) * 16]; - tmp_k3[tmp_ki] = weight_tm_data[w_offset + psc(c) * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd8 < remain) - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - int v_offset = gz * psc(cstep) + ((z + lxd8) * 2 + j) * psc(outw) + (gx + lxm8); - - tmp_v0[tmp_vi] = (gx + lxm8) < psc(outw) ? bottom_tm_blob_data[v_offset] : uvec2(0); - tmp_v0[tmp_vi + 16] = (gx + lxm8 + 8) < psc(outw) ? bottom_tm_blob_data[v_offset + 8] : uvec2(0); - tmp_v1[tmp_vi] = (gx + lxm8 + 16) < psc(outw) ? bottom_tm_blob_data[v_offset + 16] : uvec2(0); - tmp_v1[tmp_vi + 16] = (gx + lxm8 + 24) < psc(outw) ? bottom_tm_blob_data[v_offset + 24] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gz * psc(outc) * psc(c) * 4 + gy * psc(c) * 4 + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_tm_data[w_offset]; - tmp_k1[tmp_ki] = weight_tm_data[w_offset + psc(c) * 8]; - tmp_k2[tmp_ki] = weight_tm_data[w_offset + psc(c) * 16]; - tmp_k3[tmp_ki] = weight_tm_data[w_offset + psc(c) * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) - return; - -#if ncnn_VK_KHR_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStore(sum0, tmp_v0, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1, tmp_v1, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2, tmp_v0, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3, tmp_v1, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum4, tmp_v0, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum5, tmp_v1, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum6, tmp_v0, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum7, tmp_v1, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); -#else - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - coopmat sum4_fp16 = coopmat(sum4); - coopmat sum5_fp16 = coopmat(sum5); - coopmat sum6_fp16 = coopmat(sum6); - coopmat sum7_fp16 = coopmat(sum7); - - coopMatStore(sum0_fp16, tmp_v0, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum4_fp16, tmp_v0, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum5_fp16, tmp_v1, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum6_fp16, tmp_v0, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum7_fp16, tmp_v1, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); -#endif -#elif ncnn_VK_NV_cooperative_matrix -#if NCNN_fp16_arithmetic - coopMatStoreNV(sum0, tmp_v0, 0, 2, false); - coopMatStoreNV(sum1, tmp_v1, 0, 2, false); - coopMatStoreNV(sum2, tmp_v0, 16*2, 2, false); - coopMatStoreNV(sum3, tmp_v1, 16*2, 2, false); - coopMatStoreNV(sum4, tmp_v0, 16*4, 2, false); - coopMatStoreNV(sum5, tmp_v1, 16*4, 2, false); - coopMatStoreNV(sum6, tmp_v0, 16*6, 2, false); - coopMatStoreNV(sum7, tmp_v1, 16*6, 2, false); -#else - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum3); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum4_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum4); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum5_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum5); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum6_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum6); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum7_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum7); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 2, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 2, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*2, 2, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*2, 2, false); - coopMatStoreNV(sum4_fp16, tmp_v0, 16*4, 2, false); - coopMatStoreNV(sum5_fp16, tmp_v1, 16*4, 2, false); - coopMatStoreNV(sum6_fp16, tmp_v0, 16*6, 2, false); - coopMatStoreNV(sum7_fp16, tmp_v1, 16*6, 2, false); -#endif -#endif - - barrier(); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 2 + lxd16 + j*16*2; - const int gi = gz * psc(outcstep) + (gy + lxd16 + j*2) * psc(outw) + (gx + lxm16); - - if (gy + j * 2 + lxd16 < psc(outc)) - { - if (gx + lxm16 < psc(outw)) top_tm_blob_data[gi] = tmp_v0[tmp_vi]; - if (gx + lxm16 + 16 < psc(outw)) top_tm_blob_data[gi + 16] = tmp_v1[tmp_vi]; - } - } - } -} diff --git a/src/layer/vulkan/shader/convolution_pack4_gemm.comp b/src/layer/vulkan/shader/convolution_pack4_gemm.comp index a46a74a5d..af0781fe2 100644 --- a/src/layer/vulkan/shader/convolution_pack4_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack4_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4_gemm_cm_16_16_16.comp b/src/layer/vulkan/shader/convolution_pack4_gemm_cm_16_16_16.comp deleted file mode 100644 index c3f87ffec..000000000 --- a/src/layer/vulkan/shader/convolution_pack4_gemm_cm_16_16_16.comp +++ /dev/null @@ -1,349 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_GOOGLE_include_directive: enable -#include "vulkan_activation.comp" - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int kernel_w = 1; -layout (constant_id = 1) const int kernel_h = 1; -layout (constant_id = 2) const int dilation_w = 1; -layout (constant_id = 3) const int dilation_h = 1; -layout (constant_id = 4) const int stride_w = 1; -layout (constant_id = 5) const int stride_h = 1; -layout (constant_id = 6) const int bias_term = 0; -layout (constant_id = 7) const int activation_type = 0; -layout (constant_id = 8) const float activation_param_0 = 0; -layout (constant_id = 9) const float activation_param_1 = 0; - -#define shape_constant_id_offset 10 -layout (constant_id = shape_constant_id_offset + 0) const int w = 0; -layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 7) const int outcstep = 0; - -layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; -layout (binding = 1) writeonly buffer top_blob { sfpvec4 top_blob_data[]; }; -layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; -layout (binding = 3) readonly buffer bias_blob { uvec2 bias_data[]; }; - -layout (push_constant) uniform parameter -{ - int w; - int h; - int c; - int cstep; - - int outw; - int outh; - int outc; - int outcstep; -} p; - -#define UNROLL_INCH 2 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k1[UNROLL_INCH * 16*4]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - - const int outsize = psc(outw) * psc(outh); - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0; - coopmat sum1; - coopmat sum2; - coopmat sum3; - - if (bias_term == 1) - { - coopmat bias0; - coopmat bias1; - - coopMatLoad(bias0, bias_data, gy, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias1, bias_data, gy + 4, 0, gl_CooperativeMatrixLayoutRowMajor); - - sum0 = coopmat(bias0); - sum1 = coopmat(bias0); - sum2 = coopmat(bias1); - sum3 = coopmat(bias1); - } - else - { - sum0 = coopmat(0.f); - sum1 = coopmat(0.f); - sum2 = coopmat(0.f); - sum3 = coopmat(0.f); - } -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum0; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum1; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum2; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum3; - - if (bias_term == 1) - { - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> bias0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> bias1; - - coopMatLoadNV(bias0, bias_data, gy, 0, false); - coopMatLoadNV(bias1, bias_data, gy + 4, 0, false); - - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias0); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias0); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias1); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(bias1); - } - else - { - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - } -#endif - - const int maxk = kernel_w * kernel_h; - const int N = psc(c) / 4 * maxk; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int sz = (z + lxd16) / maxk; - const int kk = (z + lxd16) % maxk; - - const int ky = kk / kernel_w; - const int kx = kk % kernel_w; - - const ivec2 gx16 = gx + lxm16 + ivec2(0, 16); - - const ivec2 sy16 = gx16 / psc(outw); - const ivec2 sx16 = gx16 % psc(outw); - - const ivec2 sxs16 = sx16 * stride_w; - const ivec2 sys16 = sy16 * stride_h; - - const ivec2 v_offset = (sz * 4 + j) * psc(cstep) + (sys16 + ky * dilation_h) * psc(w) + sxs16 + kx * dilation_w; - - tmp_v0[tmp_i] = gx16.r < psc(outcstep) ? bottom_blob_data[v_offset.r] : uvec2(0); - tmp_v1[tmp_i] = gx16.g < psc(outcstep) ? bottom_blob_data[v_offset.g] : uvec2(0); - - int w_offset = gy * psc(c) * 4 * maxk + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_data[w_offset]; - tmp_k1[tmp_i] = weight_data[w_offset + psc(c) * maxk * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd16 == 0) - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int sz = (z + lxd16) / maxk; - const int kk = (z + lxd16) % maxk; - - const int ky = kk / kernel_w; - const int kx = kk % kernel_w; - - const ivec2 gx16 = gx + lxm16 + ivec2(0, 16); - - const ivec2 sy16 = gx16 / psc(outw); - const ivec2 sx16 = gx16 % psc(outw); - - const ivec2 sxs16 = sx16 * stride_w; - const ivec2 sys16 = sy16 * stride_h; - - const ivec2 v_offset = (sz * 4 + j) * psc(cstep) + (sys16 + ky * dilation_h) * psc(w) + sxs16 + kx * dilation_w; - - tmp_v0[tmp_i] = gx16.r < psc(outcstep) ? bottom_blob_data[v_offset.r] : uvec2(0); - tmp_v1[tmp_i] = gx16.g < psc(outcstep) ? bottom_blob_data[v_offset.g] : uvec2(0); - - int w_offset = gy * psc(c) * 4 * maxk + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_data[w_offset]; - tmp_k1[tmp_i] = weight_data[w_offset + psc(c) * maxk * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (gx >= outsize || gy >= psc(outc)) - return; - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - - coopMatStore(sum0_fp16, tmp_v0, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum3); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 4, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 4, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*4, 4, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*4, 4, false); -#endif - - barrier(); - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 4 + j + lxd16*16*4; - - uvec2 sum0_u2 = tmp_v0[tmp_vi]; - uvec2 sum1_u2 = tmp_v1[tmp_vi]; - - afpvec4 sum0 = afpvec4(unpackHalf2x16(sum0_u2.x), unpackHalf2x16(sum0_u2.y)); - afpvec4 sum1 = afpvec4(unpackHalf2x16(sum1_u2.x), unpackHalf2x16(sum1_u2.y)); - - sum0 = activation_afpvec4(sum0, activation_type, activation_param_0, activation_param_1); - sum1 = activation_afpvec4(sum1, activation_type, activation_param_0, activation_param_1); - - const int gi = (gy + lxd16 * 4 + j) * psc(outcstep) + (gx + lxm16); - - if (gy + lxd16 * 4 + j < psc(outc)) - { - if (gx + lxm16 < psc(outcstep)) buffer_st4(top_blob_data, gi, sum0); - if (gx + lxm16 + 16 < psc(outcstep)) buffer_st4(top_blob_data, gi + 16, sum1); - } - } - } -} diff --git a/src/layer/vulkan/shader/convolution_pack4_gemm_cm_16_8_8.comp b/src/layer/vulkan/shader/convolution_pack4_gemm_cm_16_8_8.comp deleted file mode 100644 index b8f6e3f17..000000000 --- a/src/layer/vulkan/shader/convolution_pack4_gemm_cm_16_8_8.comp +++ /dev/null @@ -1,448 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_GOOGLE_include_directive: enable -#include "vulkan_activation.comp" - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int kernel_w = 1; -layout (constant_id = 1) const int kernel_h = 1; -layout (constant_id = 2) const int dilation_w = 1; -layout (constant_id = 3) const int dilation_h = 1; -layout (constant_id = 4) const int stride_w = 1; -layout (constant_id = 5) const int stride_h = 1; -layout (constant_id = 6) const int bias_term = 0; -layout (constant_id = 7) const int activation_type = 0; -layout (constant_id = 8) const float activation_param_0 = 0; -layout (constant_id = 9) const float activation_param_1 = 0; - -#define shape_constant_id_offset 10 -layout (constant_id = shape_constant_id_offset + 0) const int w = 0; -layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 7) const int outcstep = 0; - -layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; -layout (binding = 1) writeonly buffer top_blob { sfpvec4 top_blob_data[]; }; -layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; -layout (binding = 3) readonly buffer bias_blob { uvec2 bias_data[]; }; - -layout (push_constant) uniform parameter -{ - int w; - int h; - int c; - int cstep; - - int outw; - int outh; - int outc; - int outcstep; -} p; - -#define UNROLL_INCH 4 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*2]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*2]; -shared uvec2 tmp_k0[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k1[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k2[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k3[UNROLL_INCH * 8*2]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - - const int outsize = psc(outw) * psc(outh); - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd8 = lx / 8; // 0 1 2 3 - const int lxm8 = lx % 8; // 0 1 2 3 .... 7 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0; - coopmat sum1; - coopmat sum2; - coopmat sum3; - coopmat sum4; - coopmat sum5; - coopmat sum6; - coopmat sum7; - - if (bias_term == 1) - { - coopmat bias0; - coopmat bias1; - coopmat bias2; - coopmat bias3; - - coopMatLoad(bias0, bias_data, gy, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias1, bias_data, gy + 2, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias2, bias_data, gy + 4, 0, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(bias3, bias_data, gy + 6, 0, gl_CooperativeMatrixLayoutRowMajor); - - sum0 = coopmat(bias0); - sum1 = coopmat(bias0); - sum2 = coopmat(bias1); - sum3 = coopmat(bias1); - sum4 = coopmat(bias2); - sum5 = coopmat(bias2); - sum6 = coopmat(bias3); - sum7 = coopmat(bias3); - } - else - { - sum0 = coopmat(0.f); - sum1 = coopmat(0.f); - sum2 = coopmat(0.f); - sum3 = coopmat(0.f); - sum4 = coopmat(0.f); - sum5 = coopmat(0.f); - sum6 = coopmat(0.f); - sum7 = coopmat(0.f); - } -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum0; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum1; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum2; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum3; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum4; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum5; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum6; - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum7; - - if (bias_term == 1) - { - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias1; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias2; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> bias3; - - coopMatLoadNV(bias0, bias_data, gy, 0, false); - coopMatLoadNV(bias1, bias_data, gy + 2, 0, false); - coopMatLoadNV(bias2, bias_data, gy + 4, 0, false); - coopMatLoadNV(bias3, bias_data, gy + 6, 0, false); - - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias0); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias0); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias1); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias1); - sum4 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias2); - sum5 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias2); - sum6 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias3); - sum7 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(bias3); - } - else - { - sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum4 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum5 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum6 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - sum7 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - } -#endif - - const int maxk = kernel_w * kernel_h; - const int N = psc(c) / 2 * maxk; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - const int sz = (z + lxd8) / maxk; - const int kk = (z + lxd8) % maxk; - - const int ky = kk / kernel_w; - const int kx = kk % kernel_w; - - const ivec4 gx16 = gx + lxm8 + ivec4(0, 8, 16, 24); - - const ivec4 sy16 = gx16 / psc(outw); - const ivec4 sx16 = gx16 % psc(outw); - - const ivec4 sxs16 = sx16 * stride_w; - const ivec4 sys16 = sy16 * stride_h; - - const ivec4 v_offset = (sz * 2 + j) * psc(cstep) + (sys16 + ky * dilation_h) * psc(w) + sxs16 + kx * dilation_w; - - tmp_v0[tmp_vi] = gx16.r < psc(outcstep) ? bottom_blob_data[v_offset.r] : uvec2(0); - tmp_v0[tmp_vi + 16] = gx16.g < psc(outcstep) ? bottom_blob_data[v_offset.g] : uvec2(0); - tmp_v1[tmp_vi] = gx16.b < psc(outcstep) ? bottom_blob_data[v_offset.b] : uvec2(0); - tmp_v1[tmp_vi + 16] = gx16.a < psc(outcstep) ? bottom_blob_data[v_offset.a] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gy * psc(c) * 4 * maxk + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_data[w_offset]; - tmp_k1[tmp_ki] = weight_data[w_offset + psc(c) * maxk * 8]; - tmp_k2[tmp_ki] = weight_data[w_offset + psc(c) * maxk * 16]; - tmp_k3[tmp_ki] = weight_data[w_offset + psc(c) * maxk * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd8 < remain) - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - const int sz = (z + lxd8) / maxk; - const int kk = (z + lxd8) % maxk; - - const int ky = kk / kernel_w; - const int kx = kk % kernel_w; - - const ivec4 gx16 = gx + lxm8 + ivec4(0, 8, 16, 24); - - const ivec4 sy16 = gx16 / psc(outw); - const ivec4 sx16 = gx16 % psc(outw); - - const ivec4 sxs16 = sx16 * stride_w; - const ivec4 sys16 = sy16 * stride_h; - - const ivec4 v_offset = (sz * 2 + j) * psc(cstep) + (sys16 + ky * dilation_h) * psc(w) + sxs16 + kx * dilation_w; - - tmp_v0[tmp_vi] = gx16.r < psc(outcstep) ? bottom_blob_data[v_offset.r] : uvec2(0); - tmp_v0[tmp_vi + 16] = gx16.g < psc(outcstep) ? bottom_blob_data[v_offset.g] : uvec2(0); - tmp_v1[tmp_vi] = gx16.b < psc(outcstep) ? bottom_blob_data[v_offset.b] : uvec2(0); - tmp_v1[tmp_vi + 16] = gx16.a < psc(outcstep) ? bottom_blob_data[v_offset.a] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gy * psc(c) * 4 * maxk + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_data[w_offset]; - tmp_k1[tmp_ki] = weight_data[w_offset + psc(c) * maxk * 8]; - tmp_k2[tmp_ki] = weight_data[w_offset + psc(c) * maxk * 16]; - tmp_k3[tmp_ki] = weight_data[w_offset + psc(c) * maxk * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (gx >= outsize || gy >= psc(outc)) - return; - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - coopmat sum4_fp16 = coopmat(sum4); - coopmat sum5_fp16 = coopmat(sum5); - coopmat sum6_fp16 = coopmat(sum6); - coopmat sum7_fp16 = coopmat(sum7); - - coopMatStore(sum0_fp16, tmp_v0, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum4_fp16, tmp_v0, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum5_fp16, tmp_v1, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum6_fp16, tmp_v0, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum7_fp16, tmp_v1, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum3); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum4_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum4); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum5_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum5); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum6_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum6); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum7_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum7); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 2, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 2, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*2, 2, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*2, 2, false); - coopMatStoreNV(sum4_fp16, tmp_v0, 16*4, 2, false); - coopMatStoreNV(sum5_fp16, tmp_v1, 16*4, 2, false); - coopMatStoreNV(sum6_fp16, tmp_v0, 16*6, 2, false); - coopMatStoreNV(sum7_fp16, tmp_v1, 16*6, 2, false); -#endif - - barrier(); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 2 + lxd16 + j*16*2; - const int gi = (gy + lxd16 + j*2) * psc(outcstep) + (gx + lxm16); - - if (gy + j * 2 + lxd16 < psc(outc)) - { - if (gx + lxm16 < psc(outcstep)) - { - uvec2 sum0_u2 = tmp_v0[tmp_vi]; - afpvec4 sum0 = afpvec4(unpackHalf2x16(sum0_u2.x), unpackHalf2x16(sum0_u2.y)); - sum0 = activation_afpvec4(sum0, activation_type, activation_param_0, activation_param_1); - buffer_st4(top_blob_data, gi, sum0); - } - if (gx + lxm16 + 16 < psc(outcstep)) - { - uvec2 sum1_u2 = tmp_v1[tmp_vi]; - afpvec4 sum1 = afpvec4(unpackHalf2x16(sum1_u2.x), unpackHalf2x16(sum1_u2.y)); - sum1 = activation_afpvec4(sum1, activation_type, activation_param_0, activation_param_1); - buffer_st4(top_blob_data, gi + 16, sum1); - } - } - } - } -} diff --git a/src/layer/vulkan/shader/convolution_pack4to1.comp b/src/layer/vulkan/shader/convolution_pack4to1.comp index eece80c39..96a34cfea 100644 --- a/src/layer/vulkan/shader/convolution_pack4to1.comp +++ b/src/layer/vulkan/shader/convolution_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4to1_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack4to1_1x1s1d1.comp index be970864d..4dbaf9ab8 100644 --- a/src/layer/vulkan/shader/convolution_pack4to1_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack4to1_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4to1_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack4to1_3x3s1d1_winograd_gemm.comp index beac114ce..017c77578 100644 --- a/src/layer/vulkan/shader/convolution_pack4to1_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack4to1_3x3s1d1_winograd_gemm.comp @@ -1,30 +1,18 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 #define LOCAL_MEMORY_UNROLL_INCH 8 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfpvec4 bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfp top_tm_blob_data[]; }; @@ -32,11 +20,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec4 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -52,7 +37,7 @@ void main() int gz = int(gl_GlobalInvocationID.z); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif @@ -61,21 +46,21 @@ void main() afp sum2 = afp(0.f); afp sum3 = afp(0.f); - int v_offset = gz * psc(cstep) + gx; - int w_offset = gz * psc(c) * psc(outc) + gy * psc(c); + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = gz * c * outc + gy * c; #if NCNN_shader_local_memory const int lx = int(gl_LocalInvocationID.x); const int ly = int(gl_LocalInvocationID.y); int z = 0; - for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < psc(c); z += LOCAL_MEMORY_UNROLL_INCH) + for (; z + (LOCAL_MEMORY_UNROLL_INCH - 1) < c; z += LOCAL_MEMORY_UNROLL_INCH) { if (ly < 4) { for (int z4 = 0; z4 < LOCAL_MEMORY_UNROLL_INCH; z4++) { - tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(outw) + ly]); + tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(cstep) + ly]); } } @@ -104,21 +89,21 @@ void main() sum3 += dot(v3, k); } - v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(outw); + v_offset += LOCAL_MEMORY_UNROLL_INCH * psc(cstep); w_offset += LOCAL_MEMORY_UNROLL_INCH; barrier(); } - if (z < psc(c)) + if (z < c) { - const int remain = psc(c) - z; + const int remain = c - z; if (ly < 4) { for (int z4 = 0; z4 < remain; z4++) { - tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(outw) + ly]); + tmp_v[lx][z4][ly] = sfp2lfpvec4(bottom_tm_blob_data[v_offset + z4 * psc(cstep) + ly]); } } @@ -148,7 +133,7 @@ void main() } } #else - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afpvec4 v0 = buffer_ld4(bottom_tm_blob_data, v_offset + 0); afpvec4 v1 = buffer_ld4(bottom_tm_blob_data, v_offset + 1); @@ -162,17 +147,17 @@ void main() sum2 += dot(v2, k); sum3 += dot(v3, k); - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 1; } #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; #endif - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st1(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st1(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack4to1_gemm.comp b/src/layer/vulkan/shader/convolution_pack4to1_gemm.comp index a9f5f778a..bb0c8a51e 100644 --- a/src/layer/vulkan/shader/convolution_pack4to1_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack4to1_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4to8.comp b/src/layer/vulkan/shader/convolution_pack4to8.comp index 54d8f61ad..7c9ccd4c4 100644 --- a/src/layer/vulkan/shader/convolution_pack4to8.comp +++ b/src/layer/vulkan/shader/convolution_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4to8_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack4to8_1x1s1d1.comp index a6133bbec..075e474e1 100644 --- a/src/layer/vulkan/shader/convolution_pack4to8_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack4to8_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack4to8_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack4to8_3x3s1d1_winograd_gemm.comp index 45f421635..b42eb4ac2 100644 --- a/src/layer/vulkan/shader/convolution_pack4to8_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack4to8_3x3s1d1_winograd_gemm.comp @@ -1,28 +1,16 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfpvec4 bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfpvec8 top_tm_blob_data[]; }; @@ -30,11 +18,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec4 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -44,7 +29,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; afpvec8 sum0 = afpvec8(afpvec4(0.f), afpvec4(0.f)); @@ -52,10 +37,10 @@ void main() afpvec8 sum2 = afpvec8(afpvec4(0.f), afpvec4(0.f)); afpvec8 sum3 = afpvec8(afpvec4(0.f), afpvec4(0.f)); - int v_offset = gz * psc(cstep) + gx; - int w_offset = (gz * psc(c) * psc(outc) + gy * psc(c)) * 8; + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = (gz * c * outc + gy * c) * 8; - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afpvec4 v0 = buffer_ld4(bottom_tm_blob_data, v_offset + 0); afpvec4 v1 = buffer_ld4(bottom_tm_blob_data, v_offset + 1); @@ -108,11 +93,11 @@ void main() sum3[1].b += dot(v3, k6); sum3[1].a += dot(v3, k7); - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 8; } - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st8(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st8(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack4to8_gemm.comp b/src/layer/vulkan/shader/convolution_pack4to8_gemm.comp index 9be8108b2..74ffdd879 100644 --- a/src/layer/vulkan/shader/convolution_pack4to8_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack4to8_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8.comp b/src/layer/vulkan/shader/convolution_pack8.comp index da213a7c9..5693ef2af 100644 --- a/src/layer/vulkan/shader/convolution_pack8.comp +++ b/src/layer/vulkan/shader/convolution_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack8_1x1s1d1.comp index 1df9925cc..d39fecd05 100644 --- a/src/layer/vulkan/shader/convolution_pack8_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack8_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_input.comp b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_input.comp index 1284260d9..b7afb5ca9 100644 --- a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_input.comp +++ b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_input.comp @@ -1,29 +1,19 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 +layout (constant_id = 0) const int c = 0; + +#define shape_constant_id_offset 1 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outcstep = 0; -layout (constant_id = shape_constant_id_offset + 5) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 6) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 4) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 5) const int block_y = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec8 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer bottom_tm_blob { sfpvec8 bottom_tm_blob_data[]; }; @@ -32,7 +22,6 @@ layout (push_constant) uniform parameter { int w; int h; - int c; int cstep; int outcstep; @@ -47,7 +36,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 4x4 @@ -126,22 +115,22 @@ void main() v33 = m33 - m31; // store 16 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - buffer_st8(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep), v00); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep), v01); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep), v02); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep), v03); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep), v10); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep), v11); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep), v12); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep), v13); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep), v20); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep), v21); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep), v22); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep), v23); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep), v30); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep), v31); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep), v32); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep), v33); + int v_tm_offset = gz * psc(outcstep) + gy * psc(block_x) + gx; + + buffer_st8(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep) * c, v00); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep) * c, v01); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep) * c, v02); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep) * c, v03); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep) * c, v10); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep) * c, v11); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep) * c, v12); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep) * c, v13); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep) * c, v20); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep) * c, v21); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep) * c, v22); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep) * c, v23); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep) * c, v30); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep) * c, v31); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep) * c, v32); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep) * c, v33); } diff --git a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_output.comp b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_output.comp index bb8147e87..8d3184761 100644 --- a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_output.comp +++ b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd23_transform_output.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -21,17 +10,17 @@ layout (constant_id = 0) const int bias_term = 0; layout (constant_id = 1) const int activation_type = 0; layout (constant_id = 2) const float activation_param_0 = 0; layout (constant_id = 3) const float activation_param_1 = 0; +layout (constant_id = 4) const int c = 0; -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; +#define shape_constant_id_offset 5 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 3) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 1) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 2) const int block_y = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer top_tm_blob { sfpvec8 top_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_blob { sfpvec8 top_blob_data[]; }; @@ -39,7 +28,6 @@ layout (binding = 2) readonly buffer bias_blob { sfpvec8 bias_data[]; }; layout (push_constant) uniform parameter { - int c; int cstep; int block_x; @@ -56,28 +44,28 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= psc(c)) + if (gx >= psc(block_x) || gy >= psc(block_y) || gz >= c) return; // load 16 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - afpvec8 v00 = buffer_ld8(top_tm_blob_data, v_tm_offset + 0 * psc(cstep)); - afpvec8 v01 = buffer_ld8(top_tm_blob_data, v_tm_offset + 1 * psc(cstep)); - afpvec8 v02 = buffer_ld8(top_tm_blob_data, v_tm_offset + 2 * psc(cstep)); - afpvec8 v03 = buffer_ld8(top_tm_blob_data, v_tm_offset + 3 * psc(cstep)); - afpvec8 v10 = buffer_ld8(top_tm_blob_data, v_tm_offset + 4 * psc(cstep)); - afpvec8 v11 = buffer_ld8(top_tm_blob_data, v_tm_offset + 5 * psc(cstep)); - afpvec8 v12 = buffer_ld8(top_tm_blob_data, v_tm_offset + 6 * psc(cstep)); - afpvec8 v13 = buffer_ld8(top_tm_blob_data, v_tm_offset + 7 * psc(cstep)); - afpvec8 v20 = buffer_ld8(top_tm_blob_data, v_tm_offset + 8 * psc(cstep)); - afpvec8 v21 = buffer_ld8(top_tm_blob_data, v_tm_offset + 9 * psc(cstep)); - afpvec8 v22 = buffer_ld8(top_tm_blob_data, v_tm_offset + 10 * psc(cstep)); - afpvec8 v23 = buffer_ld8(top_tm_blob_data, v_tm_offset + 11 * psc(cstep)); - afpvec8 v30 = buffer_ld8(top_tm_blob_data, v_tm_offset + 12 * psc(cstep)); - afpvec8 v31 = buffer_ld8(top_tm_blob_data, v_tm_offset + 13 * psc(cstep)); - afpvec8 v32 = buffer_ld8(top_tm_blob_data, v_tm_offset + 14 * psc(cstep)); - afpvec8 v33 = buffer_ld8(top_tm_blob_data, v_tm_offset + 15 * psc(cstep)); + int v_tm_offset = gz * psc(cstep) + gy * psc(block_x) + gx; + + afpvec8 v00 = buffer_ld8(top_tm_blob_data, v_tm_offset + 0 * psc(cstep) * c); + afpvec8 v01 = buffer_ld8(top_tm_blob_data, v_tm_offset + 1 * psc(cstep) * c); + afpvec8 v02 = buffer_ld8(top_tm_blob_data, v_tm_offset + 2 * psc(cstep) * c); + afpvec8 v03 = buffer_ld8(top_tm_blob_data, v_tm_offset + 3 * psc(cstep) * c); + afpvec8 v10 = buffer_ld8(top_tm_blob_data, v_tm_offset + 4 * psc(cstep) * c); + afpvec8 v11 = buffer_ld8(top_tm_blob_data, v_tm_offset + 5 * psc(cstep) * c); + afpvec8 v12 = buffer_ld8(top_tm_blob_data, v_tm_offset + 6 * psc(cstep) * c); + afpvec8 v13 = buffer_ld8(top_tm_blob_data, v_tm_offset + 7 * psc(cstep) * c); + afpvec8 v20 = buffer_ld8(top_tm_blob_data, v_tm_offset + 8 * psc(cstep) * c); + afpvec8 v21 = buffer_ld8(top_tm_blob_data, v_tm_offset + 9 * psc(cstep) * c); + afpvec8 v22 = buffer_ld8(top_tm_blob_data, v_tm_offset + 10 * psc(cstep) * c); + afpvec8 v23 = buffer_ld8(top_tm_blob_data, v_tm_offset + 11 * psc(cstep) * c); + afpvec8 v30 = buffer_ld8(top_tm_blob_data, v_tm_offset + 12 * psc(cstep) * c); + afpvec8 v31 = buffer_ld8(top_tm_blob_data, v_tm_offset + 13 * psc(cstep) * c); + afpvec8 v32 = buffer_ld8(top_tm_blob_data, v_tm_offset + 14 * psc(cstep) * c); + afpvec8 v33 = buffer_ld8(top_tm_blob_data, v_tm_offset + 15 * psc(cstep) * c); // const float itm[2][4] = { // {1.0f, 1.0f, 1.0f, 0.0f}, diff --git a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_input.comp b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_input.comp index fb5027496..3e86574d0 100644 --- a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_input.comp +++ b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_input.comp @@ -1,29 +1,19 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 +layout (constant_id = 0) const int c = 0; + +#define shape_constant_id_offset 1 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outcstep = 0; -layout (constant_id = shape_constant_id_offset + 5) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 6) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 4) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 5) const int block_y = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec8 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer bottom_tm_blob { sfpvec8 bottom_tm_blob_data[]; }; @@ -32,7 +22,6 @@ layout (push_constant) uniform parameter { int w; int h; - int c; int cstep; int outcstep; @@ -47,7 +36,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= p.block_x || gy >= p.block_y || gz >= psc(c)) + if (gx >= p.block_x || gy >= p.block_y || gz >= c) return; // load 6x6 @@ -198,42 +187,42 @@ void main() v55 = m51 - m53 * afp(2.5) + m55; // store 36 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - buffer_st8(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep), v00); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep), v01); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep), v02); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep), v03); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep), v04); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep), v05); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep), v10); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep), v11); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep), v12); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep), v13); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep), v14); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep), v15); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep), v20); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep), v21); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep), v22); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep), v23); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 16 * psc(outcstep), v24); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 17 * psc(outcstep), v25); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 18 * psc(outcstep), v30); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 19 * psc(outcstep), v31); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 20 * psc(outcstep), v32); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 21 * psc(outcstep), v33); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 22 * psc(outcstep), v34); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 23 * psc(outcstep), v35); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 24 * psc(outcstep), v40); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 25 * psc(outcstep), v41); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 26 * psc(outcstep), v42); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 27 * psc(outcstep), v43); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 28 * psc(outcstep), v44); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 29 * psc(outcstep), v45); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 30 * psc(outcstep), v50); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 31 * psc(outcstep), v51); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 32 * psc(outcstep), v52); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 33 * psc(outcstep), v53); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 34 * psc(outcstep), v54); - buffer_st8(bottom_tm_blob_data, v_tm_offset + 35 * psc(outcstep), v55); + int v_tm_offset = gz * psc(outcstep) + gy * psc(block_x) + gx; + + buffer_st8(bottom_tm_blob_data, v_tm_offset + 0 * psc(outcstep) * c, v00); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 1 * psc(outcstep) * c, v01); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 2 * psc(outcstep) * c, v02); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 3 * psc(outcstep) * c, v03); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 4 * psc(outcstep) * c, v04); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 5 * psc(outcstep) * c, v05); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 6 * psc(outcstep) * c, v10); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 7 * psc(outcstep) * c, v11); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 8 * psc(outcstep) * c, v12); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 9 * psc(outcstep) * c, v13); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 10 * psc(outcstep) * c, v14); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 11 * psc(outcstep) * c, v15); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 12 * psc(outcstep) * c, v20); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 13 * psc(outcstep) * c, v21); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 14 * psc(outcstep) * c, v22); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 15 * psc(outcstep) * c, v23); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 16 * psc(outcstep) * c, v24); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 17 * psc(outcstep) * c, v25); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 18 * psc(outcstep) * c, v30); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 19 * psc(outcstep) * c, v31); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 20 * psc(outcstep) * c, v32); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 21 * psc(outcstep) * c, v33); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 22 * psc(outcstep) * c, v34); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 23 * psc(outcstep) * c, v35); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 24 * psc(outcstep) * c, v40); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 25 * psc(outcstep) * c, v41); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 26 * psc(outcstep) * c, v42); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 27 * psc(outcstep) * c, v43); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 28 * psc(outcstep) * c, v44); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 29 * psc(outcstep) * c, v45); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 30 * psc(outcstep) * c, v50); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 31 * psc(outcstep) * c, v51); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 32 * psc(outcstep) * c, v52); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 33 * psc(outcstep) * c, v53); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 34 * psc(outcstep) * c, v54); + buffer_st8(bottom_tm_blob_data, v_tm_offset + 35 * psc(outcstep) * c, v55); } diff --git a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_output.comp b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_output.comp index 07b282f0e..1a2cd0775 100644 --- a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_output.comp +++ b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd43_transform_output.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -21,17 +10,17 @@ layout (constant_id = 0) const int bias_term = 0; layout (constant_id = 1) const int activation_type = 0; layout (constant_id = 2) const float activation_param_0 = 0; layout (constant_id = 3) const float activation_param_1 = 0; +layout (constant_id = 4) const int c = 0; -#define shape_constant_id_offset 4 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; +#define shape_constant_id_offset 5 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int block_x = 0; -layout (constant_id = shape_constant_id_offset + 3) const int block_y = 0; +layout (constant_id = shape_constant_id_offset + 1) const int block_x = 0; +layout (constant_id = shape_constant_id_offset + 2) const int block_y = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 6) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer top_tm_blob { sfpvec8 top_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_blob { sfpvec8 top_blob_data[]; }; @@ -39,7 +28,6 @@ layout (binding = 2) readonly buffer bias_blob { sfpvec8 bias_data[]; }; layout (push_constant) uniform parameter { - int c; int cstep; int block_x; @@ -56,48 +44,48 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= p.block_x || gy >= p.block_y || gz >= psc(c)) + if (gx >= p.block_x || gy >= p.block_y || gz >= c) return; // load 36 - int v_tm_offset = gz * psc(block_x) * psc(block_y) + gy * psc(block_x) + gx; - - afpvec8 v00 = buffer_ld8(top_tm_blob_data, v_tm_offset + 0 * psc(cstep)); - afpvec8 v01 = buffer_ld8(top_tm_blob_data, v_tm_offset + 1 * psc(cstep)); - afpvec8 v02 = buffer_ld8(top_tm_blob_data, v_tm_offset + 2 * psc(cstep)); - afpvec8 v03 = buffer_ld8(top_tm_blob_data, v_tm_offset + 3 * psc(cstep)); - afpvec8 v04 = buffer_ld8(top_tm_blob_data, v_tm_offset + 4 * psc(cstep)); - afpvec8 v05 = buffer_ld8(top_tm_blob_data, v_tm_offset + 5 * psc(cstep)); - afpvec8 v10 = buffer_ld8(top_tm_blob_data, v_tm_offset + 6 * psc(cstep)); - afpvec8 v11 = buffer_ld8(top_tm_blob_data, v_tm_offset + 7 * psc(cstep)); - afpvec8 v12 = buffer_ld8(top_tm_blob_data, v_tm_offset + 8 * psc(cstep)); - afpvec8 v13 = buffer_ld8(top_tm_blob_data, v_tm_offset + 9 * psc(cstep)); - afpvec8 v14 = buffer_ld8(top_tm_blob_data, v_tm_offset + 10 * psc(cstep)); - afpvec8 v15 = buffer_ld8(top_tm_blob_data, v_tm_offset + 11 * psc(cstep)); - afpvec8 v20 = buffer_ld8(top_tm_blob_data, v_tm_offset + 12 * psc(cstep)); - afpvec8 v21 = buffer_ld8(top_tm_blob_data, v_tm_offset + 13 * psc(cstep)); - afpvec8 v22 = buffer_ld8(top_tm_blob_data, v_tm_offset + 14 * psc(cstep)); - afpvec8 v23 = buffer_ld8(top_tm_blob_data, v_tm_offset + 15 * psc(cstep)); - afpvec8 v24 = buffer_ld8(top_tm_blob_data, v_tm_offset + 16 * psc(cstep)); - afpvec8 v25 = buffer_ld8(top_tm_blob_data, v_tm_offset + 17 * psc(cstep)); - afpvec8 v30 = buffer_ld8(top_tm_blob_data, v_tm_offset + 18 * psc(cstep)); - afpvec8 v31 = buffer_ld8(top_tm_blob_data, v_tm_offset + 19 * psc(cstep)); - afpvec8 v32 = buffer_ld8(top_tm_blob_data, v_tm_offset + 20 * psc(cstep)); - afpvec8 v33 = buffer_ld8(top_tm_blob_data, v_tm_offset + 21 * psc(cstep)); - afpvec8 v34 = buffer_ld8(top_tm_blob_data, v_tm_offset + 22 * psc(cstep)); - afpvec8 v35 = buffer_ld8(top_tm_blob_data, v_tm_offset + 23 * psc(cstep)); - afpvec8 v40 = buffer_ld8(top_tm_blob_data, v_tm_offset + 24 * psc(cstep)); - afpvec8 v41 = buffer_ld8(top_tm_blob_data, v_tm_offset + 25 * psc(cstep)); - afpvec8 v42 = buffer_ld8(top_tm_blob_data, v_tm_offset + 26 * psc(cstep)); - afpvec8 v43 = buffer_ld8(top_tm_blob_data, v_tm_offset + 27 * psc(cstep)); - afpvec8 v44 = buffer_ld8(top_tm_blob_data, v_tm_offset + 28 * psc(cstep)); - afpvec8 v45 = buffer_ld8(top_tm_blob_data, v_tm_offset + 29 * psc(cstep)); - afpvec8 v50 = buffer_ld8(top_tm_blob_data, v_tm_offset + 30 * psc(cstep)); - afpvec8 v51 = buffer_ld8(top_tm_blob_data, v_tm_offset + 31 * psc(cstep)); - afpvec8 v52 = buffer_ld8(top_tm_blob_data, v_tm_offset + 32 * psc(cstep)); - afpvec8 v53 = buffer_ld8(top_tm_blob_data, v_tm_offset + 33 * psc(cstep)); - afpvec8 v54 = buffer_ld8(top_tm_blob_data, v_tm_offset + 34 * psc(cstep)); - afpvec8 v55 = buffer_ld8(top_tm_blob_data, v_tm_offset + 35 * psc(cstep)); + int v_tm_offset = gz * psc(cstep) + gy * psc(block_x) + gx; + + afpvec8 v00 = buffer_ld8(top_tm_blob_data, v_tm_offset + 0 * psc(cstep) * c); + afpvec8 v01 = buffer_ld8(top_tm_blob_data, v_tm_offset + 1 * psc(cstep) * c); + afpvec8 v02 = buffer_ld8(top_tm_blob_data, v_tm_offset + 2 * psc(cstep) * c); + afpvec8 v03 = buffer_ld8(top_tm_blob_data, v_tm_offset + 3 * psc(cstep) * c); + afpvec8 v04 = buffer_ld8(top_tm_blob_data, v_tm_offset + 4 * psc(cstep) * c); + afpvec8 v05 = buffer_ld8(top_tm_blob_data, v_tm_offset + 5 * psc(cstep) * c); + afpvec8 v10 = buffer_ld8(top_tm_blob_data, v_tm_offset + 6 * psc(cstep) * c); + afpvec8 v11 = buffer_ld8(top_tm_blob_data, v_tm_offset + 7 * psc(cstep) * c); + afpvec8 v12 = buffer_ld8(top_tm_blob_data, v_tm_offset + 8 * psc(cstep) * c); + afpvec8 v13 = buffer_ld8(top_tm_blob_data, v_tm_offset + 9 * psc(cstep) * c); + afpvec8 v14 = buffer_ld8(top_tm_blob_data, v_tm_offset + 10 * psc(cstep) * c); + afpvec8 v15 = buffer_ld8(top_tm_blob_data, v_tm_offset + 11 * psc(cstep) * c); + afpvec8 v20 = buffer_ld8(top_tm_blob_data, v_tm_offset + 12 * psc(cstep) * c); + afpvec8 v21 = buffer_ld8(top_tm_blob_data, v_tm_offset + 13 * psc(cstep) * c); + afpvec8 v22 = buffer_ld8(top_tm_blob_data, v_tm_offset + 14 * psc(cstep) * c); + afpvec8 v23 = buffer_ld8(top_tm_blob_data, v_tm_offset + 15 * psc(cstep) * c); + afpvec8 v24 = buffer_ld8(top_tm_blob_data, v_tm_offset + 16 * psc(cstep) * c); + afpvec8 v25 = buffer_ld8(top_tm_blob_data, v_tm_offset + 17 * psc(cstep) * c); + afpvec8 v30 = buffer_ld8(top_tm_blob_data, v_tm_offset + 18 * psc(cstep) * c); + afpvec8 v31 = buffer_ld8(top_tm_blob_data, v_tm_offset + 19 * psc(cstep) * c); + afpvec8 v32 = buffer_ld8(top_tm_blob_data, v_tm_offset + 20 * psc(cstep) * c); + afpvec8 v33 = buffer_ld8(top_tm_blob_data, v_tm_offset + 21 * psc(cstep) * c); + afpvec8 v34 = buffer_ld8(top_tm_blob_data, v_tm_offset + 22 * psc(cstep) * c); + afpvec8 v35 = buffer_ld8(top_tm_blob_data, v_tm_offset + 23 * psc(cstep) * c); + afpvec8 v40 = buffer_ld8(top_tm_blob_data, v_tm_offset + 24 * psc(cstep) * c); + afpvec8 v41 = buffer_ld8(top_tm_blob_data, v_tm_offset + 25 * psc(cstep) * c); + afpvec8 v42 = buffer_ld8(top_tm_blob_data, v_tm_offset + 26 * psc(cstep) * c); + afpvec8 v43 = buffer_ld8(top_tm_blob_data, v_tm_offset + 27 * psc(cstep) * c); + afpvec8 v44 = buffer_ld8(top_tm_blob_data, v_tm_offset + 28 * psc(cstep) * c); + afpvec8 v45 = buffer_ld8(top_tm_blob_data, v_tm_offset + 29 * psc(cstep) * c); + afpvec8 v50 = buffer_ld8(top_tm_blob_data, v_tm_offset + 30 * psc(cstep) * c); + afpvec8 v51 = buffer_ld8(top_tm_blob_data, v_tm_offset + 31 * psc(cstep) * c); + afpvec8 v52 = buffer_ld8(top_tm_blob_data, v_tm_offset + 32 * psc(cstep) * c); + afpvec8 v53 = buffer_ld8(top_tm_blob_data, v_tm_offset + 33 * psc(cstep) * c); + afpvec8 v54 = buffer_ld8(top_tm_blob_data, v_tm_offset + 34 * psc(cstep) * c); + afpvec8 v55 = buffer_ld8(top_tm_blob_data, v_tm_offset + 35 * psc(cstep) * c); #define sq2 1.41421356237 #define sq2_m2 1.41421356237*2 diff --git a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd_gemm.comp index 5d581b287..ae19570b2 100644 --- a/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack8_3x3s1d1_winograd_gemm.comp @@ -1,28 +1,16 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfpvec8 bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfpvec8 top_tm_blob_data[]; }; @@ -30,11 +18,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec8 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -44,7 +29,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; afpvec8 sum0 = afpvec8(afpvec4(0.f), afpvec4(0.f)); @@ -52,10 +37,10 @@ void main() afpvec8 sum2 = afpvec8(afpvec4(0.f), afpvec4(0.f)); afpvec8 sum3 = afpvec8(afpvec4(0.f), afpvec4(0.f)); - int v_offset = gz * psc(cstep) + gx; - int w_offset = (gz * psc(c) * psc(outc) + gy * psc(c)) * 8; + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = (gz * c * outc + gy * c) * 8; - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afpvec8 v0 = buffer_ld8(bottom_tm_blob_data, v_offset + 0); afpvec8 v1 = buffer_ld8(bottom_tm_blob_data, v_offset + 1); @@ -108,11 +93,11 @@ void main() sum3[1].b += dot(v3[0], k6[0]) + dot(v3[1], k6[1]); sum3[1].a += dot(v3[0], k7[0]) + dot(v3[1], k7[1]); - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 8; } - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st8(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st8(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack8_gemm.comp b/src/layer/vulkan/shader/convolution_pack8_gemm.comp index 93c339e00..84fcf9878 100644 --- a/src/layer/vulkan/shader/convolution_pack8_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack8_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8to1.comp b/src/layer/vulkan/shader/convolution_pack8to1.comp index f7fc488c7..59f992860 100644 --- a/src/layer/vulkan/shader/convolution_pack8to1.comp +++ b/src/layer/vulkan/shader/convolution_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8to1_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack8to1_1x1s1d1.comp index 7977ad249..a9dd38c2f 100644 --- a/src/layer/vulkan/shader/convolution_pack8to1_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack8to1_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8to1_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack8to1_3x3s1d1_winograd_gemm.comp index cbbfe6cbb..4e407891a 100644 --- a/src/layer/vulkan/shader/convolution_pack8to1_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack8to1_3x3s1d1_winograd_gemm.comp @@ -1,28 +1,16 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfpvec8 bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfp top_tm_blob_data[]; }; @@ -30,11 +18,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec8 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -44,7 +29,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; afp sum0 = afp(0.f); @@ -52,10 +37,10 @@ void main() afp sum2 = afp(0.f); afp sum3 = afp(0.f); - int v_offset = gz * psc(cstep) + gx; - int w_offset = gz * psc(c) * psc(outc) + gy * psc(c); + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = gz * c * outc + gy * c; - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afpvec8 v0 = buffer_ld8(bottom_tm_blob_data, v_offset + 0); afpvec8 v1 = buffer_ld8(bottom_tm_blob_data, v_offset + 1); @@ -70,11 +55,11 @@ void main() sum2 += dot(v2[0], k[0]) + dot(v2[1], k[1]); sum3 += dot(v3[0], k[0]) + dot(v3[1], k[1]); - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 1; } - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st1(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st1(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack8to1_gemm.comp b/src/layer/vulkan/shader/convolution_pack8to1_gemm.comp index 8dc786fc2..6395f44b4 100644 --- a/src/layer/vulkan/shader/convolution_pack8to1_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack8to1_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8to4.comp b/src/layer/vulkan/shader/convolution_pack8to4.comp index 5782dca11..40ce42ba8 100644 --- a/src/layer/vulkan/shader/convolution_pack8to4.comp +++ b/src/layer/vulkan/shader/convolution_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8to4_1x1s1d1.comp b/src/layer/vulkan/shader/convolution_pack8to4_1x1s1d1.comp index e1266a162..e7493ba87 100644 --- a/src/layer/vulkan/shader/convolution_pack8to4_1x1s1d1.comp +++ b/src/layer/vulkan/shader/convolution_pack8to4_1x1s1d1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_pack8to4_3x3s1d1_winograd_gemm.comp b/src/layer/vulkan/shader/convolution_pack8to4_3x3s1d1_winograd_gemm.comp index 4e0ce4d3f..409f80c9d 100644 --- a/src/layer/vulkan/shader/convolution_pack8to4_3x3s1d1_winograd_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack8to4_3x3s1d1_winograd_gemm.comp @@ -1,28 +1,16 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const int batch = 1; +layout (constant_id = 1) const int c = 0; +layout (constant_id = 2) const int outc = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int c = 0; -layout (constant_id = shape_constant_id_offset + 1) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outc = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +#define shape_constant_id_offset 3 +layout (constant_id = shape_constant_id_offset + 0) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 1) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 2) const int outcstep = 0; layout (binding = 0) readonly buffer bottom_tm_blob { sfpvec8 bottom_tm_blob_data[]; }; layout (binding = 1) writeonly buffer top_tm_blob { sfpvec4 top_tm_blob_data[]; }; @@ -30,11 +18,8 @@ layout (binding = 2) readonly buffer weight_tm_blob { sfpvec8 weight_tm_data[]; layout (push_constant) uniform parameter { - int c; int cstep; - int outw; - int outc; int outcstep; } p; @@ -44,7 +29,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outc) || gz >= batch) + if (gx >= psc(outw) || gy >= outc || gz >= batch) return; afpvec4 sum0 = afpvec4(0.f); @@ -52,10 +37,10 @@ void main() afpvec4 sum2 = afpvec4(0.f); afpvec4 sum3 = afpvec4(0.f); - int v_offset = gz * psc(cstep) + gx; - int w_offset = (gz * psc(c) * psc(outc) + gy * psc(c)) * 4; + int v_offset = gz * c * psc(cstep) + gx; + int w_offset = (gz * c * outc + gy * c) * 4; - for (int z = 0; z < psc(c); z++) + for (int z = 0; z < c; z++) { afpvec8 v0 = buffer_ld8(bottom_tm_blob_data, v_offset + 0); afpvec8 v1 = buffer_ld8(bottom_tm_blob_data, v_offset + 1); @@ -88,11 +73,11 @@ void main() sum3.b += dot(v3[0], k2[0]) + dot(v3[1], k2[1]); sum3.a += dot(v3[0], k3[0]) + dot(v3[1], k3[1]); - v_offset += psc(outw); + v_offset += psc(cstep); w_offset += 4; } - int gi = gz * psc(outcstep) + gy * psc(outw) + gx; + int gi = gz * outc * psc(outcstep) + gy * psc(outcstep) + gx; buffer_st4(top_tm_blob_data, gi + 0, sum0); if (gx + 1 < psc(outw)) buffer_st4(top_tm_blob_data, gi + 1, sum1); diff --git a/src/layer/vulkan/shader/convolution_pack8to4_gemm.comp b/src/layer/vulkan/shader/convolution_pack8to4_gemm.comp index 5fc89fee7..60bcf58e5 100644 --- a/src/layer/vulkan/shader/convolution_pack8to4_gemm.comp +++ b/src/layer/vulkan/shader/convolution_pack8to4_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolution_winograd_gemm_cm.comp b/src/layer/vulkan/shader/convolution_winograd_gemm_cm.comp new file mode 100644 index 000000000..e310b5b36 --- /dev/null +++ b/src/layer/vulkan/shader/convolution_winograd_gemm_cm.comp @@ -0,0 +1,1183 @@ +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause + +#version 450 + +#extension GL_GOOGLE_include_directive: require +#include "vulkan_activation.comp" + +#extension GL_EXT_control_flow_attributes: require + +#extension GL_KHR_shader_subgroup_basic: require + +#extension GL_KHR_memory_scope_semantics: require +#extension GL_EXT_shader_explicit_arithmetic_types: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#if ncnn_VK_KHR_cooperative_matrix +#extension GL_KHR_cooperative_matrix: require +#elif ncnn_VK_NV_cooperative_matrix +#extension GL_NV_cooperative_matrix: require +#endif + +layout (constant_id = 0) const uint batch = 1; +layout (constant_id = 1) const uint M = 1; +layout (constant_id = 2) const uint N = 1; +layout (constant_id = 3) const uint K = 1; +layout (constant_id = 4) const uint UNROLL_SG_M = 2; +layout (constant_id = 5) const uint UNROLL_SG_N = 2; +layout (constant_id = 6) const uint UNROLL_SG_K = 2; +layout (constant_id = 7) const uint UNROLL_WG_M = 2; +layout (constant_id = 8) const uint UNROLL_WG_N = 2; +layout (constant_id = 9) const uint inch = 1; +layout (constant_id = 10) const uint outch = 1; +layout (constant_id = 11) const uint elempack = 1; +layout (constant_id = 12) const uint out_elempack = 1; +layout (constant_id = 13) const uint wbstep = 0; + +#define shape_constant_id_offset 14 +layout (constant_id = shape_constant_id_offset + 0) const uint size = 0; +layout (constant_id = shape_constant_id_offset + 1) const uint cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const uint outcstep = 0; + +layout (binding = 0) readonly buffer bottom_tm_blob { uvec2 bottom_tm_blob_data[]; }; +layout (binding = 1) writeonly buffer top_tm_blob { uvec2 top_tm_blob_data[]; }; +layout (binding = 2) readonly buffer weight_tm_blob { uvec2 weight_tm_data[]; }; + +layout (push_constant) uniform parameter +{ + uint size; + uint cstep; + uint outcstep; +} p; + +shared uvec2 tmp_v[UNROLL_WG_M][UNROLL_SG_M * UNROLL_SG_K * M * K / 4]; + +shared uvec2 tmp_k[UNROLL_WG_N][UNROLL_SG_N * UNROLL_SG_K * K * N / 4]; + +shared uvec2 tmp_o[UNROLL_WG_N * UNROLL_WG_M][UNROLL_SG_N * UNROLL_SG_M * M * N / 4]; + +void main() +{ + // assert gl_WorkGroupSize.x == gl_SubgroupSize + // but neither gl_SubgroupSize nor gl_WorkGroupSize.x is a constant + const uint local_size = ncnn_subgroupSize * UNROLL_WG_M * UNROLL_WG_N; + + // [ WG_UN * WG_UM * [ SG_UN * SG_UM * subgroup ] ] + + // <----WG_UN----> + // +---N--+-SG_UN+------+------+ + // | | | |XXXXXX| + // M | XXXX<----coopmat + // | | | |XXXXXX| + // +-- --SG0-- --+-- --SG2-- --+ + // | | | | | + // SG_UM | | + // | | | | | + // ^ +------+--WORKGROUP--+------+ + // | | | | | | + // | | | | + // | | | | | | + // WG_UM+-- --SG1-- --+-- --SG3-- --+ + // | | | | | | + // | | | | + // | | | | | | + // v +------+------+------+------+ + // + + const uint gz = gl_GlobalInvocationID.z; + if (gz >= batch) + return; + + const uint wgi = gl_WorkGroupID.x; + const uint sgi = gl_SubgroupID; + + const uint wgmm = (psc(size) + M * UNROLL_SG_M * UNROLL_WG_M - 1) / (M * UNROLL_SG_M * UNROLL_WG_M); + const uint wgnn = (outch + N * UNROLL_SG_N * UNROLL_WG_N - 1) / (N * UNROLL_SG_N * UNROLL_WG_N); + + const uint wgmi = wgi / wgnn; + const uint wgni = wgi % wgnn; + + const uint sgmi = sgi / UNROLL_WG_N; + const uint sgni = sgi % UNROLL_WG_N; + +// const uint mm = (psc(size) + M - 1) / M; +// const uint nn = (outch + N - 1) / N; + const uint kk = (inch + K - 1) / K; + + if (wgmi >= wgmm) + return; + + const uint li = gl_LocalInvocationID.x; + const uint si = gl_SubgroupInvocationID; + + const uint Md4 = M / 4; + const uint Nd4 = N / 4; + const uint Kd4 = K / 4; + + const uint ni = (wgni * UNROLL_WG_N + sgni) * UNROLL_SG_N; + const uint mi = (wgmi * UNROLL_WG_M + sgmi) * UNROLL_SG_M; + +#if ncnn_VK_KHR_cooperative_matrix + coopmat sum[UNROLL_SG_N][UNROLL_SG_M]; +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#else + fcoopmatNV<32, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#endif +#endif + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopmat(0.f); +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + sum[zn][zm] = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(0.f); +#else + sum[zn][zm] = fcoopmatNV<32, gl_ScopeSubgroup, M, N>(0.f); +#endif +#endif + } + } + + uint k = 0; + + if (kk >= UNROLL_SG_K * 2) + { + // local stack and shared memory ping-pong + + // prefetch + uvec2 prefetch_tmp_v[(UNROLL_SG_M * UNROLL_SG_K * M * K / 4 + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N)]; + uvec2 prefetch_tmp_k[(UNROLL_SG_N * UNROLL_SG_K * K * N / 4 + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M)]; + + // prefetch the very first + { + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_tm_blob_data[(gz * inch + gk) * cstepd4 + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_tm_blob_data[(gz * inchd4 + gk) * psc(cstep) + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_tm_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = gz * wbstep / 4 + ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_tm_data[w_offset + siq]; + } + } + } + } + + k += UNROLL_SG_K; + + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) + { + barrier(); + + // copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + + // prefetch the next + { + const uint ki = k * K; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_tm_blob_data[(gz * inch + gk) * cstepd4 + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_tm_blob_data[(gz * inchd4 + gk) * psc(cstep) + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_tm_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = gz * wbstep / 4 + ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_tm_data[w_offset + siq]; + } + } + } + } + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + + barrier(); + + // the last copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + else if (kk >= UNROLL_SG_K) + { + // no ping-pong version + + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_tm_blob_data[(gz * inch + gk) * cstepd4 + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_tm_blob_data[(gz * inchd4 + gk) * psc(cstep) + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_tm_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = gz * wbstep / 4 + ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = weight_tm_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + k += UNROLL_SG_K; + } + + for (; k < kk; k++) + { + const uint ki = k * K; + + barrier(); + + // load bottom_tm_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM = Md4 * K * UNROLL_SG_M; + const uint Md4_K_USGM_d_subgroupsize = (Md4_K_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM) + { + const uint zm = siq / (Md4 * K); + const uint ij = siq % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_tm_blob_data[(gz * inch + gk) * cstepd4 + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM = Kd4 * M * UNROLL_SG_M; + const uint Kd4_M_USGM_d_subgroupsize = (Kd4_M_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM) + { + const uint zmi = siq / Kd4; + const uint j = siq % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_tm_blob_data[(gz * inchd4 + gk) * psc(cstep) + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + // weight_tm_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + + const uint w_offset = gz * wbstep / 4 + ((wgni * kk + k) * UNROLL_WG_N + sgni) * Nd4_K_USGN; + + const uint Nd4_K_USGN_d_subgroupsize = (Nd4_K_USGN + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN) + { + tmp_k[sgni][siq] = weight_tm_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (out_elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#endif +#endif + } + else // if (out_elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#endif +#endif + } + } + } + + barrier(); + + // store top_tm_blob + { + if (out_elempack == 1) + { + // +-M-+ + // N | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UN+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +- -+ + // | | | + // | +- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint outcstepd4 = psc(outcstep) / 4; + + const uint Md4_N_USGM_USGN = Md4 * N * UNROLL_SG_M * UNROLL_SG_N; + const uint Md4_N_USGM_USGN_d_subgroupsize = (Md4_N_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Md4_N_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Md4_N_USGM_USGN % ncnn_subgroupSize == 0 || siq < Md4_N_USGM_USGN) + { + const uint zn = siq / (Md4 * N * UNROLL_SG_M); + const uint zmij = siq % (Md4 * N * UNROLL_SG_M); + const uint zm = zmij / (Md4 * N); + const uint ij = zmij % (Md4 * N); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gn = (ni + zn) * N + i; + const uint gm = (mi + zm) * Md4 + j; + + if (gn < outch && gm < outcstepd4) + { + top_tm_blob_data[(gz * outch + gn) * outcstepd4 + gm] = tmp_o[sgi][siq]; + } + } + } + } + else // if (out_elempack == 4) + { + // +-N-+ + // M | + // +---+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UN+---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // v +---+ + + const uint outchd4 = outch / 4; + + const uint Nd4_M_USGM_USGN = Nd4 * M * UNROLL_SG_M * UNROLL_SG_N; + const uint Nd4_M_USGM_USGN_d_subgroupsize = (Nd4_M_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Nd4_M_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Nd4_M_USGM_USGN % ncnn_subgroupSize == 0 || siq < Nd4_M_USGM_USGN) + { + const uint zn = siq / (Nd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Nd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Nd4; + const uint j = zmij % Nd4; + + const uint gn = (ni + zn) * Nd4 + j; + const uint gm = mi * M + zmi; + + if (gn < outchd4 && gm < psc(size)) + { + top_tm_blob_data[(gz * outchd4 + gn) * psc(outcstep) + gm] = tmp_o[sgi][siq]; + } + } + } + } + } +} diff --git a/src/layer/vulkan/shader/convolutiondepthwise.comp b/src/layer/vulkan/shader/convolutiondepthwise.comp index e75a90abb..d6db0ba25 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group.comp b/src/layer/vulkan/shader/convolutiondepthwise_group.comp index 2d7257a6e..9e2b36799 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to4.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to4.comp index aa11b5789..6b585c8e3 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to4.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to8.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to8.comp index 9e3f871c8..fa77b785a 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to8.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack4.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack4.comp index 9fdebc599..a1103d350 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack4.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to1.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to1.comp index d412e3637..65f70d6b4 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to1.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to8.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to8.comp index 4615b65f5..d437aada2 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to8.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack8.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack8.comp index a61db952e..abc680e7a 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack8.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to1.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to1.comp index aa8b6979a..161f9efcb 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to1.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to4.comp b/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to4.comp index 25fd41eae..200a7ef03 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to4.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_group_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_pack4.comp b/src/layer/vulkan/shader/convolutiondepthwise_pack4.comp index d092dfd79..73a2aac11 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_pack4.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/convolutiondepthwise_pack8.comp b/src/layer/vulkan/shader/convolutiondepthwise_pack8.comp index 4b14a1d5e..d93d84aaa 100644 --- a/src/layer/vulkan/shader/convolutiondepthwise_pack8.comp +++ b/src/layer/vulkan/shader/convolutiondepthwise_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop.comp b/src/layer/vulkan/shader/crop.comp index 07c656f60..5ac784164 100644 --- a/src/layer/vulkan/shader/crop.comp +++ b/src/layer/vulkan/shader/crop.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack1to4.comp b/src/layer/vulkan/shader/crop_pack1to4.comp index e6fd2da51..b95caf2c9 100644 --- a/src/layer/vulkan/shader/crop_pack1to4.comp +++ b/src/layer/vulkan/shader/crop_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack1to8.comp b/src/layer/vulkan/shader/crop_pack1to8.comp index bd28bf3f9..d1977ceb2 100644 --- a/src/layer/vulkan/shader/crop_pack1to8.comp +++ b/src/layer/vulkan/shader/crop_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack4.comp b/src/layer/vulkan/shader/crop_pack4.comp index 30e35a31b..db81b8b25 100644 --- a/src/layer/vulkan/shader/crop_pack4.comp +++ b/src/layer/vulkan/shader/crop_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack4to1.comp b/src/layer/vulkan/shader/crop_pack4to1.comp index 835a01a88..7b5551d19 100644 --- a/src/layer/vulkan/shader/crop_pack4to1.comp +++ b/src/layer/vulkan/shader/crop_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack4to8.comp b/src/layer/vulkan/shader/crop_pack4to8.comp index 54381b8df..e67fbc3a3 100644 --- a/src/layer/vulkan/shader/crop_pack4to8.comp +++ b/src/layer/vulkan/shader/crop_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack8.comp b/src/layer/vulkan/shader/crop_pack8.comp index eb5694ecf..1bf3574d2 100644 --- a/src/layer/vulkan/shader/crop_pack8.comp +++ b/src/layer/vulkan/shader/crop_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack8to1.comp b/src/layer/vulkan/shader/crop_pack8to1.comp index ca707b18e..d363d7dab 100644 --- a/src/layer/vulkan/shader/crop_pack8to1.comp +++ b/src/layer/vulkan/shader/crop_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/crop_pack8to4.comp b/src/layer/vulkan/shader/crop_pack8to4.comp index 277507309..9d8aef61c 100644 --- a/src/layer/vulkan/shader/crop_pack8to4.comp +++ b/src/layer/vulkan/shader/crop_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution.comp b/src/layer/vulkan/shader/deconvolution.comp index 828257314..d7392eb51 100644 --- a/src/layer/vulkan/shader/deconvolution.comp +++ b/src/layer/vulkan/shader/deconvolution.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_col2im.comp b/src/layer/vulkan/shader/deconvolution_col2im.comp index 5c8bd3d4d..4edf82130 100644 --- a/src/layer/vulkan/shader/deconvolution_col2im.comp +++ b/src/layer/vulkan/shader/deconvolution_col2im.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -27,14 +16,15 @@ layout (constant_id = 6) const int bias_term = 0; layout (constant_id = 7) const int activation_type = 0; layout (constant_id = 8) const float activation_param_0 = 0; layout (constant_id = 9) const float activation_param_1 = 0; +layout (constant_id = 10) const int outc = 0; -#define shape_constant_id_offset 10 +#define shape_constant_id_offset 11 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outc = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer col_blob { sfp col_blob_data[]; }; @@ -45,10 +35,10 @@ layout (push_constant) uniform parameter { int w; int h; + int cstep; int outw; int outh; - int outc; int outcstep; } p; @@ -58,7 +48,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outh) || gz >= psc(outc)) + if (gx >= psc(outw) || gy >= psc(outh) || gz >= outc) return; afp sum; @@ -95,7 +85,7 @@ void main() h_k /= dilation_h; w_k /= dilation_w; - const int gi = (gz * maxk + h_k * kernel_w + w_k) * psc(w) * psc(h) + sy * psc(w) + sx; + const int gi = (gz * maxk + h_k * kernel_w + w_k) * psc(cstep) + sy * psc(w) + sx; sum += buffer_ld1(col_blob_data, gi); } diff --git a/src/layer/vulkan/shader/deconvolution_gemm.comp b/src/layer/vulkan/shader/deconvolution_gemm.comp index f853fb06a..179f70208 100644 --- a/src/layer/vulkan/shader/deconvolution_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -24,8 +13,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfp bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfp col_blob_data[]; }; @@ -38,8 +27,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; #if NCNN_shader_local_memory @@ -53,7 +42,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif @@ -169,14 +158,14 @@ void main() #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st1(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st1(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st1(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st1(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st1(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st1(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st1(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_gemm_cm.comp b/src/layer/vulkan/shader/deconvolution_gemm_cm.comp new file mode 100644 index 000000000..332ac8ded --- /dev/null +++ b/src/layer/vulkan/shader/deconvolution_gemm_cm.comp @@ -0,0 +1,1177 @@ +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause + +#version 450 + +#extension GL_GOOGLE_include_directive: require +#include "vulkan_activation.comp" + +#extension GL_EXT_control_flow_attributes: require + +#extension GL_KHR_shader_subgroup_basic: require + +#extension GL_KHR_memory_scope_semantics: require +#extension GL_EXT_shader_explicit_arithmetic_types: require +#extension GL_EXT_shader_explicit_arithmetic_types_float16: require +#if ncnn_VK_KHR_cooperative_matrix +#extension GL_KHR_cooperative_matrix: require +#elif ncnn_VK_NV_cooperative_matrix +#extension GL_NV_cooperative_matrix: require +#endif + +layout (constant_id = 0) const uint M = 1; +layout (constant_id = 1) const uint N = 1; +layout (constant_id = 2) const uint K = 1; +layout (constant_id = 3) const uint UNROLL_SG_M = 2; +layout (constant_id = 4) const uint UNROLL_SG_N = 2; +layout (constant_id = 5) const uint UNROLL_SG_K = 2; +layout (constant_id = 6) const uint UNROLL_WG_M = 2; +layout (constant_id = 7) const uint UNROLL_WG_N = 2; +layout (constant_id = 8) const uint inch = 1; +layout (constant_id = 9) const uint outch = 1; +layout (constant_id = 10) const uint elempack = 1; +layout (constant_id = 11) const uint out_elempack = 1; + +#define shape_constant_id_offset 12 +layout (constant_id = shape_constant_id_offset + 0) const uint size = 0; +layout (constant_id = shape_constant_id_offset + 1) const uint cstep = 0; +layout (constant_id = shape_constant_id_offset + 2) const uint outcstep = 0; + +layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; +layout (binding = 1) writeonly buffer col_blob { uvec2 col_blob_data[]; }; +layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; + +layout (push_constant) uniform parameter +{ + uint size; + uint cstep; + uint outcstep; +} p; + +shared uvec2 tmp_v[UNROLL_WG_M][UNROLL_SG_M * UNROLL_SG_K * M * K / 4]; + +shared uvec2 tmp_k[UNROLL_WG_N][UNROLL_SG_N * UNROLL_SG_K * K * N / 4]; + +shared uvec2 tmp_o[UNROLL_WG_N * UNROLL_WG_M][UNROLL_SG_N * UNROLL_SG_M * M * N / 4]; + +void main() +{ + // assert gl_WorkGroupSize.x == gl_SubgroupSize + // but neither gl_SubgroupSize nor gl_WorkGroupSize.x is a constant + const uint local_size = ncnn_subgroupSize * UNROLL_WG_M * UNROLL_WG_N; + + // [ WG_UN * WG_UM * [ SG_UN * SG_UM * subgroup ] ] + + // <----WG_UN----> + // +---N--+-SG_UN+------+------+ + // | | | |XXXXXX| + // M | XXXX<----coopmat + // | | | |XXXXXX| + // +-- --SG0-- --+-- --SG2-- --+ + // | | | | | + // SG_UM | | + // | | | | | + // ^ +------+--WORKGROUP--+------+ + // | | | | | | + // | | | | + // | | | | | | + // WG_UM+-- --SG1-- --+-- --SG3-- --+ + // | | | | | | + // | | | | + // | | | | | | + // v +------+------+------+------+ + // + + const uint wgi = gl_WorkGroupID.x; + const uint sgi = gl_SubgroupID; + + const uint wgmm = (psc(size) + M * UNROLL_SG_M * UNROLL_WG_M - 1) / (M * UNROLL_SG_M * UNROLL_WG_M); + const uint wgnn = (outch + N * UNROLL_SG_N * UNROLL_WG_N - 1) / (N * UNROLL_SG_N * UNROLL_WG_N); + + const uint wgmi = wgi / wgnn; + const uint wgni = wgi % wgnn; + + const uint sgmi = sgi / UNROLL_WG_N; + const uint sgni = sgi % UNROLL_WG_N; + +// const uint mm = (psc(size) + M - 1) / M; +// const uint nn = (outch + N - 1) / N; + const uint kk = (inch + K - 1) / K; + + if (wgmi >= wgmm) + return; + + const uint li = gl_LocalInvocationID.x; + const uint si = gl_SubgroupInvocationID; + + const uint Md4 = M / 4; + const uint Nd4 = N / 4; + const uint Kd4 = K / 4; + + const uint ni = (wgni * UNROLL_WG_N + sgni) * UNROLL_SG_N; + const uint mi = (wgmi * UNROLL_WG_M + sgmi) * UNROLL_SG_M; + +#if ncnn_VK_KHR_cooperative_matrix + coopmat sum[UNROLL_SG_N][UNROLL_SG_M]; +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#else + fcoopmatNV<32, gl_ScopeSubgroup, M, N> sum[UNROLL_SG_N][UNROLL_SG_M]; +#endif +#endif + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopmat(0.f); +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + sum[zn][zm] = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(0.f); +#else + sum[zn][zm] = fcoopmatNV<32, gl_ScopeSubgroup, M, N>(0.f); +#endif +#endif + } + } + + uint k = 0; + + if (kk >= UNROLL_SG_K * 2) + { + // local stack and shared memory ping-pong + + // prefetch + uvec2 prefetch_tmp_v[(UNROLL_SG_M * UNROLL_SG_K * M * K / 4 + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N)]; + uvec2 prefetch_tmp_k[(UNROLL_SG_N * UNROLL_SG_K * K * N / 4 + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M)]; + + // prefetch the very first + { + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_data[w_offset + siq]; + } + } + } + } + + k += UNROLL_SG_K; + + for (; k + UNROLL_SG_K - 1 < kk; k += UNROLL_SG_K) + { + barrier(); + + // copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + + // prefetch the next + { + const uint ki = k * K; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + prefetch_tmp_v[q] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + prefetch_tmp_k[q] = weight_data[w_offset + siq]; + } + } + } + } + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + + barrier(); + + // the last copy prefetch to shared memory + { + // load bottom_blob + { + if (elempack == 1) + { + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + else // if (elempack == 4) + { + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + tmp_v[sgmi][siq] = prefetch_tmp_v[q]; + } + } + } + } + + // load weight + { + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = prefetch_tmp_k[q]; + } + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + } + else if (kk >= UNROLL_SG_K) + { + // no ping-pong version + + const uint ki = 0; + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM_USGK = Md4 * K * UNROLL_SG_M * UNROLL_SG_K; + const uint Md4_K_USGM_USGK_d_subgroupsize = (Md4_K_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM_USGK) + { + const uint zk = siq / (Md4 * K * UNROLL_SG_M); + const uint zmij = siq % (Md4 * K * UNROLL_SG_M); + const uint zm = zmij / (Md4 * K); + const uint ij = zmij % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + zk * K + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM_USGK = Kd4 * M * UNROLL_SG_M * UNROLL_SG_K; + const uint Kd4_M_USGM_USGK_d_subgroupsize = (Kd4_M_USGM_USGK + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM_USGK % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM_USGK) + { + const uint zk = siq / (Kd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Kd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Kd4; + const uint j = zmij % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + zk * Kd4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // SG_UK+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + const uint Nd4_K_USGN_USGK = Nd4 * K * UNROLL_SG_N * UNROLL_SG_K; + + const uint w_offset = ((wgni * kk) * UNROLL_WG_N) * Nd4_K_USGN + ((k / UNROLL_SG_K) * UNROLL_WG_N + sgni) * Nd4_K_USGN_USGK; + + const uint Nd4_K_USGN_USGK_d_subgroupsize = (Nd4_K_USGN_USGK + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_USGK_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN_USGK % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN_USGK) + { + tmp_k[sgni][siq] = weight_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zk = 0; zk < UNROLL_SG_K; zk++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], (zk * UNROLL_SG_M + zm) * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], (zk * UNROLL_SG_N + zn) * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + k += UNROLL_SG_K; + } + + for (; k < kk; k++) + { + const uint ki = k * K; + + barrier(); + + // load bottom_blob + { + if (elempack == 1) + { + // +-M-+ + // K | + // +SG_UM + // | | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint cstepd4 = psc(cstep) / 4; + + const uint Md4_K_USGM = Md4 * K * UNROLL_SG_M; + const uint Md4_K_USGM_d_subgroupsize = (Md4_K_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Md4_K_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Md4_K_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Md4_K_USGM) + { + const uint zm = siq / (Md4 * K); + const uint ij = siq % (Md4 * K); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gk = ki + i; + const uint gm = (mi + zm) * Md4 + j; + + uvec2 v = gk < inch && gm < cstepd4 ? bottom_blob_data[gk * cstepd4 + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + else // if (elempack == 4) + { + // +-K-+ + // M | + // +- -+ + // SG_UM | + // ^ +---+ + // | | | + // WG_UM+- -+ + // | | | + // v +---+ + + const uint inchd4 = inch / 4; + + const uint Kd4_M_USGM = Kd4 * M * UNROLL_SG_M; + const uint Kd4_M_USGM_d_subgroupsize = (Kd4_M_USGM + (ncnn_subgroupSize * UNROLL_WG_N - 1)) / (ncnn_subgroupSize * UNROLL_WG_N); + [[unroll]] for (uint q = 0; q < Kd4_M_USGM_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_N + sgni) * ncnn_subgroupSize + si; + + if (Kd4_M_USGM % (ncnn_subgroupSize * UNROLL_WG_N) == 0 || siq < Kd4_M_USGM) + { + const uint zmi = siq / Kd4; + const uint j = siq % Kd4; + + const uint gm = mi * M + zmi; + const uint gk = ki / 4 + j; + + uvec2 v = gk < inchd4 && gm < psc(cstep) ? bottom_blob_data[gk * psc(cstep) + gm] : uvec2(0); + + tmp_v[sgmi][siq] = v; + } + } + } + } + + // load weight + { + // +-N-+ + // K | + // +SG_UN + // | | + // ^ +---+ + // | | | + // WG_UN+- -+ + // | | | + // v +---+ + + // weight_data coopmat_N * coopmat_K * UNROLL_SG_N * UNROLL_WG_N * kk, blocks_n + + const uint Nd4_K_USGN = Nd4 * K * UNROLL_SG_N; + + const uint w_offset = ((wgni * kk + k) * UNROLL_WG_N + sgni) * Nd4_K_USGN; + + const uint Nd4_K_USGN_d_subgroupsize = (Nd4_K_USGN + (ncnn_subgroupSize * UNROLL_WG_M - 1)) / (ncnn_subgroupSize * UNROLL_WG_M); + [[unroll]] for (uint q = 0; q < Nd4_K_USGN_d_subgroupsize; q++) + { + const uint siq = (q * UNROLL_WG_M + sgmi) * ncnn_subgroupSize + si; + + if (Nd4_K_USGN % (ncnn_subgroupSize * UNROLL_WG_M) == 0 || siq < Nd4_K_USGN) + { + tmp_k[sgni][siq] = weight_data[w_offset + siq]; + } + } + } + + barrier(); + +#if ncnn_VK_KHR_cooperative_matrix + coopmat A[UNROLL_SG_M]; + coopmat B[UNROLL_SG_N]; +#elif ncnn_VK_NV_cooperative_matrix + fcoopmatNV<16, gl_ScopeSubgroup, M, K> A[UNROLL_SG_M]; + fcoopmatNV<16, gl_ScopeSubgroup, K, N> B[UNROLL_SG_N]; +#endif + + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Md4 * K), Md4, true); +#endif + } + else // if (elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(A[zm], tmp_v[sgmi], zm * (Kd4 * M), Kd4, false); +#endif + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { +#if ncnn_VK_KHR_cooperative_matrix + coopMatLoad(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#elif ncnn_VK_NV_cooperative_matrix + coopMatLoadNV(B[zn], tmp_k[sgni], zn * (Nd4 * K), Nd4, false); +#endif + } + + // sum += k * v + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { +#if ncnn_VK_KHR_cooperative_matrix + sum[zn][zm] = coopMatMulAdd(A[zm], B[zn], sum[zn][zm]); +#elif ncnn_VK_NV_cooperative_matrix + sum[zn][zm] = coopMatMulAddNV(A[zm], B[zn], sum[zn][zm]); +#endif + } + } + } + + [[unroll]] for (uint zn = 0; zn < UNROLL_SG_N; zn++) + { + [[unroll]] for (uint zm = 0; zm < UNROLL_SG_M; zm++) + { + if (out_elempack == 1) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, gl_CooperativeMatrixLayoutColumnMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Md4 * N), Md4, true); +#endif +#endif + } + else // if (out_elempack == 4) + { +#if ncnn_VK_KHR_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStore(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#else + coopmat sum_fp16 = coopmat(sum[zn][zm]); + coopMatStore(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, gl_CooperativeMatrixLayoutRowMajor); +#endif +#elif ncnn_VK_NV_cooperative_matrix +#if NCNN_fp16_arithmetic + coopMatStoreNV(sum[zn][zm], tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#else + fcoopmatNV<16, gl_ScopeSubgroup, M, N> sum_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, M, N>(sum[zn][zm]); + coopMatStoreNV(sum_fp16, tmp_o[sgi], (zn * UNROLL_SG_M + zm) * (Nd4 * M), Nd4, false); +#endif +#endif + } + } + } + + barrier(); + + // store top_blob + { + if (out_elempack == 1) + { + // +-M-+ + // N | + // +SG_UM + // | | + // ^ +---+ + // | | | + // SG_UN+- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +- -+ + // | | | + // | +- -+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +- -+ + // | | | + // v +---+ + + const uint outcstepd4 = psc(outcstep) / 4; + + const uint Md4_N_USGM_USGN = Md4 * N * UNROLL_SG_M * UNROLL_SG_N; + const uint Md4_N_USGM_USGN_d_subgroupsize = (Md4_N_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Md4_N_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Md4_N_USGM_USGN % ncnn_subgroupSize == 0 || siq < Md4_N_USGM_USGN) + { + const uint zn = siq / (Md4 * N * UNROLL_SG_M); + const uint zmij = siq % (Md4 * N * UNROLL_SG_M); + const uint zm = zmij / (Md4 * N); + const uint ij = zmij % (Md4 * N); + const uint i = ij / Md4; + const uint j = ij % Md4; + + const uint gn = (ni + zn) * N + i; + const uint gm = (mi + zm) * Md4 + j; + + if (gn < outch && gm < outcstepd4) + { + col_blob_data[gn * outcstepd4 + gm] = tmp_o[sgi][siq]; + } + } + } + } + else // if (out_elempack == 4) + { + // +-N-+ + // M | + // +---+ + // SG_UM | + // ^ +---+ + // | | | + // SG_UN+---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // WG_UM +---+ + // | | | + // | +---+ + // | | | + // ^ v +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // WG_UN +---+ + // | | | + // | +- -+ + // | | | + // | +---+ + // | | | + // | +---+ + // | | | + // v +---+ + + const uint outchd4 = outch / 4; + + const uint Nd4_M_USGM_USGN = Nd4 * M * UNROLL_SG_M * UNROLL_SG_N; + const uint Nd4_M_USGM_USGN_d_subgroupsize = (Nd4_M_USGM_USGN + ncnn_subgroupSize - 1) / ncnn_subgroupSize; + [[unroll]] for (uint q = 0; q < Nd4_M_USGM_USGN_d_subgroupsize; q++) + { + const uint siq = si + q * ncnn_subgroupSize; + + if (Nd4_M_USGM_USGN % ncnn_subgroupSize == 0 || siq < Nd4_M_USGM_USGN) + { + const uint zn = siq / (Nd4 * M * UNROLL_SG_M); + const uint zmij = siq % (Nd4 * M * UNROLL_SG_M); + const uint zmi = zmij / Nd4; + const uint j = zmij % Nd4; + + const uint gn = (ni + zn) * Nd4 + j; + const uint gm = mi * M + zmi; + + if (gn < outchd4 && gm < psc(outcstep)) + { + col_blob_data[gn * psc(outcstep) + gm] = tmp_o[sgi][siq]; + } + } + } + } + } +} diff --git a/src/layer/vulkan/shader/deconvolution_pack1to4.comp b/src/layer/vulkan/shader/deconvolution_pack1to4.comp index 404c34b23..8afdffec9 100644 --- a/src/layer/vulkan/shader/deconvolution_pack1to4.comp +++ b/src/layer/vulkan/shader/deconvolution_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack1to4_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack1to4_gemm.comp index 1a67e5584..98383756c 100644 --- a/src/layer/vulkan/shader/deconvolution_pack1to4_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack1to4_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -24,8 +13,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfp bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfpvec4 col_blob_data[]; }; @@ -38,8 +27,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; #if NCNN_shader_local_memory @@ -53,7 +42,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif @@ -169,14 +158,14 @@ void main() #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st4(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st4(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st4(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st4(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st4(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st4(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st4(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_pack1to8.comp b/src/layer/vulkan/shader/deconvolution_pack1to8.comp index f6cfe51fc..86b31a137 100644 --- a/src/layer/vulkan/shader/deconvolution_pack1to8.comp +++ b/src/layer/vulkan/shader/deconvolution_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack1to8_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack1to8_gemm.comp index 28323a553..30f56e5c9 100644 --- a/src/layer/vulkan/shader/deconvolution_pack1to8_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack1to8_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -22,8 +11,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfp bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfpvec8 col_blob_data[]; }; @@ -36,8 +25,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; void main() @@ -45,7 +34,7 @@ void main() int gx = int(gl_GlobalInvocationID.x) * 4; int gy = int(gl_GlobalInvocationID.y); - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; afpvec8 sum0 = afpvec8(afpvec4(0.f), afpvec4(0.f)); @@ -82,10 +71,10 @@ void main() w_offset += 1; } - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st8(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st8(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st8(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st8(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st8(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st8(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st8(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_pack4.comp b/src/layer/vulkan/shader/deconvolution_pack4.comp index 86c7e06c3..baf914161 100644 --- a/src/layer/vulkan/shader/deconvolution_pack4.comp +++ b/src/layer/vulkan/shader/deconvolution_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack4_col2im.comp b/src/layer/vulkan/shader/deconvolution_pack4_col2im.comp index 5a8b7e602..b7a820500 100644 --- a/src/layer/vulkan/shader/deconvolution_pack4_col2im.comp +++ b/src/layer/vulkan/shader/deconvolution_pack4_col2im.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -27,14 +16,15 @@ layout (constant_id = 6) const int bias_term = 0; layout (constant_id = 7) const int activation_type = 0; layout (constant_id = 8) const float activation_param_0 = 0; layout (constant_id = 9) const float activation_param_1 = 0; +layout (constant_id = 10) const int outc = 0; -#define shape_constant_id_offset 10 +#define shape_constant_id_offset 11 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outc = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer col_blob { sfpvec4 col_blob_data[]; }; @@ -45,10 +35,10 @@ layout (push_constant) uniform parameter { int w; int h; + int cstep; int outw; int outh; - int outc; int outcstep; } p; @@ -58,7 +48,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outh) || gz >= psc(outc)) + if (gx >= psc(outw) || gy >= psc(outh) || gz >= outc) return; afpvec4 sum; @@ -95,7 +85,7 @@ void main() h_k /= dilation_h; w_k /= dilation_w; - const int gi = (gz * maxk + h_k * kernel_w + w_k) * psc(w) * psc(h) + sy * psc(w) + sx; + const int gi = (gz * maxk + h_k * kernel_w + w_k) * psc(cstep) + sy * psc(w) + sx; sum += buffer_ld4(col_blob_data, gi); } diff --git a/src/layer/vulkan/shader/deconvolution_pack4_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack4_gemm.comp index 8cf16f2d3..5c76ca8c2 100644 --- a/src/layer/vulkan/shader/deconvolution_pack4_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack4_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -24,8 +13,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec4 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfpvec4 col_blob_data[]; }; @@ -38,8 +27,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; #if NCNN_shader_local_memory @@ -53,7 +42,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif @@ -184,14 +173,14 @@ void main() #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st4(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st4(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st4(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st4(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st4(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st4(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st4(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_pack4_gemm_cm_16_16_16.comp b/src/layer/vulkan/shader/deconvolution_pack4_gemm_cm_16_16_16.comp deleted file mode 100644 index 487adc8e1..000000000 --- a/src/layer/vulkan/shader/deconvolution_pack4_gemm_cm_16_16_16.comp +++ /dev/null @@ -1,247 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int maxk = 1; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int w = 0; -layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; - -layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; -layout (binding = 1) writeonly buffer col_blob { uvec2 col_blob_data[]; }; -layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; - -layout (push_constant) uniform parameter -{ - int w; - int h; - int c; - int cstep; - - int outw; - int outh; -} p; - -#define UNROLL_INCH 2 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k0[UNROLL_INCH * 16*4]; -shared uvec2 tmp_k1[UNROLL_INCH * 16*4]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0 = coopmat(0.f); - coopmat sum1 = coopmat(0.f); - coopmat sum2 = coopmat(0.f); - coopmat sum3 = coopmat(0.f); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 16> sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 16>(0.f); -#endif - - const int N = psc(c) / 4; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int v_offset = ((z + lxd16) * 4 + j) * psc(cstep) + (gx + lxm16); - - tmp_v0[tmp_i] = (gx + lxm16) < psc(outw) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v1[tmp_i] = (gx + lxm16 + 16) < psc(outw) ? bottom_blob_data[v_offset + 16] : uvec2(0); - - const int w_offset = gy * psc(c) * 4 + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_data[w_offset]; - tmp_k1[tmp_i] = weight_data[w_offset + psc(c) * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd16 == 0) - { - for (int j = 0; j < 4; j++) - { - const int tmp_i = lxd16*16*4 + lxm16 * 4 + j; - - const int v_offset = ((z + lxd16) * 4 + j) * psc(cstep) + (gx + lxm16); - - tmp_v0[tmp_i] = (gx + lxm16) < psc(outw) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v1[tmp_i] = (gx + lxm16 + 16) < psc(outw) ? bottom_blob_data[v_offset + 16] : uvec2(0); - - const int w_offset = gy * psc(c) * 4 + (z + lxd16) * 4 * 16 + (lxm16 * 4 + j); - - tmp_k0[tmp_i] = weight_data[w_offset]; - tmp_k1[tmp_i] = weight_data[w_offset + psc(c) * 16]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopMatLoad(B0, tmp_k0, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*4, 4, false); - coopMatLoadNV(A1, tmp_v1, z4*16*4, 4, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> B1; - coopMatLoadNV(B0, tmp_k0, z4*16*4, 4, false); - coopMatLoadNV(B1, tmp_k1, z4*16*4, 4, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); -#endif - } - - barrier(); - } - - if (gx >= psc(outw) || gy >= psc(outh)) - return; - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - - coopMatStore(sum0_fp16, tmp_v0, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*4, 4, gl_CooperativeMatrixLayoutRowMajor); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 16> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 16>(sum3); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 4, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 4, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*4, 4, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*4, 4, false); -#endif - - barrier(); - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 4 + j + lxd16*16*4; - - const int gi = ((gy / 4 + lxd16) / maxk * maxk * 4 + (gy / 4 + lxd16) % maxk) * psc(outw) + j * maxk * psc(outw) + (gx + lxm16); - - if (gx + lxm16 < psc(outw)) col_blob_data[gi] = tmp_v0[tmp_vi]; - if (gx + lxm16 + 16 < psc(outw)) col_blob_data[gi + 16] = tmp_v1[tmp_vi]; - } - } -} diff --git a/src/layer/vulkan/shader/deconvolution_pack4_gemm_cm_16_8_8.comp b/src/layer/vulkan/shader/deconvolution_pack4_gemm_cm_16_8_8.comp deleted file mode 100644 index 6e06d3c83..000000000 --- a/src/layer/vulkan/shader/deconvolution_pack4_gemm_cm_16_8_8.comp +++ /dev/null @@ -1,319 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#extension GL_KHR_memory_scope_semantics: require -#extension GL_EXT_shader_explicit_arithmetic_types: require -#extension GL_EXT_shader_explicit_arithmetic_types_float16: require -#if ncnn_VK_KHR_cooperative_matrix -#extension GL_KHR_cooperative_matrix: require -#elif ncnn_VK_NV_cooperative_matrix -#extension GL_NV_cooperative_matrix: require -#endif - -layout (constant_id = 0) const int maxk = 1; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int w = 0; -layout (constant_id = shape_constant_id_offset + 1) const int h = 0; -layout (constant_id = shape_constant_id_offset + 2) const int c = 0; -layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; - -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; - -layout (binding = 0) readonly buffer bottom_blob { uvec2 bottom_blob_data[]; }; -layout (binding = 1) writeonly buffer col_blob { uvec2 col_blob_data[]; }; -layout (binding = 2) readonly buffer weight_blob { uvec2 weight_data[]; }; - -layout (push_constant) uniform parameter -{ - int w; - int h; - int c; - int cstep; - - int outw; - int outh; -} p; - -#define UNROLL_INCH 4 - -shared uvec2 tmp_v0[UNROLL_INCH * 16*2]; -shared uvec2 tmp_v1[UNROLL_INCH * 16*2]; -shared uvec2 tmp_k0[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k1[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k2[UNROLL_INCH * 8*2]; -shared uvec2 tmp_k3[UNROLL_INCH * 8*2]; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x) / 32 * 2 * 16; - int gy = int(gl_GlobalInvocationID.y) * 2 * 4; - - const int lx = int(gl_LocalInvocationID.x); - - const int lxd8 = lx / 8; // 0 1 2 3 - const int lxm8 = lx % 8; // 0 1 2 3 .... 7 - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0 = coopmat(0.f); - coopmat sum1 = coopmat(0.f); - coopmat sum2 = coopmat(0.f); - coopmat sum3 = coopmat(0.f); - coopmat sum4 = coopmat(0.f); - coopmat sum5 = coopmat(0.f); - coopmat sum6 = coopmat(0.f); - coopmat sum7 = coopmat(0.f); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum0 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum1 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum2 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum3 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum4 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum5 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum6 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); - fcoopmatNV<32, gl_ScopeSubgroup, 16, 8> sum7 = fcoopmatNV<32, gl_ScopeSubgroup, 16, 8>(0.f); -#endif - - const int N = psc(c) / 2; - - int z = 0; - for (; z + (UNROLL_INCH - 1) < N; z += UNROLL_INCH) - { - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - int v_offset = ((z + lxd8) * 2 + j) * psc(cstep) + (gx + lxm8); - - tmp_v0[tmp_vi] = (gx + lxm8) < psc(outw) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v0[tmp_vi + 16] = (gx + lxm8 + 8) < psc(outw) ? bottom_blob_data[v_offset + 8] : uvec2(0); - tmp_v1[tmp_vi] = (gx + lxm8 + 16) < psc(outw) ? bottom_blob_data[v_offset + 16] : uvec2(0); - tmp_v1[tmp_vi + 16] = (gx + lxm8 + 24) < psc(outw) ? bottom_blob_data[v_offset + 24] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gy * psc(c) * 4 + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_data[w_offset]; - tmp_k1[tmp_ki] = weight_data[w_offset + psc(c) * 8]; - tmp_k2[tmp_ki] = weight_data[w_offset + psc(c) * 16]; - tmp_k3[tmp_ki] = weight_data[w_offset + psc(c) * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < UNROLL_INCH; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (z < N) - { - const int remain = N - z; - - if (lxd8 < remain) - { - for (int j = 0; j < 2; j++) - { - const int tmp_vi = lxd8*16*2 + lxm8 * 2 + j; - - int v_offset = ((z + lxd8) * 2 + j) * psc(cstep) + (gx + lxm8); - - tmp_v0[tmp_vi] = (gx + lxm8) < psc(outw) ? bottom_blob_data[v_offset] : uvec2(0); - tmp_v0[tmp_vi + 16] = (gx + lxm8 + 8) < psc(outw) ? bottom_blob_data[v_offset + 8] : uvec2(0); - tmp_v1[tmp_vi] = (gx + lxm8 + 16) < psc(outw) ? bottom_blob_data[v_offset + 16] : uvec2(0); - tmp_v1[tmp_vi + 16] = (gx + lxm8 + 24) < psc(outw) ? bottom_blob_data[v_offset + 24] : uvec2(0); - - const int tmp_ki = lxd8*8*2 + lxm8 * 2 + j; - - int w_offset = gy * psc(c) * 4 + (z + lxd8) * 2 * 8 + (lxm8 * 2 + j); - - tmp_k0[tmp_ki] = weight_data[w_offset]; - tmp_k1[tmp_ki] = weight_data[w_offset + psc(c) * 8]; - tmp_k2[tmp_ki] = weight_data[w_offset + psc(c) * 16]; - tmp_k3[tmp_ki] = weight_data[w_offset + psc(c) * 24]; - } - } - - barrier(); - - for (int z4 = 0; z4 < remain; z4++) - { -#if ncnn_VK_KHR_cooperative_matrix - coopmat A0; - coopmat A1; - coopMatLoad(A0, tmp_v0, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(A1, tmp_v1, z4*16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - coopmat B0; - coopmat B1; - coopmat B2; - coopmat B3; - coopMatLoad(B0, tmp_k0, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B1, tmp_k1, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B2, tmp_k2, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatLoad(B3, tmp_k3, z4*8*2, 2, gl_CooperativeMatrixLayoutRowMajor); - - // sum += v * k - sum0 = coopMatMulAdd(A0, B0, sum0); - sum1 = coopMatMulAdd(A1, B0, sum1); - sum2 = coopMatMulAdd(A0, B1, sum2); - sum3 = coopMatMulAdd(A1, B1, sum3); - sum4 = coopMatMulAdd(A0, B2, sum4); - sum5 = coopMatMulAdd(A1, B2, sum5); - sum6 = coopMatMulAdd(A0, B3, sum6); - sum7 = coopMatMulAdd(A1, B3, sum7); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A0; - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> A1; - coopMatLoadNV(A0, tmp_v0, z4*16*2, 2, false); - coopMatLoadNV(A1, tmp_v1, z4*16*2, 2, false); - - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B0; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B1; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B2; - fcoopmatNV<16, gl_ScopeSubgroup, 8, 8> B3; - coopMatLoadNV(B0, tmp_k0, z4*8*2, 2, false); - coopMatLoadNV(B1, tmp_k1, z4*8*2, 2, false); - coopMatLoadNV(B2, tmp_k2, z4*8*2, 2, false); - coopMatLoadNV(B3, tmp_k3, z4*8*2, 2, false); - - // sum += v * k - sum0 = coopMatMulAddNV(A0, B0, sum0); - sum1 = coopMatMulAddNV(A1, B0, sum1); - sum2 = coopMatMulAddNV(A0, B1, sum2); - sum3 = coopMatMulAddNV(A1, B1, sum3); - sum4 = coopMatMulAddNV(A0, B2, sum4); - sum5 = coopMatMulAddNV(A1, B2, sum5); - sum6 = coopMatMulAddNV(A0, B3, sum6); - sum7 = coopMatMulAddNV(A1, B3, sum7); -#endif - } - - barrier(); - } - - if (gx >= psc(outw) || gy >= psc(outh)) - return; - -#if ncnn_VK_KHR_cooperative_matrix - coopmat sum0_fp16 = coopmat(sum0); - coopmat sum1_fp16 = coopmat(sum1); - coopmat sum2_fp16 = coopmat(sum2); - coopmat sum3_fp16 = coopmat(sum3); - coopmat sum4_fp16 = coopmat(sum4); - coopmat sum5_fp16 = coopmat(sum5); - coopmat sum6_fp16 = coopmat(sum6); - coopmat sum7_fp16 = coopmat(sum7); - - coopMatStore(sum0_fp16, tmp_v0, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum1_fp16, tmp_v1, 0, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum2_fp16, tmp_v0, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum3_fp16, tmp_v1, 16*2, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum4_fp16, tmp_v0, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum5_fp16, tmp_v1, 16*4, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum6_fp16, tmp_v0, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); - coopMatStore(sum7_fp16, tmp_v1, 16*6, 2, gl_CooperativeMatrixLayoutRowMajor); -#elif ncnn_VK_NV_cooperative_matrix - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum0_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum0); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum1_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum1); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum2_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum2); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum3_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum3); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum4_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum4); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum5_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum5); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum6_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum6); - fcoopmatNV<16, gl_ScopeSubgroup, 16, 8> sum7_fp16 = fcoopmatNV<16, gl_ScopeSubgroup, 16, 8>(sum7); - - coopMatStoreNV(sum0_fp16, tmp_v0, 0, 2, false); - coopMatStoreNV(sum1_fp16, tmp_v1, 0, 2, false); - coopMatStoreNV(sum2_fp16, tmp_v0, 16*2, 2, false); - coopMatStoreNV(sum3_fp16, tmp_v1, 16*2, 2, false); - coopMatStoreNV(sum4_fp16, tmp_v0, 16*4, 2, false); - coopMatStoreNV(sum5_fp16, tmp_v1, 16*4, 2, false); - coopMatStoreNV(sum6_fp16, tmp_v0, 16*6, 2, false); - coopMatStoreNV(sum7_fp16, tmp_v1, 16*6, 2, false); -#endif - - barrier(); - - const int lxd16 = lx / 16; // 0 1 - const int lxm16 = lx % 16; // 0 1 2 3 .... 15 - - { - for (int j = 0; j < 4; j++) - { - const int tmp_vi = lxm16 * 2 + lxd16 + j*16*2; - const int gi = ((gy / 2 + j) / maxk * maxk * 2 + (gy / 2 + j) % maxk) * psc(outw) + lxd16 * maxk * psc(outw) + (gx + lxm16); - - if (gx + lxm16 < psc(outw)) col_blob_data[gi] = tmp_v0[tmp_vi]; - if (gx + lxm16 + 16 < psc(outw)) col_blob_data[gi + 16] = tmp_v1[tmp_vi]; - } - } -} diff --git a/src/layer/vulkan/shader/deconvolution_pack4to1.comp b/src/layer/vulkan/shader/deconvolution_pack4to1.comp index 492992778..c852727d3 100644 --- a/src/layer/vulkan/shader/deconvolution_pack4to1.comp +++ b/src/layer/vulkan/shader/deconvolution_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack4to1_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack4to1_gemm.comp index fe6e0348a..c0fdcf3ac 100644 --- a/src/layer/vulkan/shader/deconvolution_pack4to1_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack4to1_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -24,8 +13,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec4 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfp col_blob_data[]; }; @@ -38,8 +27,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; #if NCNN_shader_local_memory @@ -53,7 +42,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); #if !NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif @@ -169,14 +158,14 @@ void main() #endif #if NCNN_shader_local_memory - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; #endif - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st1(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st1(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st1(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st1(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st1(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st1(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st1(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_pack4to8.comp b/src/layer/vulkan/shader/deconvolution_pack4to8.comp index a2098df7a..e4d263f0c 100644 --- a/src/layer/vulkan/shader/deconvolution_pack4to8.comp +++ b/src/layer/vulkan/shader/deconvolution_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack4to8_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack4to8_gemm.comp index 211c24a71..0cb84f846 100644 --- a/src/layer/vulkan/shader/deconvolution_pack4to8_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack4to8_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -22,8 +11,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec4 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfpvec8 col_blob_data[]; }; @@ -36,8 +25,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; void main() @@ -45,7 +34,7 @@ void main() int gx = int(gl_GlobalInvocationID.x) * 4; int gy = int(gl_GlobalInvocationID.y); - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; afpvec8 sum0 = afpvec8(afpvec4(0.f), afpvec4(0.f)); @@ -113,10 +102,10 @@ void main() w_offset += 8; } - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st8(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st8(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st8(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st8(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st8(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st8(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st8(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_pack8.comp b/src/layer/vulkan/shader/deconvolution_pack8.comp index 01d063bdb..6d308161f 100644 --- a/src/layer/vulkan/shader/deconvolution_pack8.comp +++ b/src/layer/vulkan/shader/deconvolution_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack8_col2im.comp b/src/layer/vulkan/shader/deconvolution_pack8_col2im.comp index 1dd876ab9..c472e3a4f 100644 --- a/src/layer/vulkan/shader/deconvolution_pack8_col2im.comp +++ b/src/layer/vulkan/shader/deconvolution_pack8_col2im.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -27,14 +16,15 @@ layout (constant_id = 6) const int bias_term = 0; layout (constant_id = 7) const int activation_type = 0; layout (constant_id = 8) const float activation_param_0 = 0; layout (constant_id = 9) const float activation_param_1 = 0; +layout (constant_id = 10) const int outc = 0; -#define shape_constant_id_offset 10 +#define shape_constant_id_offset 11 layout (constant_id = shape_constant_id_offset + 0) const int w = 0; layout (constant_id = shape_constant_id_offset + 1) const int h = 0; +layout (constant_id = shape_constant_id_offset + 2) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 2) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 3) const int outh = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outc = 0; +layout (constant_id = shape_constant_id_offset + 3) const int outw = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outh = 0; layout (constant_id = shape_constant_id_offset + 5) const int outcstep = 0; layout (binding = 0) readonly buffer col_blob { sfpvec8 col_blob_data[]; }; @@ -45,10 +35,10 @@ layout (push_constant) uniform parameter { int w; int h; + int cstep; int outw; int outh; - int outc; int outcstep; } p; @@ -58,7 +48,7 @@ void main() int gy = int(gl_GlobalInvocationID.y); int gz = int(gl_GlobalInvocationID.z); - if (gx >= psc(outw) || gy >= psc(outh) || gz >= psc(outc)) + if (gx >= psc(outw) || gy >= psc(outh) || gz >= outc) return; afpvec8 sum; @@ -95,7 +85,7 @@ void main() h_k /= dilation_h; w_k /= dilation_w; - const int gi = (gz * maxk + h_k * kernel_w + w_k) * psc(w) * psc(h) + sy * psc(w) + sx; + const int gi = (gz * maxk + h_k * kernel_w + w_k) * psc(cstep) + sy * psc(w) + sx; sum += buffer_ld8(col_blob_data, gi); } diff --git a/src/layer/vulkan/shader/deconvolution_pack8_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack8_gemm.comp index 2766c78a9..6c1416aa1 100644 --- a/src/layer/vulkan/shader/deconvolution_pack8_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack8_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -22,8 +11,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec8 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfpvec8 col_blob_data[]; }; @@ -36,8 +25,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; void main() @@ -45,7 +34,7 @@ void main() int gx = int(gl_GlobalInvocationID.x) * 4; int gy = int(gl_GlobalInvocationID.y); - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; afpvec8 sum0 = afpvec8(afpvec4(0.f), afpvec4(0.f)); @@ -113,10 +102,10 @@ void main() w_offset += 8; } - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st8(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st8(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st8(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st8(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st8(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st8(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st8(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_pack8to1.comp b/src/layer/vulkan/shader/deconvolution_pack8to1.comp index 3d34cb598..31bd4d2b9 100644 --- a/src/layer/vulkan/shader/deconvolution_pack8to1.comp +++ b/src/layer/vulkan/shader/deconvolution_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack8to1_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack8to1_gemm.comp index 4a805933e..4798a6ae1 100644 --- a/src/layer/vulkan/shader/deconvolution_pack8to1_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack8to1_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -22,8 +11,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec8 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfp col_blob_data[]; }; @@ -36,8 +25,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; void main() @@ -45,7 +34,7 @@ void main() int gx = int(gl_GlobalInvocationID.x) * 4; int gy = int(gl_GlobalInvocationID.y); - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; afp sum0 = afp(0.f); @@ -75,10 +64,10 @@ void main() w_offset += 1; } - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st1(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st1(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st1(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st1(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st1(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st1(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st1(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolution_pack8to4.comp b/src/layer/vulkan/shader/deconvolution_pack8to4.comp index 003e675d9..a11d065df 100644 --- a/src/layer/vulkan/shader/deconvolution_pack8to4.comp +++ b/src/layer/vulkan/shader/deconvolution_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolution_pack8to4_gemm.comp b/src/layer/vulkan/shader/deconvolution_pack8to4_gemm.comp index 7b1c6b43a..76b727d0a 100644 --- a/src/layer/vulkan/shader/deconvolution_pack8to4_gemm.comp +++ b/src/layer/vulkan/shader/deconvolution_pack8to4_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -22,8 +11,8 @@ layout (constant_id = shape_constant_id_offset + 1) const int h = 0; layout (constant_id = shape_constant_id_offset + 2) const int c = 0; layout (constant_id = shape_constant_id_offset + 3) const int cstep = 0; -layout (constant_id = shape_constant_id_offset + 4) const int outw = 0; -layout (constant_id = shape_constant_id_offset + 5) const int outh = 0; +layout (constant_id = shape_constant_id_offset + 4) const int outcstep = 0; +layout (constant_id = shape_constant_id_offset + 5) const int outc = 0; layout (binding = 0) readonly buffer bottom_blob { sfpvec8 bottom_blob_data[]; }; layout (binding = 1) writeonly buffer col_blob { sfpvec4 col_blob_data[]; }; @@ -36,8 +25,8 @@ layout (push_constant) uniform parameter int c; int cstep; - int outw; - int outh; + int outcstep; + int outc; } p; void main() @@ -45,7 +34,7 @@ void main() int gx = int(gl_GlobalInvocationID.x) * 4; int gy = int(gl_GlobalInvocationID.y); - if (gx >= psc(outw) || gy >= psc(outh)) + if (gx >= psc(outcstep) || gy >= psc(outc)) return; afpvec4 sum0 = afpvec4(0.f); @@ -93,10 +82,10 @@ void main() w_offset += 4; } - const int gi = gy * psc(outw) + gx; + const int gi = gy * psc(outcstep) + gx; buffer_st4(col_blob_data, gi, sum0); - if (gx + 1 < psc(outw)) buffer_st4(col_blob_data, gi + 1, sum1); - if (gx + 2 < psc(outw)) buffer_st4(col_blob_data, gi + 2, sum2); - if (gx + 3 < psc(outw)) buffer_st4(col_blob_data, gi + 3, sum3); + if (gx + 1 < psc(outcstep)) buffer_st4(col_blob_data, gi + 1, sum1); + if (gx + 2 < psc(outcstep)) buffer_st4(col_blob_data, gi + 2, sum2); + if (gx + 3 < psc(outcstep)) buffer_st4(col_blob_data, gi + 3, sum3); } diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise.comp b/src/layer/vulkan/shader/deconvolutiondepthwise.comp index f8297057d..d1fab249e 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group.comp index dc25116dd..870bffbd9 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to4.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to4.comp index 77fae5e8b..020aca51b 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to4.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to8.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to8.comp index 0e46f4e0a..b123c04ae 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to8.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4.comp index f9b3ff2b8..8f599580c 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to1.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to1.comp index be90869c7..1ea65ac0a 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to1.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to8.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to8.comp index 938cdc80f..a2284acd1 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to8.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8.comp index beb805d22..510922e36 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to1.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to1.comp index 29c11f8c3..b5465eb94 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to1.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to4.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to4.comp index 29d4bb05b..2cd19a2a6 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to4.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_group_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_pack4.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_pack4.comp index f6c810125..435ffd5cf 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_pack4.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deconvolutiondepthwise_pack8.comp b/src/layer/vulkan/shader/deconvolutiondepthwise_pack8.comp index 048f43d9f..411f02c18 100644 --- a/src/layer/vulkan/shader/deconvolutiondepthwise_pack8.comp +++ b/src/layer/vulkan/shader/deconvolutiondepthwise_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deepcopy.comp b/src/layer/vulkan/shader/deepcopy.comp index 0795ffc7d..3e180e3a3 100644 --- a/src/layer/vulkan/shader/deepcopy.comp +++ b/src/layer/vulkan/shader/deepcopy.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deepcopy_pack4.comp b/src/layer/vulkan/shader/deepcopy_pack4.comp index 18a160399..772b20175 100644 --- a/src/layer/vulkan/shader/deepcopy_pack4.comp +++ b/src/layer/vulkan/shader/deepcopy_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/deepcopy_pack8.comp b/src/layer/vulkan/shader/deepcopy_pack8.comp index 8c0bf0527..ad1c7c4bc 100644 --- a/src/layer/vulkan/shader/deepcopy_pack8.comp +++ b/src/layer/vulkan/shader/deepcopy_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/dequantize.comp b/src/layer/vulkan/shader/dequantize.comp index 4dd77d713..37c8ea119 100644 --- a/src/layer/vulkan/shader/dequantize.comp +++ b/src/layer/vulkan/shader/dequantize.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/dequantize_pack4.comp b/src/layer/vulkan/shader/dequantize_pack4.comp index b54d0af92..ad59a3750 100644 --- a/src/layer/vulkan/shader/dequantize_pack4.comp +++ b/src/layer/vulkan/shader/dequantize_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/dequantize_pack8.comp b/src/layer/vulkan/shader/dequantize_pack8.comp index 63b759b7c..62bc8c0d6 100644 --- a/src/layer/vulkan/shader/dequantize_pack8.comp +++ b/src/layer/vulkan/shader/dequantize_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/dropout.comp b/src/layer/vulkan/shader/dropout.comp index f648852ea..497418129 100644 --- a/src/layer/vulkan/shader/dropout.comp +++ b/src/layer/vulkan/shader/dropout.comp @@ -1,53 +1,31 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const float scale = 1; #define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; + +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); v *= afp(scale); - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/dropout_pack4.comp b/src/layer/vulkan/shader/dropout_pack4.comp deleted file mode 100644 index c592006b2..000000000 --- a/src/layer/vulkan/shader/dropout_pack4.comp +++ /dev/null @@ -1,53 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float scale = 1; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v *= afp(scale); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/dropout_pack8.comp b/src/layer/vulkan/shader/dropout_pack8.comp deleted file mode 100644 index d6840301f..000000000 --- a/src/layer/vulkan/shader/dropout_pack8.comp +++ /dev/null @@ -1,54 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float scale = 1; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = v[0] * afp(scale); - v[1] = v[1] * afp(scale); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/eltwise.comp b/src/layer/vulkan/shader/eltwise.comp index 85af8cf7b..209c62f7e 100644 --- a/src/layer/vulkan/shader/eltwise.comp +++ b/src/layer/vulkan/shader/eltwise.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/eltwise_pack4.comp b/src/layer/vulkan/shader/eltwise_pack4.comp index da6a3ade4..47ad5f807 100644 --- a/src/layer/vulkan/shader/eltwise_pack4.comp +++ b/src/layer/vulkan/shader/eltwise_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/eltwise_pack8.comp b/src/layer/vulkan/shader/eltwise_pack8.comp index 11fd74f5b..bdd05afa8 100644 --- a/src/layer/vulkan/shader/eltwise_pack8.comp +++ b/src/layer/vulkan/shader/eltwise_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/elu.comp b/src/layer/vulkan/shader/elu.comp index b0315822c..830217f2b 100644 --- a/src/layer/vulkan/shader/elu.comp +++ b/src/layer/vulkan/shader/elu.comp @@ -1,53 +1,30 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const float alpha = 0; #define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + const uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - afp v = buffer_ld1(bottom_top_blob_data, gi); + v = mix(afpvec4(alpha) * afpvec4(exp(v) - afpvec4(1.0f)), v, greaterThan(v, afpvec4(0.0f))); - v = v > afp(0.0f) ? v : afp(alpha * (exp(v) - 1.0f)); - - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/elu_pack4.comp b/src/layer/vulkan/shader/elu_pack4.comp deleted file mode 100644 index 26e0398fd..000000000 --- a/src/layer/vulkan/shader/elu_pack4.comp +++ /dev/null @@ -1,53 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = mix(afpvec4(alpha) * afpvec4(exp(v) - afpvec4(1.0f)), v, greaterThan(v, afpvec4(0.0f))); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/elu_pack8.comp b/src/layer/vulkan/shader/elu_pack8.comp deleted file mode 100644 index 7cf5101c1..000000000 --- a/src/layer/vulkan/shader/elu_pack8.comp +++ /dev/null @@ -1,54 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = mix(afpvec4(alpha) * afpvec4(exp(v[0]) - afpvec4(1.0f)), v[0], greaterThan(v[0], afpvec4(0.0f))); - v[1] = mix(afpvec4(alpha) * afpvec4(exp(v[1]) - afpvec4(1.0f)), v[1], greaterThan(v[1], afpvec4(0.0f))); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/erf.comp b/src/layer/vulkan/shader/erf.comp index a386a2c9d..395cf5fbe 100644 --- a/src/layer/vulkan/shader/erf.comp +++ b/src/layer/vulkan/shader/erf.comp @@ -1,66 +1,43 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; -float erf(float x) +afpvec4 erf(afpvec4 x) { - float a1 = 0.254829592f; - float a2 = -0.284496736f; - float a3 = 1.421413741f; - float a4 = -1.453152027f; - float a5 = 1.061405429f; - float p = 0.3275911f; - float s = sign(x); - float x_abs = abs(x); - float t = 1.0f/(1.0f + p*x_abs); - float y = 1.0f - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x_abs*x_abs); + afpvec4 a1 = afpvec4(0.254829592f); + afpvec4 a2 = afpvec4(-0.284496736f); + afpvec4 a3 = afpvec4(1.421413741f); + afpvec4 a4 = afpvec4(-1.453152027f); + afpvec4 a5 = afpvec4(1.061405429f); + afpvec4 p = afpvec4(0.3275911f); + afpvec4 s = sign(x); + afpvec4 x_abs = abs(x); + afpvec4 t = 1.0f / (1.0f + p * x_abs); + afpvec4 y = 1.0f - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * exp(-x_abs * x_abs); return s * y; } void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + const uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); v = erf(v); - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/erf_pack4.comp b/src/layer/vulkan/shader/erf_pack4.comp deleted file mode 100644 index 905877b6f..000000000 --- a/src/layer/vulkan/shader/erf_pack4.comp +++ /dev/null @@ -1,66 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -afpvec4 erf(afpvec4 x) -{ - afpvec4 a1 = afpvec4(0.254829592f); - afpvec4 a2 = afpvec4(-0.284496736f); - afpvec4 a3 = afpvec4(1.421413741f); - afpvec4 a4 = afpvec4(-1.453152027f); - afpvec4 a5 = afpvec4(1.061405429f); - afpvec4 p = afpvec4(0.3275911f); - afpvec4 s = sign(x); - afpvec4 x_abs = abs(x); - afpvec4 t = 1.0f / (1.0f + p * x_abs); - afpvec4 y = 1.0f - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * exp(-x_abs * x_abs); - return s * y; -} - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = erf(v); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/erf_pack8.comp b/src/layer/vulkan/shader/erf_pack8.comp deleted file mode 100644 index 0854fe23f..000000000 --- a/src/layer/vulkan/shader/erf_pack8.comp +++ /dev/null @@ -1,67 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -afpvec4 erf(afpvec4 x) -{ - afpvec4 a1 = afpvec4(0.254829592f); - afpvec4 a2 = afpvec4(-0.284496736f); - afpvec4 a3 = afpvec4(1.421413741f); - afpvec4 a4 = afpvec4(-1.453152027f); - afpvec4 a5 = afpvec4(1.061405429f); - afpvec4 p = afpvec4(0.3275911f); - afpvec4 s = sign(x); - afpvec4 x_abs = abs(x); - afpvec4 t = 1.0f / (1.0f + p * x_abs); - afpvec4 y = 1.0f - (((((a5 * t + a4) * t) + a3) * t + a2) * t + a1) * t * exp(-x_abs * x_abs); - return s * y; -} - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = erf(v[0]); - v[1] = erf(v[1]); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/flatten.comp b/src/layer/vulkan/shader/flatten.comp index db9982110..b660fb922 100644 --- a/src/layer/vulkan/shader/flatten.comp +++ b/src/layer/vulkan/shader/flatten.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/flatten_pack1to4.comp b/src/layer/vulkan/shader/flatten_pack1to4.comp index 420b1eeb4..2e18582a7 100644 --- a/src/layer/vulkan/shader/flatten_pack1to4.comp +++ b/src/layer/vulkan/shader/flatten_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/flatten_pack1to8.comp b/src/layer/vulkan/shader/flatten_pack1to8.comp index 7bb6dd0d8..cd8012a08 100644 --- a/src/layer/vulkan/shader/flatten_pack1to8.comp +++ b/src/layer/vulkan/shader/flatten_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/flatten_pack4.comp b/src/layer/vulkan/shader/flatten_pack4.comp index 76ae0e6b5..a24db7fce 100644 --- a/src/layer/vulkan/shader/flatten_pack4.comp +++ b/src/layer/vulkan/shader/flatten_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/flatten_pack4to8.comp b/src/layer/vulkan/shader/flatten_pack4to8.comp index 3e0d03f7e..9aa9c7528 100644 --- a/src/layer/vulkan/shader/flatten_pack4to8.comp +++ b/src/layer/vulkan/shader/flatten_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/flatten_pack8.comp b/src/layer/vulkan/shader/flatten_pack8.comp index 38a641193..1c170ec42 100644 --- a/src/layer/vulkan/shader/flatten_pack8.comp +++ b/src/layer/vulkan/shader/flatten_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/gelu.comp b/src/layer/vulkan/shader/gelu.comp index 8832b5e9d..f329d1dc7 100644 --- a/src/layer/vulkan/shader/gelu.comp +++ b/src/layer/vulkan/shader/gelu.comp @@ -1,57 +1,35 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 #define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); // y = 0.5x * (1 + tanh(sqrt(2/Pi) * (x + 0.044715x^3))) #if NCNN_moltenvk - v = afp(0.5f) * v * (afp(1.0f) + afp(tanh(float(afp(0.79788452f) * (v + afp(0.044715f) * v * v * v))))); + v = afpvec4(0.5f) * v * (afpvec4(1.0f) + afpvec4(tanh(vec4(afpvec4(0.79788452f) * (v + afpvec4(0.044715f) * v * v * v))))); #else - v = afp(0.5f) * v * (afp(1.0f) + tanh(afp(0.79788452f) * (v + afp(0.044715f) * v * v * v))); + v = afpvec4(0.5f) * v * (afpvec4(1.0f) + tanh(afpvec4(0.79788452f) * (v + afpvec4(0.044715f) * v * v * v))); #endif - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/gelu_pack4.comp b/src/layer/vulkan/shader/gelu_pack4.comp deleted file mode 100644 index 82bb19891..000000000 --- a/src/layer/vulkan/shader/gelu_pack4.comp +++ /dev/null @@ -1,57 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - // y = 0.5x * (1 + tanh(sqrt(2/Pi) * (x + 0.044715x^3))) - -#if NCNN_moltenvk - v = afpvec4(0.5f) * v * (afpvec4(1.0f) + afpvec4(tanh(vec4(afpvec4(0.79788452f) * (v + afpvec4(0.044715f) * v * v * v))))); -#else - v = afpvec4(0.5f) * v * (afpvec4(1.0f) + tanh(afpvec4(0.79788452f) * (v + afpvec4(0.044715f) * v * v * v))); -#endif - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/gelu_pack8.comp b/src/layer/vulkan/shader/gelu_pack8.comp deleted file mode 100644 index a33cca39f..000000000 --- a/src/layer/vulkan/shader/gelu_pack8.comp +++ /dev/null @@ -1,59 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - // y = 0.5x * (1 + tanh(sqrt(2/Pi) * (x + 0.044715x^3))) - -#if NCNN_moltenvk - v[0] = afpvec4(0.5f) * v[0] * (afpvec4(1.0f) + afpvec4(tanh(vec4(afpvec4(0.79788452f) * (v[0] + afpvec4(0.044715f) * v[0] * v[0] * v[0]))))); - v[1] = afpvec4(0.5f) * v[1] * (afpvec4(1.0f) + afpvec4(tanh(vec4(afpvec4(0.79788452f) * (v[1] + afpvec4(0.044715f) * v[1] * v[1] * v[1]))))); -#else - v[0] = afpvec4(0.5f) * v[0] * (afpvec4(1.0f) + tanh(afpvec4(0.79788452f) * (v[0] + afpvec4(0.044715f) * v[0] * v[0] * v[0]))); - v[1] = afpvec4(0.5f) * v[1] * (afpvec4(1.0f) + tanh(afpvec4(0.79788452f) * (v[1] + afpvec4(0.044715f) * v[1] * v[1] * v[1]))); -#endif - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/gemm.comp b/src/layer/vulkan/shader/gemm.comp index e48c9cf96..093374f1c 100644 --- a/src/layer/vulkan/shader/gemm.comp +++ b/src/layer/vulkan/shader/gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/hardsigmoid.comp b/src/layer/vulkan/shader/hardsigmoid.comp index e5dcbfa7d..f5f2a9012 100644 --- a/src/layer/vulkan/shader/hardsigmoid.comp +++ b/src/layer/vulkan/shader/hardsigmoid.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -18,37 +7,26 @@ layout (constant_id = 0) const float alpha = 0; layout (constant_id = 1) const float beta = 0; #define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; + +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); v = clamp(v * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/hardsigmoid_pack4.comp b/src/layer/vulkan/shader/hardsigmoid_pack4.comp deleted file mode 100644 index 1c69a3978..000000000 --- a/src/layer/vulkan/shader/hardsigmoid_pack4.comp +++ /dev/null @@ -1,54 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; -layout (constant_id = 1) const float beta = 0; - -#define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = clamp(v * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/hardsigmoid_pack8.comp b/src/layer/vulkan/shader/hardsigmoid_pack8.comp deleted file mode 100644 index 75da169bc..000000000 --- a/src/layer/vulkan/shader/hardsigmoid_pack8.comp +++ /dev/null @@ -1,55 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; -layout (constant_id = 1) const float beta = 0; - -#define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = clamp(v[0] * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - v[1] = clamp(v[1] * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/hardswish.comp b/src/layer/vulkan/shader/hardswish.comp index 31dfb008b..45c47437b 100644 --- a/src/layer/vulkan/shader/hardswish.comp +++ b/src/layer/vulkan/shader/hardswish.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 @@ -18,37 +7,25 @@ layout (constant_id = 0) const float alpha = 0; layout (constant_id = 1) const float beta = 0; #define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); v = v * clamp(v * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/hardswish_pack4.comp b/src/layer/vulkan/shader/hardswish_pack4.comp deleted file mode 100644 index 29bad154c..000000000 --- a/src/layer/vulkan/shader/hardswish_pack4.comp +++ /dev/null @@ -1,54 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; -layout (constant_id = 1) const float beta = 0; - -#define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = v * clamp(v * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/hardswish_pack8.comp b/src/layer/vulkan/shader/hardswish_pack8.comp deleted file mode 100644 index 4c492e443..000000000 --- a/src/layer/vulkan/shader/hardswish_pack8.comp +++ /dev/null @@ -1,55 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float alpha = 0; -layout (constant_id = 1) const float beta = 0; - -#define shape_constant_id_offset 2 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = v[0] * clamp(v[0] * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - v[1] = v[1] * clamp(v[1] * afp(alpha) + afp(beta), afp(0.f), afp(1.f)); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/innerproduct.comp b/src/layer/vulkan/shader/innerproduct.comp index 2b6ca3e2e..5e84ac54e 100644 --- a/src/layer/vulkan/shader/innerproduct.comp +++ b/src/layer/vulkan/shader/innerproduct.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm.comp b/src/layer/vulkan/shader/innerproduct_gemm.comp index 6c3bf5e77..d72a11dde 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp1to4.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp1to4.comp index f531a7f69..19d3d7343 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp1to4.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp1to8.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp1to8.comp index 29376f2a3..552ee270a 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp1to8.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp4.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp4.comp index 0ca13279e..0e76f29a5 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp4.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp4to1.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp4to1.comp index 45bf37e5b..0af9a109c 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp4to1.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp4to8.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp4to8.comp index 0d3c93937..e64f9830c 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp4to8.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp8.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp8.comp index fc1580755..ba71e6392 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp8.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp8to1.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp8to1.comp index 53e473831..4b2e80ac8 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp8to1.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_gemm_wp8to4.comp b/src/layer/vulkan/shader/innerproduct_gemm_wp8to4.comp index b59fdd9c8..c85a92efe 100644 --- a/src/layer/vulkan/shader/innerproduct_gemm_wp8to4.comp +++ b/src/layer/vulkan/shader/innerproduct_gemm_wp8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack1to4.comp b/src/layer/vulkan/shader/innerproduct_pack1to4.comp index 4125dc8ca..26be0b06b 100644 --- a/src/layer/vulkan/shader/innerproduct_pack1to4.comp +++ b/src/layer/vulkan/shader/innerproduct_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack1to8.comp b/src/layer/vulkan/shader/innerproduct_pack1to8.comp index f1e3bb095..94a8a4a1c 100644 --- a/src/layer/vulkan/shader/innerproduct_pack1to8.comp +++ b/src/layer/vulkan/shader/innerproduct_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack4.comp b/src/layer/vulkan/shader/innerproduct_pack4.comp index 407b459f2..f9c9dea8b 100644 --- a/src/layer/vulkan/shader/innerproduct_pack4.comp +++ b/src/layer/vulkan/shader/innerproduct_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack4to1.comp b/src/layer/vulkan/shader/innerproduct_pack4to1.comp index 99eb98d0c..21f0f417f 100644 --- a/src/layer/vulkan/shader/innerproduct_pack4to1.comp +++ b/src/layer/vulkan/shader/innerproduct_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack4to8.comp b/src/layer/vulkan/shader/innerproduct_pack4to8.comp index 958efeb4d..7d6fd530a 100644 --- a/src/layer/vulkan/shader/innerproduct_pack4to8.comp +++ b/src/layer/vulkan/shader/innerproduct_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack8.comp b/src/layer/vulkan/shader/innerproduct_pack8.comp index 5a1ff8798..cbda467c6 100644 --- a/src/layer/vulkan/shader/innerproduct_pack8.comp +++ b/src/layer/vulkan/shader/innerproduct_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack8to1.comp b/src/layer/vulkan/shader/innerproduct_pack8to1.comp index b23e5c4ec..2e40fd704 100644 --- a/src/layer/vulkan/shader/innerproduct_pack8to1.comp +++ b/src/layer/vulkan/shader/innerproduct_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_pack8to4.comp b/src/layer/vulkan/shader/innerproduct_pack8to4.comp index a21f162c3..8ae0e518e 100644 --- a/src/layer/vulkan/shader/innerproduct_pack8to4.comp +++ b/src/layer/vulkan/shader/innerproduct_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_reduce_sum8.comp b/src/layer/vulkan/shader/innerproduct_reduce_sum8.comp index d7d35515f..965b42106 100644 --- a/src/layer/vulkan/shader/innerproduct_reduce_sum8.comp +++ b/src/layer/vulkan/shader/innerproduct_reduce_sum8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack4.comp b/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack4.comp index f3a5d6e84..bedb25c9c 100644 --- a/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack4.comp +++ b/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack8.comp b/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack8.comp index 92afec2f2..0162f2bb2 100644 --- a/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack8.comp +++ b/src/layer/vulkan/shader/innerproduct_reduce_sum8_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8.comp b/src/layer/vulkan/shader/innerproduct_sum8.comp index 37e7acb8b..1610fdcda 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack1to4.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack1to4.comp index 1bf20943e..0f944e62a 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack1to4.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack1to8.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack1to8.comp index c44cf240b..94773ba79 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack1to8.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack4.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack4.comp index 978fcf0a0..f81b24f62 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack4.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack4to1.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack4to1.comp index 77fa5d259..3cc5e058a 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack4to1.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack4to8.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack4to8.comp index 3c9baf36e..e7f7d125e 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack4to8.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack8.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack8.comp index 633f2a9cc..b10c7250a 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack8.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack8to1.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack8to1.comp index e17fa2cd1..da5bb8780 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack8to1.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/innerproduct_sum8_pack8to4.comp b/src/layer/vulkan/shader/innerproduct_sum8_pack8to4.comp index b924a71f7..9818aaf8e 100644 --- a/src/layer/vulkan/shader/innerproduct_sum8_pack8to4.comp +++ b/src/layer/vulkan/shader/innerproduct_sum8_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_coeffs.comp b/src/layer/vulkan/shader/instancenorm_coeffs.comp index 9f6c059d3..39a68c047 100644 --- a/src/layer/vulkan/shader/instancenorm_coeffs.comp +++ b/src/layer/vulkan/shader/instancenorm_coeffs.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_coeffs_pack4.comp b/src/layer/vulkan/shader/instancenorm_coeffs_pack4.comp index 551813efd..b00a4e3cf 100644 --- a/src/layer/vulkan/shader/instancenorm_coeffs_pack4.comp +++ b/src/layer/vulkan/shader/instancenorm_coeffs_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_coeffs_pack8.comp b/src/layer/vulkan/shader/instancenorm_coeffs_pack8.comp index 3acfe05fc..7c141e389 100644 --- a/src/layer/vulkan/shader/instancenorm_coeffs_pack8.comp +++ b/src/layer/vulkan/shader/instancenorm_coeffs_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_norm.comp b/src/layer/vulkan/shader/instancenorm_norm.comp index 71eca896c..3a5dd4713 100644 --- a/src/layer/vulkan/shader/instancenorm_norm.comp +++ b/src/layer/vulkan/shader/instancenorm_norm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_norm_pack4.comp b/src/layer/vulkan/shader/instancenorm_norm_pack4.comp index caeadb227..4d5668242 100644 --- a/src/layer/vulkan/shader/instancenorm_norm_pack4.comp +++ b/src/layer/vulkan/shader/instancenorm_norm_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_norm_pack8.comp b/src/layer/vulkan/shader/instancenorm_norm_pack8.comp index 9bc54f61f..8ba098c11 100644 --- a/src/layer/vulkan/shader/instancenorm_norm_pack8.comp +++ b/src/layer/vulkan/shader/instancenorm_norm_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_mean.comp b/src/layer/vulkan/shader/instancenorm_reduce_mean.comp index cd2f8e095..8d23dda74 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_mean.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_mean.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_mean_pack4.comp b/src/layer/vulkan/shader/instancenorm_reduce_mean_pack4.comp index d650e9928..53efd8d93 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_mean_pack4.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_mean_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_mean_pack8.comp b/src/layer/vulkan/shader/instancenorm_reduce_mean_pack8.comp index ed676c638..5b6772e74 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_mean_pack8.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_mean_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32.comp b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32.comp index 44306948f..cd79a4ed3 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack4.comp b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack4.comp index c9204152d..93d3a339d 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack4.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack8.comp b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack8.comp index 3e2570161..c9a3873db 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack8.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp16_to_fp32_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32.comp b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32.comp index 59aa2d18d..71ecc8240 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack4.comp b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack4.comp index 0f826cfde..b664bf72c 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack4.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack8.comp b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack8.comp index 5473df39d..0544880a6 100644 --- a/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack8.comp +++ b/src/layer/vulkan/shader/instancenorm_reduce_sum4_fp32_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_sub_mean_square.comp b/src/layer/vulkan/shader/instancenorm_sub_mean_square.comp index a268a03e0..c2f988bd0 100644 --- a/src/layer/vulkan/shader/instancenorm_sub_mean_square.comp +++ b/src/layer/vulkan/shader/instancenorm_sub_mean_square.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack4.comp b/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack4.comp index 36996f0f5..2d6dc3506 100644 --- a/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack4.comp +++ b/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack8.comp b/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack8.comp index b30ecbc75..f04286d50 100644 --- a/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack8.comp +++ b/src/layer/vulkan/shader/instancenorm_sub_mean_square_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/interp.comp b/src/layer/vulkan/shader/interp.comp index 5651c4f60..2f7ee942f 100644 --- a/src/layer/vulkan/shader/interp.comp +++ b/src/layer/vulkan/shader/interp.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/interp_bicubic.comp b/src/layer/vulkan/shader/interp_bicubic.comp index fee356a8c..7391a6cd5 100644 --- a/src/layer/vulkan/shader/interp_bicubic.comp +++ b/src/layer/vulkan/shader/interp_bicubic.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/interp_bicubic_coeffs.comp b/src/layer/vulkan/shader/interp_bicubic_coeffs.comp index 693cec953..d5c2449fe 100644 --- a/src/layer/vulkan/shader/interp_bicubic_coeffs.comp +++ b/src/layer/vulkan/shader/interp_bicubic_coeffs.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/interp_bicubic_pack4.comp b/src/layer/vulkan/shader/interp_bicubic_pack4.comp index d1b8a0f68..ca1f0331b 100644 --- a/src/layer/vulkan/shader/interp_bicubic_pack4.comp +++ b/src/layer/vulkan/shader/interp_bicubic_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/interp_bicubic_pack8.comp b/src/layer/vulkan/shader/interp_bicubic_pack8.comp index d1c8555de..aa246479f 100644 --- a/src/layer/vulkan/shader/interp_bicubic_pack8.comp +++ b/src/layer/vulkan/shader/interp_bicubic_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/interp_pack4.comp b/src/layer/vulkan/shader/interp_pack4.comp index 882f0ebc7..2d1c08544 100644 --- a/src/layer/vulkan/shader/interp_pack4.comp +++ b/src/layer/vulkan/shader/interp_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/interp_pack8.comp b/src/layer/vulkan/shader/interp_pack8.comp index ee32fc950..e6b43f11b 100644 --- a/src/layer/vulkan/shader/interp_pack8.comp +++ b/src/layer/vulkan/shader/interp_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_norm.comp b/src/layer/vulkan/shader/lrn_norm.comp index 401a19b80..501c3db1d 100644 --- a/src/layer/vulkan/shader/lrn_norm.comp +++ b/src/layer/vulkan/shader/lrn_norm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_norm_across_channel_pack4.comp b/src/layer/vulkan/shader/lrn_norm_across_channel_pack4.comp index 9db02e80e..2e9d9e45a 100644 --- a/src/layer/vulkan/shader/lrn_norm_across_channel_pack4.comp +++ b/src/layer/vulkan/shader/lrn_norm_across_channel_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_norm_across_channel_pack8.comp b/src/layer/vulkan/shader/lrn_norm_across_channel_pack8.comp index 8714a20cf..c0e7e67b0 100644 --- a/src/layer/vulkan/shader/lrn_norm_across_channel_pack8.comp +++ b/src/layer/vulkan/shader/lrn_norm_across_channel_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_norm_within_channel_pack4.comp b/src/layer/vulkan/shader/lrn_norm_within_channel_pack4.comp index 624ca59a5..d47037337 100644 --- a/src/layer/vulkan/shader/lrn_norm_within_channel_pack4.comp +++ b/src/layer/vulkan/shader/lrn_norm_within_channel_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_norm_within_channel_pack8.comp b/src/layer/vulkan/shader/lrn_norm_within_channel_pack8.comp index dfab6430e..8a27d74a3 100644 --- a/src/layer/vulkan/shader/lrn_norm_within_channel_pack8.comp +++ b/src/layer/vulkan/shader/lrn_norm_within_channel_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_square_pad.comp b/src/layer/vulkan/shader/lrn_square_pad.comp index ef5652430..bb8d16f31 100644 --- a/src/layer/vulkan/shader/lrn_square_pad.comp +++ b/src/layer/vulkan/shader/lrn_square_pad.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack4.comp b/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack4.comp index c7d1f4b25..2fb336426 100644 --- a/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack4.comp +++ b/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack8.comp b/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack8.comp index 39ffc7cc5..4deb63308 100644 --- a/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack8.comp +++ b/src/layer/vulkan/shader/lrn_square_pad_across_channel_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack4.comp b/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack4.comp index c442b4e2c..b49db7b41 100644 --- a/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack4.comp +++ b/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack8.comp b/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack8.comp index e84e0f005..c1391de57 100644 --- a/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack8.comp +++ b/src/layer/vulkan/shader/lrn_square_pad_within_channel_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/mish.comp b/src/layer/vulkan/shader/mish.comp index 7a263682a..60d479799 100644 --- a/src/layer/vulkan/shader/mish.comp +++ b/src/layer/vulkan/shader/mish.comp @@ -1,55 +1,32 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; + +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); #if NCNN_moltenvk - v = v * afp(tanh(float(log(exp(v) + afp(1.f))))); + v = v * afpvec4(tanh(vec4(log(exp(v) + afpvec4(1.f))))); #else - v = v * tanh(log(exp(v) + afp(1.f))); + v = v * tanh(log(exp(v) + afpvec4(1.f))); #endif - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/mish_pack4.comp b/src/layer/vulkan/shader/mish_pack4.comp deleted file mode 100644 index 362cc1f51..000000000 --- a/src/layer/vulkan/shader/mish_pack4.comp +++ /dev/null @@ -1,55 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - -#if NCNN_moltenvk - v = v * afpvec4(tanh(vec4(log(exp(v) + afpvec4(1.f))))); -#else - v = v * tanh(log(exp(v) + afpvec4(1.f))); -#endif - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/mish_pack8.comp b/src/layer/vulkan/shader/mish_pack8.comp deleted file mode 100644 index 44afd2e7a..000000000 --- a/src/layer/vulkan/shader/mish_pack8.comp +++ /dev/null @@ -1,57 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - -#if NCNN_moltenvk - v[0] = v[0] * afpvec4(tanh(vec4(log(exp(v[0]) + afpvec4(1.f))))); - v[1] = v[1] * afpvec4(tanh(vec4(log(exp(v[1]) + afpvec4(1.f))))); -#else - v[0] = v[0] * tanh(log(exp(v[0]) + afpvec4(1.f))); - v[1] = v[1] * tanh(log(exp(v[1]) + afpvec4(1.f))); -#endif - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/multiheadattention_qk_cross.comp b/src/layer/vulkan/shader/multiheadattention_qk_cross.comp index 8370e7e3a..dbe6ea5c9 100644 --- a/src/layer/vulkan/shader/multiheadattention_qk_cross.comp +++ b/src/layer/vulkan/shader/multiheadattention_qk_cross.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/multiheadattention_qk_cross_pack1to4.comp b/src/layer/vulkan/shader/multiheadattention_qk_cross_pack1to4.comp index fa726142a..23cc5a2b3 100644 --- a/src/layer/vulkan/shader/multiheadattention_qk_cross_pack1to4.comp +++ b/src/layer/vulkan/shader/multiheadattention_qk_cross_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4.comp b/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4.comp index 8b48e26de..1bda45690 100644 --- a/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4.comp +++ b/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4to1.comp b/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4to1.comp index ff01a3903..1ace0ebc4 100644 --- a/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4to1.comp +++ b/src/layer/vulkan/shader/multiheadattention_qk_cross_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/multiheadattention_qkv_cross.comp b/src/layer/vulkan/shader/multiheadattention_qkv_cross.comp index ab923379c..17cb9d405 100644 --- a/src/layer/vulkan/shader/multiheadattention_qkv_cross.comp +++ b/src/layer/vulkan/shader/multiheadattention_qkv_cross.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack1to4.comp b/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack1to4.comp index a2a349e33..0484fb672 100644 --- a/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack1to4.comp +++ b/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4.comp b/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4.comp index 6a35674a8..e2787e7ae 100644 --- a/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4.comp +++ b/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4to1.comp b/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4to1.comp index 828779fa0..7ab130690 100644 --- a/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4to1.comp +++ b/src/layer/vulkan/shader/multiheadattention_qkv_cross_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_coeffs.comp b/src/layer/vulkan/shader/normalize_coeffs.comp index 26216a54f..8b3d1a1b3 100644 --- a/src/layer/vulkan/shader/normalize_coeffs.comp +++ b/src/layer/vulkan/shader/normalize_coeffs.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_coeffs_pack4.comp b/src/layer/vulkan/shader/normalize_coeffs_pack4.comp index 0c9369d6d..15ff7a579 100644 --- a/src/layer/vulkan/shader/normalize_coeffs_pack4.comp +++ b/src/layer/vulkan/shader/normalize_coeffs_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_coeffs_pack8.comp b/src/layer/vulkan/shader/normalize_coeffs_pack8.comp index 89f185164..fd7bbe4a8 100644 --- a/src/layer/vulkan/shader/normalize_coeffs_pack8.comp +++ b/src/layer/vulkan/shader/normalize_coeffs_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_norm.comp b/src/layer/vulkan/shader/normalize_norm.comp index 5dceee7f6..693c218f6 100644 --- a/src/layer/vulkan/shader/normalize_norm.comp +++ b/src/layer/vulkan/shader/normalize_norm.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_norm_pack4.comp b/src/layer/vulkan/shader/normalize_norm_pack4.comp index bb31dcb0b..456426d84 100644 --- a/src/layer/vulkan/shader/normalize_norm_pack4.comp +++ b/src/layer/vulkan/shader/normalize_norm_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_norm_pack8.comp b/src/layer/vulkan/shader/normalize_norm_pack8.comp index abeb6738f..0cfe347a5 100644 --- a/src/layer/vulkan/shader/normalize_norm_pack8.comp +++ b/src/layer/vulkan/shader/normalize_norm_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32.comp b/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32.comp index d1dbff4b8..a90c27ec9 100644 --- a/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32.comp +++ b/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack4.comp b/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack4.comp index 1b030a05e..68474c194 100644 --- a/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack4.comp +++ b/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack8.comp b/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack8.comp index 26edf6ff9..4938c41e9 100644 --- a/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack8.comp +++ b/src/layer/vulkan/shader/normalize_reduce_sum4_fp16_to_fp32_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_reduce_sum4_fp32.comp b/src/layer/vulkan/shader/normalize_reduce_sum4_fp32.comp index f43eade38..d7eaa2aee 100644 --- a/src/layer/vulkan/shader/normalize_reduce_sum4_fp32.comp +++ b/src/layer/vulkan/shader/normalize_reduce_sum4_fp32.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack4.comp b/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack4.comp index 996555d2e..882d0e354 100644 --- a/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack4.comp +++ b/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack8.comp b/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack8.comp index f55bdd2d6..2ece9473b 100644 --- a/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack8.comp +++ b/src/layer/vulkan/shader/normalize_reduce_sum4_fp32_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing.comp b/src/layer/vulkan/shader/packing.comp index f0fbd1351..05b545af3 100644 --- a/src/layer/vulkan/shader/packing.comp +++ b/src/layer/vulkan/shader/packing.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_int8.comp b/src/layer/vulkan/shader/packing_int8.comp index 4ea5a8f93..d6cb32b06 100644 --- a/src/layer/vulkan/shader/packing_int8.comp +++ b/src/layer/vulkan/shader/packing_int8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack1to4.comp b/src/layer/vulkan/shader/packing_pack1to4.comp index 8e66e8574..b554f4f5d 100644 --- a/src/layer/vulkan/shader/packing_pack1to4.comp +++ b/src/layer/vulkan/shader/packing_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack1to4_int8.comp b/src/layer/vulkan/shader/packing_pack1to4_int8.comp index fb99d5d34..e7c79986d 100644 --- a/src/layer/vulkan/shader/packing_pack1to4_int8.comp +++ b/src/layer/vulkan/shader/packing_pack1to4_int8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack1to8.comp b/src/layer/vulkan/shader/packing_pack1to8.comp index 0c6575379..6c45b0b51 100644 --- a/src/layer/vulkan/shader/packing_pack1to8.comp +++ b/src/layer/vulkan/shader/packing_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack1to8_int8.comp b/src/layer/vulkan/shader/packing_pack1to8_int8.comp index 4f7b14732..5a9fc01e3 100644 --- a/src/layer/vulkan/shader/packing_pack1to8_int8.comp +++ b/src/layer/vulkan/shader/packing_pack1to8_int8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack4to1.comp b/src/layer/vulkan/shader/packing_pack4to1.comp index 6a121d6ac..12937355b 100644 --- a/src/layer/vulkan/shader/packing_pack4to1.comp +++ b/src/layer/vulkan/shader/packing_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack4to1_int8.comp b/src/layer/vulkan/shader/packing_pack4to1_int8.comp index 53145a40c..414f7c817 100644 --- a/src/layer/vulkan/shader/packing_pack4to1_int8.comp +++ b/src/layer/vulkan/shader/packing_pack4to1_int8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack4to8.comp b/src/layer/vulkan/shader/packing_pack4to8.comp index 363536d82..8552b569d 100644 --- a/src/layer/vulkan/shader/packing_pack4to8.comp +++ b/src/layer/vulkan/shader/packing_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack4to8_int8.comp b/src/layer/vulkan/shader/packing_pack4to8_int8.comp index 112dd2472..c62a2bd8a 100644 --- a/src/layer/vulkan/shader/packing_pack4to8_int8.comp +++ b/src/layer/vulkan/shader/packing_pack4to8_int8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack8to1.comp b/src/layer/vulkan/shader/packing_pack8to1.comp index 2929c2fd8..cf9cdd042 100644 --- a/src/layer/vulkan/shader/packing_pack8to1.comp +++ b/src/layer/vulkan/shader/packing_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack8to1_int8.comp b/src/layer/vulkan/shader/packing_pack8to1_int8.comp index 6d1c9a4a1..d4f857b9a 100644 --- a/src/layer/vulkan/shader/packing_pack8to1_int8.comp +++ b/src/layer/vulkan/shader/packing_pack8to1_int8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack8to4.comp b/src/layer/vulkan/shader/packing_pack8to4.comp index 87ad4a8a6..771329673 100644 --- a/src/layer/vulkan/shader/packing_pack8to4.comp +++ b/src/layer/vulkan/shader/packing_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/packing_pack8to4_int8.comp b/src/layer/vulkan/shader/packing_pack8to4_int8.comp index c3df6dc6d..7010d3489 100644 --- a/src/layer/vulkan/shader/packing_pack8to4_int8.comp +++ b/src/layer/vulkan/shader/packing_pack8to4_int8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding.comp b/src/layer/vulkan/shader/padding.comp index b0dc4f8c6..bdaea5072 100644 --- a/src/layer/vulkan/shader/padding.comp +++ b/src/layer/vulkan/shader/padding.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_3d.comp b/src/layer/vulkan/shader/padding_3d.comp index 0e44ec3c1..02f333ec2 100644 --- a/src/layer/vulkan/shader/padding_3d.comp +++ b/src/layer/vulkan/shader/padding_3d.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_3d_pack4.comp b/src/layer/vulkan/shader/padding_3d_pack4.comp index f2a49b10b..fa84c8f28 100644 --- a/src/layer/vulkan/shader/padding_3d_pack4.comp +++ b/src/layer/vulkan/shader/padding_3d_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_3d_pack8.comp b/src/layer/vulkan/shader/padding_3d_pack8.comp index 817076738..9286bad89 100644 --- a/src/layer/vulkan/shader/padding_3d_pack8.comp +++ b/src/layer/vulkan/shader/padding_3d_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack1to4.comp b/src/layer/vulkan/shader/padding_pack1to4.comp index 899a8faad..de57bbf0f 100644 --- a/src/layer/vulkan/shader/padding_pack1to4.comp +++ b/src/layer/vulkan/shader/padding_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack1to8.comp b/src/layer/vulkan/shader/padding_pack1to8.comp index bf87f5904..c591497fd 100644 --- a/src/layer/vulkan/shader/padding_pack1to8.comp +++ b/src/layer/vulkan/shader/padding_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack4.comp b/src/layer/vulkan/shader/padding_pack4.comp index 92f010542..bb0deaa05 100644 --- a/src/layer/vulkan/shader/padding_pack4.comp +++ b/src/layer/vulkan/shader/padding_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack4to1.comp b/src/layer/vulkan/shader/padding_pack4to1.comp index 701fbb2a9..92a3561bb 100644 --- a/src/layer/vulkan/shader/padding_pack4to1.comp +++ b/src/layer/vulkan/shader/padding_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack4to8.comp b/src/layer/vulkan/shader/padding_pack4to8.comp index 7ed773d68..2d8c32e43 100644 --- a/src/layer/vulkan/shader/padding_pack4to8.comp +++ b/src/layer/vulkan/shader/padding_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack8.comp b/src/layer/vulkan/shader/padding_pack8.comp index 126b0dc67..4dfced407 100644 --- a/src/layer/vulkan/shader/padding_pack8.comp +++ b/src/layer/vulkan/shader/padding_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack8to1.comp b/src/layer/vulkan/shader/padding_pack8to1.comp index 609793f9c..8ed4ef028 100644 --- a/src/layer/vulkan/shader/padding_pack8to1.comp +++ b/src/layer/vulkan/shader/padding_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/padding_pack8to4.comp b/src/layer/vulkan/shader/padding_pack8to4.comp index 4c31760aa..efbe906d2 100644 --- a/src/layer/vulkan/shader/padding_pack8to4.comp +++ b/src/layer/vulkan/shader/padding_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute.comp b/src/layer/vulkan/shader/permute.comp index e07b99726..195f5964a 100644 --- a/src/layer/vulkan/shader/permute.comp +++ b/src/layer/vulkan/shader/permute.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack1to4.comp b/src/layer/vulkan/shader/permute_pack1to4.comp index 4cf2063b2..b02c4f9fb 100644 --- a/src/layer/vulkan/shader/permute_pack1to4.comp +++ b/src/layer/vulkan/shader/permute_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack1to8.comp b/src/layer/vulkan/shader/permute_pack1to8.comp index 9b7056749..a06ccd93b 100644 --- a/src/layer/vulkan/shader/permute_pack1to8.comp +++ b/src/layer/vulkan/shader/permute_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack4.comp b/src/layer/vulkan/shader/permute_pack4.comp index d478c48ee..e41303ab5 100644 --- a/src/layer/vulkan/shader/permute_pack4.comp +++ b/src/layer/vulkan/shader/permute_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack4to1.comp b/src/layer/vulkan/shader/permute_pack4to1.comp index 855de8925..01630d7ee 100644 --- a/src/layer/vulkan/shader/permute_pack4to1.comp +++ b/src/layer/vulkan/shader/permute_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack4to8.comp b/src/layer/vulkan/shader/permute_pack4to8.comp index c8998122d..16cfd22ad 100644 --- a/src/layer/vulkan/shader/permute_pack4to8.comp +++ b/src/layer/vulkan/shader/permute_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack8.comp b/src/layer/vulkan/shader/permute_pack8.comp index 19a7a7b3b..0cd64c0f4 100644 --- a/src/layer/vulkan/shader/permute_pack8.comp +++ b/src/layer/vulkan/shader/permute_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack8to1.comp b/src/layer/vulkan/shader/permute_pack8to1.comp index 8e9ddd8b4..3b8635a05 100644 --- a/src/layer/vulkan/shader/permute_pack8to1.comp +++ b/src/layer/vulkan/shader/permute_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/permute_pack8to4.comp b/src/layer/vulkan/shader/permute_pack8to4.comp index 068d297d0..fb6b75acf 100644 --- a/src/layer/vulkan/shader/permute_pack8to4.comp +++ b/src/layer/vulkan/shader/permute_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pixelshuffle.comp b/src/layer/vulkan/shader/pixelshuffle.comp index 860198797..07a83d530 100644 --- a/src/layer/vulkan/shader/pixelshuffle.comp +++ b/src/layer/vulkan/shader/pixelshuffle.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pixelshuffle_pack4.comp b/src/layer/vulkan/shader/pixelshuffle_pack4.comp index fce2ec35d..68820d32a 100644 --- a/src/layer/vulkan/shader/pixelshuffle_pack4.comp +++ b/src/layer/vulkan/shader/pixelshuffle_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pixelshuffle_pack4to1.comp b/src/layer/vulkan/shader/pixelshuffle_pack4to1.comp index 7f7e6720c..f8800ff12 100644 --- a/src/layer/vulkan/shader/pixelshuffle_pack4to1.comp +++ b/src/layer/vulkan/shader/pixelshuffle_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pixelshuffle_pack8.comp b/src/layer/vulkan/shader/pixelshuffle_pack8.comp index 820e4e3cf..8f48b98de 100644 --- a/src/layer/vulkan/shader/pixelshuffle_pack8.comp +++ b/src/layer/vulkan/shader/pixelshuffle_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pixelshuffle_pack8to1.comp b/src/layer/vulkan/shader/pixelshuffle_pack8to1.comp index 52f842b6f..ce28f5a33 100644 --- a/src/layer/vulkan/shader/pixelshuffle_pack8to1.comp +++ b/src/layer/vulkan/shader/pixelshuffle_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pixelshuffle_pack8to4.comp b/src/layer/vulkan/shader/pixelshuffle_pack8to4.comp index 97797fe6b..63f218f5f 100644 --- a/src/layer/vulkan/shader/pixelshuffle_pack8to4.comp +++ b/src/layer/vulkan/shader/pixelshuffle_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling.comp b/src/layer/vulkan/shader/pooling.comp index d03741b86..4861a59a0 100644 --- a/src/layer/vulkan/shader/pooling.comp +++ b/src/layer/vulkan/shader/pooling.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_adaptive.comp b/src/layer/vulkan/shader/pooling_adaptive.comp index 3d89b6d63..82d736ae7 100644 --- a/src/layer/vulkan/shader/pooling_adaptive.comp +++ b/src/layer/vulkan/shader/pooling_adaptive.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_adaptive_pack4.comp b/src/layer/vulkan/shader/pooling_adaptive_pack4.comp index c5927c51d..84fd73c81 100644 --- a/src/layer/vulkan/shader/pooling_adaptive_pack4.comp +++ b/src/layer/vulkan/shader/pooling_adaptive_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_adaptive_pack8.comp b/src/layer/vulkan/shader/pooling_adaptive_pack8.comp index 80700ffc0..8ff69baf3 100644 --- a/src/layer/vulkan/shader/pooling_adaptive_pack8.comp +++ b/src/layer/vulkan/shader/pooling_adaptive_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max.comp b/src/layer/vulkan/shader/pooling_global_reduce_max.comp index 3f821ec8c..3698d1353 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_first.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_first.comp index d81a5233b..27b0c3b87 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_first.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_first.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack4.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack4.comp index 0cd454932..3f88759d2 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack4.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack8.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack8.comp index 9c1adf5b5..c0159bcbb 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack8.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_first_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_last.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_last.comp index dfe1a7e5b..162722497 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_last.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_last.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack4.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack4.comp index 03331db47..d35287083 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack4.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack8.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack8.comp index 55ae47149..9a273b3c8 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack8.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_last_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_pack4.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_pack4.comp index 40f4e992c..bc8ccbb23 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_pack4.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_max_pack8.comp b/src/layer/vulkan/shader/pooling_global_reduce_max_pack8.comp index 7539aab03..050d3ce37 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_max_pack8.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_max_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum.comp index 29004dd56..3e10e1b92 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_first.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_first.comp index 2a18f8b78..dfbafb057 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_first.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_first.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack4.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack4.comp index 6d5a4edef..196d13c56 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack4.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack8.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack8.comp index e49cf13dd..14c16cf4c 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack8.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_first_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_last.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_last.comp index dd367a27f..1865dc8f4 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_last.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_last.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack4.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack4.comp index 9e68b09ab..a3f7cfd21 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack4.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack8.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack8.comp index 236a76fef..6ae35f9c3 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack8.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_last_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_pack4.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_pack4.comp index 3487df099..aa1e25383 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_pack4.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_global_reduce_sum_pack8.comp b/src/layer/vulkan/shader/pooling_global_reduce_sum_pack8.comp index 4617ecc97..98660cf6a 100644 --- a/src/layer/vulkan/shader/pooling_global_reduce_sum_pack8.comp +++ b/src/layer/vulkan/shader/pooling_global_reduce_sum_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_pack4.comp b/src/layer/vulkan/shader/pooling_pack4.comp index 05a8b7ea2..bb4ee347b 100644 --- a/src/layer/vulkan/shader/pooling_pack4.comp +++ b/src/layer/vulkan/shader/pooling_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/pooling_pack8.comp b/src/layer/vulkan/shader/pooling_pack8.comp index 4b6ffc3a5..ca97df137 100644 --- a/src/layer/vulkan/shader/pooling_pack8.comp +++ b/src/layer/vulkan/shader/pooling_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/prelu.comp b/src/layer/vulkan/shader/prelu.comp index e01d978cc..56b741318 100644 --- a/src/layer/vulkan/shader/prelu.comp +++ b/src/layer/vulkan/shader/prelu.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/prelu_pack4.comp b/src/layer/vulkan/shader/prelu_pack4.comp index 4094dffc1..d3a8cd1cc 100644 --- a/src/layer/vulkan/shader/prelu_pack4.comp +++ b/src/layer/vulkan/shader/prelu_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/prelu_pack8.comp b/src/layer/vulkan/shader/prelu_pack8.comp index 33aac6f92..fbc8bb2c6 100644 --- a/src/layer/vulkan/shader/prelu_pack8.comp +++ b/src/layer/vulkan/shader/prelu_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/priorbox.comp b/src/layer/vulkan/shader/priorbox.comp index a0aa993d8..f90ae30a7 100644 --- a/src/layer/vulkan/shader/priorbox.comp +++ b/src/layer/vulkan/shader/priorbox.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/priorbox_mxnet.comp b/src/layer/vulkan/shader/priorbox_mxnet.comp index 2f0577cff..51935f8c2 100644 --- a/src/layer/vulkan/shader/priorbox_mxnet.comp +++ b/src/layer/vulkan/shader/priorbox_mxnet.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/quantize.comp b/src/layer/vulkan/shader/quantize.comp index 58d23f852..492c5da16 100644 --- a/src/layer/vulkan/shader/quantize.comp +++ b/src/layer/vulkan/shader/quantize.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/quantize_pack4.comp b/src/layer/vulkan/shader/quantize_pack4.comp index 7b58eff1a..49ec1e538 100644 --- a/src/layer/vulkan/shader/quantize_pack4.comp +++ b/src/layer/vulkan/shader/quantize_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/quantize_pack8.comp b/src/layer/vulkan/shader/quantize_pack8.comp index 032f8ff1f..6912edab1 100644 --- a/src/layer/vulkan/shader/quantize_pack8.comp +++ b/src/layer/vulkan/shader/quantize_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/relu.comp b/src/layer/vulkan/shader/relu.comp index 694061c94..359728eda 100644 --- a/src/layer/vulkan/shader/relu.comp +++ b/src/layer/vulkan/shader/relu.comp @@ -1,56 +1,34 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const float slope = 0; #define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = shape_constant_id_offset + 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; + +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); if (slope == 0) v = max(v, afp(0.f)); else - v = v < afp(0.f) ? v * afp(slope) : v; + v = mix(v, v * afp(slope), lessThan(v, afpvec4(0.f))); - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/relu_pack4.comp b/src/layer/vulkan/shader/relu_pack4.comp deleted file mode 100644 index 18ab16c30..000000000 --- a/src/layer/vulkan/shader/relu_pack4.comp +++ /dev/null @@ -1,56 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float slope = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - if (slope == 0) - v = max(v, afp(0.f)); - else - v = mix(v, v * afp(slope), lessThan(v, afpvec4(0.f))); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/relu_pack8.comp b/src/layer/vulkan/shader/relu_pack8.comp deleted file mode 100644 index 83f833e32..000000000 --- a/src/layer/vulkan/shader/relu_pack8.comp +++ /dev/null @@ -1,62 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const float slope = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - if (slope == 0) - { - v[0] = max(v[0], afp(0.f)); - v[1] = max(v[1], afp(0.f)); - } - else - { - v[0] = mix(v[0], v[0] * afp(slope), lessThan(v[0], afpvec4(0.f))); - v[1] = mix(v[1], v[1] * afp(slope), lessThan(v[1], afpvec4(0.f))); - } - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/reorg.comp b/src/layer/vulkan/shader/reorg.comp index d86decb5a..d40651fc2 100644 --- a/src/layer/vulkan/shader/reorg.comp +++ b/src/layer/vulkan/shader/reorg.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reorg_pack1to4.comp b/src/layer/vulkan/shader/reorg_pack1to4.comp index d6d30bbe8..6231cfc71 100644 --- a/src/layer/vulkan/shader/reorg_pack1to4.comp +++ b/src/layer/vulkan/shader/reorg_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reorg_pack1to8.comp b/src/layer/vulkan/shader/reorg_pack1to8.comp index 8b5db031c..2e8e9535f 100644 --- a/src/layer/vulkan/shader/reorg_pack1to8.comp +++ b/src/layer/vulkan/shader/reorg_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reorg_pack4.comp b/src/layer/vulkan/shader/reorg_pack4.comp index 81d077d6c..ab39aeae9 100644 --- a/src/layer/vulkan/shader/reorg_pack4.comp +++ b/src/layer/vulkan/shader/reorg_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reorg_pack4to8.comp b/src/layer/vulkan/shader/reorg_pack4to8.comp index 543e5824f..9007a31c7 100644 --- a/src/layer/vulkan/shader/reorg_pack4to8.comp +++ b/src/layer/vulkan/shader/reorg_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reorg_pack8.comp b/src/layer/vulkan/shader/reorg_pack8.comp index ce2727d05..1f6086234 100644 --- a/src/layer/vulkan/shader/reorg_pack8.comp +++ b/src/layer/vulkan/shader/reorg_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/requantize.comp b/src/layer/vulkan/shader/requantize.comp index cb2ef7432..39e510319 100644 --- a/src/layer/vulkan/shader/requantize.comp +++ b/src/layer/vulkan/shader/requantize.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/requantize_pack4.comp b/src/layer/vulkan/shader/requantize_pack4.comp index 2fcbc862b..cdd3ec38a 100644 --- a/src/layer/vulkan/shader/requantize_pack4.comp +++ b/src/layer/vulkan/shader/requantize_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/requantize_pack8.comp b/src/layer/vulkan/shader/requantize_pack8.comp index fedff0151..4e8dd0c59 100644 --- a/src/layer/vulkan/shader/requantize_pack8.comp +++ b/src/layer/vulkan/shader/requantize_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape.comp b/src/layer/vulkan/shader/reshape.comp index f99954e22..b5621d7b3 100644 --- a/src/layer/vulkan/shader/reshape.comp +++ b/src/layer/vulkan/shader/reshape.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack1to4.comp b/src/layer/vulkan/shader/reshape_pack1to4.comp index b109979ce..4d0bfb2bf 100644 --- a/src/layer/vulkan/shader/reshape_pack1to4.comp +++ b/src/layer/vulkan/shader/reshape_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack1to8.comp b/src/layer/vulkan/shader/reshape_pack1to8.comp index f487093b3..52f886718 100644 --- a/src/layer/vulkan/shader/reshape_pack1to8.comp +++ b/src/layer/vulkan/shader/reshape_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack4.comp b/src/layer/vulkan/shader/reshape_pack4.comp index da8f8decf..28b84351d 100644 --- a/src/layer/vulkan/shader/reshape_pack4.comp +++ b/src/layer/vulkan/shader/reshape_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack4to1.comp b/src/layer/vulkan/shader/reshape_pack4to1.comp index abd804c58..ddb80b41c 100644 --- a/src/layer/vulkan/shader/reshape_pack4to1.comp +++ b/src/layer/vulkan/shader/reshape_pack4to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack4to8.comp b/src/layer/vulkan/shader/reshape_pack4to8.comp index f421543dc..f7f31025c 100644 --- a/src/layer/vulkan/shader/reshape_pack4to8.comp +++ b/src/layer/vulkan/shader/reshape_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack8.comp b/src/layer/vulkan/shader/reshape_pack8.comp index e8650ac99..00bd9b6ea 100644 --- a/src/layer/vulkan/shader/reshape_pack8.comp +++ b/src/layer/vulkan/shader/reshape_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack8to1.comp b/src/layer/vulkan/shader/reshape_pack8to1.comp index 728fa8e82..4e3b44d16 100644 --- a/src/layer/vulkan/shader/reshape_pack8to1.comp +++ b/src/layer/vulkan/shader/reshape_pack8to1.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/reshape_pack8to4.comp b/src/layer/vulkan/shader/reshape_pack8to4.comp index 3b44b838a..368d98573 100644 --- a/src/layer/vulkan/shader/reshape_pack8to4.comp +++ b/src/layer/vulkan/shader/reshape_pack8to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/scale.comp b/src/layer/vulkan/shader/scale.comp index 3e6f6f3a8..5a438dc2a 100644 --- a/src/layer/vulkan/shader/scale.comp +++ b/src/layer/vulkan/shader/scale.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/scale_pack4.comp b/src/layer/vulkan/shader/scale_pack4.comp index ff07c07c5..c76aefe07 100644 --- a/src/layer/vulkan/shader/scale_pack4.comp +++ b/src/layer/vulkan/shader/scale_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/scale_pack8.comp b/src/layer/vulkan/shader/scale_pack8.comp index 6943b2038..2120d4b34 100644 --- a/src/layer/vulkan/shader/scale_pack8.comp +++ b/src/layer/vulkan/shader/scale_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/shufflechannel.comp b/src/layer/vulkan/shader/shufflechannel.comp index 88efdbe1c..c2bdbd233 100644 --- a/src/layer/vulkan/shader/shufflechannel.comp +++ b/src/layer/vulkan/shader/shufflechannel.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/shufflechannel_pack4.comp b/src/layer/vulkan/shader/shufflechannel_pack4.comp index 5a775b4e5..e868eb4a4 100644 --- a/src/layer/vulkan/shader/shufflechannel_pack4.comp +++ b/src/layer/vulkan/shader/shufflechannel_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/shufflechannel_pack8.comp b/src/layer/vulkan/shader/shufflechannel_pack8.comp index 94c20dc41..e67005f8b 100644 --- a/src/layer/vulkan/shader/shufflechannel_pack8.comp +++ b/src/layer/vulkan/shader/shufflechannel_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/sigmoid.comp b/src/layer/vulkan/shader/sigmoid.comp index 4d3368ada..8fa4eb386 100644 --- a/src/layer/vulkan/shader/sigmoid.comp +++ b/src/layer/vulkan/shader/sigmoid.comp @@ -1,51 +1,27 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + const uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - afp v = buffer_ld1(bottom_top_blob_data, gi); + v = afpvec4(1.f) / (afpvec4(1.f) + exp(-v)); - v = afp(1.f) / (afp(1.f) + exp(-v)); - - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/sigmoid_pack4.comp b/src/layer/vulkan/shader/sigmoid_pack4.comp deleted file mode 100644 index 6bafda784..000000000 --- a/src/layer/vulkan/shader/sigmoid_pack4.comp +++ /dev/null @@ -1,51 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = afp(1.f) / (afp(1.f) + exp(-v)); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/sigmoid_pack8.comp b/src/layer/vulkan/shader/sigmoid_pack8.comp deleted file mode 100644 index ac5919b2c..000000000 --- a/src/layer/vulkan/shader/sigmoid_pack8.comp +++ /dev/null @@ -1,52 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = afp(1.f) / (afp(1.f) + exp(-v[0])); - v[1] = afp(1.f) / (afp(1.f) + exp(-v[1])); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/slice.comp b/src/layer/vulkan/shader/slice.comp index 04aae6c48..c37df5e9f 100644 --- a/src/layer/vulkan/shader/slice.comp +++ b/src/layer/vulkan/shader/slice.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/slice_pack1to4.comp b/src/layer/vulkan/shader/slice_pack1to4.comp index 4975c4759..acea5d7f9 100644 --- a/src/layer/vulkan/shader/slice_pack1to4.comp +++ b/src/layer/vulkan/shader/slice_pack1to4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/slice_pack1to8.comp b/src/layer/vulkan/shader/slice_pack1to8.comp index d2e70b14d..24ec67879 100644 --- a/src/layer/vulkan/shader/slice_pack1to8.comp +++ b/src/layer/vulkan/shader/slice_pack1to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/slice_pack4.comp b/src/layer/vulkan/shader/slice_pack4.comp index 39e6b5f57..98a8f668d 100644 --- a/src/layer/vulkan/shader/slice_pack4.comp +++ b/src/layer/vulkan/shader/slice_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/slice_pack4to8.comp b/src/layer/vulkan/shader/slice_pack4to8.comp index 51be2cbb4..b3e9d8ab8 100644 --- a/src/layer/vulkan/shader/slice_pack4to8.comp +++ b/src/layer/vulkan/shader/slice_pack4to8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/slice_pack8.comp b/src/layer/vulkan/shader/slice_pack8.comp index 8d4c1231c..b7e03ba59 100644 --- a/src/layer/vulkan/shader/slice_pack8.comp +++ b/src/layer/vulkan/shader/slice_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_div_sum.comp b/src/layer/vulkan/shader/softmax_div_sum.comp index 140637956..508034ea1 100644 --- a/src/layer/vulkan/shader/softmax_div_sum.comp +++ b/src/layer/vulkan/shader/softmax_div_sum.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_div_sum_pack4.comp b/src/layer/vulkan/shader/softmax_div_sum_pack4.comp index 03dd03a65..c68c3dd21 100644 --- a/src/layer/vulkan/shader/softmax_div_sum_pack4.comp +++ b/src/layer/vulkan/shader/softmax_div_sum_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_div_sum_pack8.comp b/src/layer/vulkan/shader/softmax_div_sum_pack8.comp index 94ac13a2a..254f21d10 100644 --- a/src/layer/vulkan/shader/softmax_div_sum_pack8.comp +++ b/src/layer/vulkan/shader/softmax_div_sum_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_exp_sub_max.comp b/src/layer/vulkan/shader/softmax_exp_sub_max.comp index 43168a928..97fafb47e 100644 --- a/src/layer/vulkan/shader/softmax_exp_sub_max.comp +++ b/src/layer/vulkan/shader/softmax_exp_sub_max.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_exp_sub_max_pack4.comp b/src/layer/vulkan/shader/softmax_exp_sub_max_pack4.comp index 681ff3e6e..a8c05b0e7 100644 --- a/src/layer/vulkan/shader/softmax_exp_sub_max_pack4.comp +++ b/src/layer/vulkan/shader/softmax_exp_sub_max_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_exp_sub_max_pack8.comp b/src/layer/vulkan/shader/softmax_exp_sub_max_pack8.comp index 4534922f1..dc381bbec 100644 --- a/src/layer/vulkan/shader/softmax_exp_sub_max_pack8.comp +++ b/src/layer/vulkan/shader/softmax_exp_sub_max_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_reduce_max.comp b/src/layer/vulkan/shader/softmax_reduce_max.comp index 0ed4eddb1..a1669ed45 100644 --- a/src/layer/vulkan/shader/softmax_reduce_max.comp +++ b/src/layer/vulkan/shader/softmax_reduce_max.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_reduce_max_pack4.comp b/src/layer/vulkan/shader/softmax_reduce_max_pack4.comp index 3576284de..5e969e84f 100644 --- a/src/layer/vulkan/shader/softmax_reduce_max_pack4.comp +++ b/src/layer/vulkan/shader/softmax_reduce_max_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_reduce_max_pack8.comp b/src/layer/vulkan/shader/softmax_reduce_max_pack8.comp index 76af509d7..93dc3de5a 100644 --- a/src/layer/vulkan/shader/softmax_reduce_max_pack8.comp +++ b/src/layer/vulkan/shader/softmax_reduce_max_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_reduce_sum.comp b/src/layer/vulkan/shader/softmax_reduce_sum.comp index 70d490d27..a010c32b1 100644 --- a/src/layer/vulkan/shader/softmax_reduce_sum.comp +++ b/src/layer/vulkan/shader/softmax_reduce_sum.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_reduce_sum_pack4.comp b/src/layer/vulkan/shader/softmax_reduce_sum_pack4.comp index ecdf37ab7..27b12d349 100644 --- a/src/layer/vulkan/shader/softmax_reduce_sum_pack4.comp +++ b/src/layer/vulkan/shader/softmax_reduce_sum_pack4.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/softmax_reduce_sum_pack8.comp b/src/layer/vulkan/shader/softmax_reduce_sum_pack8.comp index 4764b067a..88fd9cebe 100644 --- a/src/layer/vulkan/shader/softmax_reduce_sum_pack8.comp +++ b/src/layer/vulkan/shader/softmax_reduce_sum_pack8.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 diff --git a/src/layer/vulkan/shader/swish.comp b/src/layer/vulkan/shader/swish.comp index 758d63d07..96e68a3a0 100644 --- a/src/layer/vulkan/shader/swish.comp +++ b/src/layer/vulkan/shader/swish.comp @@ -1,51 +1,27 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - afp v = buffer_ld1(bottom_top_blob_data, gi); + v = v / (afpvec4(1.f) + exp(-v)); - v = v / (afp(1.f) + exp(-v)); - - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/swish_pack4.comp b/src/layer/vulkan/shader/swish_pack4.comp deleted file mode 100644 index 583f5914c..000000000 --- a/src/layer/vulkan/shader/swish_pack4.comp +++ /dev/null @@ -1,51 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - v = v / (afpvec4(1.f) + exp(-v)); - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/swish_pack8.comp b/src/layer/vulkan/shader/swish_pack8.comp deleted file mode 100644 index 0aca80ee2..000000000 --- a/src/layer/vulkan/shader/swish_pack8.comp +++ /dev/null @@ -1,52 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - v[0] = v[0] / (afpvec4(1.f) + exp(-v[0])); - v[1] = v[1] / (afpvec4(1.f) + exp(-v[1])); - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/tanh.comp b/src/layer/vulkan/shader/tanh.comp index 1414a421d..1d20169d6 100644 --- a/src/layer/vulkan/shader/tanh.comp +++ b/src/layer/vulkan/shader/tanh.comp @@ -1,55 +1,32 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; +layout (constant_id = 0) const uint n = 0; -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; + +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); #if NCNN_moltenvk - v = afp(tanh(float(v))); + v = afpvec4(tanh(vec4(v))); #else v = tanh(v); #endif - buffer_st1(bottom_top_blob_data, gi, v); + buffer_st4(bottom_top_blob_data, gi, v); } diff --git a/src/layer/vulkan/shader/tanh_pack4.comp b/src/layer/vulkan/shader/tanh_pack4.comp deleted file mode 100644 index 5274f2af6..000000000 --- a/src/layer/vulkan/shader/tanh_pack4.comp +++ /dev/null @@ -1,55 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - -#if NCNN_moltenvk - v = afpvec4(tanh(vec4(v))); -#else - v = tanh(v); -#endif - - buffer_st4(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/tanh_pack8.comp b/src/layer/vulkan/shader/tanh_pack8.comp deleted file mode 100644 index 4a2d0ba80..000000000 --- a/src/layer/vulkan/shader/tanh_pack8.comp +++ /dev/null @@ -1,57 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -#define shape_constant_id_offset 0 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - -#if NCNN_moltenvk - v[0] = afpvec4(tanh(vec4(v[0]))); - v[1] = afpvec4(tanh(vec4(v[1]))); -#else - v[0] = tanh(v[0]); - v[1] = tanh(v[1]); -#endif - - buffer_st8(bottom_top_blob_data, gi, v); -} diff --git a/src/layer/vulkan/shader/unaryop.comp b/src/layer/vulkan/shader/unaryop.comp index d78530891..c17960816 100644 --- a/src/layer/vulkan/shader/unaryop.comp +++ b/src/layer/vulkan/shader/unaryop.comp @@ -1,53 +1,28 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #version 450 layout (constant_id = 0) const int op_type = 0; +layout (constant_id = 1) const uint n = 0; -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfp bottom_top_blob_data[]; }; +layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; layout (push_constant) uniform parameter { - int dims; - int w; - int h; - int c; - int cstep; + uint n; } p; void main() { - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); + const uint gi = gl_GlobalInvocationID.x; - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) + if (gi >= psc(n)) return; - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afp v = buffer_ld1(bottom_top_blob_data, gi); + afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - afp res; + afpvec4 res; if (op_type == 0) res = abs(v); if (op_type == 1) res = -v; @@ -66,7 +41,7 @@ void main() if (op_type == 14) res = atan(v); if (op_type == 15) res = afp(1.f) / v; #if NCNN_moltenvk - if (op_type == 16) res = afp(tanh(float(v))); + if (op_type == 16) res = afpvec4(tanh(vec4(v))); #else if (op_type == 16) res = tanh(v); #endif @@ -74,5 +49,5 @@ void main() if (op_type == 18) res = round(v); if (op_type == 19) res = trunc(v); - buffer_st1(bottom_top_blob_data, gi, res); + buffer_st4(bottom_top_blob_data, gi, res); } diff --git a/src/layer/vulkan/shader/unaryop_pack4.comp b/src/layer/vulkan/shader/unaryop_pack4.comp deleted file mode 100644 index 0aedb5e25..000000000 --- a/src/layer/vulkan/shader/unaryop_pack4.comp +++ /dev/null @@ -1,78 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const int op_type = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec4 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec4 v = buffer_ld4(bottom_top_blob_data, gi); - - afpvec4 res; - - if (op_type == 0) res = abs(v); - if (op_type == 1) res = -v; - if (op_type == 2) res = floor(v); - if (op_type == 3) res = ceil(v); - if (op_type == 4) res = v * v; - if (op_type == 5) res = sqrt(v); - if (op_type == 6) res = inversesqrt(v); - if (op_type == 7) res = exp(v); - if (op_type == 8) res = log(v); - if (op_type == 9) res = sin(v); - if (op_type == 10) res = cos(v); - if (op_type == 11) res = tan(v); - if (op_type == 12) res = asin(v); - if (op_type == 13) res = acos(v); - if (op_type == 14) res = atan(v); - if (op_type == 15) res = afp(1.f) / v; -#if NCNN_moltenvk - if (op_type == 16) res = afpvec4(tanh(vec4(v))); -#else - if (op_type == 16) res = tanh(v); -#endif - if (op_type == 17) res = log(v) * afp(0.434294481903); - if (op_type == 18) res = round(v); - if (op_type == 19) res = trunc(v); - - buffer_st4(bottom_top_blob_data, gi, res); -} diff --git a/src/layer/vulkan/shader/unaryop_pack8.comp b/src/layer/vulkan/shader/unaryop_pack8.comp deleted file mode 100644 index a8c874ae7..000000000 --- a/src/layer/vulkan/shader/unaryop_pack8.comp +++ /dev/null @@ -1,159 +0,0 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. - -#version 450 - -layout (constant_id = 0) const int op_type = 0; - -#define shape_constant_id_offset 1 -layout (constant_id = shape_constant_id_offset + 0) const int dims = 0; -layout (constant_id = shape_constant_id_offset + 1) const int w = 0; -layout (constant_id = shape_constant_id_offset + 2) const int h = 0; -layout (constant_id = shape_constant_id_offset + 3) const int c = 0; -layout (constant_id = shape_constant_id_offset + 4) const int cstep = 0; - -layout (binding = 0) buffer bottom_top_blob { sfpvec8 bottom_top_blob_data[]; }; - -layout (push_constant) uniform parameter -{ - int dims; - int w; - int h; - int c; - int cstep; -} p; - -void main() -{ - int gx = int(gl_GlobalInvocationID.x); - int gy = int(gl_GlobalInvocationID.y); - int gz = int(gl_GlobalInvocationID.z); - - if (gx >= psc(w) || gy >= psc(h) || gz >= psc(c)) - return; - - const int gi = gz * psc(cstep) + gy * psc(w) + gx; - - afpvec8 v = buffer_ld8(bottom_top_blob_data, gi); - - afpvec8 res; - - if (op_type == 0) - { - res[0] = abs(v[0]); - res[1] = abs(v[1]); - } - if (op_type == 1) - { - res[0] = -v[0]; - res[1] = -v[1]; - } - if (op_type == 2) - { - res[0] = floor(v[0]); - res[1] = floor(v[1]); - } - if (op_type == 3) - { - res[0] = ceil(v[0]); - res[1] = ceil(v[1]); - } - if (op_type == 4) - { - res[0] = v[0] * v[0]; - res[1] = v[1] * v[1]; - } - if (op_type == 5) - { - res[0] = sqrt(v[0]); - res[1] = sqrt(v[1]); - } - if (op_type == 6) - { - res[0] = inversesqrt(v[0]); - res[1] = inversesqrt(v[1]); - } - if (op_type == 7) - { - res[0] = exp(v[0]); - res[1] = exp(v[1]); - } - if (op_type == 8) - { - res[0] = log(v[0]); - res[1] = log(v[1]); - } - if (op_type == 9) - { - res[0] = sin(v[0]); - res[1] = sin(v[1]); - } - if (op_type == 10) - { - res[0] = cos(v[0]); - res[1] = cos(v[1]); - } - if (op_type == 11) - { - res[0] = tan(v[0]); - res[1] = tan(v[1]); - } - if (op_type == 12) - { - res[0] = asin(v[0]); - res[1] = asin(v[1]); - } - if (op_type == 13) - { - res[0] = acos(v[0]); - res[1] = acos(v[1]); - } - if (op_type == 14) - { - res[0] = atan(v[0]); - res[1] = atan(v[1]); - } - if (op_type == 15) - { - res[0] = afp(1.f) / v[0]; - res[1] = afp(1.f) / v[1]; - } - if (op_type == 16) - { -#if NCNN_moltenvk - res[0] = afpvec4(tanh(vec4(v[0]))); - res[1] = afpvec4(tanh(vec4(v[1]))); -#else - res[0] = tanh(v[0]); - res[1] = tanh(v[1]); -#endif - } - if (op_type == 17) - { - res[0] = log(v[0]) * afp(0.434294481903); - res[1] = log(v[1]) * afp(0.434294481903); - } - if (op_type == 18) - { - res[0] = round(v[0]); - res[1] = round(v[1]); - } - if (op_type == 19) - { - res[0] = trunc(v[0]); - res[1] = trunc(v[1]); - } - - buffer_st8(bottom_top_blob_data, gi, res); -} diff --git a/src/layer/vulkan/shader/vulkan_activation.comp b/src/layer/vulkan/shader/vulkan_activation.comp index 735be9bec..3da2b53f4 100644 --- a/src/layer/vulkan/shader/vulkan_activation.comp +++ b/src/layer/vulkan/shader/vulkan_activation.comp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_VULKAN_ACTIVATION_COMP #define NCNN_VULKAN_ACTIVATION_COMP diff --git a/src/layer/vulkan/shufflechannel_vulkan.cpp b/src/layer/vulkan/shufflechannel_vulkan.cpp index 6a834bb21..4d49e4a46 100644 --- a/src/layer/vulkan/shufflechannel_vulkan.cpp +++ b/src/layer/vulkan/shufflechannel_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "shufflechannel_vulkan.h" diff --git a/src/layer/vulkan/shufflechannel_vulkan.h b/src/layer/vulkan/shufflechannel_vulkan.h index 12c161702..3947af7c3 100644 --- a/src/layer/vulkan/shufflechannel_vulkan.h +++ b/src/layer/vulkan/shufflechannel_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SHUFFLECHANNEL_VULKAN_H #define LAYER_SHUFFLECHANNEL_VULKAN_H diff --git a/src/layer/vulkan/sigmoid_vulkan.cpp b/src/layer/vulkan/sigmoid_vulkan.cpp index 1a21a9a0d..5a18395cb 100644 --- a/src/layer/vulkan/sigmoid_vulkan.cpp +++ b/src/layer/vulkan/sigmoid_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_vulkan.h" @@ -23,18 +12,18 @@ Sigmoid_vulkan::Sigmoid_vulkan() support_vulkan = true; pipeline_sigmoid = 0; - pipeline_sigmoid_pack4 = 0; - pipeline_sigmoid_pack8 = 0; } int Sigmoid_vulkan::create_pipeline(const Option& opt) { const Mat& shape = top_shapes.empty() ? Mat() : top_shapes[0]; - int elempack = 1; - if (shape.dims == 1) elempack = opt.use_shader_pack8 && shape.w % 8 == 0 ? 8 : shape.w % 4 == 0 ? 4 : 1; - if (shape.dims == 2) elempack = opt.use_shader_pack8 && shape.h % 8 == 0 ? 8 : shape.h % 4 == 0 ? 4 : 1; - if (shape.dims == 3 || shape.dims == 4) elempack = opt.use_shader_pack8 && shape.c % 8 == 0 ? 8 : shape.c % 4 == 0 ? 4 : 1; + const int dims = shape.dims; + + int elempack = 0; + if (dims == 1) elempack = opt.use_shader_pack8 && shape.w % 8 == 0 ? 8 : shape.w % 4 == 0 ? 4 : 1; + if (dims == 2) elempack = opt.use_shader_pack8 && shape.h % 8 == 0 ? 8 : shape.h % 4 == 0 ? 4 : 1; + if (dims == 3 || dims == 4) elempack = opt.use_shader_pack8 && shape.c % 8 == 0 ? 8 : shape.c % 4 == 0 ? 4 : 1; size_t elemsize; if (opt.use_fp16_storage || opt.use_fp16_packed) @@ -47,67 +36,19 @@ int Sigmoid_vulkan::create_pipeline(const Option& opt) } Mat shape_packed; - if (shape.dims == 1) shape_packed = Mat(shape.w / elempack, (void*)0, elemsize, elempack); - if (shape.dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); - if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); - if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - - std::vector specializations(0 + 5); - specializations[0 + 0].i = shape_packed.dims; - specializations[0 + 1].i = shape_packed.w; - specializations[0 + 2].i = shape_packed.h * shape_packed.d; - specializations[0 + 3].i = shape_packed.c; - specializations[0 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } + if (dims == 1) shape_packed = Mat(shape.w / elempack, (void*)0, elemsize, elempack); // For Align with 4 + if (dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); + if (dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); + if (dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_sigmoid = new Pipeline(vkdev); - pipeline_sigmoid->set_optimal_local_size_xyz(local_size_xyz); - pipeline_sigmoid->create(LayerShaderType::sigmoid, opt, specializations); - } + std::vector specializations(1); + specializations[0].u32 = shape_packed.total() * elempack / 4; - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_sigmoid_pack4 = new Pipeline(vkdev); - pipeline_sigmoid_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_sigmoid_pack4->create(LayerShaderType::sigmoid_pack4, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_sigmoid_pack8 = new Pipeline(vkdev); - pipeline_sigmoid_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_sigmoid_pack8->create(LayerShaderType::sigmoid_pack8, opt, specializations); - } + pipeline_sigmoid = new Pipeline(vkdev); + pipeline_sigmoid->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_sigmoid->create(LayerShaderType::sigmoid, opt, specializations); return 0; } @@ -117,34 +58,24 @@ int Sigmoid_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_sigmoid; pipeline_sigmoid = 0; - delete pipeline_sigmoid_pack4; - pipeline_sigmoid_pack4 = 0; - - delete pipeline_sigmoid_pack8; - pipeline_sigmoid_pack8 = 0; - return 0; } int Sigmoid_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_sigmoid_pack8 - : elempack == 4 ? pipeline_sigmoid_pack4 - : pipeline_sigmoid; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_sigmoid, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/sigmoid_vulkan.h b/src/layer/vulkan/sigmoid_vulkan.h index 7f480fcdd..d3f905b21 100644 --- a/src/layer/vulkan/sigmoid_vulkan.h +++ b/src/layer/vulkan/sigmoid_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SIGMOID_VULKAN_H #define LAYER_SIGMOID_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_sigmoid; - Pipeline* pipeline_sigmoid_pack4; - Pipeline* pipeline_sigmoid_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/slice_vulkan.cpp b/src/layer/vulkan/slice_vulkan.cpp index 00fbe361e..c3a469dc3 100644 --- a/src/layer/vulkan/slice_vulkan.cpp +++ b/src/layer/vulkan/slice_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "slice_vulkan.h" diff --git a/src/layer/vulkan/slice_vulkan.h b/src/layer/vulkan/slice_vulkan.h index cd7d93fec..9c99ea1cc 100644 --- a/src/layer/vulkan/slice_vulkan.h +++ b/src/layer/vulkan/slice_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SLICE_VULKAN_H #define LAYER_SLICE_VULKAN_H diff --git a/src/layer/vulkan/softmax_vulkan.cpp b/src/layer/vulkan/softmax_vulkan.cpp index 8b8731b2d..1b26c5f6d 100644 --- a/src/layer/vulkan/softmax_vulkan.cpp +++ b/src/layer/vulkan/softmax_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "softmax_vulkan.h" diff --git a/src/layer/vulkan/softmax_vulkan.h b/src/layer/vulkan/softmax_vulkan.h index d36d1d863..9bf861d64 100644 --- a/src/layer/vulkan/softmax_vulkan.h +++ b/src/layer/vulkan/softmax_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTMAX_VULKAN_H #define LAYER_SOFTMAX_VULKAN_H diff --git a/src/layer/vulkan/split_vulkan.cpp b/src/layer/vulkan/split_vulkan.cpp index 6674f5ee7..cb0a836d5 100644 --- a/src/layer/vulkan/split_vulkan.cpp +++ b/src/layer/vulkan/split_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "split_vulkan.h" diff --git a/src/layer/vulkan/split_vulkan.h b/src/layer/vulkan/split_vulkan.h index 16f7f9be3..00a60a9dc 100644 --- a/src/layer/vulkan/split_vulkan.h +++ b/src/layer/vulkan/split_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SPLIT_VULKAN_H #define LAYER_SPLIT_VULKAN_H diff --git a/src/layer/vulkan/swish_vulkan.cpp b/src/layer/vulkan/swish_vulkan.cpp index 909c846d9..b2d10fd38 100644 --- a/src/layer/vulkan/swish_vulkan.cpp +++ b/src/layer/vulkan/swish_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish_vulkan.h" @@ -23,8 +12,6 @@ Swish_vulkan::Swish_vulkan() support_vulkan = true; pipeline_swish = 0; - pipeline_swish_pack4 = 0; - pipeline_swish_pack8 = 0; } int Swish_vulkan::create_pipeline(const Option& opt) @@ -52,62 +39,14 @@ int Swish_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(0 + 5); - specializations[0 + 0].i = shape_packed.dims; - specializations[0 + 1].i = shape_packed.w; - specializations[0 + 2].i = shape_packed.h * shape_packed.d; - specializations[0 + 3].i = shape_packed.c; - specializations[0 + 4].i = shape_packed.cstep; + std::vector specializations(1); + specializations[0 + 0].u32 = shape_packed.total() * elempack / 4; - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_swish = new Pipeline(vkdev); - pipeline_swish->set_optimal_local_size_xyz(local_size_xyz); - pipeline_swish->create(LayerShaderType::swish, opt, specializations); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_swish_pack4 = new Pipeline(vkdev); - pipeline_swish_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_swish_pack4->create(LayerShaderType::swish_pack4, opt, specializations); - } - - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_swish_pack8 = new Pipeline(vkdev); - pipeline_swish_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_swish_pack8->create(LayerShaderType::swish_pack8, opt, specializations); - } + pipeline_swish = new Pipeline(vkdev); + pipeline_swish->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_swish->create(LayerShaderType::swish, opt, specializations); return 0; } @@ -117,36 +56,25 @@ int Swish_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_swish; pipeline_swish = 0; - delete pipeline_swish_pack4; - pipeline_swish_pack4 = 0; - - delete pipeline_swish_pack8; - pipeline_swish_pack8 = 0; - return 0; } int Swish_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; + std::vector constants(1); + constants[0].u32 = n; - const Pipeline* pipeline = elempack == 8 ? pipeline_swish_pack8 - : elempack == 4 ? pipeline_swish_pack4 - : pipeline_swish; - - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_swish, bindings, constants, dispatcher); return 0; } - } // namespace ncnn diff --git a/src/layer/vulkan/swish_vulkan.h b/src/layer/vulkan/swish_vulkan.h index 1e9a8bc96..4d2be66d1 100644 --- a/src/layer/vulkan/swish_vulkan.h +++ b/src/layer/vulkan/swish_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SWISH_VULKAN_H #define LAYER_SWISH_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_swish; - Pipeline* pipeline_swish_pack4; - Pipeline* pipeline_swish_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/tanh_vulkan.cpp b/src/layer/vulkan/tanh_vulkan.cpp index a53fb138b..70553d27c 100644 --- a/src/layer/vulkan/tanh_vulkan.cpp +++ b/src/layer/vulkan/tanh_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_vulkan.h" @@ -23,8 +12,6 @@ TanH_vulkan::TanH_vulkan() support_vulkan = true; pipeline_tanh = 0; - pipeline_tanh_pack4 = 0; - pipeline_tanh_pack8 = 0; } int TanH_vulkan::create_pipeline(const Option& opt) @@ -52,62 +39,14 @@ int TanH_vulkan::create_pipeline(const Option& opt) if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - std::vector specializations(0 + 5); - specializations[0 + 0].i = shape_packed.dims; - specializations[0 + 1].i = shape_packed.w; - specializations[0 + 2].i = shape_packed.h * shape_packed.d; - specializations[0 + 3].i = shape_packed.c; - specializations[0 + 4].i = shape_packed.cstep; + std::vector specializations(1); + specializations[0 + 0].u32 = shape_packed.total() * elempack / 4; - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } + const int local_size_x = vkdev->info.subgroup_size(); - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_tanh = new Pipeline(vkdev); - pipeline_tanh->set_optimal_local_size_xyz(local_size_xyz); - pipeline_tanh->create(LayerShaderType::tanh, opt, specializations); - } - - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_tanh_pack4 = new Pipeline(vkdev); - pipeline_tanh_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_tanh_pack4->create(LayerShaderType::tanh_pack4, opt, specializations); - } - - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_tanh_pack8 = new Pipeline(vkdev); - pipeline_tanh_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_tanh_pack8->create(LayerShaderType::tanh_pack8, opt, specializations); - } + pipeline_tanh = new Pipeline(vkdev); + pipeline_tanh->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_tanh->create(LayerShaderType::tanh, opt, specializations); return 0; } @@ -117,34 +56,24 @@ int TanH_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_tanh; pipeline_tanh = 0; - delete pipeline_tanh_pack4; - pipeline_tanh_pack4 = 0; - - delete pipeline_tanh_pack8; - pipeline_tanh_pack8 = 0; - return 0; } int TanH_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_tanh_pack8 - : elempack == 4 ? pipeline_tanh_pack4 - : pipeline_tanh; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_tanh, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/tanh_vulkan.h b/src/layer/vulkan/tanh_vulkan.h index a31610a9e..751630d00 100644 --- a/src/layer/vulkan/tanh_vulkan.h +++ b/src/layer/vulkan/tanh_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TANH_VULKAN_H #define LAYER_TANH_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_tanh; - Pipeline* pipeline_tanh_pack4; - Pipeline* pipeline_tanh_pack8; }; } // namespace ncnn diff --git a/src/layer/vulkan/unaryop_vulkan.cpp b/src/layer/vulkan/unaryop_vulkan.cpp index e70babd50..a191fe1b9 100644 --- a/src/layer/vulkan/unaryop_vulkan.cpp +++ b/src/layer/vulkan/unaryop_vulkan.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_vulkan.h" @@ -23,92 +12,21 @@ UnaryOp_vulkan::UnaryOp_vulkan() support_vulkan = true; pipeline_unaryop = 0; - pipeline_unaryop_pack4 = 0; - pipeline_unaryop_pack8 = 0; } int UnaryOp_vulkan::create_pipeline(const Option& opt) { const Mat& shape = top_shapes.empty() ? Mat() : top_shapes[0]; - int elempack = 1; - if (shape.dims == 1) elempack = opt.use_shader_pack8 && shape.w % 8 == 0 ? 8 : shape.w % 4 == 0 ? 4 : 1; - if (shape.dims == 2) elempack = opt.use_shader_pack8 && shape.h % 8 == 0 ? 8 : shape.h % 4 == 0 ? 4 : 1; - if (shape.dims == 3 || shape.dims == 4) elempack = opt.use_shader_pack8 && shape.c % 8 == 0 ? 8 : shape.c % 4 == 0 ? 4 : 1; - - size_t elemsize; - if (opt.use_fp16_storage || opt.use_fp16_packed) - { - elemsize = elempack * 2u; - } - else - { - elemsize = elempack * 4u; - } - - Mat shape_packed; - if (shape.dims == 1) shape_packed = Mat(shape.w / elempack, (void*)0, elemsize, elempack); - if (shape.dims == 2) shape_packed = Mat(shape.w, shape.h / elempack, (void*)0, elemsize, elempack); - if (shape.dims == 3) shape_packed = Mat(shape.w, shape.h, shape.c / elempack, (void*)0, elemsize, elempack); - if (shape.dims == 4) shape_packed = Mat(shape.w, shape.h, shape.d, shape.c / elempack, (void*)0, elemsize, elempack); - - std::vector specializations(1 + 5); + std::vector specializations(2); specializations[0].i = op_type; - specializations[1 + 0].i = shape_packed.dims; - specializations[1 + 1].i = shape_packed.w; - specializations[1 + 2].i = shape_packed.h * shape_packed.d; - specializations[1 + 3].i = shape_packed.c; - specializations[1 + 4].i = shape_packed.cstep; - - Mat local_size_xyz; - if (shape_packed.dims == 1) - { - local_size_xyz.w = std::min(64, shape_packed.w); - local_size_xyz.h = 1; - local_size_xyz.c = 1; - } - if (shape_packed.dims == 2) - { - local_size_xyz.w = std::min(8, shape_packed.w); - local_size_xyz.h = std::min(8, shape_packed.h); - local_size_xyz.c = 1; - } - if (shape_packed.dims == 3) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h); - local_size_xyz.c = std::min(4, shape_packed.c); - } - if (shape_packed.dims == 4) - { - local_size_xyz.w = std::min(4, shape_packed.w); - local_size_xyz.h = std::min(4, shape_packed.h * shape_packed.d); - local_size_xyz.c = std::min(4, shape_packed.c); - } - - // pack1 - if (shape.dims == 0 || elempack == 1) - { - pipeline_unaryop = new Pipeline(vkdev); - pipeline_unaryop->set_optimal_local_size_xyz(local_size_xyz); - pipeline_unaryop->create(LayerShaderType::unaryop, opt, specializations); - } - - // pack4 - if (shape.dims == 0 || elempack == 4) - { - pipeline_unaryop_pack4 = new Pipeline(vkdev); - pipeline_unaryop_pack4->set_optimal_local_size_xyz(local_size_xyz); - pipeline_unaryop_pack4->create(LayerShaderType::unaryop_pack4, opt, specializations); - } - - // pack8 - if ((opt.use_shader_pack8 && shape.dims == 0) || elempack == 8) - { - pipeline_unaryop_pack8 = new Pipeline(vkdev); - pipeline_unaryop_pack8->set_optimal_local_size_xyz(local_size_xyz); - pipeline_unaryop_pack8->create(LayerShaderType::unaryop_pack8, opt, specializations); - } + specializations[1].u32 = shape.total() / 4; + + const int local_size_x = vkdev->info.subgroup_size(); + + pipeline_unaryop = new Pipeline(vkdev); + pipeline_unaryop->set_optimal_local_size_xyz(local_size_x, 1, 1); + pipeline_unaryop->create(LayerShaderType::unaryop, opt, specializations); return 0; } @@ -118,34 +36,24 @@ int UnaryOp_vulkan::destroy_pipeline(const Option& /*opt*/) delete pipeline_unaryop; pipeline_unaryop = 0; - delete pipeline_unaryop_pack4; - pipeline_unaryop_pack4 = 0; - - delete pipeline_unaryop_pack8; - pipeline_unaryop_pack8 = 0; - return 0; } int UnaryOp_vulkan::forward_inplace(VkMat& bottom_top_blob, VkCompute& cmd, const Option& /*opt*/) const { - int elempack = bottom_top_blob.elempack; + const size_t n = bottom_top_blob.total() * bottom_top_blob.elempack / 4; std::vector bindings(1); bindings[0] = bottom_top_blob; - std::vector constants(5); - constants[0].i = bottom_top_blob.dims; - constants[1].i = bottom_top_blob.w; - constants[2].i = bottom_top_blob.h * bottom_top_blob.d; - constants[3].i = bottom_top_blob.c; - constants[4].i = bottom_top_blob.cstep; - - const Pipeline* pipeline = elempack == 8 ? pipeline_unaryop_pack8 - : elempack == 4 ? pipeline_unaryop_pack4 - : pipeline_unaryop; + std::vector constants(1); + constants[0].u32 = n; - cmd.record_pipeline(pipeline, bindings, constants, bottom_top_blob); + VkMat dispatcher; + dispatcher.w = n; + dispatcher.h = 1; + dispatcher.c = 1; + cmd.record_pipeline(pipeline_unaryop, bindings, constants, dispatcher); return 0; } diff --git a/src/layer/vulkan/unaryop_vulkan.h b/src/layer/vulkan/unaryop_vulkan.h index c8f8df03f..9487eae7d 100644 --- a/src/layer/vulkan/unaryop_vulkan.h +++ b/src/layer/vulkan/unaryop_vulkan.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNARYOP_VULKAN_H #define LAYER_UNARYOP_VULKAN_H @@ -32,8 +21,6 @@ public: public: Pipeline* pipeline_unaryop; - Pipeline* pipeline_unaryop_pack4; - Pipeline* pipeline_unaryop_pack8; }; } // namespace ncnn diff --git a/src/layer/x86/avx512_mathfun.h b/src/layer/x86/avx512_mathfun.h index f7a3687f9..fc5bbf6a9 100644 --- a/src/layer/x86/avx512_mathfun.h +++ b/src/layer/x86/avx512_mathfun.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef AVX512_MATHFUN_H #define AVX512_MATHFUN_H diff --git a/src/layer/x86/batchnorm_x86.cpp b/src/layer/x86/batchnorm_x86.cpp index c5c3bfad6..dbfd678c7 100644 --- a/src/layer/x86/batchnorm_x86.cpp +++ b/src/layer/x86/batchnorm_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "batchnorm_x86.h" diff --git a/src/layer/x86/batchnorm_x86.h b/src/layer/x86/batchnorm_x86.h index 7168332a1..752c840b3 100644 --- a/src/layer/x86/batchnorm_x86.h +++ b/src/layer/x86/batchnorm_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BATCHNORM_X86_H #define LAYER_BATCHNORM_X86_H diff --git a/src/layer/x86/bias_x86.cpp b/src/layer/x86/bias_x86.cpp index 5345ab6e8..baa60c4de 100644 --- a/src/layer/x86/bias_x86.cpp +++ b/src/layer/x86/bias_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "bias_x86.h" diff --git a/src/layer/x86/bias_x86.h b/src/layer/x86/bias_x86.h index ab8e30de5..4b5167f99 100644 --- a/src/layer/x86/bias_x86.h +++ b/src/layer/x86/bias_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BIAS_X86_H #define LAYER_BIAS_X86_H diff --git a/src/layer/x86/binaryop_x86.cpp b/src/layer/x86/binaryop_x86.cpp index 1554c3c42..06dd4e254 100644 --- a/src/layer/x86/binaryop_x86.cpp +++ b/src/layer/x86/binaryop_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "binaryop_x86.h" diff --git a/src/layer/x86/binaryop_x86.h b/src/layer/x86/binaryop_x86.h index cd3ff12a9..f841c373d 100644 --- a/src/layer/x86/binaryop_x86.h +++ b/src/layer/x86/binaryop_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BINARYOP_X86_H #define LAYER_BINARYOP_X86_H diff --git a/src/layer/x86/bnll_x86.cpp b/src/layer/x86/bnll_x86.cpp index e2eb995d0..2e566c01c 100644 --- a/src/layer/x86/bnll_x86.cpp +++ b/src/layer/x86/bnll_x86.cpp @@ -1,16 +1,5 @@ -// JasonZhang892 is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 JasonZhang892 . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 JasonZhang892 +// SPDX-License-Identifier: BSD-3-Clause #include "bnll_x86.h" diff --git a/src/layer/x86/bnll_x86.h b/src/layer/x86/bnll_x86.h index b3fad45ca..521dfe494 100644 --- a/src/layer/x86/bnll_x86.h +++ b/src/layer/x86/bnll_x86.h @@ -1,16 +1,5 @@ -// JasonZhang892 is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 JasonZhang892 . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 JasonZhang892 +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_BNLL_X86_H #define LAYER_BNLL_X86_H diff --git a/src/layer/x86/cast_bf16.h b/src/layer/x86/cast_bf16.h index 5f6abfa5a..fbf6d8693 100644 --- a/src/layer/x86/cast_bf16.h +++ b/src/layer/x86/cast_bf16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_AVX512BF16 && __AVX512F__ && !__AVX512BF16__ void cast_fp32_to_bf16_sse_avx512bf16(const Mat& bottom_blob, Mat& top_blob, const Option& opt); diff --git a/src/layer/x86/cast_fp16.h b/src/layer/x86/cast_fp16.h index fc1902654..6739700ed 100644 --- a/src/layer/x86/cast_fp16.h +++ b/src/layer/x86/cast_fp16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_F16C && __AVX__ && !__F16C__ void cast_fp32_to_fp16_sse_f16c(const Mat& bottom_blob, Mat& top_blob, const Option& opt); diff --git a/src/layer/x86/cast_x86.cpp b/src/layer/x86/cast_x86.cpp index 032d4307b..1d252acf4 100644 --- a/src/layer/x86/cast_x86.cpp +++ b/src/layer/x86/cast_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cast_x86.h" diff --git a/src/layer/x86/cast_x86.h b/src/layer/x86/cast_x86.h index 45b27a8c6..17d2b04ec 100644 --- a/src/layer/x86/cast_x86.h +++ b/src/layer/x86/cast_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CAST_X86_H #define LAYER_CAST_X86_H diff --git a/src/layer/x86/cast_x86_avx2.cpp b/src/layer/x86/cast_x86_avx2.cpp index a4cb82050..dfda89b16 100644 --- a/src/layer/x86/cast_x86_avx2.cpp +++ b/src/layer/x86/cast_x86_avx2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/cast_x86_avx512bf16.cpp b/src/layer/x86/cast_x86_avx512bf16.cpp index d5a9ff35c..4d5c6905b 100644 --- a/src/layer/x86/cast_x86_avx512bf16.cpp +++ b/src/layer/x86/cast_x86_avx512bf16.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/cast_x86_f16c.cpp b/src/layer/x86/cast_x86_f16c.cpp index 41e923105..bfa1313b6 100644 --- a/src/layer/x86/cast_x86_f16c.cpp +++ b/src/layer/x86/cast_x86_f16c.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/clip_x86.cpp b/src/layer/x86/clip_x86.cpp index f8c7c7f46..9c6c01712 100644 --- a/src/layer/x86/clip_x86.cpp +++ b/src/layer/x86/clip_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "clip_x86.h" diff --git a/src/layer/x86/clip_x86.h b/src/layer/x86/clip_x86.h index 45a4058e9..07b806c2b 100644 --- a/src/layer/x86/clip_x86.h +++ b/src/layer/x86/clip_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CLIP_X86_H #define LAYER_CLIP_X86_H diff --git a/src/layer/x86/concat_x86.cpp b/src/layer/x86/concat_x86.cpp index 095e9e078..e34edb70e 100644 --- a/src/layer/x86/concat_x86.cpp +++ b/src/layer/x86/concat_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "concat_x86.h" diff --git a/src/layer/x86/concat_x86.h b/src/layer/x86/concat_x86.h index 28ff162db..e3d382695 100644 --- a/src/layer/x86/concat_x86.h +++ b/src/layer/x86/concat_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONCAT_X86_H #define LAYER_CONCAT_X86_H diff --git a/src/layer/x86/convolution1d_packed.h b/src/layer/x86/convolution1d_packed.h index 0bbb33f6a..b1828b7bc 100644 --- a/src/layer/x86/convolution1d_packed.h +++ b/src/layer/x86/convolution1d_packed.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution1d_transform_kernel_packed(const Mat& kernel, Mat& kernel_tm, int inh, int outh, int kernel_w) { diff --git a/src/layer/x86/convolution1d_x86.cpp b/src/layer/x86/convolution1d_x86.cpp index e1686611d..c72e40d68 100644 --- a/src/layer/x86/convolution1d_x86.cpp +++ b/src/layer/x86/convolution1d_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution1d_x86.h" diff --git a/src/layer/x86/convolution1d_x86.h b/src/layer/x86/convolution1d_x86.h index 497b34e59..0da212bc3 100644 --- a/src/layer/x86/convolution1d_x86.h +++ b/src/layer/x86/convolution1d_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION1D_X86_H #define LAYER_CONVOLUTION1D_X86_H diff --git a/src/layer/x86/convolution_1x1.h b/src/layer/x86/convolution_1x1.h index acf0f8c0c..f4669161f 100644 --- a/src/layer/x86/convolution_1x1.h +++ b/src/layer/x86/convolution_1x1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv1x1s1_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_2x2_pack8.h b/src/layer/x86/convolution_2x2_pack8.h index 24812b255..2dc2046c2 100644 --- a/src/layer/x86/convolution_2x2_pack8.h +++ b/src/layer/x86/convolution_2x2_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv2x2s1_pack8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3.h b/src/layer/x86/convolution_3x3.h index caa60fd58..4608a1ae5 100644 --- a/src/layer/x86/convolution_3x3.h +++ b/src/layer/x86/convolution_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3_int8.h b/src/layer/x86/convolution_3x3_int8.h index ceaf75b92..51fcae4fc 100644 --- a/src/layer/x86/convolution_3x3_int8.h +++ b/src/layer/x86/convolution_3x3_int8.h @@ -1,16 +1,5 @@ -// BUG1989 is pleased to support the open source community by supporting ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_int8_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3_pack16to1.h b/src/layer/x86/convolution_3x3_pack16to1.h index fd6eb2dc1..2abc1c253 100644 --- a/src/layer/x86/convolution_3x3_pack16to1.h +++ b/src/layer/x86/convolution_3x3_pack16to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack16to1_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3_pack1to4.h b/src/layer/x86/convolution_3x3_pack1to4.h index 317075460..be40a26f2 100644 --- a/src/layer/x86/convolution_3x3_pack1to4.h +++ b/src/layer/x86/convolution_3x3_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to4_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3_pack1to8.h b/src/layer/x86/convolution_3x3_pack1to8.h index 3c4dcccee..3adbeaf6d 100644 --- a/src/layer/x86/convolution_3x3_pack1to8.h +++ b/src/layer/x86/convolution_3x3_pack1to8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack1to8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3_pack8.h b/src/layer/x86/convolution_3x3_pack8.h index fea49bead..8ff96cb5c 100644 --- a/src/layer/x86/convolution_3x3_pack8.h +++ b/src/layer/x86/convolution_3x3_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3_pack8to1.h b/src/layer/x86/convolution_3x3_pack8to1.h index f7b5301f8..44cc87db9 100644 --- a/src/layer/x86/convolution_3x3_pack8to1.h +++ b/src/layer/x86/convolution_3x3_pack8to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv3x3s1_pack8to1_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_3x3_winograd.h b/src/layer/x86/convolution_3x3_winograd.h index 9b661d257..a9e115469 100644 --- a/src/layer/x86/convolution_3x3_winograd.h +++ b/src/layer/x86/convolution_3x3_winograd.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pack_A_tile(const Mat& A, Mat& AT, int batch, int max_ii, int max_kk) { @@ -2023,7 +2012,7 @@ static inline void conv3x3s1_winograd23_transform_input_tile(const Mat& bottom_b const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w - 1) / 2; @@ -2608,7 +2597,7 @@ static inline void conv3x3s1_winograd23_transform_output_tile(const Mat& top_til const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 1) / 2; @@ -3387,7 +3376,7 @@ static inline void conv3x3s1_winograd43_transform_input_tile(const Mat& bottom_b const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 1) / 4; @@ -4176,7 +4165,7 @@ static inline void conv3x3s1_winograd43_transform_output_tile(const Mat& top_til const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 3) / 4; @@ -5238,7 +5227,7 @@ static inline void conv3x3s1_winograd63_transform_input_tile(const Mat& bottom_b const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 3) / 6; @@ -6247,7 +6236,7 @@ static inline void conv3x3s1_winograd63_transform_output_tile(const Mat& top_til const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 5) / 6; diff --git a/src/layer/x86/convolution_3x3_winograd_int8.h b/src/layer/x86/convolution_3x3_winograd_int8.h index 6f396a2ba..c07927b0a 100644 --- a/src/layer/x86/convolution_3x3_winograd_int8.h +++ b/src/layer/x86/convolution_3x3_winograd_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__ int conv3x3s1_winograd23_int8_avx512vnni(const Mat& bottom_blob, Mat& top_blob, const Mat& AT, int nT, const Option& opt); @@ -3346,7 +3335,7 @@ static inline void conv3x3s1_winograd23_transform_input_tile_int8(const Mat& bot const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w - 1) / 2; @@ -3810,7 +3799,7 @@ static inline void conv3x3s1_winograd23_transform_output_tile_int8(const Mat& to const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 1) / 2; @@ -4562,7 +4551,7 @@ static inline void conv3x3s1_winograd43_transform_input_tile_int8(const Mat& bot const int w = bottom_blob.w; const int h = bottom_blob.h; const int elempack = bottom_blob.elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int w_tiles = (w + 1) / 4; @@ -5192,7 +5181,7 @@ static inline void conv3x3s1_winograd43_transform_output_tile_int8(const Mat& to const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; - const int N = top_blob.cstep * out_elempack; + const size_t N = top_blob.cstep * out_elempack; const int w_tiles = (outw + 3) / 4; diff --git a/src/layer/x86/convolution_5x5.h b/src/layer/x86/convolution_5x5.h index bdbc2e10f..5ee3809d9 100644 --- a/src/layer/x86/convolution_5x5.h +++ b/src/layer/x86/convolution_5x5.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void conv5x5s1_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolution_im2col_gemm.h b/src/layer/x86/convolution_im2col_gemm.h index 3f0eb28db..ce522212d 100644 --- a/src/layer/x86/convolution_im2col_gemm.h +++ b/src/layer/x86/convolution_im2col_gemm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_im2col_pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { diff --git a/src/layer/x86/convolution_im2col_gemm_int8.h b/src/layer/x86/convolution_im2col_gemm_int8.h index 3af6cb14d..17973500b 100644 --- a/src/layer/x86/convolution_im2col_gemm_int8.h +++ b/src/layer/x86/convolution_im2col_gemm_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__ void convolution_im2col_input_tile_int8_avx512vnni(const Mat& bottom_blob, Mat& B, int j, int max_jj, int k, int max_kk, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h); @@ -208,7 +197,7 @@ static void convolution_im2col_gemm_get_optimal_tile_mnk_int8(int M, int N, int static void convolution_im2col_input_tile_conv1x1s1d1_int8(const Mat& bottom_blob, Mat& B, int j, int max_jj, int k, int max_kk) { const int elempack = bottom_blob.elempack; - const int cstep = (int)bottom_blob.cstep; + const size_t cstep = bottom_blob.cstep; // NCNN_LOGE("convolution_im2col_input_tile_conv1x1s1d1_int8 %d %d %d %d @%d", j, max_jj, k, max_kk, elempack); @@ -754,7 +743,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& { const int w = bottom_blob.w; // const int channels = bottom_blob.c; - const int cstep = (int)bottom_blob.cstep; + const size_t cstep = bottom_blob.cstep; const int elempack = bottom_blob.elempack; const int kernel_extent_w = dilation_w * (kernel_w - 1) + 1; @@ -865,8 +854,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int offset1 = dxy_offset + p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t offset1 = dxy_offset + p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); __m128i _p0 = _mm_loadu_si128((const __m128i*)((const signed char*)bottom_blob + offset0)); __m128i _p1 = _mm_loadu_si128((const __m128i*)((const signed char*)bottom_blob + offset1)); @@ -885,7 +874,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u0 = uv0 / kernel_w; int v0 = uv0 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); __m128i _p0 = _mm_loadu_si128((const __m128i*)((const signed char*)bottom_blob + offset0)); @@ -904,7 +893,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset = (dxy_offset + p * cstep + u * dilation_h * w + v * dilation_w) * 8; + size_t offset = (dxy_offset + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w)) * 8; __m512i _r0 = _mm512_loadu_si512((const __m512i*)((const signed char*)bottom_blob + offset)); __m512i _r1 = _mm512_loadu_si512((const __m512i*)((const signed char*)bottom_blob + offset + 64)); @@ -1070,8 +1059,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int puv_offset0 = p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int puv_offset1 = p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t puv_offset0 = p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t puv_offset1 = p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); __m512i _vindex0 = _mm512_add_epi32(_dxy_offset, _mm512_set1_epi32(puv_offset0)); __m512i _vindex1 = _mm512_add_epi32(_dxy_offset, _mm512_set1_epi32(puv_offset1)); @@ -1093,7 +1082,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u0 = uv0 / kernel_w; int v0 = uv0 % kernel_w; - int puv_offset0 = p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; + size_t puv_offset0 = p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); __m512i _vindex0 = _mm512_add_epi32(_dxy_offset, _mm512_set1_epi32(puv_offset0)); @@ -1114,7 +1103,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int puv_offset = p * cstep + u * dilation_h * w + v * dilation_w; + size_t puv_offset = p * cstep + (size_t)(u * dilation_h * w + v * dilation_w); __m512i _vindex = _mm512_add_epi32(_dxy_offset, _mm512_set1_epi32(puv_offset)); @@ -1342,8 +1331,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int offset1 = dxy_offset + p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t offset1 = dxy_offset + p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); __m128i _p0 = _mm_loadl_epi64((const __m128i*)((const signed char*)bottom_blob + offset0)); __m128i _p1 = _mm_loadl_epi64((const __m128i*)((const signed char*)bottom_blob + offset1)); @@ -1359,7 +1348,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u0 = uv0 / kernel_w; int v0 = uv0 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); __m128i _r0 = _mm_loadl_epi64((const __m128i*)((const signed char*)bottom_blob + offset0)); _mm_storel_epi64((__m128i*)pp, _r0); @@ -1376,7 +1365,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset = (dxy_offset + p * cstep + u * dilation_h * w + v * dilation_w) * 8; + size_t offset = (dxy_offset + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w)) * 8; #if __AVX2__ __m256i _r0 = _mm256_loadu_si256((const __m256i*)((const signed char*)bottom_blob + offset)); @@ -1560,8 +1549,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int puv_offset0 = p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int puv_offset1 = p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t puv_offset0 = p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t puv_offset1 = p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); #if __AVX2__ __m256i _vindex0 = _mm256_add_epi32(_dxy_offset, _mm256_set1_epi32(puv_offset0)); @@ -1618,7 +1607,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u0 = uv0 / kernel_w; int v0 = uv0 % kernel_w; - int puv_offset0 = p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; + size_t puv_offset0 = p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); #if __AVX2__ __m256i _vindex0 = _mm256_add_epi32(_dxy_offset, _mm256_set1_epi32(puv_offset0)); @@ -1661,7 +1650,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int puv_offset = p * cstep + u * dilation_h * w + v * dilation_w; + size_t puv_offset = p * cstep + (size_t)(u * dilation_h * w + v * dilation_w); #if __AVX2__ __m256i _vindex = _mm256_add_epi32(_dxy_offset, _mm256_set1_epi32(puv_offset)); @@ -1849,8 +1838,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int offset1 = dxy_offset + p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t offset1 = dxy_offset + p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); __m128i _r0 = _mm_loadl_epi64((const __m128i*)((const signed char*)bottom_blob + offset0)); __m128i _r1 = _mm_loadl_epi64((const __m128i*)((const signed char*)bottom_blob + offset1)); @@ -1865,7 +1854,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u0 = uv0 / kernel_w; int v0 = uv0 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); pp[0] = ((const signed char*)bottom_blob)[offset0]; pp[1] = ((const signed char*)bottom_blob)[offset0 + 1]; @@ -1885,7 +1874,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset = (dxy_offset + p * cstep + u * dilation_h * w + v * dilation_w) * 8; + size_t offset = (dxy_offset + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w)) * 8; __m128i _r0 = _mm_loadu_si128((const __m128i*)((const signed char*)bottom_blob + offset)); __m128i _r1 = _mm_loadu_si128((const __m128i*)((const signed char*)bottom_blob + offset + 16)); @@ -2004,8 +1993,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int puv_offset0 = p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int puv_offset1 = p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t puv_offset0 = p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t puv_offset1 = p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); __m128i _vindex0 = _mm_add_epi32(_dxy_offset, _mm_set1_epi32(puv_offset0)); __m128i _vindex1 = _mm_add_epi32(_dxy_offset, _mm_set1_epi32(puv_offset1)); @@ -2042,7 +2031,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int puv_offset = p * cstep + u * dilation_h * w + v * dilation_w; + size_t puv_offset = p * cstep + (size_t)(u * dilation_h * w + v * dilation_w); __m128i _vindex0 = _mm_add_epi32(_dxy_offset, _mm_set1_epi32(puv_offset)); @@ -2073,7 +2062,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int puv_offset = p * cstep + u * dilation_h * w + v * dilation_w; + size_t puv_offset = p * cstep + (size_t)(u * dilation_h * w + v * dilation_w); __m128i _vindex = _mm_add_epi32(_dxy_offset, _mm_set1_epi32(puv_offset)); @@ -2213,8 +2202,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int offset1 = dxy_offset + p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t offset1 = dxy_offset + p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); const signed char* sptr0 = (const signed char*)bottom_blob + offset0; const signed char* sptr1 = (const signed char*)bottom_blob + offset1; @@ -2233,7 +2222,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u0 = uv0 / kernel_w; int v0 = uv0 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); const signed char* sptr0 = (const signed char*)bottom_blob + offset0; @@ -2253,7 +2242,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset = (dxy_offset + p * cstep + u * dilation_h * w + v * dilation_w) * 8; + size_t offset = (dxy_offset + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w)) * 8; const signed char* sptr = (const signed char*)bottom_blob + offset; @@ -2358,8 +2347,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int puv_offset0 = p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int puv_offset1 = p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t puv_offset0 = p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t puv_offset1 = p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); int offset00 = dxy_offset0 + puv_offset0; int offset01 = dxy_offset1 + puv_offset0; @@ -2385,8 +2374,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset0 = dxy_offset0 + p * cstep + u * dilation_h * w + v * dilation_w; - int offset1 = dxy_offset1 + p * cstep + u * dilation_h * w + v * dilation_w; + size_t offset0 = dxy_offset0 + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w); + size_t offset1 = dxy_offset1 + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w); const signed char* sptr00 = (const signed char*)bottom_blob + offset0; const signed char* sptr01 = (const signed char*)bottom_blob + offset1; @@ -2406,8 +2395,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset0 = (dxy_offset0 + p * cstep + u * dilation_h * w + v * dilation_w) * 8; - int offset1 = (dxy_offset1 + p * cstep + u * dilation_h * w + v * dilation_w) * 8; + size_t offset0 = (dxy_offset0 + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w)) * 8; + size_t offset1 = (dxy_offset1 + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w)) * 8; const signed char* sptr0 = (const signed char*)bottom_blob + offset0; const signed char* sptr1 = (const signed char*)bottom_blob + offset1; @@ -2502,8 +2491,8 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int v0 = uv0 % kernel_w; int v1 = uv1 % kernel_w; - int offset0 = dxy_offset + p0 * cstep + u0 * dilation_h * w + v0 * dilation_w; - int offset1 = dxy_offset + p1 * cstep + u1 * dilation_h * w + v1 * dilation_w; + size_t offset0 = dxy_offset + p0 * cstep + (size_t)(u0 * dilation_h * w + v0 * dilation_w); + size_t offset1 = dxy_offset + p1 * cstep + (size_t)(u1 * dilation_h * w + v1 * dilation_w); const signed char* sptr0 = (const signed char*)bottom_blob + offset0; const signed char* sptr1 = (const signed char*)bottom_blob + offset1; @@ -2520,7 +2509,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset = dxy_offset + p * cstep + u * dilation_h * w + v * dilation_w; + size_t offset = dxy_offset + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w); const signed char* sptr0 = (const signed char*)bottom_blob + offset; @@ -2539,7 +2528,7 @@ static void convolution_im2col_input_tile_int8_impl(const Mat& bottom_blob, Mat& int u = uv / kernel_w; int v = uv % kernel_w; - int offset = (dxy_offset + p * cstep + u * dilation_h * w + v * dilation_w) * 8; + size_t offset = (dxy_offset + p * cstep + (size_t)(u * dilation_h * w + v * dilation_w)) * 8; const signed char* sptr = (const signed char*)bottom_blob + offset; @@ -2705,8 +2694,8 @@ static void unpack_output_tile_int32(const Mat& topT, Mat& top_blob, int i, int #endif const int out_elempack = top_blob.elempack; - // const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; - const int out_hstep = top_blob.cstep; + // const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; + const size_t out_hstep = top_blob.cstep; // NCNN_LOGE("unpack_output_tile_int32_to_fp32 %d %d %d %d @%d", i, max_ii, j, max_jj, out_elempack); diff --git a/src/layer/x86/convolution_packed.h b/src/layer/x86/convolution_packed.h index 24857f05d..0da689a1f 100644 --- a/src/layer/x86/convolution_packed.h +++ b/src/layer/x86/convolution_packed.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convolution_transform_kernel_packed(const Mat& kernel, Mat& kernel_tm, int inch, int outch, int kernel_w, int kernel_h) { @@ -1076,14 +1065,14 @@ static void convolution_packed(const Mat& bottom_blob, Mat& top_blob, const Mat& const int elempack = bottom_blob.elempack; const int inch = bottom_blob.c * elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int outw = top_blob.w; const int outh = top_blob.h; const int out_elempack = top_blob.elempack; const int outch = top_blob.c * out_elempack; - const int M = top_blob.cstep * out_elempack; + const size_t M = top_blob.cstep * out_elempack; const int maxk = kernel_w * kernel_h; diff --git a/src/layer/x86/convolution_packed_int8.h b/src/layer/x86/convolution_packed_int8.h index 3cadcf7ad..a7c090bbb 100644 --- a/src/layer/x86/convolution_packed_int8.h +++ b/src/layer/x86/convolution_packed_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__ void convolution_packed_int8_avx512vnni(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_tm, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, const Option& opt); @@ -911,7 +900,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const const int elempack = bottom_blob.elempack; const int inch = bottom_blob.c * elempack; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; const int outw = top_blob.w; const int outh = top_blob.h; @@ -953,8 +942,8 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const // shadowed variable for less openmp task args const int outw = top_blob.w; const int outh = top_blob.h; - const int N = bottom_blob.cstep * elempack; - const int M = top_blob.cstep * out_elempack; + const size_t N = bottom_blob.cstep * elempack; + const size_t M = top_blob.cstep * out_elempack; int* outptr = top_blob.channel(p / out_elempack); @@ -1706,8 +1695,8 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const // shadowed variable for less openmp task args const int outw = top_blob.w; const int outh = top_blob.h; - const int N = bottom_blob.cstep * elempack; - const int M = top_blob.cstep * out_elempack; + const size_t N = bottom_blob.cstep * elempack; + const size_t M = top_blob.cstep * out_elempack; int* outptr = top_blob.channel(p / out_elempack); @@ -2586,8 +2575,8 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const // shadowed variable for less openmp task args const int outw = top_blob.w; const int outh = top_blob.h; - const int N = bottom_blob.cstep * elempack; - const int M = top_blob.cstep * out_elempack; + const size_t N = bottom_blob.cstep * elempack; + const size_t M = top_blob.cstep * out_elempack; int* outptr = top_blob.channel(p / out_elempack); @@ -3582,7 +3571,7 @@ static void convolution_packed_int8(const Mat& bottom_blob, Mat& top_blob, const // shadowed variable for less openmp task args const int outw = top_blob.w; const int outh = top_blob.h; - const int N = bottom_blob.cstep * elempack; + const size_t N = bottom_blob.cstep * elempack; int* outptr0 = top_blob.channel(p); int* outptr1 = top_blob.channel(p + 1); diff --git a/src/layer/x86/convolution_x86.cpp b/src/layer/x86/convolution_x86.cpp index e2c451792..efc7719c9 100644 --- a/src/layer/x86/convolution_x86.cpp +++ b/src/layer/x86/convolution_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolution_x86.h" diff --git a/src/layer/x86/convolution_x86.h b/src/layer/x86/convolution_x86.h index 3befb11f0..4222a0a19 100644 --- a/src/layer/x86/convolution_x86.h +++ b/src/layer/x86/convolution_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTION_X86_H #define LAYER_CONVOLUTION_X86_H diff --git a/src/layer/x86/convolution_x86_avx2.cpp b/src/layer/x86/convolution_x86_avx2.cpp index c70c2c6a3..d60942b95 100644 --- a/src/layer/x86/convolution_x86_avx2.cpp +++ b/src/layer/x86/convolution_x86_avx2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/convolution_x86_avx512vnni.cpp b/src/layer/x86/convolution_x86_avx512vnni.cpp index 1ab42a541..434cb61fe 100644 --- a/src/layer/x86/convolution_x86_avx512vnni.cpp +++ b/src/layer/x86/convolution_x86_avx512vnni.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/convolution_x86_avxvnni.cpp b/src/layer/x86/convolution_x86_avxvnni.cpp index b612f711b..06432d496 100644 --- a/src/layer/x86/convolution_x86_avxvnni.cpp +++ b/src/layer/x86/convolution_x86_avxvnni.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/convolution_x86_avxvnniint8.cpp b/src/layer/x86/convolution_x86_avxvnniint8.cpp index 3a2becead..4dbe73351 100644 --- a/src/layer/x86/convolution_x86_avxvnniint8.cpp +++ b/src/layer/x86/convolution_x86_avxvnniint8.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/convolution_x86_xop.cpp b/src/layer/x86/convolution_x86_xop.cpp index 1bedb2936..e5bbd66da 100644 --- a/src/layer/x86/convolution_x86_xop.cpp +++ b/src/layer/x86/convolution_x86_xop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/convolutiondepthwise_3x3.h b/src/layer/x86/convolutiondepthwise_3x3.h index fd99f105a..43980ef01 100644 --- a/src/layer/x86/convolutiondepthwise_3x3.h +++ b/src/layer/x86/convolutiondepthwise_3x3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolutiondepthwise_3x3_int8.h b/src/layer/x86/convolutiondepthwise_3x3_int8.h index 6c4249958..65dc37b98 100644 --- a/src/layer/x86/convolutiondepthwise_3x3_int8.h +++ b/src/layer/x86/convolutiondepthwise_3x3_int8.h @@ -1,16 +1,5 @@ -// BUG1989 is pleased to support the open source community by supporting ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_int8_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& _kernel, const Option& opt) { @@ -402,4 +391,4 @@ static void convdw3x3s2_int8_requant_sse(const Mat& bottom_blob, Mat& top_blob, r2 += tailstep; } } -} \ No newline at end of file +} diff --git a/src/layer/x86/convolutiondepthwise_3x3_pack16.h b/src/layer/x86/convolutiondepthwise_3x3_pack16.h index c0bf77d3d..79e95eb8d 100644 --- a/src/layer/x86/convolutiondepthwise_3x3_pack16.h +++ b/src/layer/x86/convolutiondepthwise_3x3_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack16_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolutiondepthwise_3x3_pack4.h b/src/layer/x86/convolutiondepthwise_3x3_pack4.h index 97b8c0d92..88c558ac4 100644 --- a/src/layer/x86/convolutiondepthwise_3x3_pack4.h +++ b/src/layer/x86/convolutiondepthwise_3x3_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack4_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolutiondepthwise_3x3_pack8.h b/src/layer/x86/convolutiondepthwise_3x3_pack8.h index aa30143fa..9c2b6d572 100644 --- a/src/layer/x86/convolutiondepthwise_3x3_pack8.h +++ b/src/layer/x86/convolutiondepthwise_3x3_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw3x3s1_pack8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolutiondepthwise_5x5_pack16.h b/src/layer/x86/convolutiondepthwise_5x5_pack16.h index 4485d9827..fed688eb7 100644 --- a/src/layer/x86/convolutiondepthwise_5x5_pack16.h +++ b/src/layer/x86/convolutiondepthwise_5x5_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack16_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolutiondepthwise_5x5_pack4.h b/src/layer/x86/convolutiondepthwise_5x5_pack4.h index 889df7add..d6f5b1b27 100644 --- a/src/layer/x86/convolutiondepthwise_5x5_pack4.h +++ b/src/layer/x86/convolutiondepthwise_5x5_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack4_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolutiondepthwise_5x5_pack8.h b/src/layer/x86/convolutiondepthwise_5x5_pack8.h index ec8189f0d..35cc8f1c8 100644 --- a/src/layer/x86/convolutiondepthwise_5x5_pack8.h +++ b/src/layer/x86/convolutiondepthwise_5x5_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void convdw5x5s1_pack8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& kernel, const Mat& _bias, const Option& opt) { diff --git a/src/layer/x86/convolutiondepthwise_x86.cpp b/src/layer/x86/convolutiondepthwise_x86.cpp index f8823817d..f5ae3fa43 100644 --- a/src/layer/x86/convolutiondepthwise_x86.cpp +++ b/src/layer/x86/convolutiondepthwise_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convolutiondepthwise_x86.h" diff --git a/src/layer/x86/convolutiondepthwise_x86.h b/src/layer/x86/convolutiondepthwise_x86.h index 1fedb119b..4820b97c2 100644 --- a/src/layer/x86/convolutiondepthwise_x86.h +++ b/src/layer/x86/convolutiondepthwise_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CONVOLUTIONDEPTHWISE_X86_H #define LAYER_CONVOLUTIONDEPTHWISE_X86_H diff --git a/src/layer/x86/crop_x86.cpp b/src/layer/x86/crop_x86.cpp index ace9584db..6097c68da 100644 --- a/src/layer/x86/crop_x86.cpp +++ b/src/layer/x86/crop_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "crop_x86.h" diff --git a/src/layer/x86/crop_x86.h b/src/layer/x86/crop_x86.h index ba0fc1b60..85f460fc7 100644 --- a/src/layer/x86/crop_x86.h +++ b/src/layer/x86/crop_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_CROP_X86_H #define LAYER_CROP_X86_H diff --git a/src/layer/x86/deconvolution_pack16.h b/src/layer/x86/deconvolution_pack16.h index 8f21a3938..de9d4b444 100644 --- a/src/layer/x86/deconvolution_pack16.h +++ b/src/layer/x86/deconvolution_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack16_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack16to1.h b/src/layer/x86/deconvolution_pack16to1.h index 65a1cfae0..a3688c53a 100644 --- a/src/layer/x86/deconvolution_pack16to1.h +++ b/src/layer/x86/deconvolution_pack16to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack16to1_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack16to4.h b/src/layer/x86/deconvolution_pack16to4.h index ce4f7fd37..482a808a7 100644 --- a/src/layer/x86/deconvolution_pack16to4.h +++ b/src/layer/x86/deconvolution_pack16to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack16to4_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack16to8.h b/src/layer/x86/deconvolution_pack16to8.h index 0001f7c30..88c89e071 100644 --- a/src/layer/x86/deconvolution_pack16to8.h +++ b/src/layer/x86/deconvolution_pack16to8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack16to8_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack1to16.h b/src/layer/x86/deconvolution_pack1to16.h index c357e1f0a..ab6e2c41d 100644 --- a/src/layer/x86/deconvolution_pack1to16.h +++ b/src/layer/x86/deconvolution_pack1to16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack1to16_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack1to4.h b/src/layer/x86/deconvolution_pack1to4.h index e749f1f91..05c959934 100644 --- a/src/layer/x86/deconvolution_pack1to4.h +++ b/src/layer/x86/deconvolution_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack1to4_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack1to8.h b/src/layer/x86/deconvolution_pack1to8.h index 31b7a6729..4910c35f1 100644 --- a/src/layer/x86/deconvolution_pack1to8.h +++ b/src/layer/x86/deconvolution_pack1to8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack1to8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack4.h b/src/layer/x86/deconvolution_pack4.h index 96955e209..29fe481e8 100644 --- a/src/layer/x86/deconvolution_pack4.h +++ b/src/layer/x86/deconvolution_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack4to1.h b/src/layer/x86/deconvolution_pack4to1.h index 27f890437..21683f662 100644 --- a/src/layer/x86/deconvolution_pack4to1.h +++ b/src/layer/x86/deconvolution_pack4to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4to1_sse(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack4to16.h b/src/layer/x86/deconvolution_pack4to16.h index 4510c28a4..d192ad59d 100644 --- a/src/layer/x86/deconvolution_pack4to16.h +++ b/src/layer/x86/deconvolution_pack4to16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4to16_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack4to8.h b/src/layer/x86/deconvolution_pack4to8.h index 1ca095275..f54be7676 100644 --- a/src/layer/x86/deconvolution_pack4to8.h +++ b/src/layer/x86/deconvolution_pack4to8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack4to8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack8.h b/src/layer/x86/deconvolution_pack8.h index c0ec798ef..7b2117b15 100644 --- a/src/layer/x86/deconvolution_pack8.h +++ b/src/layer/x86/deconvolution_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack8_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack8to1.h b/src/layer/x86/deconvolution_pack8to1.h index 4d40bb425..7587d1ab5 100644 --- a/src/layer/x86/deconvolution_pack8to1.h +++ b/src/layer/x86/deconvolution_pack8to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack8to1_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack8to16.h b/src/layer/x86/deconvolution_pack8to16.h index 86f0d726b..61d66f218 100644 --- a/src/layer/x86/deconvolution_pack8to16.h +++ b/src/layer/x86/deconvolution_pack8to16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack8to16_avx512(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_pack8to4.h b/src/layer/x86/deconvolution_pack8to4.h index fea7a87b6..ec0cf2696 100644 --- a/src/layer/x86/deconvolution_pack8to4.h +++ b/src/layer/x86/deconvolution_pack8to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deconvolution_pack8to4_avx(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deconvolution_x86.cpp b/src/layer/x86/deconvolution_x86.cpp index ae43e3c8a..b92ec09a8 100644 --- a/src/layer/x86/deconvolution_x86.cpp +++ b/src/layer/x86/deconvolution_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolution_x86.h" diff --git a/src/layer/x86/deconvolution_x86.h b/src/layer/x86/deconvolution_x86.h index 66c23eef3..ade9d458a 100644 --- a/src/layer/x86/deconvolution_x86.h +++ b/src/layer/x86/deconvolution_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTION_X86_H #define LAYER_DECONVOLUTION_X86_H diff --git a/src/layer/x86/deconvolutiondepthwise_x86.cpp b/src/layer/x86/deconvolutiondepthwise_x86.cpp index d25a00044..68872edb8 100644 --- a/src/layer/x86/deconvolutiondepthwise_x86.cpp +++ b/src/layer/x86/deconvolutiondepthwise_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deconvolutiondepthwise_x86.h" diff --git a/src/layer/x86/deconvolutiondepthwise_x86.h b/src/layer/x86/deconvolutiondepthwise_x86.h index 9c9e54ccc..baac72e7e 100644 --- a/src/layer/x86/deconvolutiondepthwise_x86.h +++ b/src/layer/x86/deconvolutiondepthwise_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DECONVOLUTIONDEPTHWISE_X86_H #define LAYER_DECONVOLUTIONDEPTHWISE_X86_H diff --git a/src/layer/x86/deformableconv2d_pack16.h b/src/layer/x86/deformableconv2d_pack16.h index 5491142cc..2bcd7dc5d 100644 --- a/src/layer/x86/deformableconv2d_pack16.h +++ b/src/layer/x86/deformableconv2d_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack16_avx512(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack16to1.h b/src/layer/x86/deformableconv2d_pack16to1.h index fa78c6c40..ee7c459ea 100644 --- a/src/layer/x86/deformableconv2d_pack16to1.h +++ b/src/layer/x86/deformableconv2d_pack16to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack16to1_avx512(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack16to4.h b/src/layer/x86/deformableconv2d_pack16to4.h index 91277137c..e325b1a62 100644 --- a/src/layer/x86/deformableconv2d_pack16to4.h +++ b/src/layer/x86/deformableconv2d_pack16to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack16to4_avx512(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack16to8.h b/src/layer/x86/deformableconv2d_pack16to8.h index e08c68ffd..6d2781952 100644 --- a/src/layer/x86/deformableconv2d_pack16to8.h +++ b/src/layer/x86/deformableconv2d_pack16to8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack16to8_avx512(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack1to16.h b/src/layer/x86/deformableconv2d_pack1to16.h index df890dcce..5c87b4b6f 100644 --- a/src/layer/x86/deformableconv2d_pack1to16.h +++ b/src/layer/x86/deformableconv2d_pack1to16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack1to16_avx512(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack1to4.h b/src/layer/x86/deformableconv2d_pack1to4.h index 4828dc316..8398ccd90 100644 --- a/src/layer/x86/deformableconv2d_pack1to4.h +++ b/src/layer/x86/deformableconv2d_pack1to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack1to4_sse(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack1to8.h b/src/layer/x86/deformableconv2d_pack1to8.h index 774140eb9..88b5a46ff 100644 --- a/src/layer/x86/deformableconv2d_pack1to8.h +++ b/src/layer/x86/deformableconv2d_pack1to8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack1to8_avx(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack4.h b/src/layer/x86/deformableconv2d_pack4.h index 64f1891ed..4ac27ac7d 100644 --- a/src/layer/x86/deformableconv2d_pack4.h +++ b/src/layer/x86/deformableconv2d_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack4_sse(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack4to1.h b/src/layer/x86/deformableconv2d_pack4to1.h index d5cb95904..a7a28e2a0 100644 --- a/src/layer/x86/deformableconv2d_pack4to1.h +++ b/src/layer/x86/deformableconv2d_pack4to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack4to1_sse(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack4to16.h b/src/layer/x86/deformableconv2d_pack4to16.h index 49238fddc..12ae35a13 100644 --- a/src/layer/x86/deformableconv2d_pack4to16.h +++ b/src/layer/x86/deformableconv2d_pack4to16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack4to16_avx512(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack4to8.h b/src/layer/x86/deformableconv2d_pack4to8.h index f1382da68..2dceaea58 100644 --- a/src/layer/x86/deformableconv2d_pack4to8.h +++ b/src/layer/x86/deformableconv2d_pack4to8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack4to8_avx(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack8.h b/src/layer/x86/deformableconv2d_pack8.h index 40581c9f9..4e840ebac 100644 --- a/src/layer/x86/deformableconv2d_pack8.h +++ b/src/layer/x86/deformableconv2d_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack8_avx(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack8to1.h b/src/layer/x86/deformableconv2d_pack8to1.h index 90bd127f9..d744aa595 100644 --- a/src/layer/x86/deformableconv2d_pack8to1.h +++ b/src/layer/x86/deformableconv2d_pack8to1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack8to1_avx(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack8to16.h b/src/layer/x86/deformableconv2d_pack8to16.h index 588196936..e8554c978 100644 --- a/src/layer/x86/deformableconv2d_pack8to16.h +++ b/src/layer/x86/deformableconv2d_pack8to16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack8to16_avx512(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_pack8to4.h b/src/layer/x86/deformableconv2d_pack8to4.h index f1a5fb7f5..ebc83a55c 100644 --- a/src/layer/x86/deformableconv2d_pack8to4.h +++ b/src/layer/x86/deformableconv2d_pack8to4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void deformableconv2d_pack8to4_avx(const std::vector& bottom_blobs, Mat& top_blob, const Mat& weight_data_packed, const Mat& bias_data, int kernel_w, int kernel_h, int dilation_w, int dilation_h, int stride_w, int stride_h, int pad_left, int pad_top, int activation_type, const Mat& activation_params, const Option& opt) { diff --git a/src/layer/x86/deformableconv2d_x86.cpp b/src/layer/x86/deformableconv2d_x86.cpp index 8d5048b81..fdac60a21 100644 --- a/src/layer/x86/deformableconv2d_x86.cpp +++ b/src/layer/x86/deformableconv2d_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "deformableconv2d_x86.h" diff --git a/src/layer/x86/deformableconv2d_x86.h b/src/layer/x86/deformableconv2d_x86.h index 66cce21ab..429e4c853 100644 --- a/src/layer/x86/deformableconv2d_x86.h +++ b/src/layer/x86/deformableconv2d_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEFORMABLECONV2D_X86_H #define LAYER_DEFORMABLECONV2D_X86_H diff --git a/src/layer/x86/dequantize_x86.cpp b/src/layer/x86/dequantize_x86.cpp index ecf491655..81625da9d 100644 --- a/src/layer/x86/dequantize_x86.cpp +++ b/src/layer/x86/dequantize_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dequantize_x86.h" diff --git a/src/layer/x86/dequantize_x86.h b/src/layer/x86/dequantize_x86.h index 52bfcaed2..f2f1d2f04 100644 --- a/src/layer/x86/dequantize_x86.h +++ b/src/layer/x86/dequantize_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DEQUANTIZE_X86_H #define LAYER_DEQUANTIZE_X86_H diff --git a/src/layer/x86/dropout_x86.cpp b/src/layer/x86/dropout_x86.cpp index 5dc45edc8..938dd8321 100644 --- a/src/layer/x86/dropout_x86.cpp +++ b/src/layer/x86/dropout_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dropout_x86.h" diff --git a/src/layer/x86/dropout_x86.h b/src/layer/x86/dropout_x86.h index d44a89871..b13f441c9 100644 --- a/src/layer/x86/dropout_x86.h +++ b/src/layer/x86/dropout_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_DROPOUT_X86_H #define LAYER_DROPOUT_X86_H diff --git a/src/layer/x86/eltwise_x86.cpp b/src/layer/x86/eltwise_x86.cpp index f1cf1f343..c85b7f32e 100644 --- a/src/layer/x86/eltwise_x86.cpp +++ b/src/layer/x86/eltwise_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eltwise_x86.h" diff --git a/src/layer/x86/eltwise_x86.h b/src/layer/x86/eltwise_x86.h index e941817a3..b9729fa29 100644 --- a/src/layer/x86/eltwise_x86.h +++ b/src/layer/x86/eltwise_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELTWISE_X86_H #define LAYER_ELTWISE_X86_H diff --git a/src/layer/x86/elu_x86.cpp b/src/layer/x86/elu_x86.cpp index 4fd1f84e1..a683bc58f 100644 --- a/src/layer/x86/elu_x86.cpp +++ b/src/layer/x86/elu_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "elu_x86.h" diff --git a/src/layer/x86/elu_x86.h b/src/layer/x86/elu_x86.h index 6da00490d..799ca5feb 100644 --- a/src/layer/x86/elu_x86.h +++ b/src/layer/x86/elu_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ELU_X86_H #define LAYER_ELU_X86_H diff --git a/src/layer/x86/flatten_x86.cpp b/src/layer/x86/flatten_x86.cpp index 230c0c877..241b4c26f 100644 --- a/src/layer/x86/flatten_x86.cpp +++ b/src/layer/x86/flatten_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "flatten_x86.h" diff --git a/src/layer/x86/flatten_x86.h b/src/layer/x86/flatten_x86.h index 298201216..7d4d6315d 100644 --- a/src/layer/x86/flatten_x86.h +++ b/src/layer/x86/flatten_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_FLATTEN_X86_H #define LAYER_FLATTEN_X86_H diff --git a/src/layer/x86/gelu_x86.cpp b/src/layer/x86/gelu_x86.cpp index 903a28268..eac075d4b 100644 --- a/src/layer/x86/gelu_x86.cpp +++ b/src/layer/x86/gelu_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gelu_x86.h" diff --git a/src/layer/x86/gelu_x86.h b/src/layer/x86/gelu_x86.h index ba4b43e65..df65c6f3e 100644 --- a/src/layer/x86/gelu_x86.h +++ b/src/layer/x86/gelu_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GELU_X86_H #define LAYER_GELU_X86_H diff --git a/src/layer/x86/gemm_int8.h b/src/layer/x86/gemm_int8.h index 132cf9d8c..5bd4e1cb1 100644 --- a/src/layer/x86/gemm_int8.h +++ b/src/layer/x86/gemm_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__ void pack_A_tile_int8_avx512vnni(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk); @@ -1414,7 +1403,7 @@ static void transpose_pack_B_tile_int8(const Mat& B, Mat& BT, int j, int max_jj, static void compute_A_tile_fp32_int8_scales(const Mat& A, Mat& scales, float B_scale, Mat& out_descales, int i, int max_ii) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("compute_A_tile_int8_scales %d %d", max_ii, elempack); @@ -1599,7 +1588,7 @@ static void pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("pack_A_tile_fp32_to_int8 %d %d %d", max_ii, max_kk, elempack); @@ -2582,7 +2571,7 @@ static void pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int max_ii, i static void transpose_compute_A_tile_fp32_int8_scales(const Mat& A, Mat& scales, float B_scale, Mat& out_descales, int i, int max_ii) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep * elempack : A.w * elempack; + const size_t A_hstep = A.dims == 3 ? A.cstep * elempack : (size_t)A.w * elempack; const int K = A.dims == 3 ? A.c : A.h; // NCNN_LOGE("transpose_compute_A_tile_int8_scales %d %d", max_ii, elempack); @@ -3377,7 +3366,7 @@ static void transpose_pack_A_tile_fp32_to_int8(const Mat& A, Mat& AT, int i, int #endif const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; // NCNN_LOGE("transpose_pack_A_tile_fp32_to_int8 %d %d", max_ii, elempack); @@ -4935,7 +4924,7 @@ static void compute_B_fp32_int8_scale(const Mat& B, float& scale) #endif // __SSE2__ for (int i = 0; i < (B.dims == 3 ? B.c : B.h); i++) { - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; const float* ptr = (const float*)B + i * B_hstep * B.elempack; const int size = B.w * B.elempack; @@ -5019,7 +5008,7 @@ static void pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int max_jj, i #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("pack_B_tile_fp32_to_int8 %d %d %d", max_jj, max_kk, elempack); @@ -6092,7 +6081,7 @@ static void transpose_pack_B_tile_fp32_to_int8(const Mat& B, Mat& BT, int j, int #endif const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; // NCNN_LOGE("transpose_pack_B_tile_fp32_to_int8 %d %d", max_jj, elempack); @@ -7480,9 +7469,9 @@ static void unpack_output_tile_int32_to_fp32(const Mat& topT, const Mat& C, Mat& #endif const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; - const int c_hstep = C.dims == 3 ? (int)C.cstep : C.w; + const size_t c_hstep = C.dims == 3 ? C.cstep : (size_t)C.w; const int c_elempack = C.elempack; const float* pC = C; diff --git a/src/layer/x86/gemm_x86.cpp b/src/layer/x86/gemm_x86.cpp index 436faa48b..9b05cbc06 100644 --- a/src/layer/x86/gemm_x86.cpp +++ b/src/layer/x86/gemm_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gemm_x86.h" @@ -47,7 +36,7 @@ Gemm_x86::Gemm_x86() static void pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; float* pp = AT; @@ -458,7 +447,7 @@ static void pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max static void transpose_pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int k, int max_kk) { const int elempack = A.elempack; - const int A_hstep = A.dims == 3 ? (int)A.cstep : A.w; + const size_t A_hstep = A.dims == 3 ? A.cstep : (size_t)A.w; float* pp = AT; @@ -935,7 +924,7 @@ static void transpose_pack_A_tile(const Mat& A, Mat& AT, int i, int max_ii, int static void pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; float* pp = BT; @@ -1578,7 +1567,7 @@ static void pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int k, int max static void transpose_pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int k, int max_kk) { const int elempack = B.elempack; - const int B_hstep = B.dims == 3 ? (int)B.cstep : B.w; + const size_t B_hstep = B.dims == 3 ? B.cstep : (size_t)B.w; float* pp = BT; @@ -2033,7 +2022,7 @@ static void transpose_pack_B_tile(const Mat& B, Mat& BT, int j, int max_jj, int static void transpose_unpack_output_tile(const Mat& topT, Mat& top_blob, int i, int max_ii, int j, int max_jj) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const float* pp = topT; @@ -3561,7 +3550,7 @@ static void transpose_unpack_output_tile(const Mat& topT, Mat& top_blob, int i, static void gemm_transB_packed_tile(const Mat& AT_tile, const Mat& BT_tile, const Mat& CT_tile, Mat& topT_tile, Mat& top_blob, int broadcast_type_C, int i, int max_ii, int j, int max_jj, int k, int max_kk, bool k_end) { const int out_elempack = top_blob.elempack; - const int out_hstep = top_blob.dims == 3 ? (int)top_blob.cstep : top_blob.w; + const size_t out_hstep = top_blob.dims == 3 ? top_blob.cstep : (size_t)top_blob.w; const float* pAT = AT_tile; const float* pBT = BT_tile; diff --git a/src/layer/x86/gemm_x86.h b/src/layer/x86/gemm_x86.h index a7539e9ce..55d3c19ba 100644 --- a/src/layer/x86/gemm_x86.h +++ b/src/layer/x86/gemm_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GEMM_X86_H #define LAYER_GEMM_X86_H diff --git a/src/layer/x86/gemm_x86_avx2.cpp b/src/layer/x86/gemm_x86_avx2.cpp index ccc161240..cab6c7579 100644 --- a/src/layer/x86/gemm_x86_avx2.cpp +++ b/src/layer/x86/gemm_x86_avx2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/gemm_x86_avx512vnni.cpp b/src/layer/x86/gemm_x86_avx512vnni.cpp index fd72dd66d..d8f46b5bb 100644 --- a/src/layer/x86/gemm_x86_avx512vnni.cpp +++ b/src/layer/x86/gemm_x86_avx512vnni.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/gemm_x86_avxvnni.cpp b/src/layer/x86/gemm_x86_avxvnni.cpp index b738df821..03120ff2e 100644 --- a/src/layer/x86/gemm_x86_avxvnni.cpp +++ b/src/layer/x86/gemm_x86_avxvnni.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/gemm_x86_avxvnniint8.cpp b/src/layer/x86/gemm_x86_avxvnniint8.cpp index ca1d485ef..59e3f7e18 100644 --- a/src/layer/x86/gemm_x86_avxvnniint8.cpp +++ b/src/layer/x86/gemm_x86_avxvnniint8.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/gemm_x86_xop.cpp b/src/layer/x86/gemm_x86_xop.cpp index 1673d6317..e2f58dbca 100644 --- a/src/layer/x86/gemm_x86_xop.cpp +++ b/src/layer/x86/gemm_x86_xop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/gridsample_bicubic_apply_interpolation.h b/src/layer/x86/gridsample_bicubic_apply_interpolation.h index 0b7be771d..9458872a4 100644 --- a/src/layer/x86/gridsample_bicubic_apply_interpolation.h +++ b/src/layer/x86/gridsample_bicubic_apply_interpolation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if __SSE2__ #if __AVX__ diff --git a/src/layer/x86/gridsample_bicubic_compute_blob.h b/src/layer/x86/gridsample_bicubic_compute_blob.h index 9006153d9..f54a1605e 100644 --- a/src/layer/x86/gridsample_bicubic_compute_blob.h +++ b/src/layer/x86/gridsample_bicubic_compute_blob.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause template void gridsample_2d_bicubic_compute_blob(const Mat& src, const Mat& grid, Mat& offset_value, int permute_fusion) diff --git a/src/layer/x86/gridsample_bilinear_apply_interpolation.h b/src/layer/x86/gridsample_bilinear_apply_interpolation.h index 56f2767e5..7217d2d69 100644 --- a/src/layer/x86/gridsample_bilinear_apply_interpolation.h +++ b/src/layer/x86/gridsample_bilinear_apply_interpolation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if __SSE2__ #if __AVX__ diff --git a/src/layer/x86/gridsample_bilinear_compute_blob.h b/src/layer/x86/gridsample_bilinear_compute_blob.h index f78e017c1..d4051c6c2 100644 --- a/src/layer/x86/gridsample_bilinear_compute_blob.h +++ b/src/layer/x86/gridsample_bilinear_compute_blob.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause template void gridsample_2d_bilinear_compute_blob(const Mat& src, const Mat& grid, Mat& offset_value, int permute_fusion) diff --git a/src/layer/x86/gridsample_compute_blob.h b/src/layer/x86/gridsample_compute_blob.h index 1fc903664..63ddce7e6 100644 --- a/src/layer/x86/gridsample_compute_blob.h +++ b/src/layer/x86/gridsample_compute_blob.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "x86_usability.h" diff --git a/src/layer/x86/gridsample_nearest_apply_interpolation.h b/src/layer/x86/gridsample_nearest_apply_interpolation.h index e84cdc7de..a0af481e5 100644 --- a/src/layer/x86/gridsample_nearest_apply_interpolation.h +++ b/src/layer/x86/gridsample_nearest_apply_interpolation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if __SSE2__ #if __AVX__ diff --git a/src/layer/x86/gridsample_nearest_compute_blob.h b/src/layer/x86/gridsample_nearest_compute_blob.h index a7a12066d..f0cdab8db 100644 --- a/src/layer/x86/gridsample_nearest_compute_blob.h +++ b/src/layer/x86/gridsample_nearest_compute_blob.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause template void gridsample_2d_nearest_compute_blob(const Mat& src, const Mat& grid, Mat& offset_value, int permute_fusion) diff --git a/src/layer/x86/gridsample_x86.cpp b/src/layer/x86/gridsample_x86.cpp index 004bc4d08..8d1d9a97b 100644 --- a/src/layer/x86/gridsample_x86.cpp +++ b/src/layer/x86/gridsample_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "gridsample_x86.h" diff --git a/src/layer/x86/gridsample_x86.h b/src/layer/x86/gridsample_x86.h index caf7c7c50..60d5f912f 100644 --- a/src/layer/x86/gridsample_x86.h +++ b/src/layer/x86/gridsample_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GRIDSAMPLE_X86_H #define LAYER_GRIDSAMPLE_X86_H diff --git a/src/layer/x86/groupnorm_x86.cpp b/src/layer/x86/groupnorm_x86.cpp index cce263433..29333c20e 100644 --- a/src/layer/x86/groupnorm_x86.cpp +++ b/src/layer/x86/groupnorm_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "groupnorm_x86.h" diff --git a/src/layer/x86/groupnorm_x86.h b/src/layer/x86/groupnorm_x86.h index 151884e54..42adbc4a0 100644 --- a/src/layer/x86/groupnorm_x86.h +++ b/src/layer/x86/groupnorm_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_GROUPNORM_X86_H #define LAYER_GROUPNORM_X86_H diff --git a/src/layer/x86/hardsigmoid_x86.cpp b/src/layer/x86/hardsigmoid_x86.cpp index 94d7ff47d..ccdf44fa3 100644 --- a/src/layer/x86/hardsigmoid_x86.cpp +++ b/src/layer/x86/hardsigmoid_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardsigmoid_x86.h" diff --git a/src/layer/x86/hardsigmoid_x86.h b/src/layer/x86/hardsigmoid_x86.h index 418a8dc94..f52063c4c 100644 --- a/src/layer/x86/hardsigmoid_x86.h +++ b/src/layer/x86/hardsigmoid_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSIGMOID_X86_H #define LAYER_HARDSIGMOID_X86_H diff --git a/src/layer/x86/hardswish_x86.cpp b/src/layer/x86/hardswish_x86.cpp index 9946b73d1..08697be91 100644 --- a/src/layer/x86/hardswish_x86.cpp +++ b/src/layer/x86/hardswish_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "hardswish_x86.h" diff --git a/src/layer/x86/hardswish_x86.h b/src/layer/x86/hardswish_x86.h index 4fe521ea4..dd359f6d9 100644 --- a/src/layer/x86/hardswish_x86.h +++ b/src/layer/x86/hardswish_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_HARDSWISH_X86_H #define LAYER_HARDSWISH_X86_H diff --git a/src/layer/x86/innerproduct_fp.h b/src/layer/x86/innerproduct_fp.h index d6f19b39d..47783b85c 100644 --- a/src/layer/x86/innerproduct_fp.h +++ b/src/layer/x86/innerproduct_fp.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_F16C && __AVX__ && !__F16C__ void innerproduct_fp16s_sse_f16c(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_tm, const Mat& bias_data, int activation_type, const Mat& activation_params, const Option& opt); diff --git a/src/layer/x86/innerproduct_gemm_fp.h b/src/layer/x86/innerproduct_gemm_fp.h index c4da7c992..574ee1fd3 100644 --- a/src/layer/x86/innerproduct_gemm_fp.h +++ b/src/layer/x86/innerproduct_gemm_fp.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_F16C && __AVX__ && !__F16C__ void innerproduct_gemm_fp16s_sse_f16c(const Mat& bottom_blob, Mat& top_blob, const Mat& weight_data_tm, const Mat& bias_data, int activation_type, const Mat& activation_params, const Option& opt); diff --git a/src/layer/x86/innerproduct_x86.cpp b/src/layer/x86/innerproduct_x86.cpp index 33e88c613..c8d267c42 100644 --- a/src/layer/x86/innerproduct_x86.cpp +++ b/src/layer/x86/innerproduct_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_x86.h" diff --git a/src/layer/x86/innerproduct_x86.h b/src/layer/x86/innerproduct_x86.h index 19da245f3..6121658e2 100644 --- a/src/layer/x86/innerproduct_x86.h +++ b/src/layer/x86/innerproduct_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INNERPRODUCT_X86_H #define LAYER_INNERPRODUCT_X86_H diff --git a/src/layer/x86/innerproduct_x86_f16c.cpp b/src/layer/x86/innerproduct_x86_f16c.cpp index e6a942aa3..262fc3f2f 100644 --- a/src/layer/x86/innerproduct_x86_f16c.cpp +++ b/src/layer/x86/innerproduct_x86_f16c.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "innerproduct_x86.h" diff --git a/src/layer/x86/instancenorm_x86.cpp b/src/layer/x86/instancenorm_x86.cpp index f3d42f7fb..22b80ddc7 100644 --- a/src/layer/x86/instancenorm_x86.cpp +++ b/src/layer/x86/instancenorm_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "instancenorm_x86.h" diff --git a/src/layer/x86/instancenorm_x86.h b/src/layer/x86/instancenorm_x86.h index 9f93a8e77..1f3e0d333 100644 --- a/src/layer/x86/instancenorm_x86.h +++ b/src/layer/x86/instancenorm_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INSTANCENORM_X86_H #define LAYER_INSTANCENORM_X86_H diff --git a/src/layer/x86/interp_bicubic.h b/src/layer/x86/interp_bicubic.h index e327df71c..77097597a 100644 --- a/src/layer/x86/interp_bicubic.h +++ b/src/layer/x86/interp_bicubic.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static inline void interpolate_cubic(float fx, float* coeffs) { diff --git a/src/layer/x86/interp_bicubic_pack16.h b/src/layer/x86/interp_bicubic_pack16.h index 4c6eb14e5..6d92497ef 100644 --- a/src/layer/x86/interp_bicubic_pack16.h +++ b/src/layer/x86/interp_bicubic_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack16(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/x86/interp_bicubic_pack4.h b/src/layer/x86/interp_bicubic_pack4.h index de165a79f..7d26e8b0c 100644 --- a/src/layer/x86/interp_bicubic_pack4.h +++ b/src/layer/x86/interp_bicubic_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/x86/interp_bicubic_pack8.h b/src/layer/x86/interp_bicubic_pack8.h index e8cea178e..e85975368 100644 --- a/src/layer/x86/interp_bicubic_pack8.h +++ b/src/layer/x86/interp_bicubic_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bicubic_image_pack8(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/x86/interp_bilinear.h b/src/layer/x86/interp_bilinear.h index 39d2432a0..7a3e84dcc 100644 --- a/src/layer/x86/interp_bilinear.h +++ b/src/layer/x86/interp_bilinear.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void linear_coeffs(int w, int outw, int* xofs, float* alpha, int align_corner) { diff --git a/src/layer/x86/interp_bilinear_pack16.h b/src/layer/x86/interp_bilinear_pack16.h index 5157bbe57..3b1a3b9bd 100644 --- a/src/layer/x86/interp_bilinear_pack16.h +++ b/src/layer/x86/interp_bilinear_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack16(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/x86/interp_bilinear_pack4.h b/src/layer/x86/interp_bilinear_pack4.h index 3f1c7a1a5..69eebf1d1 100644 --- a/src/layer/x86/interp_bilinear_pack4.h +++ b/src/layer/x86/interp_bilinear_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack4(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/x86/interp_bilinear_pack8.h b/src/layer/x86/interp_bilinear_pack8.h index 41e7071db..71efb8175 100644 --- a/src/layer/x86/interp_bilinear_pack8.h +++ b/src/layer/x86/interp_bilinear_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void resize_bilinear_image_pack8(const Mat& src, Mat& dst, float* alpha, int* xofs, float* beta, int* yofs) { diff --git a/src/layer/x86/interp_x86.cpp b/src/layer/x86/interp_x86.cpp index 6c8b725c5..683525817 100644 --- a/src/layer/x86/interp_x86.cpp +++ b/src/layer/x86/interp_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "interp_x86.h" diff --git a/src/layer/x86/interp_x86.h b/src/layer/x86/interp_x86.h index 46fcde6f2..0035baf1c 100644 --- a/src/layer/x86/interp_x86.h +++ b/src/layer/x86/interp_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_INTERP_X86_H #define LAYER_INTERP_X86_H diff --git a/src/layer/x86/layernorm_x86.cpp b/src/layer/x86/layernorm_x86.cpp index 9af5ea372..f18ec2562 100644 --- a/src/layer/x86/layernorm_x86.cpp +++ b/src/layer/x86/layernorm_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layernorm_x86.h" diff --git a/src/layer/x86/layernorm_x86.h b/src/layer/x86/layernorm_x86.h index 7e8ec0589..97ac4fa70 100644 --- a/src/layer/x86/layernorm_x86.h +++ b/src/layer/x86/layernorm_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LAYERNORM_X86_H #define LAYER_LAYERNORM_X86_H diff --git a/src/layer/x86/lrn_x86.cpp b/src/layer/x86/lrn_x86.cpp index b05c75996..d115b9239 100644 --- a/src/layer/x86/lrn_x86.cpp +++ b/src/layer/x86/lrn_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lrn_x86.h" diff --git a/src/layer/x86/lrn_x86.h b/src/layer/x86/lrn_x86.h index 9aa85367c..5a40d9eda 100644 --- a/src/layer/x86/lrn_x86.h +++ b/src/layer/x86/lrn_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LRN_X86_H #define LAYER_LRN_X86_H diff --git a/src/layer/x86/lstm_int8.h b/src/layer/x86/lstm_int8.h index a7d102cc1..008caabda 100644 --- a/src/layer/x86/lstm_int8.h +++ b/src/layer/x86/lstm_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if NCNN_RUNTIME_CPU && NCNN_AVX512VNNI && __AVX512F__ && !__AVX512VNNI__ void lstm_transform_weight_int8_avx512vnni(const Mat& weight_xc, const Mat& weight_xc_int8_scales, const Mat& weight_hc, const Mat& weight_hc_int8_scales, const Mat& bias_c, Mat& weight_data_tm, Mat& weight_data_tm_int8_descales, Mat& bias_c_tm, int size, int num_output, int num_directions, int hidden_size, const Option& opt); diff --git a/src/layer/x86/lstm_x86.cpp b/src/layer/x86/lstm_x86.cpp index 70b26b9d4..a29a0c126 100644 --- a/src/layer/x86/lstm_x86.cpp +++ b/src/layer/x86/lstm_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lstm_x86.h" diff --git a/src/layer/x86/lstm_x86.h b/src/layer/x86/lstm_x86.h index 09cde80be..c3fb8811c 100644 --- a/src/layer/x86/lstm_x86.h +++ b/src/layer/x86/lstm_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_LSTM_X86_H #define LAYER_LSTM_X86_H diff --git a/src/layer/x86/lstm_x86_avx2.cpp b/src/layer/x86/lstm_x86_avx2.cpp index 2029b46b0..0d4ddd8fb 100644 --- a/src/layer/x86/lstm_x86_avx2.cpp +++ b/src/layer/x86/lstm_x86_avx2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/lstm_x86_avx512vnni.cpp b/src/layer/x86/lstm_x86_avx512vnni.cpp index 6caf7a544..65cdd6aff 100644 --- a/src/layer/x86/lstm_x86_avx512vnni.cpp +++ b/src/layer/x86/lstm_x86_avx512vnni.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/lstm_x86_avxvnni.cpp b/src/layer/x86/lstm_x86_avxvnni.cpp index 0d55fcf51..70f3a38cb 100644 --- a/src/layer/x86/lstm_x86_avxvnni.cpp +++ b/src/layer/x86/lstm_x86_avxvnni.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/lstm_x86_xop.cpp b/src/layer/x86/lstm_x86_xop.cpp index 5345b3dd4..af22dc904 100644 --- a/src/layer/x86/lstm_x86_xop.cpp +++ b/src/layer/x86/lstm_x86_xop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "cpu.h" #include "mat.h" diff --git a/src/layer/x86/matmul_x86.cpp b/src/layer/x86/matmul_x86.cpp index d0afe81f7..701163dd4 100644 --- a/src/layer/x86/matmul_x86.cpp +++ b/src/layer/x86/matmul_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "matmul_x86.h" diff --git a/src/layer/x86/matmul_x86.h b/src/layer/x86/matmul_x86.h index afbb85a78..12fcaea39 100644 --- a/src/layer/x86/matmul_x86.h +++ b/src/layer/x86/matmul_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MATMUL_X86_H #define LAYER_MATMUL_X86_H diff --git a/src/layer/x86/mish_x86.cpp b/src/layer/x86/mish_x86.cpp index 90ce135c1..279faba3a 100644 --- a/src/layer/x86/mish_x86.cpp +++ b/src/layer/x86/mish_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mish_x86.h" diff --git a/src/layer/x86/mish_x86.h b/src/layer/x86/mish_x86.h index dce8823c6..dc545339c 100644 --- a/src/layer/x86/mish_x86.h +++ b/src/layer/x86/mish_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MISH_X86_H #define LAYER_MISH_X86_H diff --git a/src/layer/x86/multiheadattention_x86.cpp b/src/layer/x86/multiheadattention_x86.cpp index 08a0c50d4..4c22560b4 100644 --- a/src/layer/x86/multiheadattention_x86.cpp +++ b/src/layer/x86/multiheadattention_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "multiheadattention_x86.h" diff --git a/src/layer/x86/multiheadattention_x86.h b/src/layer/x86/multiheadattention_x86.h index 55ea41780..66d88910c 100644 --- a/src/layer/x86/multiheadattention_x86.h +++ b/src/layer/x86/multiheadattention_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_MULTIHEADATTENTION_X86_H #define LAYER_MULTIHEADATTENTION_X86_H diff --git a/src/layer/x86/packing_x86.cpp b/src/layer/x86/packing_x86.cpp index 7a66d4e88..c866eadd0 100644 --- a/src/layer/x86/packing_x86.cpp +++ b/src/layer/x86/packing_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "packing_x86.h" diff --git a/src/layer/x86/packing_x86.h b/src/layer/x86/packing_x86.h index 9f8f36803..e32a33c33 100644 --- a/src/layer/x86/packing_x86.h +++ b/src/layer/x86/packing_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PACKING_X86_H #define LAYER_PACKING_X86_H diff --git a/src/layer/x86/padding_pack16.h b/src/layer/x86/padding_pack16.h index 08d2d236d..785841212 100644 --- a/src/layer/x86/padding_pack16.h +++ b/src/layer/x86/padding_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack16_avx512(const Mat& src, Mat& dst, int top, int bottom, int left, int right, const __m512& v) { diff --git a/src/layer/x86/padding_pack4.h b/src/layer/x86/padding_pack4.h index 9eaaac798..015b9d7b8 100644 --- a/src/layer/x86/padding_pack4.h +++ b/src/layer/x86/padding_pack4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack4_sse(const Mat& src, Mat& dst, int top, int bottom, int left, int right, const __m128& v) { diff --git a/src/layer/x86/padding_pack8.h b/src/layer/x86/padding_pack8.h index 52a68726a..cfabd715b 100644 --- a/src/layer/x86/padding_pack8.h +++ b/src/layer/x86/padding_pack8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack8_avx(const Mat& src, Mat& dst, int top, int bottom, int left, int right, const __m256& v) { diff --git a/src/layer/x86/padding_pack8_int8.h b/src/layer/x86/padding_pack8_int8.h index e2eb86ea6..4a8e35d62 100644 --- a/src/layer/x86/padding_pack8_int8.h +++ b/src/layer/x86/padding_pack8_int8.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void padding_constant_pack8_int8_sse(const Mat& src, Mat& dst, int top, int bottom, int left, int right, int64_t _v) { diff --git a/src/layer/x86/padding_x86.cpp b/src/layer/x86/padding_x86.cpp index 782bc3b7d..d46bb5515 100644 --- a/src/layer/x86/padding_x86.cpp +++ b/src/layer/x86/padding_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "padding_x86.h" diff --git a/src/layer/x86/padding_x86.h b/src/layer/x86/padding_x86.h index 8772fe30e..a2428252f 100644 --- a/src/layer/x86/padding_x86.h +++ b/src/layer/x86/padding_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PADDING_X86_H #define LAYER_PADDING_X86_H diff --git a/src/layer/x86/pooling_2x2.h b/src/layer/x86/pooling_2x2.h index d062f9b1f..8bc305d1f 100644 --- a/src/layer/x86/pooling_2x2.h +++ b/src/layer/x86/pooling_2x2.h @@ -1,19 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn -// available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling2x2s2_max_avx(const Mat& bottom_blob, Mat& top_blob, const Option& opt) diff --git a/src/layer/x86/pooling_2x2_pack16.h b/src/layer/x86/pooling_2x2_pack16.h index 5ce81d0ea..5da7fd11a 100644 --- a/src/layer/x86/pooling_2x2_pack16.h +++ b/src/layer/x86/pooling_2x2_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling2x2s2_max_pack16_avx512(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/x86/pooling_2x2_pack4.h b/src/layer/x86/pooling_2x2_pack4.h index 3f3a0e5f7..e0f0c802b 100644 --- a/src/layer/x86/pooling_2x2_pack4.h +++ b/src/layer/x86/pooling_2x2_pack4.h @@ -1,17 +1,5 @@ - -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling2x2s2_max_pack4_sse(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/x86/pooling_2x2_pack8.h b/src/layer/x86/pooling_2x2_pack8.h index eeb9f9346..34dbc4767 100644 --- a/src/layer/x86/pooling_2x2_pack8.h +++ b/src/layer/x86/pooling_2x2_pack8.h @@ -1,17 +1,5 @@ - -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling2x2s2_max_pack8_avx(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/x86/pooling_3x3_pack16.h b/src/layer/x86/pooling_3x3_pack16.h index 70000b083..f78c99ce5 100644 --- a/src/layer/x86/pooling_3x3_pack16.h +++ b/src/layer/x86/pooling_3x3_pack16.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling3x3s2_max_pack16_avx512(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/x86/pooling_3x3_pack4.h b/src/layer/x86/pooling_3x3_pack4.h index ed84c1a21..563f66369 100644 --- a/src/layer/x86/pooling_3x3_pack4.h +++ b/src/layer/x86/pooling_3x3_pack4.h @@ -1,17 +1,5 @@ - -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling3x3s2_max_pack4_sse(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/x86/pooling_3x3_pack8.h b/src/layer/x86/pooling_3x3_pack8.h index 0c5f68770..48fd8d201 100644 --- a/src/layer/x86/pooling_3x3_pack8.h +++ b/src/layer/x86/pooling_3x3_pack8.h @@ -1,17 +1,5 @@ - -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause static void pooling3x3s2_max_pack8_avx(const Mat& bottom_blob, Mat& top_blob, const Option& opt) { diff --git a/src/layer/x86/pooling_x86.cpp b/src/layer/x86/pooling_x86.cpp index 7dc1dac4b..23bbd571d 100644 --- a/src/layer/x86/pooling_x86.cpp +++ b/src/layer/x86/pooling_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pooling_x86.h" diff --git a/src/layer/x86/pooling_x86.h b/src/layer/x86/pooling_x86.h index 030964fcb..18231a231 100644 --- a/src/layer/x86/pooling_x86.h +++ b/src/layer/x86/pooling_x86.h @@ -1,19 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn -// available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_POOLING_X86_H #define LAYER_POOLING_X86_H diff --git a/src/layer/x86/prelu_x86.cpp b/src/layer/x86/prelu_x86.cpp index 3d46d3e4f..aafb554e0 100644 --- a/src/layer/x86/prelu_x86.cpp +++ b/src/layer/x86/prelu_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "prelu_x86.h" diff --git a/src/layer/x86/prelu_x86.h b/src/layer/x86/prelu_x86.h index 17d60d4b2..2f33524c1 100644 --- a/src/layer/x86/prelu_x86.h +++ b/src/layer/x86/prelu_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_PRELU_X86_H #define LAYER_PRELU_X86_H diff --git a/src/layer/x86/quantize_x86.cpp b/src/layer/x86/quantize_x86.cpp index 6295ebead..f91c5dcf4 100644 --- a/src/layer/x86/quantize_x86.cpp +++ b/src/layer/x86/quantize_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "quantize_x86.h" diff --git a/src/layer/x86/quantize_x86.h b/src/layer/x86/quantize_x86.h index 5c743fe4c..ac3631cce 100644 --- a/src/layer/x86/quantize_x86.h +++ b/src/layer/x86/quantize_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_QUANTIZE_X86_H #define LAYER_QUANTIZE_X86_H diff --git a/src/layer/x86/relu_x86.cpp b/src/layer/x86/relu_x86.cpp index 1dfc9dd9e..014fa3995 100644 --- a/src/layer/x86/relu_x86.cpp +++ b/src/layer/x86/relu_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "relu_x86.h" diff --git a/src/layer/x86/relu_x86.h b/src/layer/x86/relu_x86.h index 9d0b5966f..49139812f 100644 --- a/src/layer/x86/relu_x86.h +++ b/src/layer/x86/relu_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RELU_X86_H #define LAYER_RELU_X86_H diff --git a/src/layer/x86/requantize_x86.cpp b/src/layer/x86/requantize_x86.cpp index 8b744958b..84f1f5ab4 100644 --- a/src/layer/x86/requantize_x86.cpp +++ b/src/layer/x86/requantize_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "requantize_x86.h" diff --git a/src/layer/x86/requantize_x86.h b/src/layer/x86/requantize_x86.h index febc41865..f68170f31 100644 --- a/src/layer/x86/requantize_x86.h +++ b/src/layer/x86/requantize_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_REQUANTIZE_X86_H #define LAYER_REQUANTIZE_X86_H diff --git a/src/layer/x86/reshape_x86.cpp b/src/layer/x86/reshape_x86.cpp index 2bfc86977..3dd675ccf 100644 --- a/src/layer/x86/reshape_x86.cpp +++ b/src/layer/x86/reshape_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reshape_x86.h" diff --git a/src/layer/x86/reshape_x86.h b/src/layer/x86/reshape_x86.h index b31f6347a..6b3542025 100644 --- a/src/layer/x86/reshape_x86.h +++ b/src/layer/x86/reshape_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RESHAPE_X86_H #define LAYER_RESHAPE_X86_H diff --git a/src/layer/x86/rmsnorm_x86.cpp b/src/layer/x86/rmsnorm_x86.cpp index e67c950db..51524e9ee 100644 --- a/src/layer/x86/rmsnorm_x86.cpp +++ b/src/layer/x86/rmsnorm_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rmsnorm_x86.h" diff --git a/src/layer/x86/rmsnorm_x86.h b/src/layer/x86/rmsnorm_x86.h index 2e6296db1..70bc164ff 100644 --- a/src/layer/x86/rmsnorm_x86.h +++ b/src/layer/x86/rmsnorm_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_RMSNORM_X86_H #define LAYER_RMSNORM_X86_H diff --git a/src/layer/x86/roialign_x86.cpp b/src/layer/x86/roialign_x86.cpp index 051937677..581c5e077 100644 --- a/src/layer/x86/roialign_x86.cpp +++ b/src/layer/x86/roialign_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "roialign_x86.h" diff --git a/src/layer/x86/roialign_x86.h b/src/layer/x86/roialign_x86.h index 1b91c1a8c..d16ca6e8e 100644 --- a/src/layer/x86/roialign_x86.h +++ b/src/layer/x86/roialign_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_ROIALIGN_X86_H #define LAYER_ROIALIGN_X86_H diff --git a/src/layer/x86/scale_x86.cpp b/src/layer/x86/scale_x86.cpp index 4e1ea19cd..42147e972 100644 --- a/src/layer/x86/scale_x86.cpp +++ b/src/layer/x86/scale_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "scale_x86.h" diff --git a/src/layer/x86/scale_x86.h b/src/layer/x86/scale_x86.h index f06cf4146..e0884615d 100644 --- a/src/layer/x86/scale_x86.h +++ b/src/layer/x86/scale_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SCALE_X86_H #define LAYER_SCALE_X86_H diff --git a/src/layer/x86/selu_x86.cpp b/src/layer/x86/selu_x86.cpp index 098067395..1a39a864b 100644 --- a/src/layer/x86/selu_x86.cpp +++ b/src/layer/x86/selu_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "selu_x86.h" diff --git a/src/layer/x86/selu_x86.h b/src/layer/x86/selu_x86.h index 7f4a78f80..59b85b810 100644 --- a/src/layer/x86/selu_x86.h +++ b/src/layer/x86/selu_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SELU_X86_H #define LAYER_SELU_X86_H diff --git a/src/layer/x86/shufflechannel_x86.cpp b/src/layer/x86/shufflechannel_x86.cpp index 44802ea96..bd4d1d529 100644 --- a/src/layer/x86/shufflechannel_x86.cpp +++ b/src/layer/x86/shufflechannel_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "shufflechannel_x86.h" diff --git a/src/layer/x86/shufflechannel_x86.h b/src/layer/x86/shufflechannel_x86.h index 1e4328a25..5c85a3490 100644 --- a/src/layer/x86/shufflechannel_x86.h +++ b/src/layer/x86/shufflechannel_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SHUFFLECHANNEL_X86_H #define LAYER_SHUFFLECHANNEL_X86_H diff --git a/src/layer/x86/sigmoid_x86.cpp b/src/layer/x86/sigmoid_x86.cpp index 165375e3f..dee0bbe5f 100644 --- a/src/layer/x86/sigmoid_x86.cpp +++ b/src/layer/x86/sigmoid_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "sigmoid_x86.h" diff --git a/src/layer/x86/sigmoid_x86.h b/src/layer/x86/sigmoid_x86.h index 52bf85d9e..2f4493fb0 100644 --- a/src/layer/x86/sigmoid_x86.h +++ b/src/layer/x86/sigmoid_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SIGMOID_X86_H #define LAYER_SIGMOID_X86_H diff --git a/src/layer/x86/slice_x86.cpp b/src/layer/x86/slice_x86.cpp index 5323969ce..e0f895ecc 100644 --- a/src/layer/x86/slice_x86.cpp +++ b/src/layer/x86/slice_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "slice_x86.h" diff --git a/src/layer/x86/slice_x86.h b/src/layer/x86/slice_x86.h index 0c9b266f8..06b98f6d3 100644 --- a/src/layer/x86/slice_x86.h +++ b/src/layer/x86/slice_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SLICE_X86_H #define LAYER_SLICE_X86_H diff --git a/src/layer/x86/softmax_x86.cpp b/src/layer/x86/softmax_x86.cpp index 2afce3852..7636cc968 100644 --- a/src/layer/x86/softmax_x86.cpp +++ b/src/layer/x86/softmax_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "softmax_x86.h" @@ -326,7 +315,7 @@ static void softmax(float* _ptr, int elemcount, int elempack) #if __SSE2__ #if __AVX__ #if __AVX512F__ -static void softmax_pack16(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_pack16(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -625,7 +614,7 @@ static void softmax_pack16(float* _ptr, int elemcount, int stride, int size1, fl } #endif // __AVX512F__ -static void softmax_pack8(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_pack8(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -1012,7 +1001,7 @@ static void softmax_pack8(float* _ptr, int elemcount, int stride, int size1, flo } #endif // __AVX__ -static void softmax_pack4(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_pack4(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -1360,7 +1349,7 @@ static void softmax_pack4(float* _ptr, int elemcount, int stride, int size1, flo } #endif // __SSE2__ -static void softmax_pack1(float* _ptr, int elemcount, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax_pack1(float* _ptr, int elemcount, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max for (int i = 0; i < elemcount; i++) @@ -1566,7 +1555,7 @@ static void softmax_pack1(float* _ptr, int elemcount, int stride, int size1, flo } } -static void softmax(float* _ptr, int elemcount, int elempack, int stride, int size1, float* _maxptr, float* _sumptr) +static void softmax(float* _ptr, int elemcount, int elempack, size_t stride, int size1, float* _maxptr, float* _sumptr) { // reduce max { @@ -1685,7 +1674,7 @@ int Softmax_x86::forward_inplace(Mat& bottom_top_blob, const Option& opt) const { const int size = w; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = w * elempack; + const size_t stride = (size_t)w * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) @@ -1723,7 +1712,7 @@ int Softmax_x86::forward_inplace(Mat& bottom_top_blob, const Option& opt) const { const int size = w * h * d; const int sizen = (size + (opt.num_threads - 1)) / opt.num_threads; - const int stride = bottom_top_blob.cstep * elempack; + const size_t stride = bottom_top_blob.cstep * elempack; Mat maxsum(sizen, 2, opt.num_threads, 4u, opt.workspace_allocator); if (maxsum.empty()) diff --git a/src/layer/x86/softmax_x86.h b/src/layer/x86/softmax_x86.h index 3d1b733a9..0e3da9e0a 100644 --- a/src/layer/x86/softmax_x86.h +++ b/src/layer/x86/softmax_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SOFTMAX_X86_H #define LAYER_SOFTMAX_X86_H diff --git a/src/layer/x86/swish_x86.cpp b/src/layer/x86/swish_x86.cpp index d8ae26950..2aaf80ef8 100644 --- a/src/layer/x86/swish_x86.cpp +++ b/src/layer/x86/swish_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "swish_x86.h" diff --git a/src/layer/x86/swish_x86.h b/src/layer/x86/swish_x86.h index 76b7c3d83..2a2ad5641 100644 --- a/src/layer/x86/swish_x86.h +++ b/src/layer/x86/swish_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_SWISH_X86_H #define LAYER_SWISH_X86_H diff --git a/src/layer/x86/tanh_x86.cpp b/src/layer/x86/tanh_x86.cpp index 92b9486de..1ae5a0f28 100644 --- a/src/layer/x86/tanh_x86.cpp +++ b/src/layer/x86/tanh_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tanh_x86.h" diff --git a/src/layer/x86/tanh_x86.h b/src/layer/x86/tanh_x86.h index e4c4477bc..06c28f4ae 100644 --- a/src/layer/x86/tanh_x86.h +++ b/src/layer/x86/tanh_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_TANH_X86_H #define LAYER_TANH_X86_H diff --git a/src/layer/x86/unaryop_x86.cpp b/src/layer/x86/unaryop_x86.cpp index 2cd79b834..524c509b5 100644 --- a/src/layer/x86/unaryop_x86.cpp +++ b/src/layer/x86/unaryop_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unaryop_x86.h" diff --git a/src/layer/x86/unaryop_x86.h b/src/layer/x86/unaryop_x86.h index 0e4a7ff59..dae07ba50 100644 --- a/src/layer/x86/unaryop_x86.h +++ b/src/layer/x86/unaryop_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_UNARYOP_X86_H #define LAYER_UNARYOP_X86_H diff --git a/src/layer/x86/x86_activation.h b/src/layer/x86/x86_activation.h index 691bc65ee..257cb47a4 100644 --- a/src/layer/x86/x86_activation.h +++ b/src/layer/x86/x86_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef X86_ACTIVATION_H #define X86_ACTIVATION_H diff --git a/src/layer/x86/x86_usability.h b/src/layer/x86/x86_usability.h index b58d3499d..bb0f0c95f 100644 --- a/src/layer/x86/x86_usability.h +++ b/src/layer/x86/x86_usability.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef X86_USABILITY_H #define X86_USABILITY_H diff --git a/src/layer/x86/yolov3detectionoutput_x86.cpp b/src/layer/x86/yolov3detectionoutput_x86.cpp index 175d73435..5818b533c 100644 --- a/src/layer/x86/yolov3detectionoutput_x86.cpp +++ b/src/layer/x86/yolov3detectionoutput_x86.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #if __AVX__ #include #endif diff --git a/src/layer/x86/yolov3detectionoutput_x86.h b/src/layer/x86/yolov3detectionoutput_x86.h index c378b5827..4512684a4 100644 --- a/src/layer/x86/yolov3detectionoutput_x86.h +++ b/src/layer/x86/yolov3detectionoutput_x86.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_YOLOV3DETECTIONOUTPUT_X86_H #define LAYER_YOLOV3DETECTIONOUTPUT_X86_H diff --git a/src/layer/yolodetectionoutput.cpp b/src/layer/yolodetectionoutput.cpp index b4194f3a5..12306912f 100644 --- a/src/layer/yolodetectionoutput.cpp +++ b/src/layer/yolodetectionoutput.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "yolodetectionoutput.h" diff --git a/src/layer/yolodetectionoutput.h b/src/layer/yolodetectionoutput.h index 5dc35afb3..89bbeaab7 100644 --- a/src/layer/yolodetectionoutput.h +++ b/src/layer/yolodetectionoutput.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_YOLODETECTIONOUTPUT_H #define LAYER_YOLODETECTIONOUTPUT_H diff --git a/src/layer/yolov3detectionoutput.cpp b/src/layer/yolov3detectionoutput.cpp index 7528f5033..ec2a15ac9 100644 --- a/src/layer/yolov3detectionoutput.cpp +++ b/src/layer/yolov3detectionoutput.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "yolov3detectionoutput.h" diff --git a/src/layer/yolov3detectionoutput.h b/src/layer/yolov3detectionoutput.h index fbaf339ec..56d14a9e8 100644 --- a/src/layer/yolov3detectionoutput.h +++ b/src/layer/yolov3detectionoutput.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef LAYER_YOLOV3DETECTIONOUTPUT_H #define LAYER_YOLOV3DETECTIONOUTPUT_H diff --git a/src/layer_shader_type.h b/src/layer_shader_type.h index c143e7de2..6e648ebe3 100644 --- a/src/layer_shader_type.h +++ b/src/layer_shader_type.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_LAYER_SHADER_TYPE_H #define NCNN_LAYER_SHADER_TYPE_H diff --git a/src/layer_type.h b/src/layer_type.h index 511c714bf..d65c5912d 100644 --- a/src/layer_type.h +++ b/src/layer_type.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_LAYER_TYPE_H #define NCNN_LAYER_TYPE_H diff --git a/src/mat.cpp b/src/mat.cpp index 42071ea33..73fc90b1e 100644 --- a/src/mat.cpp +++ b/src/mat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" @@ -84,7 +73,7 @@ Mat Mat::reshape(int _w, Allocator* _allocator) const for (int i = 0; i < c; i++) { const void* ptr = (unsigned char*)data + i * cstep * elemsize; - void* mptr = (unsigned char*)m.data + (size_t)i * w * h * d * elemsize; + void* mptr = (unsigned char*)m.data + i * (size_t)w * h * d * elemsize; memcpy(mptr, ptr, (size_t)w * h * d * elemsize); } @@ -99,7 +88,7 @@ Mat Mat::reshape(int _w, Allocator* _allocator) const m.d = 1; m.c = 1; - m.cstep = alignSize((size_t)_w * elemsize, 16) / elemsize; + m.cstep = alignSize(_w * elemsize, 16) / elemsize; return m; } @@ -120,7 +109,7 @@ Mat Mat::reshape(int _w, int _h, Allocator* _allocator) const for (int i = 0; i < c; i++) { const void* ptr = (unsigned char*)data + i * cstep * elemsize; - void* mptr = (unsigned char*)m.data + (size_t)i * w * h * d * elemsize; + void* mptr = (unsigned char*)m.data + i * (size_t)w * h * d * elemsize; memcpy(mptr, ptr, (size_t)w * h * d * elemsize); } @@ -157,7 +146,7 @@ Mat Mat::reshape(int _w, int _h, int _c, Allocator* _allocator) const // align channel for (int i = 0; i < _c; i++) { - const void* ptr = (unsigned char*)data + (size_t)i * _w * _h * elemsize; + const void* ptr = (unsigned char*)data + i * (size_t)_w * _h * elemsize; void* mptr = (unsigned char*)m.data + i * m.cstep * m.elemsize; memcpy(mptr, ptr, (size_t)_w * _h * elemsize); } @@ -202,7 +191,7 @@ Mat Mat::reshape(int _w, int _h, int _d, int _c, Allocator* _allocator) const // align channel for (int i = 0; i < _c; i++) { - const void* ptr = (unsigned char*)data + (size_t)i * _w * _h * _d * elemsize; + const void* ptr = (unsigned char*)data + i * (size_t)_w * _h * _d * elemsize; void* mptr = (unsigned char*)m.data + i * m.cstep * m.elemsize; memcpy(mptr, ptr, (size_t)_w * _h * _d * elemsize); } @@ -247,7 +236,7 @@ void Mat::create(int _w, size_t _elemsize, Allocator* _allocator) d = 1; c = 1; - cstep = alignSize((size_t)w * elemsize, 16) / elemsize; + cstep = alignSize(w * elemsize, 16) / elemsize; size_t totalsize = alignSize(total() * elemsize, 4); if (totalsize > 0) @@ -387,7 +376,7 @@ void Mat::create(int _w, size_t _elemsize, int _elempack, Allocator* _allocator) d = 1; c = 1; - cstep = alignSize((size_t)w * elemsize, 16) / elemsize; + cstep = alignSize(w * elemsize, 16) / elemsize; size_t totalsize = alignSize(total() * elemsize, 4); if (totalsize > 0) @@ -602,7 +591,7 @@ void VkMat::create(int _w, int _h, size_t _elemsize, VkAllocator* _allocator) d = 1; c = 1; - cstep = alignSize(w * h * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; if (total() > 0) { @@ -635,7 +624,7 @@ void VkMat::create(int _w, int _h, int _c, size_t _elemsize, VkAllocator* _alloc d = 1; c = _c; - cstep = alignSize(w * h * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; if (total() > 0) { @@ -668,7 +657,7 @@ void VkMat::create(int _w, int _h, int _d, int _c, size_t _elemsize, VkAllocator d = _d; c = _c; - cstep = alignSize(w * h * d * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * d * elemsize, 16) / elemsize; if (total() > 0) { @@ -734,7 +723,7 @@ void VkMat::create(int _w, int _h, size_t _elemsize, int _elempack, VkAllocator* d = 1; c = 1; - cstep = alignSize(w * h * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; if (total() > 0) { @@ -767,7 +756,7 @@ void VkMat::create(int _w, int _h, int _c, size_t _elemsize, int _elempack, VkAl d = 1; c = _c; - cstep = alignSize(w * h * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; if (total() > 0) { @@ -800,7 +789,7 @@ void VkMat::create(int _w, int _h, int _d, int _c, size_t _elemsize, int _elempa d = _d; c = _c; - cstep = alignSize(w * h * d * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * d * elemsize, 16) / elemsize; if (total() > 0) { diff --git a/src/mat.h b/src/mat.h index 05ab0dfd7..95bbe9503 100644 --- a/src/mat.h +++ b/src/mat.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_MAT_H #define NCNN_MAT_H @@ -851,13 +840,13 @@ NCNN_FORCEINLINE Mat::Mat(const Mat& m) NCNN_FORCEINLINE Mat::Mat(int _w, void* _data, size_t _elemsize, Allocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(1), allocator(_allocator), dims(1), w(_w), h(1), d(1), c(1) { - cstep = (size_t)w; + cstep = alignSize(w * elemsize, 16) / elemsize; } NCNN_FORCEINLINE Mat::Mat(int _w, int _h, void* _data, size_t _elemsize, Allocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(1), allocator(_allocator), dims(2), w(_w), h(_h), d(1), c(1) { - cstep = (size_t)w * h; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; } NCNN_FORCEINLINE Mat::Mat(int _w, int _h, int _c, void* _data, size_t _elemsize, Allocator* _allocator) @@ -875,13 +864,13 @@ NCNN_FORCEINLINE Mat::Mat(int _w, int _h, int _d, int _c, void* _data, size_t _e NCNN_FORCEINLINE Mat::Mat(int _w, void* _data, size_t _elemsize, int _elempack, Allocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(_elempack), allocator(_allocator), dims(1), w(_w), h(1), d(1), c(1) { - cstep = (size_t)w; + cstep = alignSize(w * elemsize, 16) / elemsize; } NCNN_FORCEINLINE Mat::Mat(int _w, int _h, void* _data, size_t _elemsize, int _elempack, Allocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(_elempack), allocator(_allocator), dims(2), w(_w), h(_h), d(1), c(1) { - cstep = (size_t)w * h; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; } NCNN_FORCEINLINE Mat::Mat(int _w, int _h, int _c, void* _data, size_t _elemsize, int _elempack, Allocator* _allocator) @@ -1269,12 +1258,16 @@ NCNN_FORCEINLINE const Mat Mat::channel(int _c) const NCNN_FORCEINLINE Mat Mat::depth(int z) { - return Mat(w, h, (unsigned char*)data + (size_t)w * h * z * elemsize, elemsize, elempack, allocator); + Mat m(w, h, (unsigned char*)data + (size_t)w * h * z * elemsize, elemsize, elempack, allocator); + m.cstep = (size_t)w * h; + return m; } NCNN_FORCEINLINE const Mat Mat::depth(int z) const { - return Mat(w, h, (unsigned char*)data + (size_t)w * h * z * elemsize, elemsize, elempack, allocator); + Mat m(w, h, (unsigned char*)data + (size_t)w * h * z * elemsize, elemsize, elempack, allocator); + m.cstep = (size_t)w * h; + return m; } NCNN_FORCEINLINE float* Mat::row(int y) @@ -1329,22 +1322,30 @@ NCNN_FORCEINLINE const Mat Mat::depth_range(int z, int depths) const NCNN_FORCEINLINE Mat Mat::row_range(int y, int rows) { - return Mat(w, rows, (unsigned char*)data + (size_t)w * y * elemsize, elemsize, elempack, allocator); + Mat m(w, rows, (unsigned char*)data + (size_t)w * y * elemsize, elemsize, elempack, allocator); + m.cstep = (size_t)w * rows; + return m; } NCNN_FORCEINLINE const Mat Mat::row_range(int y, int rows) const { - return Mat(w, rows, (unsigned char*)data + (size_t)w * y * elemsize, elemsize, elempack, allocator); + Mat m(w, rows, (unsigned char*)data + (size_t)w * y * elemsize, elemsize, elempack, allocator); + m.cstep = (size_t)w * rows; + return m; } NCNN_FORCEINLINE Mat Mat::range(int x, int n) { - return Mat(n, (unsigned char*)data + x * elemsize, elemsize, elempack, allocator); + Mat m(n, (unsigned char*)data + x * elemsize, elemsize, elempack, allocator); + m.cstep = (size_t)n; + return m; } NCNN_FORCEINLINE const Mat Mat::range(int x, int n) const { - return Mat(n, (unsigned char*)data + x * elemsize, elemsize, elempack, allocator); + Mat m(n, (unsigned char*)data + x * elemsize, elemsize, elempack, allocator); + m.cstep = (size_t)n; + return m; } template @@ -1435,49 +1436,49 @@ NCNN_FORCEINLINE VkMat::VkMat(const VkMat& m) NCNN_FORCEINLINE VkMat::VkMat(int _w, VkBufferMemory* _data, size_t _elemsize, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(1), allocator(_allocator), dims(1), w(_w), h(1), d(1), c(1) { - cstep = (size_t)w; + cstep = alignSize(w * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::VkMat(int _w, int _h, VkBufferMemory* _data, size_t _elemsize, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(1), allocator(_allocator), dims(2), w(_w), h(_h), d(1), c(1) { - cstep = (size_t)w * h; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::VkMat(int _w, int _h, int _c, VkBufferMemory* _data, size_t _elemsize, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(1), allocator(_allocator), dims(3), w(_w), h(_h), d(1), c(_c) { - cstep = alignSize(w * h * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::VkMat(int _w, int _h, int _d, int _c, VkBufferMemory* _data, size_t _elemsize, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(1), allocator(_allocator), dims(4), w(_w), h(_h), d(_d), c(_c) { - cstep = alignSize(w * h * d * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * d * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::VkMat(int _w, VkBufferMemory* _data, size_t _elemsize, int _elempack, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(_elempack), allocator(_allocator), dims(1), w(_w), h(1), d(1), c(1) { - cstep = (size_t)w; + cstep = alignSize(w * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::VkMat(int _w, int _h, VkBufferMemory* _data, size_t _elemsize, int _elempack, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(_elempack), allocator(_allocator), dims(2), w(_w), h(_h), d(1), c(1) { - cstep = (size_t)w * h; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::VkMat(int _w, int _h, int _c, VkBufferMemory* _data, size_t _elemsize, int _elempack, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(_elempack), allocator(_allocator), dims(3), w(_w), h(_h), d(1), c(_c) { - cstep = alignSize(w * h * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::VkMat(int _w, int _h, int _d, int _c, VkBufferMemory* _data, size_t _elemsize, int _elempack, VkAllocator* _allocator) : data(_data), refcount(0), elemsize(_elemsize), elempack(_elempack), allocator(_allocator), dims(4), w(_w), h(_h), d(_d), c(_c) { - cstep = alignSize(w * h * d * elemsize, 16) / elemsize; + cstep = alignSize((size_t)w * h * d * elemsize, 16) / elemsize; } NCNN_FORCEINLINE VkMat::~VkMat() diff --git a/src/mat_pixel.cpp b/src/mat_pixel.cpp index 84a651244..7c2c806bd 100644 --- a/src/mat_pixel.cpp +++ b/src/mat_pixel.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" diff --git a/src/mat_pixel_affine.cpp b/src/mat_pixel_affine.cpp index 934fe22b1..fdacc7347 100644 --- a/src/mat_pixel_affine.cpp +++ b/src/mat_pixel_affine.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" #if __ARM_NEON diff --git a/src/mat_pixel_android.cpp b/src/mat_pixel_android.cpp index 6e70b7fe0..2d2752a74 100644 --- a/src/mat_pixel_android.cpp +++ b/src/mat_pixel_android.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" diff --git a/src/mat_pixel_drawing.cpp b/src/mat_pixel_drawing.cpp index 5d334de2c..5e71ad213 100644 --- a/src/mat_pixel_drawing.cpp +++ b/src/mat_pixel_drawing.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" diff --git a/src/mat_pixel_drawing_font.h b/src/mat_pixel_drawing_font.h index 47dd38662..59ad54b09 100644 --- a/src/mat_pixel_drawing_font.h +++ b/src/mat_pixel_drawing_font.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause static const unsigned char mono_font_data[94][40 * 10] = { { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, diff --git a/src/mat_pixel_resize.cpp b/src/mat_pixel_resize.cpp index f28ce061b..482073088 100644 --- a/src/mat_pixel_resize.cpp +++ b/src/mat_pixel_resize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" diff --git a/src/mat_pixel_rotate.cpp b/src/mat_pixel_rotate.cpp index f865b61f8..59f65d9d7 100644 --- a/src/mat_pixel_rotate.cpp +++ b/src/mat_pixel_rotate.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" #if __ARM_NEON diff --git a/src/modelbin.cpp b/src/modelbin.cpp index 3425ad6ca..2f67beeed 100644 --- a/src/modelbin.cpp +++ b/src/modelbin.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "modelbin.h" diff --git a/src/modelbin.h b/src/modelbin.h index aada5f61c..2b31e2ec9 100644 --- a/src/modelbin.h +++ b/src/modelbin.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_MODELBIN_H #define NCNN_MODELBIN_H diff --git a/src/net.cpp b/src/net.cpp index 05f121dd9..c257a36d1 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "net.h" diff --git a/src/net.h b/src/net.h index adbbafc5e..c7e33956a 100644 --- a/src/net.h +++ b/src/net.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_NET_H #define NCNN_NET_H diff --git a/src/option.cpp b/src/option.cpp index f464cb557..e239704db 100644 --- a/src/option.cpp +++ b/src/option.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "option.h" diff --git a/src/option.h b/src/option.h index bbc48508d..9548e41c9 100644 --- a/src/option.h +++ b/src/option.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_OPTION_H #define NCNN_OPTION_H diff --git a/src/paramdict.cpp b/src/paramdict.cpp index f1fbead97..e698cb92a 100644 --- a/src/paramdict.cpp +++ b/src/paramdict.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "paramdict.h" diff --git a/src/paramdict.h b/src/paramdict.h index dc306c815..2acdb7a07 100644 --- a/src/paramdict.h +++ b/src/paramdict.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_PARAMDICT_H #define NCNN_PARAMDICT_H diff --git a/src/pipeline.cpp b/src/pipeline.cpp index 2354f9ede..60bbcdfdf 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pipeline.h" diff --git a/src/pipeline.h b/src/pipeline.h index efd375e1d..0a3a9ba91 100644 --- a/src/pipeline.h +++ b/src/pipeline.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_PIPELINE_H #define NCNN_PIPELINE_H diff --git a/src/pipelinecache.cpp b/src/pipelinecache.cpp index cceba36c1..1bd274514 100644 --- a/src/pipelinecache.cpp +++ b/src/pipelinecache.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pipelinecache.h" diff --git a/src/pipelinecache.h b/src/pipelinecache.h index 66faefaf4..b93c0cfd8 100644 --- a/src/pipelinecache.h +++ b/src/pipelinecache.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_PIPELINECACHE_H #define NCNN_PIPELINECACHE_H diff --git a/src/platform.h.in b/src/platform.h.in index 1a3e32422..2753fabbd 100644 --- a/src/platform.h.in +++ b/src/platform.h.in @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_PLATFORM_H #define NCNN_PLATFORM_H @@ -80,6 +69,9 @@ #if NCNN_THREADS #if defined _WIN32 #define WIN32_LEAN_AND_MEAN +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0501 +#endif #include #include #else @@ -97,6 +89,7 @@ namespace ncnn { #if NCNN_THREADS #if defined _WIN32 +#if _WIN32_WINNT > _WIN32_WINNT_WINXP // Windows Vista and later class NCNN_EXPORT Mutex { public: @@ -106,7 +99,6 @@ public: void unlock() { ReleaseSRWLockExclusive(&srwlock); } private: friend class ConditionVariable; - // NOTE SRWLock is available from windows vista SRWLOCK srwlock; }; @@ -122,6 +114,56 @@ private: CONDITION_VARIABLE condvar; }; +#else // Windows XP compatibility + +class NCNN_EXPORT Mutex +{ +public: + Mutex() { InitializeCriticalSection(&cs); } + ~Mutex() { DeleteCriticalSection(&cs); } + void lock() { EnterCriticalSection(&cs); } + void unlock() { LeaveCriticalSection(&cs); } +private: + friend class ConditionVariable; + CRITICAL_SECTION cs; +}; + +class NCNN_EXPORT ConditionVariable +{ +public: + ConditionVariable() + { + signal_event = CreateEvent(0, FALSE, FALSE, 0); // Auto-reset event for signal() + broadcast_event = CreateEvent(0, TRUE, FALSE, 0); // Manual-reset event for broadcast() + } + ~ConditionVariable() + { + CloseHandle(signal_event); + CloseHandle(broadcast_event); + } + void wait(Mutex& mutex) + { + mutex.unlock(); + HANDLE events[2] = { signal_event, broadcast_event }; + WaitForMultipleObjects(2, events, FALSE, INFINITE); // Wait for either signal or broadcast + mutex.lock(); + } + void broadcast() + { + SetEvent(broadcast_event); // Wake all threads + ResetEvent(broadcast_event); // Reset after waking all threads + } + void signal() + { + SetEvent(signal_event); // Wake one thread + } +private: + HANDLE signal_event; + HANDLE broadcast_event; +}; + +#endif // _WIN32_WINNT > _WIN32_WINNT_WINXP + static unsigned __stdcall start_wrapper(void* args); class NCNN_EXPORT Thread { diff --git a/src/simplemath.cpp b/src/simplemath.cpp index 27b9c5e3d..2fc73d3fe 100644 --- a/src/simplemath.cpp +++ b/src/simplemath.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "platform.h" diff --git a/src/simplemath.h b/src/simplemath.h index 0e39e4f22..561deb124 100644 --- a/src/simplemath.h +++ b/src/simplemath.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_SIMPLEMATH_H #define NCNN_SIMPLEMATH_H diff --git a/src/simpleocv.cpp b/src/simpleocv.cpp index 99b2e3c80..f2a68f6cb 100644 --- a/src/simpleocv.cpp +++ b/src/simpleocv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "simpleocv.h" diff --git a/src/simpleocv.h b/src/simpleocv.h index 015e48b4c..650e5203d 100644 --- a/src/simpleocv.h +++ b/src/simpleocv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_SIMPLEOCV_H #define NCNN_SIMPLEOCV_H diff --git a/src/simpleomp.cpp b/src/simpleomp.cpp index 6de069a9b..df407971c 100644 --- a/src/simpleomp.cpp +++ b/src/simpleomp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "platform.h" diff --git a/src/simpleomp.h b/src/simpleomp.h index 13e245291..0f132f7a9 100644 --- a/src/simpleomp.h +++ b/src/simpleomp.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_SIMPLEOMP_H #define NCNN_SIMPLEOMP_H diff --git a/src/simplestl.cpp b/src/simplestl.cpp index 26dec043e..a94fa15f9 100644 --- a/src/simplestl.cpp +++ b/src/simplestl.cpp @@ -1,16 +1,5 @@ -// Leo is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2018 Leo . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2018 Leo +// SPDX-License-Identifier: BSD-3-Clause #include "platform.h" diff --git a/src/simplestl.h b/src/simplestl.h index f6daee53f..334d75a9a 100644 --- a/src/simplestl.h +++ b/src/simplestl.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_SIMPLESTL_H #define NCNN_SIMPLESTL_H diff --git a/src/simplevk.cpp b/src/simplevk.cpp index 10231ecc9..fb8f0ffeb 100644 --- a/src/simplevk.cpp +++ b/src/simplevk.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "platform.h" diff --git a/src/simplevk.h b/src/simplevk.h index 6146c8135..c2c7060dd 100644 --- a/src/simplevk.h +++ b/src/simplevk.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_SIMPLEVK_H #define NCNN_SIMPLEVK_H diff --git a/src/vulkan_header_fix.h b/src/vulkan_header_fix.h index e4d2227ea..595f8d471 100644 --- a/src/vulkan_header_fix.h +++ b/src/vulkan_header_fix.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_VULKAN_HEADER_FIX_H #define NCNN_VULKAN_HEADER_FIX_H diff --git a/tests/test_absval.cpp b/tests/test_absval.cpp index e931606be..154c10836 100644 --- a/tests/test_absval.cpp +++ b/tests/test_absval.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" @@ -32,6 +21,7 @@ static int test_absval(const ncnn::Mat& a) static int test_absval_0() { return 0 + || test_absval(RandomMat(1, 1, 13)) || test_absval(RandomMat(5, 7, 24)) || test_absval(RandomMat(7, 9, 12)) || test_absval(RandomMat(3, 5, 13)); @@ -40,6 +30,7 @@ static int test_absval_0() static int test_absval_1() { return 0 + || test_absval(RandomMat(1, 13)) || test_absval(RandomMat(15, 24)) || test_absval(RandomMat(19, 12)) || test_absval(RandomMat(17, 15)); @@ -48,6 +39,7 @@ static int test_absval_1() static int test_absval_2() { return 0 + || test_absval(RandomMat(1)) || test_absval(RandomMat(128)) || test_absval(RandomMat(124)) || test_absval(RandomMat(127)); diff --git a/tests/test_batchnorm.cpp b/tests/test_batchnorm.cpp index a977a3364..73e34a4c5 100644 --- a/tests/test_batchnorm.cpp +++ b/tests/test_batchnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_bias.cpp b/tests/test_bias.cpp index d522a950b..76289cfeb 100644 --- a/tests/test_bias.cpp +++ b/tests/test_bias.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_binaryop.cpp b/tests/test_binaryop.cpp index 4a0552d8b..d7335dd56 100644 --- a/tests/test_binaryop.cpp +++ b/tests/test_binaryop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_binaryop_1.cpp b/tests/test_binaryop_1.cpp index d89993229..bb5e16f5a 100644 --- a/tests/test_binaryop_1.cpp +++ b/tests/test_binaryop_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_binaryop_2.cpp b/tests/test_binaryop_2.cpp index 3427f7af2..48502151d 100644 --- a/tests/test_binaryop_2.cpp +++ b/tests/test_binaryop_2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_binaryop_3.cpp b/tests/test_binaryop_3.cpp index 7509fc6aa..84ad76eb6 100644 --- a/tests/test_binaryop_3.cpp +++ b/tests/test_binaryop_3.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_bnll.cpp b/tests/test_bnll.cpp index 0b22fda67..633f938e2 100644 --- a/tests/test_bnll.cpp +++ b/tests/test_bnll.cpp @@ -1,16 +1,5 @@ -// JasonZhang892 is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 JasonZhang892 . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 JasonZhang892 +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_c_api.cpp b/tests/test_c_api.cpp index 7cdfc940f..a92174674 100644 --- a/tests/test_c_api.cpp +++ b/tests/test_c_api.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include "c_api.h" diff --git a/tests/test_cast.cpp b/tests/test_cast.cpp index a42dd17bd..80ba3337a 100644 --- a/tests/test_cast.cpp +++ b/tests/test_cast.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_celu.cpp b/tests/test_celu.cpp index 36a11ccd0..979131ccc 100644 --- a/tests/test_celu.cpp +++ b/tests/test_celu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_clip.cpp b/tests/test_clip.cpp index 72a35fcf2..3517b664b 100644 --- a/tests/test_clip.cpp +++ b/tests/test_clip.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_command.cpp b/tests/test_command.cpp index 4f289f9da..6d4de5c3b 100644 --- a/tests/test_command.cpp +++ b/tests/test_command.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "command.h" #include "gpu.h" diff --git a/tests/test_concat.cpp b/tests/test_concat.cpp index c4931383b..7171f1e0b 100644 --- a/tests/test_concat.cpp +++ b/tests/test_concat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_concat_oom.cpp b/tests/test_concat_oom.cpp index 5baf59061..65bdd5990 100644 --- a/tests/test_concat_oom.cpp +++ b/tests/test_concat_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolution.cpp b/tests/test_convolution.cpp index fbdd41413..1064e562e 100644 --- a/tests/test_convolution.cpp +++ b/tests/test_convolution.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolution1d.cpp b/tests/test_convolution1d.cpp index 1b194b562..6cc0dbd97 100644 --- a/tests/test_convolution1d.cpp +++ b/tests/test_convolution1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolution3d.cpp b/tests/test_convolution3d.cpp index ba1ca7454..eb29259e3 100644 --- a/tests/test_convolution3d.cpp +++ b/tests/test_convolution3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolution_1.cpp b/tests/test_convolution_1.cpp index 30de517af..ad2e618fd 100644 --- a/tests/test_convolution_1.cpp +++ b/tests/test_convolution_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolution_2.cpp b/tests/test_convolution_2.cpp index 5d8eaff14..2ce75ee6b 100644 --- a/tests/test_convolution_2.cpp +++ b/tests/test_convolution_2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolution_3.cpp b/tests/test_convolution_3.cpp index 9bdf67ce5..40fb36e90 100644 --- a/tests/test_convolution_3.cpp +++ b/tests/test_convolution_3.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolution_oom.cpp b/tests/test_convolution_oom.cpp index 664375335..f1e1d7f8d 100644 --- a/tests/test_convolution_oom.cpp +++ b/tests/test_convolution_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolutiondepthwise.cpp b/tests/test_convolutiondepthwise.cpp index dcded4f98..5983b80a2 100644 --- a/tests/test_convolutiondepthwise.cpp +++ b/tests/test_convolutiondepthwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolutiondepthwise1d.cpp b/tests/test_convolutiondepthwise1d.cpp index fe7fc2543..a92ec2379 100644 --- a/tests/test_convolutiondepthwise1d.cpp +++ b/tests/test_convolutiondepthwise1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolutiondepthwise3d.cpp b/tests/test_convolutiondepthwise3d.cpp index ad392532a..dcee99da3 100644 --- a/tests/test_convolutiondepthwise3d.cpp +++ b/tests/test_convolutiondepthwise3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_convolutiondepthwise_1.cpp b/tests/test_convolutiondepthwise_1.cpp index e1429e30c..fe820c390 100644 --- a/tests/test_convolutiondepthwise_1.cpp +++ b/tests/test_convolutiondepthwise_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_copyto.cpp b/tests/test_copyto.cpp index 782886630..cc79e000b 100644 --- a/tests/test_copyto.cpp +++ b/tests/test_copyto.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_copyto_1.cpp b/tests/test_copyto_1.cpp index 48bc3b958..6a4b9ada8 100644 --- a/tests/test_copyto_1.cpp +++ b/tests/test_copyto_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_cpu.cpp b/tests/test_cpu.cpp index 900431449..680c91cc9 100644 --- a/tests/test_cpu.cpp +++ b/tests/test_cpu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include @@ -118,8 +107,8 @@ static int test_cpu_powersave() #else #if defined _WIN32 -// Check SDK >= Win7 -#if _WIN32_WINNT >= _WIN32_WINNT_WIN7 // win7 +// Check SDK >= WinXP +#if _WIN32_WINNT >= _WIN32_WINNT_WINXP // winxp static int test_cpu_info() { diff --git a/tests/test_crop.cpp b/tests/test_crop.cpp index 93fc3a02f..e712c84cf 100644 --- a/tests/test_crop.cpp +++ b/tests/test_crop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_crop_1.cpp b/tests/test_crop_1.cpp index 38f143a24..1e13ff70c 100644 --- a/tests/test_crop_1.cpp +++ b/tests/test_crop_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_crop_2.cpp b/tests/test_crop_2.cpp index b896caa2e..aa517dc61 100644 --- a/tests/test_crop_2.cpp +++ b/tests/test_crop_2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_crop_3.cpp b/tests/test_crop_3.cpp index fcf0b9a40..f9c80b27f 100644 --- a/tests/test_crop_3.cpp +++ b/tests/test_crop_3.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_crop_oom.cpp b/tests/test_crop_oom.cpp index 0f22b933d..3694cb118 100644 --- a/tests/test_crop_oom.cpp +++ b/tests/test_crop_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_cumulativesum.cpp b/tests/test_cumulativesum.cpp index 666a5e040..6bd92712f 100644 --- a/tests/test_cumulativesum.cpp +++ b/tests/test_cumulativesum.cpp @@ -1,14 +1,5 @@ -// Copyright (c) 2023 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deconvolution.cpp b/tests/test_deconvolution.cpp index a840299dd..d31af13b0 100644 --- a/tests/test_deconvolution.cpp +++ b/tests/test_deconvolution.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" @@ -24,12 +13,12 @@ static int test_deconvolution(int w, int h, int c, int outch, int kernel, int di } ncnn::ParamDict pd; - pd.set(0, outch); // num_output - pd.set(1, kernel); // kernel_w - pd.set(2, dilation); // dilation_w - pd.set(3, stride); // stride_w - pd.set(4, pad); // pad_w - pd.set(5, bias); // bias_term + pd.set(0, outch); + pd.set(1, kernel); + pd.set(2, dilation); + pd.set(3, stride); + pd.set(4, pad); + pd.set(5, bias); pd.set(6, outch * c * kernel * kernel); int activation_type = RAND() % 5; // 0 1 2 3 4 @@ -52,6 +41,7 @@ static int test_deconvolution(int w, int h, int c, int outch, int kernel, int di if (ret != 0) { fprintf(stderr, "test_deconvolution failed w=%d h=%d c=%d outch=%d kernel=%d dilation=%d stride=%d pad=%d bias=%d act=%d actparams=[%f,%f] output_pad_right=%d output_pad_bottom=%d output_w=%d output_h=%d\n", w, h, c, outch, kernel, dilation, stride, pad, bias, activation_type, activation_params[0], activation_params[1], output_pad_right, output_pad_bottom, output_w, output_h); + return ret; } { @@ -70,6 +60,7 @@ static int test_deconvolution(int w, int h, int c, int outch, int kernel, int di if (ret != 0) { fprintf(stderr, "test_deconvolution failed w=%d h=%d c=%d outch=%d kernel=%d dilation=%d stride=%d pad=%d bias=%d act=%d actparams=[%f,%f] output_pad_right=%d output_pad_bottom=%d output_w=%d output_h=%d\n", w, h, c, outch, kernel, dilation, stride, pad, bias, activation_type, activation_params[0], activation_params[1], output_pad_right, output_pad_bottom, output_w, output_h); + return ret; } } @@ -89,6 +80,7 @@ static int test_deconvolution(int w, int h, int c, int outch, int kernel, int di if (ret != 0) { fprintf(stderr, "test_deconvolution failed w=%d h=%d c=%d outch=%d kernel=%d dilation=%d stride=%d pad=%d bias=%d act=%d actparams=[%f,%f] output_pad_right=%d output_pad_bottom=%d output_w=%d output_h=%d\n", w, h, c, outch, kernel, dilation, stride, pad, bias, activation_type, activation_params[0], activation_params[1], output_pad_right, output_pad_bottom, output_w, output_h); + return ret; } } diff --git a/tests/test_deconvolution1d.cpp b/tests/test_deconvolution1d.cpp index 4836173ab..a8f7dc1a5 100644 --- a/tests/test_deconvolution1d.cpp +++ b/tests/test_deconvolution1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deconvolution3d.cpp b/tests/test_deconvolution3d.cpp index 4d1ad2f20..480f778ee 100644 --- a/tests/test_deconvolution3d.cpp +++ b/tests/test_deconvolution3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deconvolutiondepthwise.cpp b/tests/test_deconvolutiondepthwise.cpp index 80b9f052d..5f9e066a6 100644 --- a/tests/test_deconvolutiondepthwise.cpp +++ b/tests/test_deconvolutiondepthwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deconvolutiondepthwise1d.cpp b/tests/test_deconvolutiondepthwise1d.cpp index f02d02118..9703547f8 100644 --- a/tests/test_deconvolutiondepthwise1d.cpp +++ b/tests/test_deconvolutiondepthwise1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deconvolutiondepthwise3d.cpp b/tests/test_deconvolutiondepthwise3d.cpp index ff2f47193..fecc5e790 100644 --- a/tests/test_deconvolutiondepthwise3d.cpp +++ b/tests/test_deconvolutiondepthwise3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deconvolutiondepthwise_1.cpp b/tests/test_deconvolutiondepthwise_1.cpp index adbd81556..1a1eb308e 100644 --- a/tests/test_deconvolutiondepthwise_1.cpp +++ b/tests/test_deconvolutiondepthwise_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deepcopy.cpp b/tests/test_deepcopy.cpp index ad21a007d..9d7270347 100644 --- a/tests/test_deepcopy.cpp +++ b/tests/test_deepcopy.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deformableconv2d.cpp b/tests/test_deformableconv2d.cpp index 0f979f525..92391bc73 100644 --- a/tests/test_deformableconv2d.cpp +++ b/tests/test_deformableconv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deformableconv2d_1.cpp b/tests/test_deformableconv2d_1.cpp index c74a18bea..1de0a71c5 100644 --- a/tests/test_deformableconv2d_1.cpp +++ b/tests/test_deformableconv2d_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deformableconv2d_2.cpp b/tests/test_deformableconv2d_2.cpp index 76b7d1afd..fbb87cbef 100644 --- a/tests/test_deformableconv2d_2.cpp +++ b/tests/test_deformableconv2d_2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deformableconv2d_3.cpp b/tests/test_deformableconv2d_3.cpp index 631df4efb..21c93db9e 100644 --- a/tests/test_deformableconv2d_3.cpp +++ b/tests/test_deformableconv2d_3.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_deformableconv2d_4.cpp b/tests/test_deformableconv2d_4.cpp index 1981c762b..d9ad8f5b5 100644 --- a/tests/test_deformableconv2d_4.cpp +++ b/tests/test_deformableconv2d_4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_dequantize.cpp b/tests/test_dequantize.cpp index f80684539..3a1fee5b6 100644 --- a/tests/test_dequantize.cpp +++ b/tests/test_dequantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_diag.cpp b/tests/test_diag.cpp index 53eefe31e..c5b220ca2 100644 --- a/tests/test_diag.cpp +++ b/tests/test_diag.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_dropout.cpp b/tests/test_dropout.cpp index 964dd8a39..9de177f25 100644 --- a/tests/test_dropout.cpp +++ b/tests/test_dropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_einsum.cpp b/tests/test_einsum.cpp index a189061df..0e542f511 100644 --- a/tests/test_einsum.cpp +++ b/tests/test_einsum.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_eltwise.cpp b/tests/test_eltwise.cpp index 84ddfcf13..363ece163 100644 --- a/tests/test_eltwise.cpp +++ b/tests/test_eltwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_elu.cpp b/tests/test_elu.cpp index cd78f846d..98af3beb2 100644 --- a/tests/test_elu.cpp +++ b/tests/test_elu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_embed.cpp b/tests/test_embed.cpp index 9c007ee5d..83d4dd4c4 100644 --- a/tests/test_embed.cpp +++ b/tests/test_embed.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_erf.cpp b/tests/test_erf.cpp index 454d13c1a..7615fca3d 100644 --- a/tests/test_erf.cpp +++ b/tests/test_erf.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_expanddims.cpp b/tests/test_expanddims.cpp index 428656282..24da603e2 100644 --- a/tests/test_expanddims.cpp +++ b/tests/test_expanddims.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_expression.cpp b/tests/test_expression.cpp index 20b93c247..11b0e2003 100644 --- a/tests/test_expression.cpp +++ b/tests/test_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tests/test_flatten.cpp b/tests/test_flatten.cpp index c4fb6e35a..ff21b188e 100644 --- a/tests/test_flatten.cpp +++ b/tests/test_flatten.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_fold.cpp b/tests/test_fold.cpp index cdb6dc88c..dc133793c 100644 --- a/tests/test_fold.cpp +++ b/tests/test_fold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_gelu.cpp b/tests/test_gelu.cpp index 4bcdd6a93..456f89277 100644 --- a/tests/test_gelu.cpp +++ b/tests/test_gelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_gemm.cpp b/tests/test_gemm.cpp index 95f5436f6..abb86ecd7 100644 --- a/tests/test_gemm.cpp +++ b/tests/test_gemm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_gemm_1.cpp b/tests/test_gemm_1.cpp index 7179bf8d2..02e7886e4 100644 --- a/tests/test_gemm_1.cpp +++ b/tests/test_gemm_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_gemm_3.cpp b/tests/test_gemm_3.cpp index 1c3f136d2..56cad810e 100644 --- a/tests/test_gemm_3.cpp +++ b/tests/test_gemm_3.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_gemm_4.cpp b/tests/test_gemm_4.cpp index bde08eecb..911a03bbd 100644 --- a/tests/test_gemm_4.cpp +++ b/tests/test_gemm_4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_glu.cpp b/tests/test_glu.cpp index 3313b4f53..8bd8a7dd0 100644 --- a/tests/test_glu.cpp +++ b/tests/test_glu.cpp @@ -1,14 +1,5 @@ -// Copyright (c) 2022 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_gridsample.cpp b/tests/test_gridsample.cpp index 438b6218d..34a6babdb 100644 --- a/tests/test_gridsample.cpp +++ b/tests/test_gridsample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_groupnorm.cpp b/tests/test_groupnorm.cpp index 6b80c66ef..fea95a59d 100644 --- a/tests/test_groupnorm.cpp +++ b/tests/test_groupnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_gru.cpp b/tests/test_gru.cpp index be9d6f828..7b2fab9dd 100644 --- a/tests/test_gru.cpp +++ b/tests/test_gru.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_hardsigmoid.cpp b/tests/test_hardsigmoid.cpp index d1318ef49..e68d3e607 100644 --- a/tests/test_hardsigmoid.cpp +++ b/tests/test_hardsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_hardswish.cpp b/tests/test_hardswish.cpp index 0f3352652..a4c986d31 100644 --- a/tests/test_hardswish.cpp +++ b/tests/test_hardswish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_innerproduct.cpp b/tests/test_innerproduct.cpp index 298ad6aa0..fb1caaf4e 100644 --- a/tests/test_innerproduct.cpp +++ b/tests/test_innerproduct.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_instancenorm.cpp b/tests/test_instancenorm.cpp index 1c28dc358..04f4ea538 100644 --- a/tests/test_instancenorm.cpp +++ b/tests/test_instancenorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_interp.cpp b/tests/test_interp.cpp index b2c646cf8..140ac162a 100644 --- a/tests/test_interp.cpp +++ b/tests/test_interp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_interp_1.cpp b/tests/test_interp_1.cpp index 16748956e..e8bc4988d 100644 --- a/tests/test_interp_1.cpp +++ b/tests/test_interp_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_inversespectrogram.cpp b/tests/test_inversespectrogram.cpp index 59796efdf..36cc301aa 100644 --- a/tests/test_inversespectrogram.cpp +++ b/tests/test_inversespectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_layernorm.cpp b/tests/test_layernorm.cpp index b6d6684ab..a858744ca 100644 --- a/tests/test_layernorm.cpp +++ b/tests/test_layernorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_lrn.cpp b/tests/test_lrn.cpp index 6fe5d0e6a..51c447b7f 100644 --- a/tests/test_lrn.cpp +++ b/tests/test_lrn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_lstm.cpp b/tests/test_lstm.cpp index 71077f594..662d1cf66 100644 --- a/tests/test_lstm.cpp +++ b/tests/test_lstm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_mat_pixel.cpp b/tests/test_mat_pixel.cpp index 76f0460de..4ceb44b9c 100644 --- a/tests/test_mat_pixel.cpp +++ b/tests/test_mat_pixel.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" #include "prng.h" diff --git a/tests/test_mat_pixel_affine.cpp b/tests/test_mat_pixel_affine.cpp index 94ea366f9..5aa41f93b 100644 --- a/tests/test_mat_pixel_affine.cpp +++ b/tests/test_mat_pixel_affine.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" #include "prng.h" diff --git a/tests/test_mat_pixel_drawing.cpp b/tests/test_mat_pixel_drawing.cpp index 2f68927d6..044ff76e5 100644 --- a/tests/test_mat_pixel_drawing.cpp +++ b/tests/test_mat_pixel_drawing.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" #include "prng.h" diff --git a/tests/test_mat_pixel_resize.cpp b/tests/test_mat_pixel_resize.cpp index 38b8c5ab3..5cf52770d 100644 --- a/tests/test_mat_pixel_resize.cpp +++ b/tests/test_mat_pixel_resize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" #include "prng.h" diff --git a/tests/test_mat_pixel_rotate.cpp b/tests/test_mat_pixel_rotate.cpp index b0ec78d34..3bcfa7676 100644 --- a/tests/test_mat_pixel_rotate.cpp +++ b/tests/test_mat_pixel_rotate.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "mat.h" #include "prng.h" diff --git a/tests/test_matmul.cpp b/tests/test_matmul.cpp index 0ca17d108..48a2a134c 100644 --- a/tests/test_matmul.cpp +++ b/tests/test_matmul.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_memorydata.cpp b/tests/test_memorydata.cpp index ff15fab35..1e18c85b8 100644 --- a/tests/test_memorydata.cpp +++ b/tests/test_memorydata.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_mish.cpp b/tests/test_mish.cpp index 7bf03e19f..76a3e3e7b 100644 --- a/tests/test_mish.cpp +++ b/tests/test_mish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_multiheadattention.cpp b/tests/test_multiheadattention.cpp index 5f110284c..beea30d95 100644 --- a/tests/test_multiheadattention.cpp +++ b/tests/test_multiheadattention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_multiheadattention_1.cpp b/tests/test_multiheadattention_1.cpp index 7039b19cc..2b8da44c2 100644 --- a/tests/test_multiheadattention_1.cpp +++ b/tests/test_multiheadattention_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_multiheadattention_oom.cpp b/tests/test_multiheadattention_oom.cpp index 6b1d6ccbd..86ff50e1c 100644 --- a/tests/test_multiheadattention_oom.cpp +++ b/tests/test_multiheadattention_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_noop.cpp b/tests/test_noop.cpp index 8484a151e..2dfa8bb55 100644 --- a/tests/test_noop.cpp +++ b/tests/test_noop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_normalize.cpp b/tests/test_normalize.cpp index d20d19ef6..0647f8056 100644 --- a/tests/test_normalize.cpp +++ b/tests/test_normalize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_packing.cpp b/tests/test_packing.cpp index a8e5c6c28..9d8e94e27 100644 --- a/tests/test_packing.cpp +++ b/tests/test_packing.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_padding.cpp b/tests/test_padding.cpp index f8018781e..7d28923b9 100644 --- a/tests/test_padding.cpp +++ b/tests/test_padding.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_paramdict.cpp b/tests/test_paramdict.cpp index 01ee07255..8cc5aae6f 100644 --- a/tests/test_paramdict.cpp +++ b/tests/test_paramdict.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include diff --git a/tests/test_permute.cpp b/tests/test_permute.cpp index 2793185c9..160c47bf0 100644 --- a/tests/test_permute.cpp +++ b/tests/test_permute.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_pixelshuffle.cpp b/tests/test_pixelshuffle.cpp index f55c81a9f..5f13130f6 100644 --- a/tests/test_pixelshuffle.cpp +++ b/tests/test_pixelshuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_pooling.cpp b/tests/test_pooling.cpp index 01d85b80e..f7b579e0f 100644 --- a/tests/test_pooling.cpp +++ b/tests/test_pooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_pooling1d.cpp b/tests/test_pooling1d.cpp index b73c4fdb6..3a00f4ee9 100644 --- a/tests/test_pooling1d.cpp +++ b/tests/test_pooling1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_pooling3d.cpp b/tests/test_pooling3d.cpp index 4296bd446..8d8531402 100644 --- a/tests/test_pooling3d.cpp +++ b/tests/test_pooling3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_power.cpp b/tests/test_power.cpp index 550cda42f..40b4877b4 100644 --- a/tests/test_power.cpp +++ b/tests/test_power.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_prelu.cpp b/tests/test_prelu.cpp index 02887de81..f0cd43a9c 100644 --- a/tests/test_prelu.cpp +++ b/tests/test_prelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_priorbox.cpp b/tests/test_priorbox.cpp index ae2243209..08fc5ffa2 100644 --- a/tests/test_priorbox.cpp +++ b/tests/test_priorbox.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_quantize.cpp b/tests/test_quantize.cpp index be137a49f..56c4c5a38 100644 --- a/tests/test_quantize.cpp +++ b/tests/test_quantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_quantize_oom.cpp b/tests/test_quantize_oom.cpp index cc029e0bb..cc94e8d37 100644 --- a/tests/test_quantize_oom.cpp +++ b/tests/test_quantize_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_reduction.cpp b/tests/test_reduction.cpp index a5e5b638d..14e2af424 100644 --- a/tests/test_reduction.cpp +++ b/tests/test_reduction.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_relu.cpp b/tests/test_relu.cpp index 8ecf293ad..3db7305cc 100644 --- a/tests/test_relu.cpp +++ b/tests/test_relu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_reorg.cpp b/tests/test_reorg.cpp index c1c363072..b1f0aa3fd 100644 --- a/tests/test_reorg.cpp +++ b/tests/test_reorg.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_requantize.cpp b/tests/test_requantize.cpp index e9c37d739..ebe03b0b4 100644 --- a/tests/test_requantize.cpp +++ b/tests/test_requantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_requantize_oom.cpp b/tests/test_requantize_oom.cpp index 3b39ba169..37cc8033f 100644 --- a/tests/test_requantize_oom.cpp +++ b/tests/test_requantize_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_reshape.cpp b/tests/test_reshape.cpp index 03906c2ad..f1e5c3431 100644 --- a/tests/test_reshape.cpp +++ b/tests/test_reshape.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_reshape_1.cpp b/tests/test_reshape_1.cpp index 7e0176bac..11e160879 100644 --- a/tests/test_reshape_1.cpp +++ b/tests/test_reshape_1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_reshape_oom.cpp b/tests/test_reshape_oom.cpp index d11e3456c..895a7d5ff 100644 --- a/tests/test_reshape_oom.cpp +++ b/tests/test_reshape_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_rmsnorm.cpp b/tests/test_rmsnorm.cpp index 2d88c162d..f0d6f94a6 100644 --- a/tests/test_rmsnorm.cpp +++ b/tests/test_rmsnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_rnn.cpp b/tests/test_rnn.cpp index a99c78140..f89314597 100644 --- a/tests/test_rnn.cpp +++ b/tests/test_rnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_roialign.cpp b/tests/test_roialign.cpp index 1f7e99230..2d7995250 100644 --- a/tests/test_roialign.cpp +++ b/tests/test_roialign.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "testutil.h" diff --git a/tests/test_roipooling.cpp b/tests/test_roipooling.cpp index 0abab3428..4a1fe3661 100644 --- a/tests/test_roipooling.cpp +++ b/tests/test_roipooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "testutil.h" diff --git a/tests/test_scale.cpp b/tests/test_scale.cpp index 7b0237024..b0f9ab10d 100644 --- a/tests/test_scale.cpp +++ b/tests/test_scale.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_selu.cpp b/tests/test_selu.cpp index ac55c8b42..f4930e453 100644 --- a/tests/test_selu.cpp +++ b/tests/test_selu.cpp @@ -1,16 +1,5 @@ -// Xavier Hsinyuan is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 Xavier Hsinyuan . All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Xavier Hsinyuan +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_shrink.cpp b/tests/test_shrink.cpp index f1e904098..452c153e1 100644 --- a/tests/test_shrink.cpp +++ b/tests/test_shrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_shufflechannel.cpp b/tests/test_shufflechannel.cpp index ea528747d..9b45aa644 100644 --- a/tests/test_shufflechannel.cpp +++ b/tests/test_shufflechannel.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_sigmoid.cpp b/tests/test_sigmoid.cpp index 83e98e89d..7e5e86654 100644 --- a/tests/test_sigmoid.cpp +++ b/tests/test_sigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_slice.cpp b/tests/test_slice.cpp index bbe911359..7b0e03a65 100644 --- a/tests/test_slice.cpp +++ b/tests/test_slice.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_slice_oom.cpp b/tests/test_slice_oom.cpp index cabf56a23..e1dc3e28f 100644 --- a/tests/test_slice_oom.cpp +++ b/tests/test_slice_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_softmax.cpp b/tests/test_softmax.cpp index 5e1babcc4..fef3dce85 100644 --- a/tests/test_softmax.cpp +++ b/tests/test_softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_softmax_oom.cpp b/tests/test_softmax_oom.cpp index 1df68d595..7088c0d49 100644 --- a/tests/test_softmax_oom.cpp +++ b/tests/test_softmax_oom.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_softplus.cpp b/tests/test_softplus.cpp index 1aa6c3aff..44840749d 100644 --- a/tests/test_softplus.cpp +++ b/tests/test_softplus.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_spectrogram.cpp b/tests/test_spectrogram.cpp index b58ddd3cf..6bf8e979f 100644 --- a/tests/test_spectrogram.cpp +++ b/tests/test_spectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_squeeze.cpp b/tests/test_squeeze.cpp index 30df274ab..c06f62208 100644 --- a/tests/test_squeeze.cpp +++ b/tests/test_squeeze.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_squeezenet.cpp b/tests/test_squeezenet.cpp index 4c4485e2c..d2e9afa92 100644 --- a/tests/test_squeezenet.cpp +++ b/tests/test_squeezenet.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "platform.h" #include "net.h" diff --git a/tests/test_swish.cpp b/tests/test_swish.cpp index b67c5d4bd..e153e8701 100644 --- a/tests/test_swish.cpp +++ b/tests/test_swish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_tanh.cpp b/tests/test_tanh.cpp index 141a5cf37..22c399f1f 100644 --- a/tests/test_tanh.cpp +++ b/tests/test_tanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_tile.cpp b/tests/test_tile.cpp index f663f35c8..c72c51a0d 100644 --- a/tests/test_tile.cpp +++ b/tests/test_tile.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_unaryop.cpp b/tests/test_unaryop.cpp index 7c142b8fa..ef4da17de 100644 --- a/tests/test_unaryop.cpp +++ b/tests/test_unaryop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_unfold.cpp b/tests/test_unfold.cpp index 12b4066d3..230069239 100644 --- a/tests/test_unfold.cpp +++ b/tests/test_unfold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/test_yolov3detectionoutput.cpp b/tests/test_yolov3detectionoutput.cpp index c4b1d32b1..0c012adab 100644 --- a/tests/test_yolov3detectionoutput.cpp +++ b/tests/test_yolov3detectionoutput.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/testutil.cpp b/tests/testutil.cpp index db7b4ca8e..0846d25fd 100644 --- a/tests/testutil.cpp +++ b/tests/testutil.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "testutil.h" diff --git a/tests/testutil.h b/tests/testutil.h index 60ff4d652..436c2465a 100644 --- a/tests/testutil.h +++ b/tests/testutil.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef TESTUTIL_H #define TESTUTIL_H diff --git a/toolchains/anykav500.toolchain.cmake b/toolchains/anykav500.toolchain.cmake new file mode 100644 index 000000000..2e6ba33ee --- /dev/null +++ b/toolchains/anykav500.toolchain.cmake @@ -0,0 +1,27 @@ +# set cross-compiled system type, it's better not use the type which cmake cannot recognized. +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR arm) +# when hislicon SDK was installed, toolchain was installed in the path as below: +set(CMAKE_C_COMPILER "arm-anykav500-linux-uclibcgnueabi-gcc") +set(CMAKE_CXX_COMPILER "arm-anykav500-linux-uclibcgnueabi-g++") + +# set searching rules for cross-compiler +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +endif() + +# set ${CMAKE_C_FLAGS} and ${CMAKE_CXX_FLAGS}flag for cross-compiled process +set(CMAKE_CXX_FLAGS "-march=armv7-a -mfloat-abi=softfp -mfpu=neon ${CMAKE_CXX_FLAGS}") + +# cache flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags") diff --git a/toolchains/himix210.toolchain.cmake b/toolchains/himix210.toolchain.cmake new file mode 100644 index 000000000..7c4fff713 --- /dev/null +++ b/toolchains/himix210.toolchain.cmake @@ -0,0 +1,31 @@ +# set cross-compiled system type, it's better not use the type which cmake cannot recognized. +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_PROCESSOR aarch64) +# when hislicon SDK was installed, toolchain was installed in the path as below: +set(CMAKE_C_COMPILER /opt/linux/x86-arm/aarch64-mix210-linux/bin/aarch64-mix210-linux-gcc) +set(CMAKE_CXX_COMPILER /opt/linux/x86-arm/aarch64-mix210-linux/bin/aarch64-mix210-linux-g++) + +# set searching rules for cross-compiler +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +endif() + +# set ${CMAKE_C_FLAGS} and ${CMAKE_CXX_FLAGS}flag for cross-compiled process +set(CROSS_COMPILATION_ARM aarch64-mix210) +set(CROSS_COMPILATION_ARCHITECTURE aarch64) + +# set g++ param +set(CMAKE_CXX_FLAGS "-march=armv8-a ${CMAKE_CXX_FLAGS}") + +# cache flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags") diff --git a/toolchains/k1.llvm.toolchain.cmake b/toolchains/k1.llvm.toolchain.cmake index 514fe3e80..5626ba6f8 100644 --- a/toolchains/k1.llvm.toolchain.cmake +++ b/toolchains/k1.llvm.toolchain.cmake @@ -29,13 +29,12 @@ if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) endif() -set(CMAKE_FIND_LIBRARY_SUFFIXES_INIT ".a") -set(CMAKE_C_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60 -static") -set(CMAKE_CXX_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60 -static") +set(CMAKE_C_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60") +set(CMAKE_CXX_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60") # cache flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags") -# export RISCV_ROOT_PATH=/home/nihui/osd/spacemit-toolchain-linux-glibc-x86_64-v1.0.5 +# export RISCV_ROOT_PATH=/home/nihui/osd/spacemit-toolchain-linux-glibc-x86_64-v1.1.2 # cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/k1.llvm.toolchain.cmake -DCMAKE_BUILD_TYPE=release -DNCNN_BUILD_TESTS=ON -DNCNN_OPENMP=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_RVV=ON -DNCNN_XTHEADVECTOR=OFF -DNCNN_ZFH=ON -DNCNN_ZVFH=ON -DNCNN_SIMPLEOCV=ON -DNCNN_BUILD_EXAMPLES=ON .. diff --git a/toolchains/k1.toolchain.cmake b/toolchains/k1.toolchain.cmake index 5f5260d1e..b45da6c9b 100644 --- a/toolchains/k1.toolchain.cmake +++ b/toolchains/k1.toolchain.cmake @@ -29,13 +29,12 @@ if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) endif() -set(CMAKE_FIND_LIBRARY_SUFFIXES_INIT ".a") -set(CMAKE_C_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60 -static") -set(CMAKE_CXX_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60 -static") +set(CMAKE_C_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60") +set(CMAKE_CXX_FLAGS "-march=rv64gc_zba_zbb_zbc_zbs_zicbop -mabi=lp64d -mtune=spacemit-x60") # cache flags set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags") -# export RISCV_ROOT_PATH=/home/nihui/osd/spacemit-toolchain-linux-glibc-x86_64-v1.0.5 +# export RISCV_ROOT_PATH=/home/nihui/osd/spacemit-toolchain-linux-glibc-x86_64-v1.1.2 # cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/k1.toolchain.cmake -DCMAKE_BUILD_TYPE=release -DNCNN_BUILD_TESTS=ON -DNCNN_OPENMP=ON -DNCNN_RUNTIME_CPU=OFF -DNCNN_RVV=ON -DNCNN_XTHEADVECTOR=OFF -DNCNN_ZFH=ON -DNCNN_ZVFH=ON -DNCNN_SIMPLEOCV=ON -DNCNN_BUILD_EXAMPLES=ON .. diff --git a/toolchains/windows-xp-clang.toolchain.cmake b/toolchains/windows-xp-clang.toolchain.cmake new file mode 100644 index 000000000..c4d339e8e --- /dev/null +++ b/toolchains/windows-xp-clang.toolchain.cmake @@ -0,0 +1,33 @@ +# Windows XP Clang Toolchain +# Supports building ncnn for Windows XP using Clang with MinGW libraries +# Contributors: @Sugar-Baby and @AtomAlpaca + +set(CMAKE_SYSTEM_NAME Windows) + +if(DEFINED ENV{MINGW32_ROOT_PATH}) + file(TO_CMAKE_PATH $ENV{MINGW32_ROOT_PATH} MINGW32_ROOT_PATH) +else() + message(FATAL_ERROR "MINGW32_ROOT_PATH env must be defined") +endif() + +set(CMAKE_C_COMPILER "clang.exe") +set(CMAKE_CXX_COMPILER "clang++.exe") +set(CMAKE_AR "$ENV{MINGW32_ROOT_PATH}/bin/ar.exe" CACHE FILEPATH "Archiver") +set(CMAKE_RANLIB "$ENV{MINGW32_ROOT_PATH}/bin/ranlib.exe" CACHE FILEPATH "Ranlib") + +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --target=i686-pc-windows-gnu -D_WIN32_WINNT=0x0501 -static --sysroot=${MINGW32_ROOT_PATH} -D__STRICT_ANSI__") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --target=i686-pc-windows-gnu -D_WIN32_WINNT=0x0501 -static --sysroot=${MINGW32_ROOT_PATH} -D__STRICT_ANSI__") + +# cache flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags") + +set(STATIC_LINK_FLAGS "-static") + +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${STATIC_LINK_FLAGS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${STATIC_LINK_FLAGS}") \ No newline at end of file diff --git a/toolchains/windows-xp-mingw.toolchain.cmake b/toolchains/windows-xp-mingw.toolchain.cmake new file mode 100644 index 000000000..16aa6a845 --- /dev/null +++ b/toolchains/windows-xp-mingw.toolchain.cmake @@ -0,0 +1,43 @@ +# Windows XP MinGW Toolchain +# Supports building ncnn for Windows XP using MinGW-w64 32-bit toolchain +# Contributors: @Sugar-Baby and @AtomAlpaca + +set(CMAKE_SYSTEM_NAME Windows) + +if(DEFINED ENV{MINGW32_ROOT_PATH}) + file(TO_CMAKE_PATH $ENV{MINGW32_ROOT_PATH} MINGW32_ROOT_PATH) +else() + message(FATAL_ERROR "MINGW32_ROOT_PATH env must be defined") +endif() + +set(MINGW32_ROOT_PATH ${MINGW32_ROOT_PATH} CACHE STRING "root path to mingw toolchain") + +set(CMAKE_C_COMPILER "${MINGW32_ROOT_PATH}/bin/i686-w64-mingw32-gcc.exe") +set(CMAKE_CXX_COMPILER "${MINGW32_ROOT_PATH}/bin/i686-w64-mingw32-g++.exe") + +set(CMAKE_FIND_ROOT_PATH "${MINGW32_ROOT_PATH}/i686-w64-mingw32") + +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PROGRAM) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_LIBRARY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_INCLUDE) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() +if(NOT CMAKE_FIND_ROOT_PATH_MODE_PACKAGE) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) +endif() + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_WIN32_WINNT=0x0501 -march=i686 -static -UMINGW_HAS_SECURE_API") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_WIN32_WINNT=0x0501 -march=i686 -static -UMINGW_HAS_SECURE_API") + +# cache flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags") + +set(STATIC_LINK_FLAGS "-static -fopenmp") + +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${STATIC_LINK_FLAGS}") +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${STATIC_LINK_FLAGS}") \ No newline at end of file diff --git a/toolchains/windows-xp-msvc.toolchain.cmake b/toolchains/windows-xp-msvc.toolchain.cmake new file mode 100644 index 000000000..0de1cea50 --- /dev/null +++ b/toolchains/windows-xp-msvc.toolchain.cmake @@ -0,0 +1,31 @@ +# Windows XP MSVC Toolchain +# Supports Visual Studio 2017 (v141) and later with XP compatibility +# Contributors: @Sugar-Baby and @AtomAlpaca + +set(CMAKE_SYSTEM_NAME Windows) +set(CMAKE_SYSTEM_VERSION 5.1) +set(CMAKE_C_COMPILER cl) +set(CMAKE_CXX_COMPILER cl) +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /EHsc") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_WIN32_WINNT=0x0501 /DWINVER=0x0501 /EHsc") +set(CMAKE_GENERATOR_TOOLSET "v141_xp" CACHE STRING "Platform Toolset" FORCE) + +# Disabling AVX will automatically disable newer instruction sets (AVX2, AVX512, etc.) +set(NCNN_VULKAN OFF CACHE BOOL "Disable Vulkan for Windows XP" FORCE) +set(CMAKE_GENERATOR_PLATFORM "Win32" CACHE STRING "Platform" FORCE) +set(NCNN_SIMPLEOCV ON CACHE BOOL "Use simple OpenCV implementation" FORCE) + +# cache flags +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c flags") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" CACHE STRING "c++ flags") + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) +set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) + +message(STATUS "Windows XP MSVC Toolchain configured") +message(STATUS " Platform Toolset: ${CMAKE_GENERATOR_TOOLSET}") +message(STATUS " Platform: ${CMAKE_GENERATOR_PLATFORM}") +message(STATUS " Runtime Library: ${CMAKE_MSVC_RUNTIME_LIBRARY}") +message(STATUS " Vulkan: ${NCNN_VULKAN}") +message(STATUS " Build Type: ${CMAKE_BUILD_TYPE}") \ No newline at end of file diff --git a/tools/caffe/caffe2ncnn.cpp b/tools/caffe/caffe2ncnn.cpp index 5318ef679..a3020c511 100644 --- a/tools/caffe/caffe2ncnn.cpp +++ b/tools/caffe/caffe2ncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifdef _MSC_VER #define _CRT_SECURE_NO_DEPRECATE diff --git a/tools/darknet/darknet2ncnn.cpp b/tools/darknet/darknet2ncnn.cpp index 888baaf22..c99e31e75 100644 --- a/tools/darknet/darknet2ncnn.cpp +++ b/tools/darknet/darknet2ncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tools/mlir/mlir2ncnn.cpp b/tools/mlir/mlir2ncnn.cpp index 220389585..52d636ebb 100644 --- a/tools/mlir/mlir2ncnn.cpp +++ b/tools/mlir/mlir2ncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include diff --git a/tools/mlir/ncnn_dialect.cpp b/tools/mlir/ncnn_dialect.cpp index 915d622fd..c4b7cbc9d 100644 --- a/tools/mlir/ncnn_dialect.cpp +++ b/tools/mlir/ncnn_dialect.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ncnn_dialect.h" diff --git a/tools/mlir/ncnn_dialect.h b/tools/mlir/ncnn_dialect.h index bcb070015..7a6cb3c6e 100644 --- a/tools/mlir/ncnn_dialect.h +++ b/tools/mlir/ncnn_dialect.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_DIALECT_H #define NCNN_DIALECT_H diff --git a/tools/mlir/ncnn_ops.td b/tools/mlir/ncnn_ops.td index 9560c2600..930285907 100644 --- a/tools/mlir/ncnn_ops.td +++ b/tools/mlir/ncnn_ops.td @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_OPS_TD #define NCNN_OPS_TD diff --git a/tools/mlir/ncnn_rewriter.cpp b/tools/mlir/ncnn_rewriter.cpp index 746bfb144..50276c8ef 100644 --- a/tools/mlir/ncnn_rewriter.cpp +++ b/tools/mlir/ncnn_rewriter.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tools/mlir/ncnn_rewriter.td b/tools/mlir/ncnn_rewriter.td index aa574c0c5..2953c1960 100644 --- a/tools/mlir/ncnn_rewriter.td +++ b/tools/mlir/ncnn_rewriter.td @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef NCNN_REWRITER_TD #define NCNN_REWRITER_TD diff --git a/tools/mlir/tf_dialect.cpp b/tools/mlir/tf_dialect.cpp index ce48fb2b9..dbc29dd0a 100644 --- a/tools/mlir/tf_dialect.cpp +++ b/tools/mlir/tf_dialect.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "tf_dialect.h" diff --git a/tools/mlir/tf_dialect.h b/tools/mlir/tf_dialect.h index 19a8c9360..3078c1f7c 100644 --- a/tools/mlir/tf_dialect.h +++ b/tools/mlir/tf_dialect.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef TF_DIALECT_H #define TF_DIALECT_H diff --git a/tools/modelwriter.h b/tools/modelwriter.h index bc345f9bc..b4fe61f40 100644 --- a/tools/modelwriter.h +++ b/tools/modelwriter.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifdef _MSC_VER #define _CRT_SECURE_NO_DEPRECATE diff --git a/tools/mxnet/mxnet2ncnn.cpp b/tools/mxnet/mxnet2ncnn.cpp index 4e0c6716e..5f8018fa6 100644 --- a/tools/mxnet/mxnet2ncnn.cpp +++ b/tools/mxnet/mxnet2ncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tools/ncnn2mem.cpp b/tools/ncnn2mem.cpp index 200abc5be..e27b344e9 100644 --- a/tools/ncnn2mem.cpp +++ b/tools/ncnn2mem.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "layer.h" #include "layer_type.h" diff --git a/tools/ncnnmerge.cpp b/tools/ncnnmerge.cpp index df8132286..c2df3dda9 100644 --- a/tools/ncnnmerge.cpp +++ b/tools/ncnnmerge.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2020 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tools/ncnnoptimize.cpp b/tools/ncnnoptimize.cpp index 6ba88e6b2..f4f1110cb 100644 --- a/tools/ncnnoptimize.cpp +++ b/tools/ncnnoptimize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifdef _MSC_VER #define _CRT_SECURE_NO_DEPRECATE diff --git a/tools/onnx/onnx2ncnn.cpp b/tools/onnx/onnx2ncnn.cpp index 1b29e34c1..502363562 100644 --- a/tools/onnx/onnx2ncnn.cpp +++ b/tools/onnx/onnx2ncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx.pb.h" diff --git a/tools/pnnx/python/examples/convert.py b/tools/pnnx/python/examples/convert.py index ab695186b..1ac1d8547 100644 --- a/tools/pnnx/python/examples/convert.py +++ b/tools/pnnx/python/examples/convert.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pnnx diff --git a/tools/pnnx/python/examples/export.py b/tools/pnnx/python/examples/export.py index c31d9046c..6592c8e19 100644 --- a/tools/pnnx/python/examples/export.py +++ b/tools/pnnx/python/examples/export.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pnnx diff --git a/tools/pnnx/python/pnnx/__init__.py b/tools/pnnx/python/pnnx/__init__.py index e33f5c55a..c63ee244b 100644 --- a/tools/pnnx/python/pnnx/__init__.py +++ b/tools/pnnx/python/pnnx/__init__.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import os import sys diff --git a/tools/pnnx/python/pnnx/utils/__init__.py b/tools/pnnx/python/pnnx/utils/__init__.py index e83f4bc37..62f468b08 100644 --- a/tools/pnnx/python/pnnx/utils/__init__.py +++ b/tools/pnnx/python/pnnx/utils/__init__.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause from .export import export from .convert import convert \ No newline at end of file diff --git a/tools/pnnx/python/pnnx/utils/convert.py b/tools/pnnx/python/pnnx/utils/convert.py index 6e5f78cc6..3f44344ff 100644 --- a/tools/pnnx/python/pnnx/utils/convert.py +++ b/tools/pnnx/python/pnnx/utils/convert.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import os diff --git a/tools/pnnx/python/pnnx/utils/export.py b/tools/pnnx/python/pnnx/utils/export.py index 6e24954ef..ca3897051 100644 --- a/tools/pnnx/python/pnnx/utils/export.py +++ b/tools/pnnx/python/pnnx/utils/export.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import os diff --git a/tools/pnnx/python/pnnx/utils/utils.py b/tools/pnnx/python/pnnx/utils/utils.py index 73dffd9ee..65c52fde7 100644 --- a/tools/pnnx/python/pnnx/utils/utils.py +++ b/tools/pnnx/python/pnnx/utils/utils.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch diff --git a/tools/pnnx/python/tests/test_convert.py b/tools/pnnx/python/tests/test_convert.py index a1a6cc928..29bbec388 100644 --- a/tools/pnnx/python/tests/test_convert.py +++ b/tools/pnnx/python/tests/test_convert.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest import pnnx diff --git a/tools/pnnx/python/tests/test_dynamicinput_convert.py b/tools/pnnx/python/tests/test_dynamicinput_convert.py index 9aeaedb97..35faf06e9 100644 --- a/tools/pnnx/python/tests/test_dynamicinput_convert.py +++ b/tools/pnnx/python/tests/test_dynamicinput_convert.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest import pnnx diff --git a/tools/pnnx/python/tests/test_dynamicinput_export.py b/tools/pnnx/python/tests/test_dynamicinput_export.py index baac509fd..85797c0ef 100644 --- a/tools/pnnx/python/tests/test_dynamicinput_export.py +++ b/tools/pnnx/python/tests/test_dynamicinput_export.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest import pnnx diff --git a/tools/pnnx/python/tests/test_export.py b/tools/pnnx/python/tests/test_export.py index 3797c2219..a3855c275 100644 --- a/tools/pnnx/python/tests/test_export.py +++ b/tools/pnnx/python/tests/test_export.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2020 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2020 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest import pnnx diff --git a/tools/pnnx/python/tests/test_naiveinput_convert.py b/tools/pnnx/python/tests/test_naiveinput_convert.py index e13504d87..455c79540 100644 --- a/tools/pnnx/python/tests/test_naiveinput_convert.py +++ b/tools/pnnx/python/tests/test_naiveinput_convert.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest import pnnx diff --git a/tools/pnnx/python/tests/test_naiveinput_export.py b/tools/pnnx/python/tests/test_naiveinput_export.py index aec357596..09ff026b3 100644 --- a/tools/pnnx/python/tests/test_naiveinput_export.py +++ b/tools/pnnx/python/tests/test_naiveinput_export.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import pytest import pnnx diff --git a/tools/pnnx/src/ir.cpp b/tools/pnnx/src/ir.cpp index 63d4b93cf..014bc057f 100644 --- a/tools/pnnx/src/ir.cpp +++ b/tools/pnnx/src/ir.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/ir.h b/tools/pnnx/src/ir.h index 638c12f80..f50fed155 100644 --- a/tools/pnnx/src/ir.h +++ b/tools/pnnx/src/ir.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_IR_H #define PNNX_IR_H diff --git a/tools/pnnx/src/load_onnx.cpp b/tools/pnnx/src/load_onnx.cpp index e39c20296..642b1522b 100644 --- a/tools/pnnx/src/load_onnx.cpp +++ b/tools/pnnx/src/load_onnx.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "load_onnx.h" diff --git a/tools/pnnx/src/load_onnx.h b/tools/pnnx/src/load_onnx.h index 2fdf6acd9..4f0cfa4d5 100644 --- a/tools/pnnx/src/load_onnx.h +++ b/tools/pnnx/src/load_onnx.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_LOAD_ONNX_H #define PNNX_LOAD_ONNX_H diff --git a/tools/pnnx/src/load_tnn.cpp b/tools/pnnx/src/load_tnn.cpp index 2e0d8bb68..fbee94479 100644 --- a/tools/pnnx/src/load_tnn.cpp +++ b/tools/pnnx/src/load_tnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "load_tnn.h" diff --git a/tools/pnnx/src/load_tnn.h b/tools/pnnx/src/load_tnn.h index 6b7075e85..ca5e596ab 100644 --- a/tools/pnnx/src/load_tnn.h +++ b/tools/pnnx/src/load_tnn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_LOAD_TNN_H #define PNNX_LOAD_TNN_H diff --git a/tools/pnnx/src/load_torchscript.cpp b/tools/pnnx/src/load_torchscript.cpp index cb78b3b8a..01fa3937a 100644 --- a/tools/pnnx/src/load_torchscript.cpp +++ b/tools/pnnx/src/load_torchscript.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "load_torchscript.h" diff --git a/tools/pnnx/src/load_torchscript.h b/tools/pnnx/src/load_torchscript.h index 31a8a4217..a973441a4 100644 --- a/tools/pnnx/src/load_torchscript.h +++ b/tools/pnnx/src/load_torchscript.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_LOAD_TORCHSCRIPT_H #define PNNX_LOAD_TORCHSCRIPT_H diff --git a/tools/pnnx/src/main.cpp b/tools/pnnx/src/main.cpp index c737da8d3..cc1aa93ea 100644 --- a/tools/pnnx/src/main.cpp +++ b/tools/pnnx/src/main.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tools/pnnx/src/pass_level0.cpp b/tools/pnnx/src/pass_level0.cpp index 2a1e47276..22311c32d 100644 --- a/tools/pnnx/src/pass_level0.cpp +++ b/tools/pnnx/src/pass_level0.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level0.h" diff --git a/tools/pnnx/src/pass_level0.h b/tools/pnnx/src/pass_level0.h index 783a8522d..c3e38a0f8 100644 --- a/tools/pnnx/src/pass_level0.h +++ b/tools/pnnx/src/pass_level0.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_LEVEL0_H #define PNNX_PASS_LEVEL0_H diff --git a/tools/pnnx/src/pass_level0/constant_unpooling.cpp b/tools/pnnx/src/pass_level0/constant_unpooling.cpp index 036196e01..b9c6e92cc 100644 --- a/tools/pnnx/src/pass_level0/constant_unpooling.cpp +++ b/tools/pnnx/src/pass_level0/constant_unpooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "constant_unpooling.h" diff --git a/tools/pnnx/src/pass_level0/constant_unpooling.h b/tools/pnnx/src/pass_level0/constant_unpooling.h index e6b8ec869..7ec3a7cec 100644 --- a/tools/pnnx/src/pass_level0/constant_unpooling.h +++ b/tools/pnnx/src/pass_level0/constant_unpooling.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include diff --git a/tools/pnnx/src/pass_level0/convert_half_to_float.cpp b/tools/pnnx/src/pass_level0/convert_half_to_float.cpp index d3de023a7..3b0d02cd4 100644 --- a/tools/pnnx/src/pass_level0/convert_half_to_float.cpp +++ b/tools/pnnx/src/pass_level0/convert_half_to_float.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_half_to_float.h" diff --git a/tools/pnnx/src/pass_level0/convert_half_to_float.h b/tools/pnnx/src/pass_level0/convert_half_to_float.h index 9eef6d1d1..c5d1f1ea4 100644 --- a/tools/pnnx/src/pass_level0/convert_half_to_float.h +++ b/tools/pnnx/src/pass_level0/convert_half_to_float.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include diff --git a/tools/pnnx/src/pass_level0/flatten_input.cpp b/tools/pnnx/src/pass_level0/flatten_input.cpp index 67b06f1d8..343a98738 100644 --- a/tools/pnnx/src/pass_level0/flatten_input.cpp +++ b/tools/pnnx/src/pass_level0/flatten_input.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "flatten_input.h" diff --git a/tools/pnnx/src/pass_level0/flatten_input.h b/tools/pnnx/src/pass_level0/flatten_input.h index e75158108..c6e5ee71f 100644 --- a/tools/pnnx/src/pass_level0/flatten_input.h +++ b/tools/pnnx/src/pass_level0/flatten_input.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include diff --git a/tools/pnnx/src/pass_level0/inline_block.cpp b/tools/pnnx/src/pass_level0/inline_block.cpp index e181c4a1f..017464032 100644 --- a/tools/pnnx/src/pass_level0/inline_block.cpp +++ b/tools/pnnx/src/pass_level0/inline_block.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "inline_block.h" #include "../pass_level1/fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level0/inline_block.h b/tools/pnnx/src/pass_level0/inline_block.h index 40f6a23f5..f8cb67eb3 100644 --- a/tools/pnnx/src/pass_level0/inline_block.h +++ b/tools/pnnx/src/pass_level0/inline_block.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include diff --git a/tools/pnnx/src/pass_level0/reset_device.cpp b/tools/pnnx/src/pass_level0/reset_device.cpp index 008228239..5d0144edc 100644 --- a/tools/pnnx/src/pass_level0/reset_device.cpp +++ b/tools/pnnx/src/pass_level0/reset_device.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "reset_device.h" diff --git a/tools/pnnx/src/pass_level0/reset_device.h b/tools/pnnx/src/pass_level0/reset_device.h index 17d8f9399..57961511b 100644 --- a/tools/pnnx/src/pass_level0/reset_device.h +++ b/tools/pnnx/src/pass_level0/reset_device.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include diff --git a/tools/pnnx/src/pass_level0/shape_inference.cpp b/tools/pnnx/src/pass_level0/shape_inference.cpp index 5865390bd..5539b205d 100644 --- a/tools/pnnx/src/pass_level0/shape_inference.cpp +++ b/tools/pnnx/src/pass_level0/shape_inference.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "shape_inference.h" #include diff --git a/tools/pnnx/src/pass_level0/shape_inference.h b/tools/pnnx/src/pass_level0/shape_inference.h index feabfffe6..de1c3021d 100644 --- a/tools/pnnx/src/pass_level0/shape_inference.h +++ b/tools/pnnx/src/pass_level0/shape_inference.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tools/pnnx/src/pass_level1.cpp b/tools/pnnx/src/pass_level1.cpp index 0696149c5..26aa3f6cd 100644 --- a/tools/pnnx/src/pass_level1.cpp +++ b/tools/pnnx/src/pass_level1.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include #include diff --git a/tools/pnnx/src/pass_level1.h b/tools/pnnx/src/pass_level1.h index 13daca961..f2bc2b38f 100644 --- a/tools/pnnx/src/pass_level1.h +++ b/tools/pnnx/src/pass_level1.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_LEVEL1_H #define PNNX_PASS_LEVEL1_H diff --git a/tools/pnnx/src/pass_level1/fuse_module_pass.cpp b/tools/pnnx/src/pass_level1/fuse_module_pass.cpp index 007a900aa..456b51b32 100644 --- a/tools/pnnx/src/pass_level1/fuse_module_pass.cpp +++ b/tools/pnnx/src/pass_level1/fuse_module_pass.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/fuse_module_pass.h b/tools/pnnx/src/pass_level1/fuse_module_pass.h index 68ae8179b..13a35b3ab 100644 --- a/tools/pnnx/src/pass_level1/fuse_module_pass.h +++ b/tools/pnnx/src/pass_level1/fuse_module_pass.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_FUSE_MODULE_PASS_H #define PNNX_FUSE_MODULE_PASS_H diff --git a/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool1d.cpp b/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool1d.cpp index b13150f51..04cc90e19 100644 --- a/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool2d.cpp b/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool2d.cpp index 57d239ca0..5dcaf1962 100644 --- a/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool3d.cpp b/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool3d.cpp index 153ea3f17..dce2ca9bc 100644 --- a/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AdaptiveAvgPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool1d.cpp b/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool1d.cpp index 2019555ae..815a0f565 100644 --- a/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool2d.cpp b/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool2d.cpp index 98d00d8e0..d81d42699 100644 --- a/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool3d.cpp b/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool3d.cpp index 0acb1287a..6e209e508 100644 --- a/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AdaptiveMaxPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AlphaDropout.cpp b/tools/pnnx/src/pass_level1/nn_AlphaDropout.cpp index 191842abf..f96dacc31 100644 --- a/tools/pnnx/src/pass_level1/nn_AlphaDropout.cpp +++ b/tools/pnnx/src/pass_level1/nn_AlphaDropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AvgPool1d.cpp b/tools/pnnx/src/pass_level1/nn_AvgPool1d.cpp index 0efb54d63..fff698583 100644 --- a/tools/pnnx/src/pass_level1/nn_AvgPool1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AvgPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AvgPool2d.cpp b/tools/pnnx/src/pass_level1/nn_AvgPool2d.cpp index 594627045..bf9bae3d6 100644 --- a/tools/pnnx/src/pass_level1/nn_AvgPool2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AvgPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_AvgPool3d.cpp b/tools/pnnx/src/pass_level1/nn_AvgPool3d.cpp index 49958ee49..c32805c5e 100644 --- a/tools/pnnx/src/pass_level1/nn_AvgPool3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_AvgPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_BatchNorm1d.cpp b/tools/pnnx/src/pass_level1/nn_BatchNorm1d.cpp index 1d70abd1a..513ef5101 100644 --- a/tools/pnnx/src/pass_level1/nn_BatchNorm1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_BatchNorm1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_BatchNorm2d.cpp b/tools/pnnx/src/pass_level1/nn_BatchNorm2d.cpp index b8b85a433..20d61244b 100644 --- a/tools/pnnx/src/pass_level1/nn_BatchNorm2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_BatchNorm2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_BatchNorm3d.cpp b/tools/pnnx/src/pass_level1/nn_BatchNorm3d.cpp index 93e47326a..d6290177d 100644 --- a/tools/pnnx/src/pass_level1/nn_BatchNorm3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_BatchNorm3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_CELU.cpp b/tools/pnnx/src/pass_level1/nn_CELU.cpp index 1c9292ba2..27580ecc5 100644 --- a/tools/pnnx/src/pass_level1/nn_CELU.cpp +++ b/tools/pnnx/src/pass_level1/nn_CELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ChannelShuffle.cpp b/tools/pnnx/src/pass_level1/nn_ChannelShuffle.cpp index f46548397..ee9944c95 100644 --- a/tools/pnnx/src/pass_level1/nn_ChannelShuffle.cpp +++ b/tools/pnnx/src/pass_level1/nn_ChannelShuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ConstantPad1d.cpp b/tools/pnnx/src/pass_level1/nn_ConstantPad1d.cpp index c0130b944..019feaecf 100644 --- a/tools/pnnx/src/pass_level1/nn_ConstantPad1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ConstantPad1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ConstantPad2d.cpp b/tools/pnnx/src/pass_level1/nn_ConstantPad2d.cpp index 2fd748692..44fff9e54 100644 --- a/tools/pnnx/src/pass_level1/nn_ConstantPad2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ConstantPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ConstantPad3d.cpp b/tools/pnnx/src/pass_level1/nn_ConstantPad3d.cpp index 573839c38..2c02afcb1 100644 --- a/tools/pnnx/src/pass_level1/nn_ConstantPad3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ConstantPad3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Conv1d.cpp b/tools/pnnx/src/pass_level1/nn_Conv1d.cpp index df3727f17..0fa8dd13d 100644 --- a/tools/pnnx/src/pass_level1/nn_Conv1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_Conv1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Conv2d.cpp b/tools/pnnx/src/pass_level1/nn_Conv2d.cpp index 4a9f968e9..08b687832 100644 --- a/tools/pnnx/src/pass_level1/nn_Conv2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_Conv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Conv3d.cpp b/tools/pnnx/src/pass_level1/nn_Conv3d.cpp index 8e4472433..96965a850 100644 --- a/tools/pnnx/src/pass_level1/nn_Conv3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_Conv3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ConvTranspose1d.cpp b/tools/pnnx/src/pass_level1/nn_ConvTranspose1d.cpp index 35a06bb86..c124fa9cd 100644 --- a/tools/pnnx/src/pass_level1/nn_ConvTranspose1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ConvTranspose1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ConvTranspose2d.cpp b/tools/pnnx/src/pass_level1/nn_ConvTranspose2d.cpp index c47d19710..50104b8f8 100644 --- a/tools/pnnx/src/pass_level1/nn_ConvTranspose2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ConvTranspose2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ConvTranspose3d.cpp b/tools/pnnx/src/pass_level1/nn_ConvTranspose3d.cpp index d762bbd89..e4382a626 100644 --- a/tools/pnnx/src/pass_level1/nn_ConvTranspose3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ConvTranspose3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Dropout.cpp b/tools/pnnx/src/pass_level1/nn_Dropout.cpp index 4302b8677..8c3884604 100644 --- a/tools/pnnx/src/pass_level1/nn_Dropout.cpp +++ b/tools/pnnx/src/pass_level1/nn_Dropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Dropout2d.cpp b/tools/pnnx/src/pass_level1/nn_Dropout2d.cpp index c3c470871..2722a75f1 100644 --- a/tools/pnnx/src/pass_level1/nn_Dropout2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_Dropout2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Dropout3d.cpp b/tools/pnnx/src/pass_level1/nn_Dropout3d.cpp index 44793afa3..935f1ff4e 100644 --- a/tools/pnnx/src/pass_level1/nn_Dropout3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_Dropout3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ELU.cpp b/tools/pnnx/src/pass_level1/nn_ELU.cpp index 1a77339e2..39270f637 100644 --- a/tools/pnnx/src/pass_level1/nn_ELU.cpp +++ b/tools/pnnx/src/pass_level1/nn_ELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Embedding.cpp b/tools/pnnx/src/pass_level1/nn_Embedding.cpp index 2c6cd24ee..d36a4712f 100644 --- a/tools/pnnx/src/pass_level1/nn_Embedding.cpp +++ b/tools/pnnx/src/pass_level1/nn_Embedding.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Fold.cpp b/tools/pnnx/src/pass_level1/nn_Fold.cpp index ab1cf85ce..bacdc22fe 100644 --- a/tools/pnnx/src/pass_level1/nn_Fold.cpp +++ b/tools/pnnx/src/pass_level1/nn_Fold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_GELU.cpp b/tools/pnnx/src/pass_level1/nn_GELU.cpp index 789863d50..99ef76f18 100644 --- a/tools/pnnx/src/pass_level1/nn_GELU.cpp +++ b/tools/pnnx/src/pass_level1/nn_GELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_GLU.cpp b/tools/pnnx/src/pass_level1/nn_GLU.cpp index 3739f1621..12a5a6ad8 100644 --- a/tools/pnnx/src/pass_level1/nn_GLU.cpp +++ b/tools/pnnx/src/pass_level1/nn_GLU.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// 2022 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_GRU.cpp b/tools/pnnx/src/pass_level1/nn_GRU.cpp index 6ac4f213a..65571aff1 100644 --- a/tools/pnnx/src/pass_level1/nn_GRU.cpp +++ b/tools/pnnx/src/pass_level1/nn_GRU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_GroupNorm.cpp b/tools/pnnx/src/pass_level1/nn_GroupNorm.cpp index 063f729f4..275f74761 100644 --- a/tools/pnnx/src/pass_level1/nn_GroupNorm.cpp +++ b/tools/pnnx/src/pass_level1/nn_GroupNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Hardshrink.cpp b/tools/pnnx/src/pass_level1/nn_Hardshrink.cpp index 0ef45be02..5b5b60652 100644 --- a/tools/pnnx/src/pass_level1/nn_Hardshrink.cpp +++ b/tools/pnnx/src/pass_level1/nn_Hardshrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Hardsigmoid.cpp b/tools/pnnx/src/pass_level1/nn_Hardsigmoid.cpp index c4827495f..a041a94c0 100644 --- a/tools/pnnx/src/pass_level1/nn_Hardsigmoid.cpp +++ b/tools/pnnx/src/pass_level1/nn_Hardsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Hardswish.cpp b/tools/pnnx/src/pass_level1/nn_Hardswish.cpp index 940ff2cfb..26e088f9f 100644 --- a/tools/pnnx/src/pass_level1/nn_Hardswish.cpp +++ b/tools/pnnx/src/pass_level1/nn_Hardswish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Hardtanh.cpp b/tools/pnnx/src/pass_level1/nn_Hardtanh.cpp index fac05a575..471c2fd01 100644 --- a/tools/pnnx/src/pass_level1/nn_Hardtanh.cpp +++ b/tools/pnnx/src/pass_level1/nn_Hardtanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_InstanceNorm1d.cpp b/tools/pnnx/src/pass_level1/nn_InstanceNorm1d.cpp index 9dfabf5e5..c6a34f2bc 100644 --- a/tools/pnnx/src/pass_level1/nn_InstanceNorm1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_InstanceNorm1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_InstanceNorm2d.cpp b/tools/pnnx/src/pass_level1/nn_InstanceNorm2d.cpp index ab1f69e79..9d74a41f0 100644 --- a/tools/pnnx/src/pass_level1/nn_InstanceNorm2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_InstanceNorm2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_InstanceNorm3d.cpp b/tools/pnnx/src/pass_level1/nn_InstanceNorm3d.cpp index 08b06ac8a..aa7bccbd4 100644 --- a/tools/pnnx/src/pass_level1/nn_InstanceNorm3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_InstanceNorm3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LPPool1d.cpp b/tools/pnnx/src/pass_level1/nn_LPPool1d.cpp index 0993bedb6..b1aae6b39 100644 --- a/tools/pnnx/src/pass_level1/nn_LPPool1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_LPPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LPPool2d.cpp b/tools/pnnx/src/pass_level1/nn_LPPool2d.cpp index 702e4c875..d562748f8 100644 --- a/tools/pnnx/src/pass_level1/nn_LPPool2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_LPPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LSTM.cpp b/tools/pnnx/src/pass_level1/nn_LSTM.cpp index 44b24b145..64d4ad9ef 100644 --- a/tools/pnnx/src/pass_level1/nn_LSTM.cpp +++ b/tools/pnnx/src/pass_level1/nn_LSTM.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LayerNorm.cpp b/tools/pnnx/src/pass_level1/nn_LayerNorm.cpp index 51ce1c73c..3ab503137 100644 --- a/tools/pnnx/src/pass_level1/nn_LayerNorm.cpp +++ b/tools/pnnx/src/pass_level1/nn_LayerNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LeakyReLU.cpp b/tools/pnnx/src/pass_level1/nn_LeakyReLU.cpp index 161299a09..446154ae7 100644 --- a/tools/pnnx/src/pass_level1/nn_LeakyReLU.cpp +++ b/tools/pnnx/src/pass_level1/nn_LeakyReLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Linear.cpp b/tools/pnnx/src/pass_level1/nn_Linear.cpp index ce4c9f5cf..2aa7b4400 100644 --- a/tools/pnnx/src/pass_level1/nn_Linear.cpp +++ b/tools/pnnx/src/pass_level1/nn_Linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LocalResponseNorm.cpp b/tools/pnnx/src/pass_level1/nn_LocalResponseNorm.cpp index e119cce84..231bc0038 100644 --- a/tools/pnnx/src/pass_level1/nn_LocalResponseNorm.cpp +++ b/tools/pnnx/src/pass_level1/nn_LocalResponseNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LogSigmoid.cpp b/tools/pnnx/src/pass_level1/nn_LogSigmoid.cpp index 949bd3579..ceccbbf6a 100644 --- a/tools/pnnx/src/pass_level1/nn_LogSigmoid.cpp +++ b/tools/pnnx/src/pass_level1/nn_LogSigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_LogSoftmax.cpp b/tools/pnnx/src/pass_level1/nn_LogSoftmax.cpp index de696d1d5..b9d641217 100644 --- a/tools/pnnx/src/pass_level1/nn_LogSoftmax.cpp +++ b/tools/pnnx/src/pass_level1/nn_LogSoftmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_MaxPool1d.cpp b/tools/pnnx/src/pass_level1/nn_MaxPool1d.cpp index 18b619d52..57d4223d7 100644 --- a/tools/pnnx/src/pass_level1/nn_MaxPool1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_MaxPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_MaxPool2d.cpp b/tools/pnnx/src/pass_level1/nn_MaxPool2d.cpp index 5cdc45fc9..1add13321 100644 --- a/tools/pnnx/src/pass_level1/nn_MaxPool2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_MaxPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_MaxPool3d.cpp b/tools/pnnx/src/pass_level1/nn_MaxPool3d.cpp index 46e845c76..225f0eba2 100644 --- a/tools/pnnx/src/pass_level1/nn_MaxPool3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_MaxPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Mish.cpp b/tools/pnnx/src/pass_level1/nn_Mish.cpp index 837bbc258..e107a4412 100644 --- a/tools/pnnx/src/pass_level1/nn_Mish.cpp +++ b/tools/pnnx/src/pass_level1/nn_Mish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_MultiheadAttention.cpp b/tools/pnnx/src/pass_level1/nn_MultiheadAttention.cpp index 6a0ca41e0..1a5176e6b 100644 --- a/tools/pnnx/src/pass_level1/nn_MultiheadAttention.cpp +++ b/tools/pnnx/src/pass_level1/nn_MultiheadAttention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause // #include "pass_level1.h" // diff --git a/tools/pnnx/src/pass_level1/nn_PReLU.cpp b/tools/pnnx/src/pass_level1/nn_PReLU.cpp index 7ae2f7b8c..d59489fb2 100644 --- a/tools/pnnx/src/pass_level1/nn_PReLU.cpp +++ b/tools/pnnx/src/pass_level1/nn_PReLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_PixelShuffle.cpp b/tools/pnnx/src/pass_level1/nn_PixelShuffle.cpp index 2f58e85bf..9f77e402c 100644 --- a/tools/pnnx/src/pass_level1/nn_PixelShuffle.cpp +++ b/tools/pnnx/src/pass_level1/nn_PixelShuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_PixelUnshuffle.cpp b/tools/pnnx/src/pass_level1/nn_PixelUnshuffle.cpp index fedcefa8b..7693880e1 100644 --- a/tools/pnnx/src/pass_level1/nn_PixelUnshuffle.cpp +++ b/tools/pnnx/src/pass_level1/nn_PixelUnshuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_RMSNorm.cpp b/tools/pnnx/src/pass_level1/nn_RMSNorm.cpp index e564ec4b7..577b78160 100644 --- a/tools/pnnx/src/pass_level1/nn_RMSNorm.cpp +++ b/tools/pnnx/src/pass_level1/nn_RMSNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_RNN.cpp b/tools/pnnx/src/pass_level1/nn_RNN.cpp index a13abd496..f27ed7f61 100644 --- a/tools/pnnx/src/pass_level1/nn_RNN.cpp +++ b/tools/pnnx/src/pass_level1/nn_RNN.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_RReLU.cpp b/tools/pnnx/src/pass_level1/nn_RReLU.cpp index 35f4c240d..ce47da47d 100644 --- a/tools/pnnx/src/pass_level1/nn_RReLU.cpp +++ b/tools/pnnx/src/pass_level1/nn_RReLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ReLU.cpp b/tools/pnnx/src/pass_level1/nn_ReLU.cpp index fbd45a8fc..a3860baae 100644 --- a/tools/pnnx/src/pass_level1/nn_ReLU.cpp +++ b/tools/pnnx/src/pass_level1/nn_ReLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ReLU6.cpp b/tools/pnnx/src/pass_level1/nn_ReLU6.cpp index 5616ee413..65cc70723 100644 --- a/tools/pnnx/src/pass_level1/nn_ReLU6.cpp +++ b/tools/pnnx/src/pass_level1/nn_ReLU6.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ReflectionPad1d.cpp b/tools/pnnx/src/pass_level1/nn_ReflectionPad1d.cpp index dae365c23..2c7b44466 100644 --- a/tools/pnnx/src/pass_level1/nn_ReflectionPad1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ReflectionPad1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ReflectionPad2d.cpp b/tools/pnnx/src/pass_level1/nn_ReflectionPad2d.cpp index efa71a6bb..df2a11a49 100644 --- a/tools/pnnx/src/pass_level1/nn_ReflectionPad2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ReflectionPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ReplicationPad1d.cpp b/tools/pnnx/src/pass_level1/nn_ReplicationPad1d.cpp index 99c6d3fce..567c68ce2 100644 --- a/tools/pnnx/src/pass_level1/nn_ReplicationPad1d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ReplicationPad1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ReplicationPad2d.cpp b/tools/pnnx/src/pass_level1/nn_ReplicationPad2d.cpp index f977b5e90..399bc3dde 100644 --- a/tools/pnnx/src/pass_level1/nn_ReplicationPad2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ReplicationPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ReplicationPad3d.cpp b/tools/pnnx/src/pass_level1/nn_ReplicationPad3d.cpp index b3eee4555..2e9b3a71d 100644 --- a/tools/pnnx/src/pass_level1/nn_ReplicationPad3d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ReplicationPad3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_SELU.cpp b/tools/pnnx/src/pass_level1/nn_SELU.cpp index 501a3f4a8..09ea941bd 100644 --- a/tools/pnnx/src/pass_level1/nn_SELU.cpp +++ b/tools/pnnx/src/pass_level1/nn_SELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_SiLU.cpp b/tools/pnnx/src/pass_level1/nn_SiLU.cpp index b95c348db..88117b343 100644 --- a/tools/pnnx/src/pass_level1/nn_SiLU.cpp +++ b/tools/pnnx/src/pass_level1/nn_SiLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Sigmoid.cpp b/tools/pnnx/src/pass_level1/nn_Sigmoid.cpp index 26297c67b..8e0fed72d 100644 --- a/tools/pnnx/src/pass_level1/nn_Sigmoid.cpp +++ b/tools/pnnx/src/pass_level1/nn_Sigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Softmax.cpp b/tools/pnnx/src/pass_level1/nn_Softmax.cpp index 5461f9f6a..b7de37fc4 100644 --- a/tools/pnnx/src/pass_level1/nn_Softmax.cpp +++ b/tools/pnnx/src/pass_level1/nn_Softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Softmax2d.cpp b/tools/pnnx/src/pass_level1/nn_Softmax2d.cpp index 5536c7979..948fd36d0 100644 --- a/tools/pnnx/src/pass_level1/nn_Softmax2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_Softmax2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Softmin.cpp b/tools/pnnx/src/pass_level1/nn_Softmin.cpp index 4dae08d0b..883af51f5 100644 --- a/tools/pnnx/src/pass_level1/nn_Softmin.cpp +++ b/tools/pnnx/src/pass_level1/nn_Softmin.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Softplus.cpp b/tools/pnnx/src/pass_level1/nn_Softplus.cpp index b76065a3d..70b45a824 100644 --- a/tools/pnnx/src/pass_level1/nn_Softplus.cpp +++ b/tools/pnnx/src/pass_level1/nn_Softplus.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Softshrink.cpp b/tools/pnnx/src/pass_level1/nn_Softshrink.cpp index f61f4b04f..4b597eae4 100644 --- a/tools/pnnx/src/pass_level1/nn_Softshrink.cpp +++ b/tools/pnnx/src/pass_level1/nn_Softshrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Softsign.cpp b/tools/pnnx/src/pass_level1/nn_Softsign.cpp index e28f73ccd..24c9a344d 100644 --- a/tools/pnnx/src/pass_level1/nn_Softsign.cpp +++ b/tools/pnnx/src/pass_level1/nn_Softsign.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Tanh.cpp b/tools/pnnx/src/pass_level1/nn_Tanh.cpp index cdbfc25f3..50db3161e 100644 --- a/tools/pnnx/src/pass_level1/nn_Tanh.cpp +++ b/tools/pnnx/src/pass_level1/nn_Tanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Tanhshrink.cpp b/tools/pnnx/src/pass_level1/nn_Tanhshrink.cpp index 650363c5d..e6e769241 100644 --- a/tools/pnnx/src/pass_level1/nn_Tanhshrink.cpp +++ b/tools/pnnx/src/pass_level1/nn_Tanhshrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Threshold.cpp b/tools/pnnx/src/pass_level1/nn_Threshold.cpp index 1bbb1fe27..3ffa95f4c 100644 --- a/tools/pnnx/src/pass_level1/nn_Threshold.cpp +++ b/tools/pnnx/src/pass_level1/nn_Threshold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Unfold.cpp b/tools/pnnx/src/pass_level1/nn_Unfold.cpp index 8be9f6be7..672a54c83 100644 --- a/tools/pnnx/src/pass_level1/nn_Unfold.cpp +++ b/tools/pnnx/src/pass_level1/nn_Unfold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_Upsample.cpp b/tools/pnnx/src/pass_level1/nn_Upsample.cpp index f355919a2..238b336df 100644 --- a/tools/pnnx/src/pass_level1/nn_Upsample.cpp +++ b/tools/pnnx/src/pass_level1/nn_Upsample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_UpsamplingBilinear2d.cpp b/tools/pnnx/src/pass_level1/nn_UpsamplingBilinear2d.cpp index 07a8c22d3..f1a97df57 100644 --- a/tools/pnnx/src/pass_level1/nn_UpsamplingBilinear2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_UpsamplingBilinear2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_UpsamplingNearest2d.cpp b/tools/pnnx/src/pass_level1/nn_UpsamplingNearest2d.cpp index 2b1856134..f8f3607d0 100644 --- a/tools/pnnx/src/pass_level1/nn_UpsamplingNearest2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_UpsamplingNearest2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_ZeroPad2d.cpp b/tools/pnnx/src/pass_level1/nn_ZeroPad2d.cpp index 4886774df..2af3e05b8 100644 --- a/tools/pnnx/src/pass_level1/nn_ZeroPad2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_ZeroPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_maxunpool2d.cpp b/tools/pnnx/src/pass_level1/nn_maxunpool2d.cpp index 2a067a344..1ddc04e4a 100644 --- a/tools/pnnx/src/pass_level1/nn_maxunpool2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_maxunpool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level1.h" diff --git a/tools/pnnx/src/pass_level1/nn_quantized_Conv2d.cpp b/tools/pnnx/src/pass_level1/nn_quantized_Conv2d.cpp index 90e6daee8..e75822c2c 100644 --- a/tools/pnnx/src/pass_level1/nn_quantized_Conv2d.cpp +++ b/tools/pnnx/src/pass_level1/nn_quantized_Conv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_quantized_DeQuantize.cpp b/tools/pnnx/src/pass_level1/nn_quantized_DeQuantize.cpp index 7cf389fd8..ead623b7c 100644 --- a/tools/pnnx/src/pass_level1/nn_quantized_DeQuantize.cpp +++ b/tools/pnnx/src/pass_level1/nn_quantized_DeQuantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_quantized_Linear.cpp b/tools/pnnx/src/pass_level1/nn_quantized_Linear.cpp index ddedcc35b..7bfd2ee23 100644 --- a/tools/pnnx/src/pass_level1/nn_quantized_Linear.cpp +++ b/tools/pnnx/src/pass_level1/nn_quantized_Linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/nn_quantized_Quantize.cpp b/tools/pnnx/src/pass_level1/nn_quantized_Quantize.cpp index eb3ab819d..17020009e 100644 --- a/tools/pnnx/src/pass_level1/nn_quantized_Quantize.cpp +++ b/tools/pnnx/src/pass_level1/nn_quantized_Quantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/torchvision_DeformConv2d.cpp b/tools/pnnx/src/pass_level1/torchvision_DeformConv2d.cpp index dbc3fbf31..f891c6171 100644 --- a/tools/pnnx/src/pass_level1/torchvision_DeformConv2d.cpp +++ b/tools/pnnx/src/pass_level1/torchvision_DeformConv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level1/torchvision_RoIAlign.cpp b/tools/pnnx/src/pass_level1/torchvision_RoIAlign.cpp index ed85d85a5..5a6fd31cd 100644 --- a/tools/pnnx/src/pass_level1/torchvision_RoIAlign.cpp +++ b/tools/pnnx/src/pass_level1/torchvision_RoIAlign.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_module_pass.h" diff --git a/tools/pnnx/src/pass_level2.cpp b/tools/pnnx/src/pass_level2.cpp index 3dab7ff1c..2d020bc75 100644 --- a/tools/pnnx/src/pass_level2.cpp +++ b/tools/pnnx/src/pass_level2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2.h b/tools/pnnx/src/pass_level2.h index 4c94faff5..8018d5185 100644 --- a/tools/pnnx/src/pass_level2.h +++ b/tools/pnnx/src/pass_level2.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_LEVEL2_H #define PNNX_PASS_LEVEL2_H diff --git a/tools/pnnx/src/pass_level2/F_adaptive_avg_pool1d.cpp b/tools/pnnx/src/pass_level2/F_adaptive_avg_pool1d.cpp index cd3a11256..f5a025fe4 100644 --- a/tools/pnnx/src/pass_level2/F_adaptive_avg_pool1d.cpp +++ b/tools/pnnx/src/pass_level2/F_adaptive_avg_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_adaptive_avg_pool2d.cpp b/tools/pnnx/src/pass_level2/F_adaptive_avg_pool2d.cpp index 5a6a31909..12b2f1e38 100644 --- a/tools/pnnx/src/pass_level2/F_adaptive_avg_pool2d.cpp +++ b/tools/pnnx/src/pass_level2/F_adaptive_avg_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_adaptive_avg_pool3d.cpp b/tools/pnnx/src/pass_level2/F_adaptive_avg_pool3d.cpp index e3a2a2cff..8742d4266 100644 --- a/tools/pnnx/src/pass_level2/F_adaptive_avg_pool3d.cpp +++ b/tools/pnnx/src/pass_level2/F_adaptive_avg_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_adaptive_max_pool1d.cpp b/tools/pnnx/src/pass_level2/F_adaptive_max_pool1d.cpp index a21f0e06b..32ea9d430 100644 --- a/tools/pnnx/src/pass_level2/F_adaptive_max_pool1d.cpp +++ b/tools/pnnx/src/pass_level2/F_adaptive_max_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_adaptive_max_pool2d.cpp b/tools/pnnx/src/pass_level2/F_adaptive_max_pool2d.cpp index 72bfc6aab..8d7a4b274 100644 --- a/tools/pnnx/src/pass_level2/F_adaptive_max_pool2d.cpp +++ b/tools/pnnx/src/pass_level2/F_adaptive_max_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_adaptive_max_pool3d.cpp b/tools/pnnx/src/pass_level2/F_adaptive_max_pool3d.cpp index 91fe45907..58939196d 100644 --- a/tools/pnnx/src/pass_level2/F_adaptive_max_pool3d.cpp +++ b/tools/pnnx/src/pass_level2/F_adaptive_max_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_affine_grid.cpp b/tools/pnnx/src/pass_level2/F_affine_grid.cpp index 72704072c..dc8c761d9 100644 --- a/tools/pnnx/src/pass_level2/F_affine_grid.cpp +++ b/tools/pnnx/src/pass_level2/F_affine_grid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_alpha_dropout.cpp b/tools/pnnx/src/pass_level2/F_alpha_dropout.cpp index bcb64bea5..9502ea643 100644 --- a/tools/pnnx/src/pass_level2/F_alpha_dropout.cpp +++ b/tools/pnnx/src/pass_level2/F_alpha_dropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_avg_pool1d.cpp b/tools/pnnx/src/pass_level2/F_avg_pool1d.cpp index 718ad2dec..fdd636e0e 100644 --- a/tools/pnnx/src/pass_level2/F_avg_pool1d.cpp +++ b/tools/pnnx/src/pass_level2/F_avg_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_avg_pool2d.cpp b/tools/pnnx/src/pass_level2/F_avg_pool2d.cpp index d9fb11ac9..382a94e99 100644 --- a/tools/pnnx/src/pass_level2/F_avg_pool2d.cpp +++ b/tools/pnnx/src/pass_level2/F_avg_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_avg_pool3d.cpp b/tools/pnnx/src/pass_level2/F_avg_pool3d.cpp index 81c2a6675..89114fb7f 100644 --- a/tools/pnnx/src/pass_level2/F_avg_pool3d.cpp +++ b/tools/pnnx/src/pass_level2/F_avg_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_batch_norm.cpp b/tools/pnnx/src/pass_level2/F_batch_norm.cpp index 4a82809ff..71ecbd0f7 100644 --- a/tools/pnnx/src/pass_level2/F_batch_norm.cpp +++ b/tools/pnnx/src/pass_level2/F_batch_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_celu.cpp b/tools/pnnx/src/pass_level2/F_celu.cpp index b04ed26f3..c76442365 100644 --- a/tools/pnnx/src/pass_level2/F_celu.cpp +++ b/tools/pnnx/src/pass_level2/F_celu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_conv1d.cpp b/tools/pnnx/src/pass_level2/F_conv1d.cpp index 12958a3d3..d319702e0 100644 --- a/tools/pnnx/src/pass_level2/F_conv1d.cpp +++ b/tools/pnnx/src/pass_level2/F_conv1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_conv2d.cpp b/tools/pnnx/src/pass_level2/F_conv2d.cpp index 1a66b10ee..b7890d73e 100644 --- a/tools/pnnx/src/pass_level2/F_conv2d.cpp +++ b/tools/pnnx/src/pass_level2/F_conv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_conv3d.cpp b/tools/pnnx/src/pass_level2/F_conv3d.cpp index 8586cf737..fca16e9a6 100644 --- a/tools/pnnx/src/pass_level2/F_conv3d.cpp +++ b/tools/pnnx/src/pass_level2/F_conv3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_conv_transpose1d.cpp b/tools/pnnx/src/pass_level2/F_conv_transpose1d.cpp index b1ff9587b..e265215df 100644 --- a/tools/pnnx/src/pass_level2/F_conv_transpose1d.cpp +++ b/tools/pnnx/src/pass_level2/F_conv_transpose1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_conv_transpose2d.cpp b/tools/pnnx/src/pass_level2/F_conv_transpose2d.cpp index dc548f7bc..8b77067de 100644 --- a/tools/pnnx/src/pass_level2/F_conv_transpose2d.cpp +++ b/tools/pnnx/src/pass_level2/F_conv_transpose2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_conv_transpose3d.cpp b/tools/pnnx/src/pass_level2/F_conv_transpose3d.cpp index d19d64960..8ad8e836a 100644 --- a/tools/pnnx/src/pass_level2/F_conv_transpose3d.cpp +++ b/tools/pnnx/src/pass_level2/F_conv_transpose3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_dropout.cpp b/tools/pnnx/src/pass_level2/F_dropout.cpp index 93b5a9a8c..177a28904 100644 --- a/tools/pnnx/src/pass_level2/F_dropout.cpp +++ b/tools/pnnx/src/pass_level2/F_dropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_dropout23d.cpp b/tools/pnnx/src/pass_level2/F_dropout23d.cpp index 627115c1e..b958544f8 100644 --- a/tools/pnnx/src/pass_level2/F_dropout23d.cpp +++ b/tools/pnnx/src/pass_level2/F_dropout23d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_elu.cpp b/tools/pnnx/src/pass_level2/F_elu.cpp index 540aec8bf..0ed90f927 100644 --- a/tools/pnnx/src/pass_level2/F_elu.cpp +++ b/tools/pnnx/src/pass_level2/F_elu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_embedding.cpp b/tools/pnnx/src/pass_level2/F_embedding.cpp index d869d897a..5e2b1145a 100644 --- a/tools/pnnx/src/pass_level2/F_embedding.cpp +++ b/tools/pnnx/src/pass_level2/F_embedding.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_feature_alpha_dropout.cpp b/tools/pnnx/src/pass_level2/F_feature_alpha_dropout.cpp index aaa5eba2c..aefc8b1a8 100644 --- a/tools/pnnx/src/pass_level2/F_feature_alpha_dropout.cpp +++ b/tools/pnnx/src/pass_level2/F_feature_alpha_dropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_fold.cpp b/tools/pnnx/src/pass_level2/F_fold.cpp index 108349e61..62a9cd880 100644 --- a/tools/pnnx/src/pass_level2/F_fold.cpp +++ b/tools/pnnx/src/pass_level2/F_fold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_gelu.cpp b/tools/pnnx/src/pass_level2/F_gelu.cpp index db86b1bb1..be361b9f5 100644 --- a/tools/pnnx/src/pass_level2/F_gelu.cpp +++ b/tools/pnnx/src/pass_level2/F_gelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_glu.cpp b/tools/pnnx/src/pass_level2/F_glu.cpp index a59c954af..892645038 100644 --- a/tools/pnnx/src/pass_level2/F_glu.cpp +++ b/tools/pnnx/src/pass_level2/F_glu.cpp @@ -1,16 +1,5 @@ -// Copyright (c) 2022 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this -// file except in compliance with the License. You may obtain a copy of the -// License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. +// Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_grid_sample.cpp b/tools/pnnx/src/pass_level2/F_grid_sample.cpp index 7abb11aee..6acceece8 100644 --- a/tools/pnnx/src/pass_level2/F_grid_sample.cpp +++ b/tools/pnnx/src/pass_level2/F_grid_sample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_group_norm.cpp b/tools/pnnx/src/pass_level2/F_group_norm.cpp index 65c42964b..3c07e5e38 100644 --- a/tools/pnnx/src/pass_level2/F_group_norm.cpp +++ b/tools/pnnx/src/pass_level2/F_group_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_hardshrink.cpp b/tools/pnnx/src/pass_level2/F_hardshrink.cpp index c2630a528..f7b7cf4d0 100644 --- a/tools/pnnx/src/pass_level2/F_hardshrink.cpp +++ b/tools/pnnx/src/pass_level2/F_hardshrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_hardsigmoid.cpp b/tools/pnnx/src/pass_level2/F_hardsigmoid.cpp index 263d34f3e..d1b0f010a 100644 --- a/tools/pnnx/src/pass_level2/F_hardsigmoid.cpp +++ b/tools/pnnx/src/pass_level2/F_hardsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_hardswish.cpp b/tools/pnnx/src/pass_level2/F_hardswish.cpp index ed31d0725..4211750d3 100644 --- a/tools/pnnx/src/pass_level2/F_hardswish.cpp +++ b/tools/pnnx/src/pass_level2/F_hardswish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_hardtanh.cpp b/tools/pnnx/src/pass_level2/F_hardtanh.cpp index c02cd80f4..803715b5a 100644 --- a/tools/pnnx/src/pass_level2/F_hardtanh.cpp +++ b/tools/pnnx/src/pass_level2/F_hardtanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_instance_norm.cpp b/tools/pnnx/src/pass_level2/F_instance_norm.cpp index f8bfb9c24..0e28256c1 100644 --- a/tools/pnnx/src/pass_level2/F_instance_norm.cpp +++ b/tools/pnnx/src/pass_level2/F_instance_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_interpolate.cpp b/tools/pnnx/src/pass_level2/F_interpolate.cpp index e47f2a35b..44d2fda15 100644 --- a/tools/pnnx/src/pass_level2/F_interpolate.cpp +++ b/tools/pnnx/src/pass_level2/F_interpolate.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_layer_norm.cpp b/tools/pnnx/src/pass_level2/F_layer_norm.cpp index 7e2bb4a9a..abc4c4579 100644 --- a/tools/pnnx/src/pass_level2/F_layer_norm.cpp +++ b/tools/pnnx/src/pass_level2/F_layer_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_leaky_relu.cpp b/tools/pnnx/src/pass_level2/F_leaky_relu.cpp index 950b1a5a8..5051c39d9 100644 --- a/tools/pnnx/src/pass_level2/F_leaky_relu.cpp +++ b/tools/pnnx/src/pass_level2/F_leaky_relu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_linear.cpp b/tools/pnnx/src/pass_level2/F_linear.cpp index d796cb471..96c4cb6f6 100644 --- a/tools/pnnx/src/pass_level2/F_linear.cpp +++ b/tools/pnnx/src/pass_level2/F_linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_local_response_norm.cpp b/tools/pnnx/src/pass_level2/F_local_response_norm.cpp index 0ee121055..5ffcd4414 100644 --- a/tools/pnnx/src/pass_level2/F_local_response_norm.cpp +++ b/tools/pnnx/src/pass_level2/F_local_response_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_log_softmax.cpp b/tools/pnnx/src/pass_level2/F_log_softmax.cpp index 184965ae8..0bdf9ebaa 100644 --- a/tools/pnnx/src/pass_level2/F_log_softmax.cpp +++ b/tools/pnnx/src/pass_level2/F_log_softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_logsigmoid.cpp b/tools/pnnx/src/pass_level2/F_logsigmoid.cpp index 6d1aeeae1..6591e6a2f 100644 --- a/tools/pnnx/src/pass_level2/F_logsigmoid.cpp +++ b/tools/pnnx/src/pass_level2/F_logsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_lp_pool1d.cpp b/tools/pnnx/src/pass_level2/F_lp_pool1d.cpp index d3e45c075..c0b705955 100644 --- a/tools/pnnx/src/pass_level2/F_lp_pool1d.cpp +++ b/tools/pnnx/src/pass_level2/F_lp_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_lp_pool2d.cpp b/tools/pnnx/src/pass_level2/F_lp_pool2d.cpp index d75edf7a6..8f2a47e94 100644 --- a/tools/pnnx/src/pass_level2/F_lp_pool2d.cpp +++ b/tools/pnnx/src/pass_level2/F_lp_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_max_pool1d.cpp b/tools/pnnx/src/pass_level2/F_max_pool1d.cpp index 6af7a2597..0c3cd657a 100644 --- a/tools/pnnx/src/pass_level2/F_max_pool1d.cpp +++ b/tools/pnnx/src/pass_level2/F_max_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_max_pool2d.cpp b/tools/pnnx/src/pass_level2/F_max_pool2d.cpp index 8ff94b631..4deae630d 100644 --- a/tools/pnnx/src/pass_level2/F_max_pool2d.cpp +++ b/tools/pnnx/src/pass_level2/F_max_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_max_pool3d.cpp b/tools/pnnx/src/pass_level2/F_max_pool3d.cpp index 9b45e816e..48c6786e1 100644 --- a/tools/pnnx/src/pass_level2/F_max_pool3d.cpp +++ b/tools/pnnx/src/pass_level2/F_max_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_mish.cpp b/tools/pnnx/src/pass_level2/F_mish.cpp index a82d6d89a..70b1a6411 100644 --- a/tools/pnnx/src/pass_level2/F_mish.cpp +++ b/tools/pnnx/src/pass_level2/F_mish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_normalize.cpp b/tools/pnnx/src/pass_level2/F_normalize.cpp index 79fc090c8..019a7f54f 100644 --- a/tools/pnnx/src/pass_level2/F_normalize.cpp +++ b/tools/pnnx/src/pass_level2/F_normalize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_pad.cpp b/tools/pnnx/src/pass_level2/F_pad.cpp index 5511a7d67..4c810e41a 100644 --- a/tools/pnnx/src/pass_level2/F_pad.cpp +++ b/tools/pnnx/src/pass_level2/F_pad.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_pairwise_distance.cpp b/tools/pnnx/src/pass_level2/F_pairwise_distance.cpp index d889e5051..2107f4238 100644 --- a/tools/pnnx/src/pass_level2/F_pairwise_distance.cpp +++ b/tools/pnnx/src/pass_level2/F_pairwise_distance.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_pixel_shuffle.cpp b/tools/pnnx/src/pass_level2/F_pixel_shuffle.cpp index f5ed765f1..00a898061 100644 --- a/tools/pnnx/src/pass_level2/F_pixel_shuffle.cpp +++ b/tools/pnnx/src/pass_level2/F_pixel_shuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_pixel_unshuffle.cpp b/tools/pnnx/src/pass_level2/F_pixel_unshuffle.cpp index 15209e350..64c541032 100644 --- a/tools/pnnx/src/pass_level2/F_pixel_unshuffle.cpp +++ b/tools/pnnx/src/pass_level2/F_pixel_unshuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_prelu.cpp b/tools/pnnx/src/pass_level2/F_prelu.cpp index 1615e11c1..6834fb32c 100644 --- a/tools/pnnx/src/pass_level2/F_prelu.cpp +++ b/tools/pnnx/src/pass_level2/F_prelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_relu.cpp b/tools/pnnx/src/pass_level2/F_relu.cpp index ee5a366c8..aa76eed90 100644 --- a/tools/pnnx/src/pass_level2/F_relu.cpp +++ b/tools/pnnx/src/pass_level2/F_relu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_relu6.cpp b/tools/pnnx/src/pass_level2/F_relu6.cpp index 6dbe4ee4f..1b4e8caf1 100644 --- a/tools/pnnx/src/pass_level2/F_relu6.cpp +++ b/tools/pnnx/src/pass_level2/F_relu6.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_rms_norm.cpp b/tools/pnnx/src/pass_level2/F_rms_norm.cpp index aeb9eb170..d2b67dd38 100644 --- a/tools/pnnx/src/pass_level2/F_rms_norm.cpp +++ b/tools/pnnx/src/pass_level2/F_rms_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_rrelu.cpp b/tools/pnnx/src/pass_level2/F_rrelu.cpp index c41001a21..a477a7454 100644 --- a/tools/pnnx/src/pass_level2/F_rrelu.cpp +++ b/tools/pnnx/src/pass_level2/F_rrelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_scaled_dot_product_attention.cpp b/tools/pnnx/src/pass_level2/F_scaled_dot_product_attention.cpp index d766e3fe9..619564577 100644 --- a/tools/pnnx/src/pass_level2/F_scaled_dot_product_attention.cpp +++ b/tools/pnnx/src/pass_level2/F_scaled_dot_product_attention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_selu.cpp b/tools/pnnx/src/pass_level2/F_selu.cpp index 286bae7f7..50d606a8a 100644 --- a/tools/pnnx/src/pass_level2/F_selu.cpp +++ b/tools/pnnx/src/pass_level2/F_selu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_sigmoid.cpp b/tools/pnnx/src/pass_level2/F_sigmoid.cpp index 7c998001c..2ab43c7a0 100644 --- a/tools/pnnx/src/pass_level2/F_sigmoid.cpp +++ b/tools/pnnx/src/pass_level2/F_sigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_silu.cpp b/tools/pnnx/src/pass_level2/F_silu.cpp index 6d9d7418f..59c2d3a4f 100644 --- a/tools/pnnx/src/pass_level2/F_silu.cpp +++ b/tools/pnnx/src/pass_level2/F_silu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_softmax.cpp b/tools/pnnx/src/pass_level2/F_softmax.cpp index d61213bf3..0aa1c7ee4 100644 --- a/tools/pnnx/src/pass_level2/F_softmax.cpp +++ b/tools/pnnx/src/pass_level2/F_softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_softmin.cpp b/tools/pnnx/src/pass_level2/F_softmin.cpp index 2882f7eb1..bfedc6156 100644 --- a/tools/pnnx/src/pass_level2/F_softmin.cpp +++ b/tools/pnnx/src/pass_level2/F_softmin.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_softplus.cpp b/tools/pnnx/src/pass_level2/F_softplus.cpp index 14898a748..068d84302 100644 --- a/tools/pnnx/src/pass_level2/F_softplus.cpp +++ b/tools/pnnx/src/pass_level2/F_softplus.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_softshrink.cpp b/tools/pnnx/src/pass_level2/F_softshrink.cpp index 3089016af..ff8b70aa5 100644 --- a/tools/pnnx/src/pass_level2/F_softshrink.cpp +++ b/tools/pnnx/src/pass_level2/F_softshrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_softsign.cpp b/tools/pnnx/src/pass_level2/F_softsign.cpp index 489f7196d..1bceb3a71 100644 --- a/tools/pnnx/src/pass_level2/F_softsign.cpp +++ b/tools/pnnx/src/pass_level2/F_softsign.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_tanh.cpp b/tools/pnnx/src/pass_level2/F_tanh.cpp index af558a548..9987d305a 100644 --- a/tools/pnnx/src/pass_level2/F_tanh.cpp +++ b/tools/pnnx/src/pass_level2/F_tanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_tanhshrink.cpp b/tools/pnnx/src/pass_level2/F_tanhshrink.cpp index 589709edc..4fcd35303 100644 --- a/tools/pnnx/src/pass_level2/F_tanhshrink.cpp +++ b/tools/pnnx/src/pass_level2/F_tanhshrink.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_threshold.cpp b/tools/pnnx/src/pass_level2/F_threshold.cpp index e86b44862..54ec46cde 100644 --- a/tools/pnnx/src/pass_level2/F_threshold.cpp +++ b/tools/pnnx/src/pass_level2/F_threshold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_unfold.cpp b/tools/pnnx/src/pass_level2/F_unfold.cpp index 2ebbde397..3490011a4 100644 --- a/tools/pnnx/src/pass_level2/F_unfold.cpp +++ b/tools/pnnx/src/pass_level2/F_unfold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_upsample.cpp b/tools/pnnx/src/pass_level2/F_upsample.cpp index 9f1983194..564f4d2d4 100644 --- a/tools/pnnx/src/pass_level2/F_upsample.cpp +++ b/tools/pnnx/src/pass_level2/F_upsample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_upsample_bilinear.cpp b/tools/pnnx/src/pass_level2/F_upsample_bilinear.cpp index 65ef0eae8..ecbd62639 100644 --- a/tools/pnnx/src/pass_level2/F_upsample_bilinear.cpp +++ b/tools/pnnx/src/pass_level2/F_upsample_bilinear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/F_upsample_nearest.cpp b/tools/pnnx/src/pass_level2/F_upsample_nearest.cpp index 2f3261078..4d1d6ec87 100644 --- a/tools/pnnx/src/pass_level2/F_upsample_nearest.cpp +++ b/tools/pnnx/src/pass_level2/F_upsample_nearest.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_contiguous.cpp b/tools/pnnx/src/pass_level2/Tensor_contiguous.cpp index 0659bd18c..05569df62 100644 --- a/tools/pnnx/src/pass_level2/Tensor_contiguous.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_contiguous.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_copy.cpp b/tools/pnnx/src/pass_level2/Tensor_copy.cpp index 76f1926dd..70f3ab005 100644 --- a/tools/pnnx/src/pass_level2/Tensor_copy.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_copy.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_expand.cpp b/tools/pnnx/src/pass_level2/Tensor_expand.cpp index f3a7d0275..bb7e0e178 100644 --- a/tools/pnnx/src/pass_level2/Tensor_expand.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_expand.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_expand_as.cpp b/tools/pnnx/src/pass_level2/Tensor_expand_as.cpp index 855574684..cece8550c 100644 --- a/tools/pnnx/src/pass_level2/Tensor_expand_as.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_expand_as.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_fill.cpp b/tools/pnnx/src/pass_level2/Tensor_fill.cpp index b725080da..db63a8fae 100644 --- a/tools/pnnx/src/pass_level2/Tensor_fill.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_fill.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_index.cpp b/tools/pnnx/src/pass_level2/Tensor_index.cpp index 0b752fc76..7abc516aa 100644 --- a/tools/pnnx/src/pass_level2/Tensor_index.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_index.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_index_put.cpp b/tools/pnnx/src/pass_level2/Tensor_index_put.cpp index b69f3c9e7..81294f34c 100644 --- a/tools/pnnx/src/pass_level2/Tensor_index_put.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_index_put.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_masked_fill.cpp b/tools/pnnx/src/pass_level2/Tensor_masked_fill.cpp index 1aef09326..5be1c83f4 100644 --- a/tools/pnnx/src/pass_level2/Tensor_masked_fill.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_masked_fill.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_new_empty.cpp b/tools/pnnx/src/pass_level2/Tensor_new_empty.cpp index ec9d2be7a..78506061c 100644 --- a/tools/pnnx/src/pass_level2/Tensor_new_empty.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_new_empty.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_new_ones.cpp b/tools/pnnx/src/pass_level2/Tensor_new_ones.cpp index 98448ff2a..8ffc98094 100644 --- a/tools/pnnx/src/pass_level2/Tensor_new_ones.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_new_ones.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_new_zeros.cpp b/tools/pnnx/src/pass_level2/Tensor_new_zeros.cpp index 7ebc94e47..f61b0af4f 100644 --- a/tools/pnnx/src/pass_level2/Tensor_new_zeros.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_new_zeros.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_permute.cpp b/tools/pnnx/src/pass_level2/Tensor_permute.cpp index 7f55d00f6..58c439bec 100644 --- a/tools/pnnx/src/pass_level2/Tensor_permute.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_permute.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_repeat.cpp b/tools/pnnx/src/pass_level2/Tensor_repeat.cpp index 3cb5d162e..0cfaa136f 100644 --- a/tools/pnnx/src/pass_level2/Tensor_repeat.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_repeat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_reshape.cpp b/tools/pnnx/src/pass_level2/Tensor_reshape.cpp index a9238d3e4..3e486f14d 100644 --- a/tools/pnnx/src/pass_level2/Tensor_reshape.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_reshape.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_reshape_as.cpp b/tools/pnnx/src/pass_level2/Tensor_reshape_as.cpp index 964c22c70..f960dd0fd 100644 --- a/tools/pnnx/src/pass_level2/Tensor_reshape_as.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_reshape_as.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_select.cpp b/tools/pnnx/src/pass_level2/Tensor_select.cpp index 9730c01bf..1d3a4f2d1 100644 --- a/tools/pnnx/src/pass_level2/Tensor_select.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_select.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_size.cpp b/tools/pnnx/src/pass_level2/Tensor_size.cpp index 57531f73b..2b67a40c2 100644 --- a/tools/pnnx/src/pass_level2/Tensor_size.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_size.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_slice.cpp b/tools/pnnx/src/pass_level2/Tensor_slice.cpp index 8fd684c9d..1f38f670a 100644 --- a/tools/pnnx/src/pass_level2/Tensor_slice.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_slice.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_to.cpp b/tools/pnnx/src/pass_level2/Tensor_to.cpp index 2780a5296..42cf5de28 100644 --- a/tools/pnnx/src/pass_level2/Tensor_to.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_to.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_type_as.cpp b/tools/pnnx/src/pass_level2/Tensor_type_as.cpp index b155294b4..9377a7e46 100644 --- a/tools/pnnx/src/pass_level2/Tensor_type_as.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_type_as.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/Tensor_view.cpp b/tools/pnnx/src/pass_level2/Tensor_view.cpp index 2931b57cb..2800116bf 100644 --- a/tools/pnnx/src/pass_level2/Tensor_view.cpp +++ b/tools/pnnx/src/pass_level2/Tensor_view.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.cpp b/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.cpp index e5eb4a7ca..a0ba51c4d 100644 --- a/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.cpp +++ b/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_size_numtotensor_int.h" diff --git a/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.h b/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.h index 2c87acbdd..3cf45150d 100644 --- a/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.h +++ b/tools/pnnx/src/pass_level2/eliminate_size_numtotensor_int.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level2/functionize.cpp b/tools/pnnx/src/pass_level2/functionize.cpp index 78251e0c1..cc246f812 100644 --- a/tools/pnnx/src/pass_level2/functionize.cpp +++ b/tools/pnnx/src/pass_level2/functionize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "functionize.h" diff --git a/tools/pnnx/src/pass_level2/functionize.h b/tools/pnnx/src/pass_level2/functionize.h index 0f3fd85ee..8369d356a 100644 --- a/tools/pnnx/src/pass_level2/functionize.h +++ b/tools/pnnx/src/pass_level2/functionize.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level2/fuse_constantlist.cpp b/tools/pnnx/src/pass_level2/fuse_constantlist.cpp index f08927c31..e83fb474f 100644 --- a/tools/pnnx/src/pass_level2/fuse_constantlist.cpp +++ b/tools/pnnx/src/pass_level2/fuse_constantlist.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_constantlist.h" diff --git a/tools/pnnx/src/pass_level2/fuse_constantlist.h b/tools/pnnx/src/pass_level2/fuse_constantlist.h index c4e991483..2d7b0d13f 100644 --- a/tools/pnnx/src/pass_level2/fuse_constantlist.h +++ b/tools/pnnx/src/pass_level2/fuse_constantlist.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level2/nn_GRU.cpp b/tools/pnnx/src/pass_level2/nn_GRU.cpp index e76558a4a..ed563c4d4 100644 --- a/tools/pnnx/src/pass_level2/nn_GRU.cpp +++ b/tools/pnnx/src/pass_level2/nn_GRU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" #include diff --git a/tools/pnnx/src/pass_level2/nn_LSTM.cpp b/tools/pnnx/src/pass_level2/nn_LSTM.cpp index 6b1134f03..12a9ac25a 100644 --- a/tools/pnnx/src/pass_level2/nn_LSTM.cpp +++ b/tools/pnnx/src/pass_level2/nn_LSTM.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" #include diff --git a/tools/pnnx/src/pass_level2/nn_RNN.cpp b/tools/pnnx/src/pass_level2/nn_RNN.cpp index 1ee6c9811..4b0f485d7 100644 --- a/tools/pnnx/src/pass_level2/nn_RNN.cpp +++ b/tools/pnnx/src/pass_level2/nn_RNN.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/nn_quantized_FloatFunctional.cpp b/tools/pnnx/src/pass_level2/nn_quantized_FloatFunctional.cpp index 2b5796db5..6e86d2d2b 100644 --- a/tools/pnnx/src/pass_level2/nn_quantized_FloatFunctional.cpp +++ b/tools/pnnx/src/pass_level2/nn_quantized_FloatFunctional.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_addmm.cpp b/tools/pnnx/src/pass_level2/torch_addmm.cpp index 1868f32b1..76cb07ac0 100644 --- a/tools/pnnx/src/pass_level2/torch_addmm.cpp +++ b/tools/pnnx/src/pass_level2/torch_addmm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_amax.cpp b/tools/pnnx/src/pass_level2/torch_amax.cpp index 07b65ea95..b45a440c8 100644 --- a/tools/pnnx/src/pass_level2/torch_amax.cpp +++ b/tools/pnnx/src/pass_level2/torch_amax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_amin.cpp b/tools/pnnx/src/pass_level2/torch_amin.cpp index 1b382362e..da61929be 100644 --- a/tools/pnnx/src/pass_level2/torch_amin.cpp +++ b/tools/pnnx/src/pass_level2/torch_amin.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_arange.cpp b/tools/pnnx/src/pass_level2/torch_arange.cpp index 6693664ea..2c5453a00 100644 --- a/tools/pnnx/src/pass_level2/torch_arange.cpp +++ b/tools/pnnx/src/pass_level2/torch_arange.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_argmax.cpp b/tools/pnnx/src/pass_level2/torch_argmax.cpp index a9fd55b4a..6c934409a 100644 --- a/tools/pnnx/src/pass_level2/torch_argmax.cpp +++ b/tools/pnnx/src/pass_level2/torch_argmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_argmin.cpp b/tools/pnnx/src/pass_level2/torch_argmin.cpp index 46307aa1d..d0bc20cba 100644 --- a/tools/pnnx/src/pass_level2/torch_argmin.cpp +++ b/tools/pnnx/src/pass_level2/torch_argmin.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_as_strided.cpp b/tools/pnnx/src/pass_level2/torch_as_strided.cpp index c1d9cdb38..f1ed1776b 100644 --- a/tools/pnnx/src/pass_level2/torch_as_strided.cpp +++ b/tools/pnnx/src/pass_level2/torch_as_strided.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_baddbmm.cpp b/tools/pnnx/src/pass_level2/torch_baddbmm.cpp index 7cd733f3e..866844c30 100644 --- a/tools/pnnx/src/pass_level2/torch_baddbmm.cpp +++ b/tools/pnnx/src/pass_level2/torch_baddbmm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_bitwise_and.cpp b/tools/pnnx/src/pass_level2/torch_bitwise_and.cpp index 6dfe048af..2b51a4f89 100644 --- a/tools/pnnx/src/pass_level2/torch_bitwise_and.cpp +++ b/tools/pnnx/src/pass_level2/torch_bitwise_and.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_bitwise_left_shift.cpp b/tools/pnnx/src/pass_level2/torch_bitwise_left_shift.cpp index b099f169b..af1570e97 100644 --- a/tools/pnnx/src/pass_level2/torch_bitwise_left_shift.cpp +++ b/tools/pnnx/src/pass_level2/torch_bitwise_left_shift.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_bitwise_not.cpp b/tools/pnnx/src/pass_level2/torch_bitwise_not.cpp index 3b1fbda66..41656adcd 100644 --- a/tools/pnnx/src/pass_level2/torch_bitwise_not.cpp +++ b/tools/pnnx/src/pass_level2/torch_bitwise_not.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_bitwise_or.cpp b/tools/pnnx/src/pass_level2/torch_bitwise_or.cpp index 0a9f502ca..da7bca510 100644 --- a/tools/pnnx/src/pass_level2/torch_bitwise_or.cpp +++ b/tools/pnnx/src/pass_level2/torch_bitwise_or.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_bitwise_right_shift.cpp b/tools/pnnx/src/pass_level2/torch_bitwise_right_shift.cpp index cda87ddd7..ae07da79e 100644 --- a/tools/pnnx/src/pass_level2/torch_bitwise_right_shift.cpp +++ b/tools/pnnx/src/pass_level2/torch_bitwise_right_shift.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_bitwise_xor.cpp b/tools/pnnx/src/pass_level2/torch_bitwise_xor.cpp index 097e13d4c..2760d1c47 100644 --- a/tools/pnnx/src/pass_level2/torch_bitwise_xor.cpp +++ b/tools/pnnx/src/pass_level2/torch_bitwise_xor.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_bmm.cpp b/tools/pnnx/src/pass_level2/torch_bmm.cpp index 31811fdfa..b93e6a4b1 100644 --- a/tools/pnnx/src/pass_level2/torch_bmm.cpp +++ b/tools/pnnx/src/pass_level2/torch_bmm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_cat.cpp b/tools/pnnx/src/pass_level2/torch_cat.cpp index 8c006833b..2eeb7faed 100644 --- a/tools/pnnx/src/pass_level2/torch_cat.cpp +++ b/tools/pnnx/src/pass_level2/torch_cat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_chunk.cpp b/tools/pnnx/src/pass_level2/torch_chunk.cpp index c3357af46..63791b1e3 100644 --- a/tools/pnnx/src/pass_level2/torch_chunk.cpp +++ b/tools/pnnx/src/pass_level2/torch_chunk.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_clamp.cpp b/tools/pnnx/src/pass_level2/torch_clamp.cpp index db7e94521..d046d3cd5 100644 --- a/tools/pnnx/src/pass_level2/torch_clamp.cpp +++ b/tools/pnnx/src/pass_level2/torch_clamp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_clone.cpp b/tools/pnnx/src/pass_level2/torch_clone.cpp index 82a9d82bb..649208d07 100644 --- a/tools/pnnx/src/pass_level2/torch_clone.cpp +++ b/tools/pnnx/src/pass_level2/torch_clone.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_complex.cpp b/tools/pnnx/src/pass_level2/torch_complex.cpp index fc34ff5d0..dd41ec41f 100644 --- a/tools/pnnx/src/pass_level2/torch_complex.cpp +++ b/tools/pnnx/src/pass_level2/torch_complex.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_cross.cpp b/tools/pnnx/src/pass_level2/torch_cross.cpp index cd8d8a3b4..edf422939 100644 --- a/tools/pnnx/src/pass_level2/torch_cross.cpp +++ b/tools/pnnx/src/pass_level2/torch_cross.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_cumprod.cpp b/tools/pnnx/src/pass_level2/torch_cumprod.cpp index ff3f00c78..2a09e98f6 100644 --- a/tools/pnnx/src/pass_level2/torch_cumprod.cpp +++ b/tools/pnnx/src/pass_level2/torch_cumprod.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// 2023 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_cumsum.cpp b/tools/pnnx/src/pass_level2/torch_cumsum.cpp index c93c78f3e..d567e4aca 100644 --- a/tools/pnnx/src/pass_level2/torch_cumsum.cpp +++ b/tools/pnnx/src/pass_level2/torch_cumsum.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// 2023 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_dequantize.cpp b/tools/pnnx/src/pass_level2/torch_dequantize.cpp index 230df7b39..e816e3817 100644 --- a/tools/pnnx/src/pass_level2/torch_dequantize.cpp +++ b/tools/pnnx/src/pass_level2/torch_dequantize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_diag.cpp b/tools/pnnx/src/pass_level2/torch_diag.cpp index 6e78a2752..f8ca813ae 100644 --- a/tools/pnnx/src/pass_level2/torch_diag.cpp +++ b/tools/pnnx/src/pass_level2/torch_diag.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_einsum.cpp b/tools/pnnx/src/pass_level2/torch_einsum.cpp index 1467e701c..b61d4de12 100644 --- a/tools/pnnx/src/pass_level2/torch_einsum.cpp +++ b/tools/pnnx/src/pass_level2/torch_einsum.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_empty.cpp b/tools/pnnx/src/pass_level2/torch_empty.cpp index c1f1d548a..e6dc42f37 100644 --- a/tools/pnnx/src/pass_level2/torch_empty.cpp +++ b/tools/pnnx/src/pass_level2/torch_empty.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_empty_like.cpp b/tools/pnnx/src/pass_level2/torch_empty_like.cpp index 168278c37..6b94b00c4 100644 --- a/tools/pnnx/src/pass_level2/torch_empty_like.cpp +++ b/tools/pnnx/src/pass_level2/torch_empty_like.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_eq.cpp b/tools/pnnx/src/pass_level2/torch_eq.cpp index f34ce9a7f..bb291b611 100644 --- a/tools/pnnx/src/pass_level2/torch_eq.cpp +++ b/tools/pnnx/src/pass_level2/torch_eq.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_fft.cpp b/tools/pnnx/src/pass_level2/torch_fft_fft.cpp index cc816cbc7..a1640a536 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_fft.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_fft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_fft2.cpp b/tools/pnnx/src/pass_level2/torch_fft_fft2.cpp index b4dc8a48c..10c285ccf 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_fft2.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_fft2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_fftn.cpp b/tools/pnnx/src/pass_level2/torch_fft_fftn.cpp index 72390fee6..ced9c8f47 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_fftn.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_fftn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_hfft.cpp b/tools/pnnx/src/pass_level2/torch_fft_hfft.cpp index 0cc245f63..fcfd28b9d 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_hfft.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_hfft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_hfft2.cpp b/tools/pnnx/src/pass_level2/torch_fft_hfft2.cpp index fc9b31cb5..0b5fdabe3 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_hfft2.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_hfft2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_hfftn.cpp b/tools/pnnx/src/pass_level2/torch_fft_hfftn.cpp index 52e2ac12f..c99e00132 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_hfftn.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_hfftn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_ifft.cpp b/tools/pnnx/src/pass_level2/torch_fft_ifft.cpp index 5531de9f1..a6a5fd653 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_ifft.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_ifft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_ifft2.cpp b/tools/pnnx/src/pass_level2/torch_fft_ifft2.cpp index f83f06aaa..a8b71a57a 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_ifft2.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_ifft2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_ifftn.cpp b/tools/pnnx/src/pass_level2/torch_fft_ifftn.cpp index 9daf5ce89..d0326846c 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_ifftn.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_ifftn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_ihfft.cpp b/tools/pnnx/src/pass_level2/torch_fft_ihfft.cpp index 98dcd28f3..2b479b3ec 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_ihfft.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_ihfft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_ihfft2.cpp b/tools/pnnx/src/pass_level2/torch_fft_ihfft2.cpp index bafb04a9b..a96b133b6 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_ihfft2.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_ihfft2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_ihfftn.cpp b/tools/pnnx/src/pass_level2/torch_fft_ihfftn.cpp index 91783958b..e9c541cd7 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_ihfftn.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_ihfftn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_irfft.cpp b/tools/pnnx/src/pass_level2/torch_fft_irfft.cpp index 4fa5a54c2..73197e1a0 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_irfft.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_irfft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_irfft2.cpp b/tools/pnnx/src/pass_level2/torch_fft_irfft2.cpp index edf7cd27e..85b3a2ff7 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_irfft2.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_irfft2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_irfftn.cpp b/tools/pnnx/src/pass_level2/torch_fft_irfftn.cpp index 89cfe5404..16701e87e 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_irfftn.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_irfftn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_rfft.cpp b/tools/pnnx/src/pass_level2/torch_fft_rfft.cpp index 96d867a11..43fa4b060 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_rfft.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_rfft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_rfft2.cpp b/tools/pnnx/src/pass_level2/torch_fft_rfft2.cpp index dd89fa503..992f27f89 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_rfft2.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_rfft2.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_fft_rfftn.cpp b/tools/pnnx/src/pass_level2/torch_fft_rfftn.cpp index 7d013ea1f..ae63ffcc7 100644 --- a/tools/pnnx/src/pass_level2/torch_fft_rfftn.cpp +++ b/tools/pnnx/src/pass_level2/torch_fft_rfftn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_flatten.cpp b/tools/pnnx/src/pass_level2/torch_flatten.cpp index 1eecf24c4..cefdc448c 100644 --- a/tools/pnnx/src/pass_level2/torch_flatten.cpp +++ b/tools/pnnx/src/pass_level2/torch_flatten.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_flip.cpp b/tools/pnnx/src/pass_level2/torch_flip.cpp index 7f756d4d6..39235654d 100644 --- a/tools/pnnx/src/pass_level2/torch_flip.cpp +++ b/tools/pnnx/src/pass_level2/torch_flip.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_full.cpp b/tools/pnnx/src/pass_level2/torch_full.cpp index 1e77c60a9..34fb2b3cd 100644 --- a/tools/pnnx/src/pass_level2/torch_full.cpp +++ b/tools/pnnx/src/pass_level2/torch_full.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_full_like.cpp b/tools/pnnx/src/pass_level2/torch_full_like.cpp index 20e2cec30..345894038 100644 --- a/tools/pnnx/src/pass_level2/torch_full_like.cpp +++ b/tools/pnnx/src/pass_level2/torch_full_like.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_gather.cpp b/tools/pnnx/src/pass_level2/torch_gather.cpp index 361c29a4a..a41499b33 100644 --- a/tools/pnnx/src/pass_level2/torch_gather.cpp +++ b/tools/pnnx/src/pass_level2/torch_gather.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_ge.cpp b/tools/pnnx/src/pass_level2/torch_ge.cpp index 239d89f2a..a575c6b33 100644 --- a/tools/pnnx/src/pass_level2/torch_ge.cpp +++ b/tools/pnnx/src/pass_level2/torch_ge.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_gt.cpp b/tools/pnnx/src/pass_level2/torch_gt.cpp index d72af37f1..de226f17c 100644 --- a/tools/pnnx/src/pass_level2/torch_gt.cpp +++ b/tools/pnnx/src/pass_level2/torch_gt.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_imag.cpp b/tools/pnnx/src/pass_level2/torch_imag.cpp index 1636cc480..1a03b906a 100644 --- a/tools/pnnx/src/pass_level2/torch_imag.cpp +++ b/tools/pnnx/src/pass_level2/torch_imag.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_index_select.cpp b/tools/pnnx/src/pass_level2/torch_index_select.cpp index 2bfc10558..b0ba03011 100644 --- a/tools/pnnx/src/pass_level2/torch_index_select.cpp +++ b/tools/pnnx/src/pass_level2/torch_index_select.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" #include diff --git a/tools/pnnx/src/pass_level2/torch_istft.cpp b/tools/pnnx/src/pass_level2/torch_istft.cpp index 186308cca..c89782963 100644 --- a/tools/pnnx/src/pass_level2/torch_istft.cpp +++ b/tools/pnnx/src/pass_level2/torch_istft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_le.cpp b/tools/pnnx/src/pass_level2/torch_le.cpp index 2bafd3b5a..7b4240ea8 100644 --- a/tools/pnnx/src/pass_level2/torch_le.cpp +++ b/tools/pnnx/src/pass_level2/torch_le.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_lgamma.cpp b/tools/pnnx/src/pass_level2/torch_lgamma.cpp index e8aeb153e..7ab1da8bd 100644 --- a/tools/pnnx/src/pass_level2/torch_lgamma.cpp +++ b/tools/pnnx/src/pass_level2/torch_lgamma.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_logical_and.cpp b/tools/pnnx/src/pass_level2/torch_logical_and.cpp index aed147e95..f9089bc4a 100644 --- a/tools/pnnx/src/pass_level2/torch_logical_and.cpp +++ b/tools/pnnx/src/pass_level2/torch_logical_and.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_logical_not.cpp b/tools/pnnx/src/pass_level2/torch_logical_not.cpp index ce3c4ca76..c64968c30 100644 --- a/tools/pnnx/src/pass_level2/torch_logical_not.cpp +++ b/tools/pnnx/src/pass_level2/torch_logical_not.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_logical_or.cpp b/tools/pnnx/src/pass_level2/torch_logical_or.cpp index 30fe45788..a8dc0d057 100644 --- a/tools/pnnx/src/pass_level2/torch_logical_or.cpp +++ b/tools/pnnx/src/pass_level2/torch_logical_or.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_logical_xor.cpp b/tools/pnnx/src/pass_level2/torch_logical_xor.cpp index 63c50d514..6e5d8018b 100644 --- a/tools/pnnx/src/pass_level2/torch_logical_xor.cpp +++ b/tools/pnnx/src/pass_level2/torch_logical_xor.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_logsumexp.cpp b/tools/pnnx/src/pass_level2/torch_logsumexp.cpp index e27dd44c8..6c1e58605 100644 --- a/tools/pnnx/src/pass_level2/torch_logsumexp.cpp +++ b/tools/pnnx/src/pass_level2/torch_logsumexp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_lt.cpp b/tools/pnnx/src/pass_level2/torch_lt.cpp index 3df49e509..6b974634c 100644 --- a/tools/pnnx/src/pass_level2/torch_lt.cpp +++ b/tools/pnnx/src/pass_level2/torch_lt.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_masked_select.cpp b/tools/pnnx/src/pass_level2/torch_masked_select.cpp index 7f69ff249..7081dc3f5 100644 --- a/tools/pnnx/src/pass_level2/torch_masked_select.cpp +++ b/tools/pnnx/src/pass_level2/torch_masked_select.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_matmul.cpp b/tools/pnnx/src/pass_level2/torch_matmul.cpp index 62127a777..7907a76fa 100644 --- a/tools/pnnx/src/pass_level2/torch_matmul.cpp +++ b/tools/pnnx/src/pass_level2/torch_matmul.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_max.cpp b/tools/pnnx/src/pass_level2/torch_max.cpp index 78dd72601..725529c33 100644 --- a/tools/pnnx/src/pass_level2/torch_max.cpp +++ b/tools/pnnx/src/pass_level2/torch_max.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_mean.cpp b/tools/pnnx/src/pass_level2/torch_mean.cpp index 45fc54023..355fc4ef8 100644 --- a/tools/pnnx/src/pass_level2/torch_mean.cpp +++ b/tools/pnnx/src/pass_level2/torch_mean.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_min.cpp b/tools/pnnx/src/pass_level2/torch_min.cpp index 201604aff..a0aa09f45 100644 --- a/tools/pnnx/src/pass_level2/torch_min.cpp +++ b/tools/pnnx/src/pass_level2/torch_min.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_mm.cpp b/tools/pnnx/src/pass_level2/torch_mm.cpp index 4b8cda3ac..d64a11790 100644 --- a/tools/pnnx/src/pass_level2/torch_mm.cpp +++ b/tools/pnnx/src/pass_level2/torch_mm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_mv.cpp b/tools/pnnx/src/pass_level2/torch_mv.cpp index 9ffd87de7..fedf8c14e 100644 --- a/tools/pnnx/src/pass_level2/torch_mv.cpp +++ b/tools/pnnx/src/pass_level2/torch_mv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_narrow.cpp b/tools/pnnx/src/pass_level2/torch_narrow.cpp index bc87890dd..62c4adb87 100644 --- a/tools/pnnx/src/pass_level2/torch_narrow.cpp +++ b/tools/pnnx/src/pass_level2/torch_narrow.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_ne.cpp b/tools/pnnx/src/pass_level2/torch_ne.cpp index b0fd9c571..243d07884 100644 --- a/tools/pnnx/src/pass_level2/torch_ne.cpp +++ b/tools/pnnx/src/pass_level2/torch_ne.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_norm.cpp b/tools/pnnx/src/pass_level2/torch_norm.cpp index 2f5eacc35..4567eba51 100644 --- a/tools/pnnx/src/pass_level2/torch_norm.cpp +++ b/tools/pnnx/src/pass_level2/torch_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_normal.cpp b/tools/pnnx/src/pass_level2/torch_normal.cpp index d8b502b98..0aaad6955 100644 --- a/tools/pnnx/src/pass_level2/torch_normal.cpp +++ b/tools/pnnx/src/pass_level2/torch_normal.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_ones.cpp b/tools/pnnx/src/pass_level2/torch_ones.cpp index b1608676d..0a4967a26 100644 --- a/tools/pnnx/src/pass_level2/torch_ones.cpp +++ b/tools/pnnx/src/pass_level2/torch_ones.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_ones_like.cpp b/tools/pnnx/src/pass_level2/torch_ones_like.cpp index bd59dbe82..6a74444db 100644 --- a/tools/pnnx/src/pass_level2/torch_ones_like.cpp +++ b/tools/pnnx/src/pass_level2/torch_ones_like.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_positive.cpp b/tools/pnnx/src/pass_level2/torch_positive.cpp index 8d77eaedd..b858ada5b 100644 --- a/tools/pnnx/src/pass_level2/torch_positive.cpp +++ b/tools/pnnx/src/pass_level2/torch_positive.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_prod.cpp b/tools/pnnx/src/pass_level2/torch_prod.cpp index 653b112de..6ba758471 100644 --- a/tools/pnnx/src/pass_level2/torch_prod.cpp +++ b/tools/pnnx/src/pass_level2/torch_prod.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_quantize_per_tensor.cpp b/tools/pnnx/src/pass_level2/torch_quantize_per_tensor.cpp index 11f8cb733..26d3a4d0a 100644 --- a/tools/pnnx/src/pass_level2/torch_quantize_per_tensor.cpp +++ b/tools/pnnx/src/pass_level2/torch_quantize_per_tensor.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_randn.cpp b/tools/pnnx/src/pass_level2/torch_randn.cpp index 92e9d3520..c5aa3d122 100644 --- a/tools/pnnx/src/pass_level2/torch_randn.cpp +++ b/tools/pnnx/src/pass_level2/torch_randn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_randn_like.cpp b/tools/pnnx/src/pass_level2/torch_randn_like.cpp index fc631c687..077b284e7 100644 --- a/tools/pnnx/src/pass_level2/torch_randn_like.cpp +++ b/tools/pnnx/src/pass_level2/torch_randn_like.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_real.cpp b/tools/pnnx/src/pass_level2/torch_real.cpp index 415d2a5a3..c870f994b 100644 --- a/tools/pnnx/src/pass_level2/torch_real.cpp +++ b/tools/pnnx/src/pass_level2/torch_real.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_repeat_interleave.cpp b/tools/pnnx/src/pass_level2/torch_repeat_interleave.cpp index cdfb2485a..75b1f2c54 100644 --- a/tools/pnnx/src/pass_level2/torch_repeat_interleave.cpp +++ b/tools/pnnx/src/pass_level2/torch_repeat_interleave.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_roll.cpp b/tools/pnnx/src/pass_level2/torch_roll.cpp index 2f54acd12..bf38ecd36 100644 --- a/tools/pnnx/src/pass_level2/torch_roll.cpp +++ b/tools/pnnx/src/pass_level2/torch_roll.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_scatter_add.cpp b/tools/pnnx/src/pass_level2/torch_scatter_add.cpp index 094cb00cd..852f0b70f 100644 --- a/tools/pnnx/src/pass_level2/torch_scatter_add.cpp +++ b/tools/pnnx/src/pass_level2/torch_scatter_add.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_slice_scatter.cpp b/tools/pnnx/src/pass_level2/torch_slice_scatter.cpp index e2cfad833..306cf954f 100644 --- a/tools/pnnx/src/pass_level2/torch_slice_scatter.cpp +++ b/tools/pnnx/src/pass_level2/torch_slice_scatter.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_split.cpp b/tools/pnnx/src/pass_level2/torch_split.cpp index 8ac100ff7..4694b1920 100644 --- a/tools/pnnx/src/pass_level2/torch_split.cpp +++ b/tools/pnnx/src/pass_level2/torch_split.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_squeeze.cpp b/tools/pnnx/src/pass_level2/torch_squeeze.cpp index 0fdabe821..29b7fb17d 100644 --- a/tools/pnnx/src/pass_level2/torch_squeeze.cpp +++ b/tools/pnnx/src/pass_level2/torch_squeeze.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_stack.cpp b/tools/pnnx/src/pass_level2/torch_stack.cpp index 4ff46aaeb..f45a362ed 100644 --- a/tools/pnnx/src/pass_level2/torch_stack.cpp +++ b/tools/pnnx/src/pass_level2/torch_stack.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_std.cpp b/tools/pnnx/src/pass_level2/torch_std.cpp index 83568bb46..73d192b14 100644 --- a/tools/pnnx/src/pass_level2/torch_std.cpp +++ b/tools/pnnx/src/pass_level2/torch_std.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_stft.cpp b/tools/pnnx/src/pass_level2/torch_stft.cpp index b0d9c1cf3..de82e0dc8 100644 --- a/tools/pnnx/src/pass_level2/torch_stft.cpp +++ b/tools/pnnx/src/pass_level2/torch_stft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_sum.cpp b/tools/pnnx/src/pass_level2/torch_sum.cpp index 66ea74f3c..9696938a6 100644 --- a/tools/pnnx/src/pass_level2/torch_sum.cpp +++ b/tools/pnnx/src/pass_level2/torch_sum.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_t.cpp b/tools/pnnx/src/pass_level2/torch_t.cpp index 99c1b6d8c..5cfe81bc0 100644 --- a/tools/pnnx/src/pass_level2/torch_t.cpp +++ b/tools/pnnx/src/pass_level2/torch_t.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_tensor_split.cpp b/tools/pnnx/src/pass_level2/torch_tensor_split.cpp index 19fdd1962..208d3ba6c 100644 --- a/tools/pnnx/src/pass_level2/torch_tensor_split.cpp +++ b/tools/pnnx/src/pass_level2/torch_tensor_split.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_tile.cpp b/tools/pnnx/src/pass_level2/torch_tile.cpp index 84acf1056..78fbf1bdf 100644 --- a/tools/pnnx/src/pass_level2/torch_tile.cpp +++ b/tools/pnnx/src/pass_level2/torch_tile.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_topk.cpp b/tools/pnnx/src/pass_level2/torch_topk.cpp index 992ac3634..f3d7fae98 100644 --- a/tools/pnnx/src/pass_level2/torch_topk.cpp +++ b/tools/pnnx/src/pass_level2/torch_topk.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_transpose.cpp b/tools/pnnx/src/pass_level2/torch_transpose.cpp index b82acf9e5..f31ce29b6 100644 --- a/tools/pnnx/src/pass_level2/torch_transpose.cpp +++ b/tools/pnnx/src/pass_level2/torch_transpose.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_unbind.cpp b/tools/pnnx/src/pass_level2/torch_unbind.cpp index 8d0fe2cab..80613b051 100644 --- a/tools/pnnx/src/pass_level2/torch_unbind.cpp +++ b/tools/pnnx/src/pass_level2/torch_unbind.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_unsqueeze.cpp b/tools/pnnx/src/pass_level2/torch_unsqueeze.cpp index 1ff74798a..3ced7e40c 100644 --- a/tools/pnnx/src/pass_level2/torch_unsqueeze.cpp +++ b/tools/pnnx/src/pass_level2/torch_unsqueeze.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_var.cpp b/tools/pnnx/src/pass_level2/torch_var.cpp index 12b0019fd..b1d7791c3 100644 --- a/tools/pnnx/src/pass_level2/torch_var.cpp +++ b/tools/pnnx/src/pass_level2/torch_var.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_view_as_complex.cpp b/tools/pnnx/src/pass_level2/torch_view_as_complex.cpp index 213c47658..73a2987e3 100644 --- a/tools/pnnx/src/pass_level2/torch_view_as_complex.cpp +++ b/tools/pnnx/src/pass_level2/torch_view_as_complex.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_view_as_real.cpp b/tools/pnnx/src/pass_level2/torch_view_as_real.cpp index 974ca4749..552ec2fb3 100644 --- a/tools/pnnx/src/pass_level2/torch_view_as_real.cpp +++ b/tools/pnnx/src/pass_level2/torch_view_as_real.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_where.cpp b/tools/pnnx/src/pass_level2/torch_where.cpp index 28bd204b2..93020a067 100644 --- a/tools/pnnx/src/pass_level2/torch_where.cpp +++ b/tools/pnnx/src/pass_level2/torch_where.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_zeros.cpp b/tools/pnnx/src/pass_level2/torch_zeros.cpp index e97bccbb5..42b1b5f9f 100644 --- a/tools/pnnx/src/pass_level2/torch_zeros.cpp +++ b/tools/pnnx/src/pass_level2/torch_zeros.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torch_zeros_like.cpp b/tools/pnnx/src/pass_level2/torch_zeros_like.cpp index 480111e9a..8c6d27ba4 100644 --- a/tools/pnnx/src/pass_level2/torch_zeros_like.cpp +++ b/tools/pnnx/src/pass_level2/torch_zeros_like.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torchaudio_F_inverse_spectrogram.cpp b/tools/pnnx/src/pass_level2/torchaudio_F_inverse_spectrogram.cpp index 31d51425f..cf2a30921 100644 --- a/tools/pnnx/src/pass_level2/torchaudio_F_inverse_spectrogram.cpp +++ b/tools/pnnx/src/pass_level2/torchaudio_F_inverse_spectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level2/torchaudio_F_spectrogram.cpp b/tools/pnnx/src/pass_level2/torchaudio_F_spectrogram.cpp index 0807ad850..4afc03121 100644 --- a/tools/pnnx/src/pass_level2/torchaudio_F_spectrogram.cpp +++ b/tools/pnnx/src/pass_level2/torchaudio_F_spectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level2.h" diff --git a/tools/pnnx/src/pass_level3.cpp b/tools/pnnx/src/pass_level3.cpp index 557a9eb0a..c883e51ec 100644 --- a/tools/pnnx/src/pass_level3.cpp +++ b/tools/pnnx/src/pass_level3.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level3.h" diff --git a/tools/pnnx/src/pass_level3.h b/tools/pnnx/src/pass_level3.h index 208d19e1e..c90352931 100644 --- a/tools/pnnx/src/pass_level3.h +++ b/tools/pnnx/src/pass_level3.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_LEVEL3_H #define PNNX_PASS_LEVEL3_H diff --git a/tools/pnnx/src/pass_level3/assign_unique_name.cpp b/tools/pnnx/src/pass_level3/assign_unique_name.cpp index fa387e12b..52c03c06c 100644 --- a/tools/pnnx/src/pass_level3/assign_unique_name.cpp +++ b/tools/pnnx/src/pass_level3/assign_unique_name.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "assign_unique_name.h" #include diff --git a/tools/pnnx/src/pass_level3/assign_unique_name.h b/tools/pnnx/src/pass_level3/assign_unique_name.h index afdd5b73c..896beef8e 100644 --- a/tools/pnnx/src/pass_level3/assign_unique_name.h +++ b/tools/pnnx/src/pass_level3/assign_unique_name.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/eliminate_noop_math.cpp b/tools/pnnx/src/pass_level3/eliminate_noop_math.cpp index 5822490ad..4c4685eac 100644 --- a/tools/pnnx/src/pass_level3/eliminate_noop_math.cpp +++ b/tools/pnnx/src/pass_level3/eliminate_noop_math.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_math.h" diff --git a/tools/pnnx/src/pass_level3/eliminate_noop_math.h b/tools/pnnx/src/pass_level3/eliminate_noop_math.h index 08d0113c3..79f9d242f 100644 --- a/tools/pnnx/src/pass_level3/eliminate_noop_math.h +++ b/tools/pnnx/src/pass_level3/eliminate_noop_math.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.cpp b/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.cpp index 95bcd9f19..dac37fc66 100644 --- a/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.cpp +++ b/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_squeeze_unsqueeze_pair.h" diff --git a/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.h b/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.h index d0cff7d82..c3afbeec6 100644 --- a/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.h +++ b/tools/pnnx/src/pass_level3/eliminate_squeeze_unsqueeze_pair.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/eliminate_tuple_pair.cpp b/tools/pnnx/src/pass_level3/eliminate_tuple_pair.cpp index 013538f65..1e22cd213 100644 --- a/tools/pnnx/src/pass_level3/eliminate_tuple_pair.cpp +++ b/tools/pnnx/src/pass_level3/eliminate_tuple_pair.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_tuple_pair.h" diff --git a/tools/pnnx/src/pass_level3/eliminate_tuple_pair.h b/tools/pnnx/src/pass_level3/eliminate_tuple_pair.h index df70eda27..7a5e38297 100644 --- a/tools/pnnx/src/pass_level3/eliminate_tuple_pair.h +++ b/tools/pnnx/src/pass_level3/eliminate_tuple_pair.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/expand_quantization_modules.cpp b/tools/pnnx/src/pass_level3/expand_quantization_modules.cpp index d856de94e..99df5407f 100644 --- a/tools/pnnx/src/pass_level3/expand_quantization_modules.cpp +++ b/tools/pnnx/src/pass_level3/expand_quantization_modules.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "expand_quantization_modules.h" #include diff --git a/tools/pnnx/src/pass_level3/expand_quantization_modules.h b/tools/pnnx/src/pass_level3/expand_quantization_modules.h index a57cbc8a2..91856be69 100644 --- a/tools/pnnx/src/pass_level3/expand_quantization_modules.h +++ b/tools/pnnx/src/pass_level3/expand_quantization_modules.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.cpp b/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.cpp index 1d8197c4c..fb8938dbe 100644 --- a/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.cpp +++ b/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_dynamic_adaptive_pool.h" diff --git a/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.h b/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.h index ce7a190a1..25c66c6cf 100644 --- a/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.h +++ b/tools/pnnx/src/pass_level3/fuse_dynamic_adaptive_pool.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_einsum_operands.cpp b/tools/pnnx/src/pass_level3/fuse_einsum_operands.cpp index 87a60d005..62d53264f 100644 --- a/tools/pnnx/src/pass_level3/fuse_einsum_operands.cpp +++ b/tools/pnnx/src/pass_level3/fuse_einsum_operands.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_einsum_operands.h" #include diff --git a/tools/pnnx/src/pass_level3/fuse_einsum_operands.h b/tools/pnnx/src/pass_level3/fuse_einsum_operands.h index 21861b534..6bf279f2c 100644 --- a/tools/pnnx/src/pass_level3/fuse_einsum_operands.h +++ b/tools/pnnx/src/pass_level3/fuse_einsum_operands.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_expression.cpp b/tools/pnnx/src/pass_level3/fuse_expression.cpp index dcb3d1f13..afc49be9e 100644 --- a/tools/pnnx/src/pass_level3/fuse_expression.cpp +++ b/tools/pnnx/src/pass_level3/fuse_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_expression.h" diff --git a/tools/pnnx/src/pass_level3/fuse_expression.h b/tools/pnnx/src/pass_level3/fuse_expression.h index 0bd709759..0b9e0eacd 100644 --- a/tools/pnnx/src/pass_level3/fuse_expression.h +++ b/tools/pnnx/src/pass_level3/fuse_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_index_expression.cpp b/tools/pnnx/src/pass_level3/fuse_index_expression.cpp index 59583913a..969bf95ac 100644 --- a/tools/pnnx/src/pass_level3/fuse_index_expression.cpp +++ b/tools/pnnx/src/pass_level3/fuse_index_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_index_expression.h" diff --git a/tools/pnnx/src/pass_level3/fuse_index_expression.h b/tools/pnnx/src/pass_level3/fuse_index_expression.h index 930cfa99c..0224292ce 100644 --- a/tools/pnnx/src/pass_level3/fuse_index_expression.h +++ b/tools/pnnx/src/pass_level3/fuse_index_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.cpp b/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.cpp index 5cba43c00..191263a9e 100644 --- a/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.cpp +++ b/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_maxpool_unpack.h" #include diff --git a/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.h b/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.h index 19bbf1442..98623de56 100644 --- a/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.h +++ b/tools/pnnx/src/pass_level3/fuse_maxpool_unpack.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.cpp b/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.cpp index 29ad1aef5..954382c9d 100644 --- a/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.cpp +++ b/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_multiheadattention_unpack.h" #include diff --git a/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.h b/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.h index 7285cebec..d538e6a51 100644 --- a/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.h +++ b/tools/pnnx/src/pass_level3/fuse_multiheadattention_unpack.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.cpp b/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.cpp index 882b4dd11..3f4fe403f 100644 --- a/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.cpp +++ b/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_op1ton_unpack.h" #include diff --git a/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.h b/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.h index a584c00cb..7e2a8f745 100644 --- a/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.h +++ b/tools/pnnx/src/pass_level3/fuse_op1ton_unpack.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.cpp b/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.cpp index f3dcecbc7..7f2a23446 100644 --- a/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.cpp +++ b/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_opnto1_tensors.h" #include diff --git a/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.h b/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.h index 4fb990a48..c54a173ac 100644 --- a/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.h +++ b/tools/pnnx/src/pass_level3/fuse_opnto1_tensors.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/fuse_rnn_unpack.cpp b/tools/pnnx/src/pass_level3/fuse_rnn_unpack.cpp index 42ba42234..7a58662b8 100644 --- a/tools/pnnx/src/pass_level3/fuse_rnn_unpack.cpp +++ b/tools/pnnx/src/pass_level3/fuse_rnn_unpack.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_rnn_unpack.h" #include diff --git a/tools/pnnx/src/pass_level3/fuse_rnn_unpack.h b/tools/pnnx/src/pass_level3/fuse_rnn_unpack.h index 79f1f65df..5beabb135 100644 --- a/tools/pnnx/src/pass_level3/fuse_rnn_unpack.h +++ b/tools/pnnx/src/pass_level3/fuse_rnn_unpack.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level3/rename_F_dropoutnd.cpp b/tools/pnnx/src/pass_level3/rename_F_dropoutnd.cpp index 3ddc7989a..c895d9bde 100644 --- a/tools/pnnx/src/pass_level3/rename_F_dropoutnd.cpp +++ b/tools/pnnx/src/pass_level3/rename_F_dropoutnd.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "rename_F_dropoutnd.h" #include diff --git a/tools/pnnx/src/pass_level3/rename_F_dropoutnd.h b/tools/pnnx/src/pass_level3/rename_F_dropoutnd.h index 5bc48ea35..fa1a9ac1e 100644 --- a/tools/pnnx/src/pass_level3/rename_F_dropoutnd.h +++ b/tools/pnnx/src/pass_level3/rename_F_dropoutnd.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level4.cpp b/tools/pnnx/src/pass_level4.cpp index 0e565b46d..efb2033c2 100644 --- a/tools/pnnx/src/pass_level4.cpp +++ b/tools/pnnx/src/pass_level4.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level4.h" diff --git a/tools/pnnx/src/pass_level4.h b/tools/pnnx/src/pass_level4.h index 2f6daf73b..77a07f377 100644 --- a/tools/pnnx/src/pass_level4.h +++ b/tools/pnnx/src/pass_level4.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_LEVEL4_H #define PNNX_PASS_LEVEL4_H diff --git a/tools/pnnx/src/pass_level4/canonicalize.cpp b/tools/pnnx/src/pass_level4/canonicalize.cpp index 65017e2fb..a0e01f061 100644 --- a/tools/pnnx/src/pass_level4/canonicalize.cpp +++ b/tools/pnnx/src/pass_level4/canonicalize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "canonicalize.h" diff --git a/tools/pnnx/src/pass_level4/canonicalize.h b/tools/pnnx/src/pass_level4/canonicalize.h index e65f19e1c..4f5ed9fbf 100644 --- a/tools/pnnx/src/pass_level4/canonicalize.h +++ b/tools/pnnx/src/pass_level4/canonicalize.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level4/dead_code_elimination.cpp b/tools/pnnx/src/pass_level4/dead_code_elimination.cpp index 800bd6715..e7a690086 100644 --- a/tools/pnnx/src/pass_level4/dead_code_elimination.cpp +++ b/tools/pnnx/src/pass_level4/dead_code_elimination.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dead_code_elimination.h" diff --git a/tools/pnnx/src/pass_level4/dead_code_elimination.h b/tools/pnnx/src/pass_level4/dead_code_elimination.h index 145b40904..9666f216f 100644 --- a/tools/pnnx/src/pass_level4/dead_code_elimination.h +++ b/tools/pnnx/src/pass_level4/dead_code_elimination.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level4/fuse_custom_op.cpp b/tools/pnnx/src/pass_level4/fuse_custom_op.cpp index 1b999312b..ca8cb11a6 100644 --- a/tools/pnnx/src/pass_level4/fuse_custom_op.cpp +++ b/tools/pnnx/src/pass_level4/fuse_custom_op.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_custom_op.h" diff --git a/tools/pnnx/src/pass_level4/fuse_custom_op.h b/tools/pnnx/src/pass_level4/fuse_custom_op.h index e1668c817..cfb8e8213 100644 --- a/tools/pnnx/src/pass_level4/fuse_custom_op.h +++ b/tools/pnnx/src/pass_level4/fuse_custom_op.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5.cpp b/tools/pnnx/src/pass_level5.cpp index 8cb5ee53b..c3ac108df 100644 --- a/tools/pnnx/src/pass_level5.cpp +++ b/tools/pnnx/src/pass_level5.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level5.h" diff --git a/tools/pnnx/src/pass_level5.h b/tools/pnnx/src/pass_level5.h index a040c7bf1..21c3bf445 100644 --- a/tools/pnnx/src/pass_level5.h +++ b/tools/pnnx/src/pass_level5.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_LEVEL5_H #define PNNX_PASS_LEVEL5_H diff --git a/tools/pnnx/src/pass_level5/attribute_unpooling.cpp b/tools/pnnx/src/pass_level5/attribute_unpooling.cpp index 76e7f7622..9e453159d 100644 --- a/tools/pnnx/src/pass_level5/attribute_unpooling.cpp +++ b/tools/pnnx/src/pass_level5/attribute_unpooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "attribute_unpooling.h" diff --git a/tools/pnnx/src/pass_level5/attribute_unpooling.h b/tools/pnnx/src/pass_level5/attribute_unpooling.h index 333c709be..5e7e1a2dd 100644 --- a/tools/pnnx/src/pass_level5/attribute_unpooling.h +++ b/tools/pnnx/src/pass_level5/attribute_unpooling.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_dropout.cpp b/tools/pnnx/src/pass_level5/eliminate_dropout.cpp index 9809ac189..87988b93f 100644 --- a/tools/pnnx/src/pass_level5/eliminate_dropout.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_dropout.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_dropout.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_dropout.h b/tools/pnnx/src/pass_level5/eliminate_dropout.h index d3636611a..8f02361d8 100644 --- a/tools/pnnx/src/pass_level5/eliminate_dropout.h +++ b/tools/pnnx/src/pass_level5/eliminate_dropout.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_identity_operator.cpp b/tools/pnnx/src/pass_level5/eliminate_identity_operator.cpp index 02040406e..21416d0bb 100644 --- a/tools/pnnx/src/pass_level5/eliminate_identity_operator.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_identity_operator.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_identity_operator.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_identity_operator.h b/tools/pnnx/src/pass_level5/eliminate_identity_operator.h index 7ff0299a2..898e36d7c 100644 --- a/tools/pnnx/src/pass_level5/eliminate_identity_operator.h +++ b/tools/pnnx/src/pass_level5/eliminate_identity_operator.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.cpp b/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.cpp index a677fef3a..46723c43d 100644 --- a/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_maxpool_indices.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.h b/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.h index deecf3169..28c267784 100644 --- a/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.h +++ b/tools/pnnx/src/pass_level5/eliminate_maxpool_indices.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_cat.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_cat.cpp index f09911819..d7819069a 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_cat.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_cat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_cat.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_cat.h b/tools/pnnx/src/pass_level5/eliminate_noop_cat.h index 6186ed495..51038cabf 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_cat.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_cat.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_einsum.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_einsum.cpp index f20522a16..2bb7ce28f 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_einsum.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_einsum.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_einsum.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_einsum.h b/tools/pnnx/src/pass_level5/eliminate_noop_einsum.h index 96e3811a4..9683076f0 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_einsum.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_einsum.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_expand.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_expand.cpp index 33257617b..b7d5d1143 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_expand.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_expand.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_expand.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_expand.h b/tools/pnnx/src/pass_level5/eliminate_noop_expand.h index cda5974a9..328cc3759 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_expand.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_expand.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_expression.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_expression.cpp index 02f9a9342..d43128dcf 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_expression.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_expression.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_expression.h b/tools/pnnx/src/pass_level5/eliminate_noop_expression.h index 7c015eab1..183ec3f86 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_expression.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_pad.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_pad.cpp index 7b1ca5827..ab11748f9 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_pad.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_pad.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_pad.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_pad.h b/tools/pnnx/src/pass_level5/eliminate_noop_pad.h index 359c04634..b19ab325c 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_pad.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_pad.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_slice.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_slice.cpp index 9c207e9ad..773169dd7 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_slice.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_slice.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_slice.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_slice.h b/tools/pnnx/src/pass_level5/eliminate_noop_slice.h index 162109d2a..0fc5bd5f6 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_slice.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_slice.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_upsample.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_upsample.cpp index 30f56b768..ab25dae09 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_upsample.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_upsample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_upsample.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_upsample.h b/tools/pnnx/src/pass_level5/eliminate_noop_upsample.h index 985781f22..ea48b2495 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_upsample.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_upsample.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.cpp b/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.cpp index 1f79a7a63..826a51ab5 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop_view_reshape.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.h b/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.h index 1d724d99c..c229dad13 100644 --- a/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.h +++ b/tools/pnnx/src/pass_level5/eliminate_noop_view_reshape.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.cpp b/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.cpp index 662f69685..7a537af87 100644 --- a/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_reshape_shape_expression.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.h b/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.h index d4457c3ac..4102c8499 100644 --- a/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.h +++ b/tools/pnnx/src/pass_level5/eliminate_reshape_shape_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_type_as.cpp b/tools/pnnx/src/pass_level5/eliminate_type_as.cpp index c7290fb04..c4094db9e 100644 --- a/tools/pnnx/src/pass_level5/eliminate_type_as.cpp +++ b/tools/pnnx/src/pass_level5/eliminate_type_as.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_type_as.h" diff --git a/tools/pnnx/src/pass_level5/eliminate_type_as.h b/tools/pnnx/src/pass_level5/eliminate_type_as.h index 46ec5ad57..09e7dde37 100644 --- a/tools/pnnx/src/pass_level5/eliminate_type_as.h +++ b/tools/pnnx/src/pass_level5/eliminate_type_as.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/eval_expression.cpp b/tools/pnnx/src/pass_level5/eval_expression.cpp index 3619a452f..7f3d37027 100644 --- a/tools/pnnx/src/pass_level5/eval_expression.cpp +++ b/tools/pnnx/src/pass_level5/eval_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eval_expression.h" diff --git a/tools/pnnx/src/pass_level5/eval_expression.h b/tools/pnnx/src/pass_level5/eval_expression.h index 149ef82ce..fad26d40d 100644 --- a/tools/pnnx/src/pass_level5/eval_expression.h +++ b/tools/pnnx/src/pass_level5/eval_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fold_constants.cpp b/tools/pnnx/src/pass_level5/fold_constants.cpp index 47906f761..bcb4da4f3 100644 --- a/tools/pnnx/src/pass_level5/fold_constants.cpp +++ b/tools/pnnx/src/pass_level5/fold_constants.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fold_constants.h" #include diff --git a/tools/pnnx/src/pass_level5/fold_constants.h b/tools/pnnx/src/pass_level5/fold_constants.h index 0d96f9fbd..0e7f5435c 100644 --- a/tools/pnnx/src/pass_level5/fold_constants.h +++ b/tools/pnnx/src/pass_level5/fold_constants.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.cpp b/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.cpp index f85050721..3ba7d658f 100644 --- a/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.cpp +++ b/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_adjacent_reshape.h" diff --git a/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.h b/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.h index 7f3fb51cd..cb1d03001 100644 --- a/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.h +++ b/tools/pnnx/src/pass_level5/fuse_adjacent_reshape.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_channel_shuffle.cpp b/tools/pnnx/src/pass_level5/fuse_channel_shuffle.cpp index cf7f5b3f8..ebe9882d1 100644 --- a/tools/pnnx/src/pass_level5/fuse_channel_shuffle.cpp +++ b/tools/pnnx/src/pass_level5/fuse_channel_shuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_channel_shuffle.h" diff --git a/tools/pnnx/src/pass_level5/fuse_channel_shuffle.h b/tools/pnnx/src/pass_level5/fuse_channel_shuffle.h index 3257f9cda..6e7483d1d 100644 --- a/tools/pnnx/src/pass_level5/fuse_channel_shuffle.h +++ b/tools/pnnx/src/pass_level5/fuse_channel_shuffle.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_constant_expression.cpp b/tools/pnnx/src/pass_level5/fuse_constant_expression.cpp index d25bba6ed..ebf7d33ea 100644 --- a/tools/pnnx/src/pass_level5/fuse_constant_expression.cpp +++ b/tools/pnnx/src/pass_level5/fuse_constant_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_constant_expression.h" diff --git a/tools/pnnx/src/pass_level5/fuse_constant_expression.h b/tools/pnnx/src/pass_level5/fuse_constant_expression.h index bb6a5937b..2c209283f 100644 --- a/tools/pnnx/src/pass_level5/fuse_constant_expression.h +++ b/tools/pnnx/src/pass_level5/fuse_constant_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_contiguous_view.cpp b/tools/pnnx/src/pass_level5/fuse_contiguous_view.cpp index e42a72c92..95ae88094 100644 --- a/tools/pnnx/src/pass_level5/fuse_contiguous_view.cpp +++ b/tools/pnnx/src/pass_level5/fuse_contiguous_view.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_contiguous_view.h" diff --git a/tools/pnnx/src/pass_level5/fuse_contiguous_view.h b/tools/pnnx/src/pass_level5/fuse_contiguous_view.h index 33612c867..351c70a5b 100644 --- a/tools/pnnx/src/pass_level5/fuse_contiguous_view.h +++ b/tools/pnnx/src/pass_level5/fuse_contiguous_view.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.cpp b/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.cpp index c471dc6a5..207cb7fa5 100644 --- a/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_conv1d_batchnorm1d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.h b/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.h index 89a2bd465..bbb7eb78b 100644 --- a/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.h +++ b/tools/pnnx/src/pass_level5/fuse_conv1d_batchnorm1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.cpp b/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.cpp index 3c207c71a..8990e0eb7 100644 --- a/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_conv2d_batchnorm2d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.h b/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.h index 829aa5a6d..c6f6afe77 100644 --- a/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.h +++ b/tools/pnnx/src/pass_level5/fuse_conv2d_batchnorm2d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.cpp b/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.cpp index ea89e99cb..54a822aec 100644 --- a/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_conv3d_batchnorm3d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.h b/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.h index 017201d4d..c1c39dbcf 100644 --- a/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.h +++ b/tools/pnnx/src/pass_level5/fuse_conv3d_batchnorm3d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.cpp b/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.cpp index 0b0603ffe..cc5954287 100644 --- a/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convtranspose1d_batchnorm1d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.h b/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.h index 68ced8ecc..1bbde7b9f 100644 --- a/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.h +++ b/tools/pnnx/src/pass_level5/fuse_convtranspose1d_batchnorm1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.cpp b/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.cpp index fc3244654..4c3efb4f5 100644 --- a/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convtranspose2d_batchnorm2d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.h b/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.h index 854b72a25..15361ac0b 100644 --- a/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.h +++ b/tools/pnnx/src/pass_level5/fuse_convtranspose2d_batchnorm2d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.cpp b/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.cpp index d01eebeed..5be98cdf4 100644 --- a/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convtranspose3d_batchnorm3d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.h b/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.h index f15e2f41c..340ba614c 100644 --- a/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.h +++ b/tools/pnnx/src/pass_level5/fuse_convtranspose3d_batchnorm3d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_layernorm.cpp b/tools/pnnx/src/pass_level5/fuse_layernorm.cpp index 5f60d1345..a96c09865 100644 --- a/tools/pnnx/src/pass_level5/fuse_layernorm.cpp +++ b/tools/pnnx/src/pass_level5/fuse_layernorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_layernorm.h" diff --git a/tools/pnnx/src/pass_level5/fuse_layernorm.h b/tools/pnnx/src/pass_level5/fuse_layernorm.h index ac8c82cf8..02c4df16b 100644 --- a/tools/pnnx/src/pass_level5/fuse_layernorm.h +++ b/tools/pnnx/src/pass_level5/fuse_layernorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.cpp b/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.cpp index 679cf7ec9..0f1ef8529 100644 --- a/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_linear_batchnorm1d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.h b/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.h index b04e03332..9e30d63ee 100644 --- a/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.h +++ b/tools/pnnx/src/pass_level5/fuse_linear_batchnorm1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_multiheadattention.cpp b/tools/pnnx/src/pass_level5/fuse_multiheadattention.cpp index eb23f952a..5c769c152 100644 --- a/tools/pnnx/src/pass_level5/fuse_multiheadattention.cpp +++ b/tools/pnnx/src/pass_level5/fuse_multiheadattention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_multiheadattention.h" diff --git a/tools/pnnx/src/pass_level5/fuse_multiheadattention.h b/tools/pnnx/src/pass_level5/fuse_multiheadattention.h index d8c1914d2..ea8cc472f 100644 --- a/tools/pnnx/src/pass_level5/fuse_multiheadattention.h +++ b/tools/pnnx/src/pass_level5/fuse_multiheadattention.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.cpp b/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.cpp index 1cdb6346c..c1fa6fc53 100644 --- a/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.cpp +++ b/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_multiheadattention_sameqkv.h" diff --git a/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.h b/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.h index a3ee3516e..767112295 100644 --- a/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.h +++ b/tools/pnnx/src/pass_level5/fuse_multiheadattention_sameqkv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_pad_conv1d.cpp b/tools/pnnx/src/pass_level5/fuse_pad_conv1d.cpp index 776c0dac0..963090caa 100644 --- a/tools/pnnx/src/pass_level5/fuse_pad_conv1d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_pad_conv1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_pad_conv1d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_pad_conv1d.h b/tools/pnnx/src/pass_level5/fuse_pad_conv1d.h index f121b340c..48d71503d 100644 --- a/tools/pnnx/src/pass_level5/fuse_pad_conv1d.h +++ b/tools/pnnx/src/pass_level5/fuse_pad_conv1d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_pad_conv2d.cpp b/tools/pnnx/src/pass_level5/fuse_pad_conv2d.cpp index 6710c2bce..b22fcc53d 100644 --- a/tools/pnnx/src/pass_level5/fuse_pad_conv2d.cpp +++ b/tools/pnnx/src/pass_level5/fuse_pad_conv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_pad_conv2d.h" diff --git a/tools/pnnx/src/pass_level5/fuse_pad_conv2d.h b/tools/pnnx/src/pass_level5/fuse_pad_conv2d.h index fb47be50e..6fe62e4eb 100644 --- a/tools/pnnx/src/pass_level5/fuse_pad_conv2d.h +++ b/tools/pnnx/src/pass_level5/fuse_pad_conv2d.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.cpp b/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.cpp index bbc575b93..46b0cc285 100644 --- a/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.cpp +++ b/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_pixel_unshuffle.h" diff --git a/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.h b/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.h index d852d5c43..458f4f445 100644 --- a/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.h +++ b/tools/pnnx/src/pass_level5/fuse_pixel_unshuffle.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_rmsnorm.cpp b/tools/pnnx/src/pass_level5/fuse_rmsnorm.cpp index 7b99770ed..23d4f177d 100644 --- a/tools/pnnx/src/pass_level5/fuse_rmsnorm.cpp +++ b/tools/pnnx/src/pass_level5/fuse_rmsnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_rmsnorm.h" diff --git a/tools/pnnx/src/pass_level5/fuse_rmsnorm.h b/tools/pnnx/src/pass_level5/fuse_rmsnorm.h index 0ba18e37f..a748f26ce 100644 --- a/tools/pnnx/src/pass_level5/fuse_rmsnorm.h +++ b/tools/pnnx/src/pass_level5/fuse_rmsnorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.cpp b/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.cpp index a6dcbc86d..1d16ce9aa 100644 --- a/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.cpp +++ b/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_scaled_dot_product_attention.h" diff --git a/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.h b/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.h index 0eb13015c..8b733ce97 100644 --- a/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.h +++ b/tools/pnnx/src/pass_level5/fuse_scaled_dot_product_attention.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_select_to_unbind.cpp b/tools/pnnx/src/pass_level5/fuse_select_to_unbind.cpp index 91c678fea..e9b6c78c0 100644 --- a/tools/pnnx/src/pass_level5/fuse_select_to_unbind.cpp +++ b/tools/pnnx/src/pass_level5/fuse_select_to_unbind.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_select_to_unbind.h" diff --git a/tools/pnnx/src/pass_level5/fuse_select_to_unbind.h b/tools/pnnx/src/pass_level5/fuse_select_to_unbind.h index b48e64432..1e45a2bea 100644 --- a/tools/pnnx/src/pass_level5/fuse_select_to_unbind.h +++ b/tools/pnnx/src/pass_level5/fuse_select_to_unbind.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_silu.cpp b/tools/pnnx/src/pass_level5/fuse_silu.cpp index c7d7e10eb..010d6aa13 100644 --- a/tools/pnnx/src/pass_level5/fuse_silu.cpp +++ b/tools/pnnx/src/pass_level5/fuse_silu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_silu.h" diff --git a/tools/pnnx/src/pass_level5/fuse_silu.h b/tools/pnnx/src/pass_level5/fuse_silu.h index dde78e60e..4e1622ac0 100644 --- a/tools/pnnx/src/pass_level5/fuse_silu.h +++ b/tools/pnnx/src/pass_level5/fuse_silu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_copy.cpp b/tools/pnnx/src/pass_level5/fuse_slice_copy.cpp index eccae6f11..d6ad55b5e 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_copy.cpp +++ b/tools/pnnx/src/pass_level5/fuse_slice_copy.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_slice_copy.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_copy.h b/tools/pnnx/src/pass_level5/fuse_slice_copy.h index db3aef773..3f952d866 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_copy.h +++ b/tools/pnnx/src/pass_level5/fuse_slice_copy.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_indices.cpp b/tools/pnnx/src/pass_level5/fuse_slice_indices.cpp index 332ca6b57..fbe15b628 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_indices.cpp +++ b/tools/pnnx/src/pass_level5/fuse_slice_indices.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_slice_indices.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_indices.h b/tools/pnnx/src/pass_level5/fuse_slice_indices.h index ca8dfa32d..c39781e18 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_indices.h +++ b/tools/pnnx/src/pass_level5/fuse_slice_indices.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.cpp b/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.cpp index 0495b083c..ebec94405 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.cpp +++ b/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_slice_squeeze_to_select.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.h b/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.h index 562b5b052..ce99be889 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.h +++ b/tools/pnnx/src/pass_level5/fuse_slice_squeeze_to_select.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.cpp b/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.cpp index 5b74636d1..273cf26ac 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.cpp +++ b/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_slice_to_tensor_split.h" diff --git a/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.h b/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.h index 1c172838b..7d2e948f2 100644 --- a/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.h +++ b/tools/pnnx/src/pass_level5/fuse_slice_to_tensor_split.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_batchnorm.cpp b/tools/pnnx/src/pass_level5/fuse_static_batchnorm.cpp index 1a3363b60..8caab7ca7 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_batchnorm.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_batchnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_batchnorm.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_batchnorm.h b/tools/pnnx/src/pass_level5/fuse_static_batchnorm.h index 7ffc7ca2c..d07c5cc45 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_batchnorm.h +++ b/tools/pnnx/src/pass_level5/fuse_static_batchnorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_conv.cpp b/tools/pnnx/src/pass_level5/fuse_static_conv.cpp index e0fd29a59..025a79b98 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_conv.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_conv.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_conv.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_conv.h b/tools/pnnx/src/pass_level5/fuse_static_conv.h index b6bf6c0ae..c854d83bb 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_conv.h +++ b/tools/pnnx/src/pass_level5/fuse_static_conv.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_convtranspose.cpp b/tools/pnnx/src/pass_level5/fuse_static_convtranspose.cpp index 5d6aa66f3..141f614da 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_convtranspose.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_convtranspose.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_convtranspose.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_convtranspose.h b/tools/pnnx/src/pass_level5/fuse_static_convtranspose.h index 2474074a1..e9cb60007 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_convtranspose.h +++ b/tools/pnnx/src/pass_level5/fuse_static_convtranspose.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_embedding.cpp b/tools/pnnx/src/pass_level5/fuse_static_embedding.cpp index f5ad240f2..90534e10f 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_embedding.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_embedding.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_embedding.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_embedding.h b/tools/pnnx/src/pass_level5/fuse_static_embedding.h index 3e53c8665..358b1a1f7 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_embedding.h +++ b/tools/pnnx/src/pass_level5/fuse_static_embedding.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_groupnorm.cpp b/tools/pnnx/src/pass_level5/fuse_static_groupnorm.cpp index c0ab1f77c..a18a7aa3d 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_groupnorm.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_groupnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_groupnorm.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_groupnorm.h b/tools/pnnx/src/pass_level5/fuse_static_groupnorm.h index 2de65fa30..db3915638 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_groupnorm.h +++ b/tools/pnnx/src/pass_level5/fuse_static_groupnorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_instancenorm.cpp b/tools/pnnx/src/pass_level5/fuse_static_instancenorm.cpp index 86fc2c2dc..138c18850 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_instancenorm.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_instancenorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_instancenorm.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_instancenorm.h b/tools/pnnx/src/pass_level5/fuse_static_instancenorm.h index df71b0e52..cb31dd63f 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_instancenorm.h +++ b/tools/pnnx/src/pass_level5/fuse_static_instancenorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_layernorm.cpp b/tools/pnnx/src/pass_level5/fuse_static_layernorm.cpp index 2590bc1a0..cefc9a24c 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_layernorm.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_layernorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_layernorm.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_layernorm.h b/tools/pnnx/src/pass_level5/fuse_static_layernorm.h index e61f254d2..d9bdeec71 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_layernorm.h +++ b/tools/pnnx/src/pass_level5/fuse_static_layernorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_linear.cpp b/tools/pnnx/src/pass_level5/fuse_static_linear.cpp index 7396142d4..1a78fc53a 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_linear.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_linear.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_linear.h b/tools/pnnx/src/pass_level5/fuse_static_linear.h index 8c26f924c..4720bc596 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_linear.h +++ b/tools/pnnx/src/pass_level5/fuse_static_linear.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_prelu.cpp b/tools/pnnx/src/pass_level5/fuse_static_prelu.cpp index 7bdf9a8b0..1d61af6b9 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_prelu.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_prelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_prelu.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_prelu.h b/tools/pnnx/src/pass_level5/fuse_static_prelu.h index 778662ce8..a5dd9b313 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_prelu.h +++ b/tools/pnnx/src/pass_level5/fuse_static_prelu.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.cpp b/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.cpp index ed68c026d..802ba0ff9 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.cpp +++ b/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_static_rmsnorm.h" diff --git a/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.h b/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.h index c88b703cb..1b16e6f1f 100644 --- a/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.h +++ b/tools/pnnx/src/pass_level5/fuse_static_rmsnorm.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.cpp b/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.cpp index a62d3d019..6080d3455 100644 --- a/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.cpp +++ b/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_multiheadattention.h" diff --git a/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.h b/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.h index 84aa3c39e..ec9a94bdb 100644 --- a/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.h +++ b/tools/pnnx/src/pass_level5/fuse_transformers_multiheadattention.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.cpp b/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.cpp index ca4b3e722..1ff57004e 100644 --- a/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.cpp +++ b/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_scaled_dot_product_attention.h" diff --git a/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.h b/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.h index 7d1d40a8e..1e1fe47bc 100644 --- a/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.h +++ b/tools/pnnx/src/pass_level5/fuse_transformers_scaled_dot_product_attention.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/normalize_einsum_equation.cpp b/tools/pnnx/src/pass_level5/normalize_einsum_equation.cpp index 0f1902ab9..1b6bbd82c 100644 --- a/tools/pnnx/src/pass_level5/normalize_einsum_equation.cpp +++ b/tools/pnnx/src/pass_level5/normalize_einsum_equation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "normalize_einsum_equation.h" diff --git a/tools/pnnx/src/pass_level5/normalize_einsum_equation.h b/tools/pnnx/src/pass_level5/normalize_einsum_equation.h index 30cda5d7b..3970bd0b1 100644 --- a/tools/pnnx/src/pass_level5/normalize_einsum_equation.h +++ b/tools/pnnx/src/pass_level5/normalize_einsum_equation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_level5/unroll_rnn_op.cpp b/tools/pnnx/src/pass_level5/unroll_rnn_op.cpp index 2fda02423..5e4528c59 100644 --- a/tools/pnnx/src/pass_level5/unroll_rnn_op.cpp +++ b/tools/pnnx/src/pass_level5/unroll_rnn_op.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "unroll_rnn_op.h" diff --git a/tools/pnnx/src/pass_level5/unroll_rnn_op.h b/tools/pnnx/src/pass_level5/unroll_rnn_op.h index a3d57a84f..38b3ca798 100644 --- a/tools/pnnx/src/pass_level5/unroll_rnn_op.h +++ b/tools/pnnx/src/pass_level5/unroll_rnn_op.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_level5.h" diff --git a/tools/pnnx/src/pass_ncnn.cpp b/tools/pnnx/src/pass_ncnn.cpp index c5804c1ca..947d0d6af 100644 --- a/tools/pnnx/src/pass_ncnn.cpp +++ b/tools/pnnx/src/pass_ncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn.h b/tools/pnnx/src/pass_ncnn.h index f6991d7a6..1c8b7ba6f 100644 --- a/tools/pnnx/src/pass_ncnn.h +++ b/tools/pnnx/src/pass_ncnn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_NCNN_H #define PNNX_PASS_NCNN_H diff --git a/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool1d.cpp b/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool1d.cpp index e975151da..028f0e2e9 100644 --- a/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool2d.cpp b/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool2d.cpp index bf06ea0b7..4831a8ba7 100644 --- a/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool3d.cpp b/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool3d.cpp index 444be100e..4ede2d9af 100644 --- a/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_adaptive_avg_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool1d.cpp b/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool1d.cpp index 816794794..1d806f42e 100644 --- a/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool2d.cpp b/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool2d.cpp index 8d1a37c8d..6a13cb0d2 100644 --- a/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool3d.cpp b/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool3d.cpp index ca6386a49..6050c757a 100644 --- a/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_adaptive_max_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_avg_pool1d.cpp b/tools/pnnx/src/pass_ncnn/F_avg_pool1d.cpp index 691b762d1..dccebf9aa 100644 --- a/tools/pnnx/src/pass_ncnn/F_avg_pool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_avg_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_avg_pool2d.cpp b/tools/pnnx/src/pass_ncnn/F_avg_pool2d.cpp index 8403831f8..01967d102 100644 --- a/tools/pnnx/src/pass_ncnn/F_avg_pool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_avg_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_avg_pool3d.cpp b/tools/pnnx/src/pass_ncnn/F_avg_pool3d.cpp index ec5d4123a..7017b90f0 100644 --- a/tools/pnnx/src/pass_ncnn/F_avg_pool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_avg_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_batch_norm.cpp b/tools/pnnx/src/pass_ncnn/F_batch_norm.cpp index 68971c647..fdfe72f2b 100644 --- a/tools/pnnx/src/pass_ncnn/F_batch_norm.cpp +++ b/tools/pnnx/src/pass_ncnn/F_batch_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_celu.cpp b/tools/pnnx/src/pass_ncnn/F_celu.cpp index dd89d8897..0d193084e 100644 --- a/tools/pnnx/src/pass_ncnn/F_celu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_celu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_conv1d.cpp b/tools/pnnx/src/pass_ncnn/F_conv1d.cpp index daa1eb0e2..0b64497e6 100644 --- a/tools/pnnx/src/pass_ncnn/F_conv1d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_conv1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_conv2d.cpp b/tools/pnnx/src/pass_ncnn/F_conv2d.cpp index 8480b80aa..8e1187375 100644 --- a/tools/pnnx/src/pass_ncnn/F_conv2d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_conv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_conv3d.cpp b/tools/pnnx/src/pass_ncnn/F_conv3d.cpp index 890f36cc9..5bdb0c8fa 100644 --- a/tools/pnnx/src/pass_ncnn/F_conv3d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_conv3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_conv_transpose1d.cpp b/tools/pnnx/src/pass_ncnn/F_conv_transpose1d.cpp index 7131557ce..c600e56bd 100644 --- a/tools/pnnx/src/pass_ncnn/F_conv_transpose1d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_conv_transpose1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_conv_transpose2d.cpp b/tools/pnnx/src/pass_ncnn/F_conv_transpose2d.cpp index f0e578e7b..2f8f7e323 100644 --- a/tools/pnnx/src/pass_ncnn/F_conv_transpose2d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_conv_transpose2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_conv_transpose3d.cpp b/tools/pnnx/src/pass_ncnn/F_conv_transpose3d.cpp index 890f36cc9..5bdb0c8fa 100644 --- a/tools/pnnx/src/pass_ncnn/F_conv_transpose3d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_conv_transpose3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_elu.cpp b/tools/pnnx/src/pass_ncnn/F_elu.cpp index fc55e80cc..ae08584ea 100644 --- a/tools/pnnx/src/pass_ncnn/F_elu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_elu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_embedding.cpp b/tools/pnnx/src/pass_ncnn/F_embedding.cpp index 708f69c33..5e34ea84f 100644 --- a/tools/pnnx/src/pass_ncnn/F_embedding.cpp +++ b/tools/pnnx/src/pass_ncnn/F_embedding.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_fold.cpp b/tools/pnnx/src/pass_ncnn/F_fold.cpp index 1d35a72eb..2c9e93e86 100644 --- a/tools/pnnx/src/pass_ncnn/F_fold.cpp +++ b/tools/pnnx/src/pass_ncnn/F_fold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_gelu.cpp b/tools/pnnx/src/pass_ncnn/F_gelu.cpp index fd5305d61..10238c081 100644 --- a/tools/pnnx/src/pass_ncnn/F_gelu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_gelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_glu.cpp b/tools/pnnx/src/pass_ncnn/F_glu.cpp index 3baf63ce5..92ab3bab2 100644 --- a/tools/pnnx/src/pass_ncnn/F_glu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_glu.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// 2022 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_grid_sample.cpp b/tools/pnnx/src/pass_ncnn/F_grid_sample.cpp index 917f27eaf..212070da1 100644 --- a/tools/pnnx/src/pass_ncnn/F_grid_sample.cpp +++ b/tools/pnnx/src/pass_ncnn/F_grid_sample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_group_norm.cpp b/tools/pnnx/src/pass_ncnn/F_group_norm.cpp index 0af5d32c5..427dc223e 100644 --- a/tools/pnnx/src/pass_ncnn/F_group_norm.cpp +++ b/tools/pnnx/src/pass_ncnn/F_group_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_hardsigmoid.cpp b/tools/pnnx/src/pass_ncnn/F_hardsigmoid.cpp index 5d0bf0f54..677a16c37 100644 --- a/tools/pnnx/src/pass_ncnn/F_hardsigmoid.cpp +++ b/tools/pnnx/src/pass_ncnn/F_hardsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_hardswish.cpp b/tools/pnnx/src/pass_ncnn/F_hardswish.cpp index b1294136e..ed4161577 100644 --- a/tools/pnnx/src/pass_ncnn/F_hardswish.cpp +++ b/tools/pnnx/src/pass_ncnn/F_hardswish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_hardtanh.cpp b/tools/pnnx/src/pass_ncnn/F_hardtanh.cpp index 29904730a..24e146ae8 100644 --- a/tools/pnnx/src/pass_ncnn/F_hardtanh.cpp +++ b/tools/pnnx/src/pass_ncnn/F_hardtanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_instance_norm.cpp b/tools/pnnx/src/pass_ncnn/F_instance_norm.cpp index 36d71afa6..cd38c2d23 100644 --- a/tools/pnnx/src/pass_ncnn/F_instance_norm.cpp +++ b/tools/pnnx/src/pass_ncnn/F_instance_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_interpolate.cpp b/tools/pnnx/src/pass_ncnn/F_interpolate.cpp index 07690b640..8b3426a3d 100644 --- a/tools/pnnx/src/pass_ncnn/F_interpolate.cpp +++ b/tools/pnnx/src/pass_ncnn/F_interpolate.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_layer_norm.cpp b/tools/pnnx/src/pass_ncnn/F_layer_norm.cpp index 74ec974fb..81da34c5d 100644 --- a/tools/pnnx/src/pass_ncnn/F_layer_norm.cpp +++ b/tools/pnnx/src/pass_ncnn/F_layer_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_leaky_relu.cpp b/tools/pnnx/src/pass_ncnn/F_leaky_relu.cpp index 3f45afc9d..927a3a004 100644 --- a/tools/pnnx/src/pass_ncnn/F_leaky_relu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_leaky_relu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_linear.cpp b/tools/pnnx/src/pass_ncnn/F_linear.cpp index 890f36cc9..5bdb0c8fa 100644 --- a/tools/pnnx/src/pass_ncnn/F_linear.cpp +++ b/tools/pnnx/src/pass_ncnn/F_linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_local_response_norm.cpp b/tools/pnnx/src/pass_ncnn/F_local_response_norm.cpp index e4ee419b4..4a15a8d65 100644 --- a/tools/pnnx/src/pass_ncnn/F_local_response_norm.cpp +++ b/tools/pnnx/src/pass_ncnn/F_local_response_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_log_softmax.cpp b/tools/pnnx/src/pass_ncnn/F_log_softmax.cpp index 046546f51..1bc751911 100644 --- a/tools/pnnx/src/pass_ncnn/F_log_softmax.cpp +++ b/tools/pnnx/src/pass_ncnn/F_log_softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_logsigmoid.cpp b/tools/pnnx/src/pass_ncnn/F_logsigmoid.cpp index a894689ad..d86de00a1 100644 --- a/tools/pnnx/src/pass_ncnn/F_logsigmoid.cpp +++ b/tools/pnnx/src/pass_ncnn/F_logsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_max_pool1d.cpp b/tools/pnnx/src/pass_ncnn/F_max_pool1d.cpp index aaef7db2d..e85a03056 100644 --- a/tools/pnnx/src/pass_ncnn/F_max_pool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_max_pool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_max_pool2d.cpp b/tools/pnnx/src/pass_ncnn/F_max_pool2d.cpp index 3519c8a02..a0f0d3a07 100644 --- a/tools/pnnx/src/pass_ncnn/F_max_pool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_max_pool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_max_pool3d.cpp b/tools/pnnx/src/pass_ncnn/F_max_pool3d.cpp index 2caede16a..a89784b58 100644 --- a/tools/pnnx/src/pass_ncnn/F_max_pool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/F_max_pool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_mish.cpp b/tools/pnnx/src/pass_ncnn/F_mish.cpp index 93f3fe389..823f15e27 100644 --- a/tools/pnnx/src/pass_ncnn/F_mish.cpp +++ b/tools/pnnx/src/pass_ncnn/F_mish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_normalize.cpp b/tools/pnnx/src/pass_ncnn/F_normalize.cpp index 2030ba567..e3c7b8ab5 100644 --- a/tools/pnnx/src/pass_ncnn/F_normalize.cpp +++ b/tools/pnnx/src/pass_ncnn/F_normalize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_pad.cpp b/tools/pnnx/src/pass_ncnn/F_pad.cpp index 04b358973..5067271cc 100644 --- a/tools/pnnx/src/pass_ncnn/F_pad.cpp +++ b/tools/pnnx/src/pass_ncnn/F_pad.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_pixel_shuffle.cpp b/tools/pnnx/src/pass_ncnn/F_pixel_shuffle.cpp index 0cedb9289..5ae646764 100644 --- a/tools/pnnx/src/pass_ncnn/F_pixel_shuffle.cpp +++ b/tools/pnnx/src/pass_ncnn/F_pixel_shuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_pixel_unshuffle.cpp b/tools/pnnx/src/pass_ncnn/F_pixel_unshuffle.cpp index 5791ba1a8..a28028054 100644 --- a/tools/pnnx/src/pass_ncnn/F_pixel_unshuffle.cpp +++ b/tools/pnnx/src/pass_ncnn/F_pixel_unshuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_prelu.cpp b/tools/pnnx/src/pass_ncnn/F_prelu.cpp index b9036d3f1..b439076e3 100644 --- a/tools/pnnx/src/pass_ncnn/F_prelu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_prelu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_relu.cpp b/tools/pnnx/src/pass_ncnn/F_relu.cpp index 3a9794d57..093df186f 100644 --- a/tools/pnnx/src/pass_ncnn/F_relu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_relu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_relu6.cpp b/tools/pnnx/src/pass_ncnn/F_relu6.cpp index 6ebd658a0..a896b1b53 100644 --- a/tools/pnnx/src/pass_ncnn/F_relu6.cpp +++ b/tools/pnnx/src/pass_ncnn/F_relu6.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_rms_norm.cpp b/tools/pnnx/src/pass_ncnn/F_rms_norm.cpp index 823016831..f1aa20da4 100644 --- a/tools/pnnx/src/pass_ncnn/F_rms_norm.cpp +++ b/tools/pnnx/src/pass_ncnn/F_rms_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_scaled_dot_product_attention.cpp b/tools/pnnx/src/pass_ncnn/F_scaled_dot_product_attention.cpp index a9d63bfd1..59d69b945 100644 --- a/tools/pnnx/src/pass_ncnn/F_scaled_dot_product_attention.cpp +++ b/tools/pnnx/src/pass_ncnn/F_scaled_dot_product_attention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_selu.cpp b/tools/pnnx/src/pass_ncnn/F_selu.cpp index eb64b7982..f53e0b438 100644 --- a/tools/pnnx/src/pass_ncnn/F_selu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_selu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_sigmoid.cpp b/tools/pnnx/src/pass_ncnn/F_sigmoid.cpp index c6e785046..109552240 100644 --- a/tools/pnnx/src/pass_ncnn/F_sigmoid.cpp +++ b/tools/pnnx/src/pass_ncnn/F_sigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_silu.cpp b/tools/pnnx/src/pass_ncnn/F_silu.cpp index ccad64027..b5e33b165 100644 --- a/tools/pnnx/src/pass_ncnn/F_silu.cpp +++ b/tools/pnnx/src/pass_ncnn/F_silu.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_softmax.cpp b/tools/pnnx/src/pass_ncnn/F_softmax.cpp index a3a23587a..e64703aff 100644 --- a/tools/pnnx/src/pass_ncnn/F_softmax.cpp +++ b/tools/pnnx/src/pass_ncnn/F_softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_tanh.cpp b/tools/pnnx/src/pass_ncnn/F_tanh.cpp index cb1528568..1c7872edf 100644 --- a/tools/pnnx/src/pass_ncnn/F_tanh.cpp +++ b/tools/pnnx/src/pass_ncnn/F_tanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_unfold.cpp b/tools/pnnx/src/pass_ncnn/F_unfold.cpp index 14f82b08f..a9279b6a5 100644 --- a/tools/pnnx/src/pass_ncnn/F_unfold.cpp +++ b/tools/pnnx/src/pass_ncnn/F_unfold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_upsample.cpp b/tools/pnnx/src/pass_ncnn/F_upsample.cpp index 6c61aa894..e8f789b14 100644 --- a/tools/pnnx/src/pass_ncnn/F_upsample.cpp +++ b/tools/pnnx/src/pass_ncnn/F_upsample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_upsample_bilinear.cpp b/tools/pnnx/src/pass_ncnn/F_upsample_bilinear.cpp index 0b4dd0e47..a87072315 100644 --- a/tools/pnnx/src/pass_ncnn/F_upsample_bilinear.cpp +++ b/tools/pnnx/src/pass_ncnn/F_upsample_bilinear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/F_upsample_nearest.cpp b/tools/pnnx/src/pass_ncnn/F_upsample_nearest.cpp index 897dbfbe2..3255f61e4 100644 --- a/tools/pnnx/src/pass_ncnn/F_upsample_nearest.cpp +++ b/tools/pnnx/src/pass_ncnn/F_upsample_nearest.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/Tensor_contiguous.cpp b/tools/pnnx/src/pass_ncnn/Tensor_contiguous.cpp index 12f097b4a..f1838456f 100644 --- a/tools/pnnx/src/pass_ncnn/Tensor_contiguous.cpp +++ b/tools/pnnx/src/pass_ncnn/Tensor_contiguous.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/Tensor_permute.cpp b/tools/pnnx/src/pass_ncnn/Tensor_permute.cpp index 5736b07bf..71cb9fc2b 100644 --- a/tools/pnnx/src/pass_ncnn/Tensor_permute.cpp +++ b/tools/pnnx/src/pass_ncnn/Tensor_permute.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/Tensor_repeat.cpp b/tools/pnnx/src/pass_ncnn/Tensor_repeat.cpp index 1d7a26301..4a07a14d2 100644 --- a/tools/pnnx/src/pass_ncnn/Tensor_repeat.cpp +++ b/tools/pnnx/src/pass_ncnn/Tensor_repeat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/Tensor_reshape.cpp b/tools/pnnx/src/pass_ncnn/Tensor_reshape.cpp index c091ccccb..ee1769b9e 100644 --- a/tools/pnnx/src/pass_ncnn/Tensor_reshape.cpp +++ b/tools/pnnx/src/pass_ncnn/Tensor_reshape.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/Tensor_reshape_as.cpp b/tools/pnnx/src/pass_ncnn/Tensor_reshape_as.cpp index 706c098c5..ac0f32d01 100644 --- a/tools/pnnx/src/pass_ncnn/Tensor_reshape_as.cpp +++ b/tools/pnnx/src/pass_ncnn/Tensor_reshape_as.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/Tensor_view.cpp b/tools/pnnx/src/pass_ncnn/Tensor_view.cpp index c7f3296db..673987ba8 100644 --- a/tools/pnnx/src/pass_ncnn/Tensor_view.cpp +++ b/tools/pnnx/src/pass_ncnn/Tensor_view.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/chain_multi_output.cpp b/tools/pnnx/src/pass_ncnn/chain_multi_output.cpp index c28668692..21407a767 100644 --- a/tools/pnnx/src/pass_ncnn/chain_multi_output.cpp +++ b/tools/pnnx/src/pass_ncnn/chain_multi_output.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "chain_multi_output.h" diff --git a/tools/pnnx/src/pass_ncnn/chain_multi_output.h b/tools/pnnx/src/pass_ncnn/chain_multi_output.h index 619ede9e3..3fe38ff25 100644 --- a/tools/pnnx/src/pass_ncnn/chain_multi_output.h +++ b/tools/pnnx/src/pass_ncnn/chain_multi_output.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_Tensor_select.cpp b/tools/pnnx/src/pass_ncnn/convert_Tensor_select.cpp index 4d65f1bc7..cc9d371c5 100644 --- a/tools/pnnx/src/pass_ncnn/convert_Tensor_select.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_Tensor_select.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_Tensor_select.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_Tensor_select.h b/tools/pnnx/src/pass_ncnn/convert_Tensor_select.h index 66262a2ef..da304a7e0 100644 --- a/tools/pnnx/src/pass_ncnn/convert_Tensor_select.h +++ b/tools/pnnx/src/pass_ncnn/convert_Tensor_select.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.cpp b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.cpp index 75e9c5acc..74c2cd3ca 100644 --- a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_Tensor_slice.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.h b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.h index 004815779..9fba42995 100644 --- a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.h +++ b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.cpp b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.cpp index 42bddf35b..115c360ac 100644 --- a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_Tensor_slice_copy.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.h b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.h index 241064a3b..165ea3ea7 100644 --- a/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.h +++ b/tools/pnnx/src/pass_ncnn/convert_Tensor_slice_copy.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_attribute.cpp b/tools/pnnx/src/pass_ncnn/convert_attribute.cpp index dc8694e42..3c972fae2 100644 --- a/tools/pnnx/src/pass_ncnn/convert_attribute.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_attribute.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_attribute.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_attribute.h b/tools/pnnx/src/pass_ncnn/convert_attribute.h index d7345dc9d..69449623d 100644 --- a/tools/pnnx/src/pass_ncnn/convert_attribute.h +++ b/tools/pnnx/src/pass_ncnn/convert_attribute.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_custom_op.cpp b/tools/pnnx/src/pass_ncnn/convert_custom_op.cpp index e4d804623..5058d116b 100644 --- a/tools/pnnx/src/pass_ncnn/convert_custom_op.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_custom_op.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_custom_op.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_custom_op.h b/tools/pnnx/src/pass_ncnn/convert_custom_op.h index 3ee1455ed..7b099212e 100644 --- a/tools/pnnx/src/pass_ncnn/convert_custom_op.h +++ b/tools/pnnx/src/pass_ncnn/convert_custom_op.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_half_to_float.cpp b/tools/pnnx/src/pass_ncnn/convert_half_to_float.cpp index 3e8cc2923..386bc0b3b 100644 --- a/tools/pnnx/src/pass_ncnn/convert_half_to_float.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_half_to_float.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_half_to_float.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_half_to_float.h b/tools/pnnx/src/pass_ncnn/convert_half_to_float.h index b7dd799a8..2d22b3fc9 100644 --- a/tools/pnnx/src/pass_ncnn/convert_half_to_float.h +++ b/tools/pnnx/src/pass_ncnn/convert_half_to_float.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_input.cpp b/tools/pnnx/src/pass_ncnn/convert_input.cpp index 71a471519..527a11de2 100644 --- a/tools/pnnx/src/pass_ncnn/convert_input.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_input.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_input.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_input.h b/tools/pnnx/src/pass_ncnn/convert_input.h index 328c18cfb..d8c4665a3 100644 --- a/tools/pnnx/src/pass_ncnn/convert_input.h +++ b/tools/pnnx/src/pass_ncnn/convert_input.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_module_op.cpp b/tools/pnnx/src/pass_ncnn/convert_module_op.cpp index eb8b28bf4..5f1701465 100644 --- a/tools/pnnx/src/pass_ncnn/convert_module_op.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_module_op.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_module_op.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_module_op.h b/tools/pnnx/src/pass_ncnn/convert_module_op.h index 63c09df17..1dad3843d 100644 --- a/tools/pnnx/src/pass_ncnn/convert_module_op.h +++ b/tools/pnnx/src/pass_ncnn/convert_module_op.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.cpp b/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.cpp index 384fd9801..e55e5394c 100644 --- a/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_reshape_interp_expression.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.h b/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.h index a19b53e89..63e14eddb 100644 --- a/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.h +++ b/tools/pnnx/src/pass_ncnn/convert_reshape_interp_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_slice_expression.cpp b/tools/pnnx/src/pass_ncnn/convert_slice_expression.cpp index 7f382d1c0..b873c90f8 100644 --- a/tools/pnnx/src/pass_ncnn/convert_slice_expression.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_slice_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_slice_expression.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_slice_expression.h b/tools/pnnx/src/pass_ncnn/convert_slice_expression.h index 2c57db53a..9d626248c 100644 --- a/tools/pnnx/src/pass_ncnn/convert_slice_expression.h +++ b/tools/pnnx/src/pass_ncnn/convert_slice_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_cat.cpp b/tools/pnnx/src/pass_ncnn/convert_torch_cat.cpp index e15c24b51..78011e971 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_cat.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_torch_cat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_torch_cat.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_cat.h b/tools/pnnx/src/pass_ncnn/convert_torch_cat.h index c7f4a26e6..f555a5e2e 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_cat.h +++ b/tools/pnnx/src/pass_ncnn/convert_torch_cat.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_chunk.cpp b/tools/pnnx/src/pass_ncnn/convert_torch_chunk.cpp index 4c2607f97..b3ebfdd75 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_chunk.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_torch_chunk.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_torch_chunk.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_chunk.h b/tools/pnnx/src/pass_ncnn/convert_torch_chunk.h index 3f3002573..dee9b8a87 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_chunk.h +++ b/tools/pnnx/src/pass_ncnn/convert_torch_chunk.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_einsum.cpp b/tools/pnnx/src/pass_ncnn/convert_torch_einsum.cpp index 2a7b34880..e706bd2c4 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_einsum.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_torch_einsum.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_torch_einsum.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_einsum.h b/tools/pnnx/src/pass_ncnn/convert_torch_einsum.h index 21aef9d84..90828eeea 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_einsum.h +++ b/tools/pnnx/src/pass_ncnn/convert_torch_einsum.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_split.cpp b/tools/pnnx/src/pass_ncnn/convert_torch_split.cpp index 3c50b6f42..961e6508c 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_split.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_torch_split.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_torch_split.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_split.h b/tools/pnnx/src/pass_ncnn/convert_torch_split.h index 2ec4c8246..5ee1be167 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_split.h +++ b/tools/pnnx/src/pass_ncnn/convert_torch_split.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_stack.cpp b/tools/pnnx/src/pass_ncnn/convert_torch_stack.cpp index a9c0e9f73..b70a202fa 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_stack.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_torch_stack.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_torch_stack.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_stack.h b/tools/pnnx/src/pass_ncnn/convert_torch_stack.h index 40495b730..e9be487d4 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_stack.h +++ b/tools/pnnx/src/pass_ncnn/convert_torch_stack.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.cpp b/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.cpp index 04fd7bfd2..547d706cc 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_torch_tensor_split.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.h b/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.h index 7793029db..b4ca7dc83 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.h +++ b/tools/pnnx/src/pass_ncnn/convert_torch_tensor_split.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_unbind.cpp b/tools/pnnx/src/pass_ncnn/convert_torch_unbind.cpp index fd6b718aa..8ed94469f 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_unbind.cpp +++ b/tools/pnnx/src/pass_ncnn/convert_torch_unbind.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "convert_torch_unbind.h" diff --git a/tools/pnnx/src/pass_ncnn/convert_torch_unbind.h b/tools/pnnx/src/pass_ncnn/convert_torch_unbind.h index 3180a11a4..e4d99f367 100644 --- a/tools/pnnx/src/pass_ncnn/convert_torch_unbind.h +++ b/tools/pnnx/src/pass_ncnn/convert_torch_unbind.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/eliminate_noop.cpp b/tools/pnnx/src/pass_ncnn/eliminate_noop.cpp index 2d30f60ba..62e71af69 100644 --- a/tools/pnnx/src/pass_ncnn/eliminate_noop.cpp +++ b/tools/pnnx/src/pass_ncnn/eliminate_noop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop.h" diff --git a/tools/pnnx/src/pass_ncnn/eliminate_noop.h b/tools/pnnx/src/pass_ncnn/eliminate_noop.h index bfe278453..5c1f135ba 100644 --- a/tools/pnnx/src/pass_ncnn/eliminate_noop.h +++ b/tools/pnnx/src/pass_ncnn/eliminate_noop.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/eliminate_output.cpp b/tools/pnnx/src/pass_ncnn/eliminate_output.cpp index 2cafb0a1c..42e3ec694 100644 --- a/tools/pnnx/src/pass_ncnn/eliminate_output.cpp +++ b/tools/pnnx/src/pass_ncnn/eliminate_output.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_output.h" diff --git a/tools/pnnx/src/pass_ncnn/eliminate_output.h b/tools/pnnx/src/pass_ncnn/eliminate_output.h index 49149c77c..1ab889f54 100644 --- a/tools/pnnx/src/pass_ncnn/eliminate_output.h +++ b/tools/pnnx/src/pass_ncnn/eliminate_output.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.cpp b/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.cpp index 180895717..5d147eac2 100644 --- a/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.cpp +++ b/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_tail_reshape_permute.h" diff --git a/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.h b/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.h index 4f662401c..06a5b28e0 100644 --- a/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.h +++ b/tools/pnnx/src/pass_ncnn/eliminate_tail_reshape_permute.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/expand_expression.cpp b/tools/pnnx/src/pass_ncnn/expand_expression.cpp index 63efb4f8e..9978c9789 100644 --- a/tools/pnnx/src/pass_ncnn/expand_expression.cpp +++ b/tools/pnnx/src/pass_ncnn/expand_expression.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/expand_expression.h b/tools/pnnx/src/pass_ncnn/expand_expression.h index 3e9e7c049..03d38aa62 100644 --- a/tools/pnnx/src/pass_ncnn/expand_expression.h +++ b/tools/pnnx/src/pass_ncnn/expand_expression.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.cpp b/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.cpp index 6524447be..d937be374 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_binaryop_eltwise.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.h b/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.h index 1eed2e45b..418a28fd5 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.h +++ b/tools/pnnx/src/pass_ncnn/fuse_binaryop_eltwise.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.cpp b/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.cpp index 60bd85128..7da92d2b8 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convert_shufflechannel_slice.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.h b/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.h index 6eb8b49c1..8bbaea5a2 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.h +++ b/tools/pnnx/src/pass_ncnn/fuse_convert_shufflechannel_slice.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.cpp b/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.cpp index c0b32ccde..db1fb9f41 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convolution1d_activation.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.h b/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.h index 91fefe89b..ab1ed3cf4 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.h +++ b/tools/pnnx/src/pass_ncnn/fuse_convolution1d_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.cpp b/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.cpp index 0256b3973..fc558471b 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convolution_activation.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.h b/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.h index cbd47d4fa..3f5f375d1 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.h +++ b/tools/pnnx/src/pass_ncnn/fuse_convolution_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.cpp b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.cpp index 122fbd301..35ed4ff6c 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convolutiondepthwise1d_activation.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.h b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.h index 624f8607a..188f81d76 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.h +++ b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise1d_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.cpp b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.cpp index 33f978b9a..70a17e21e 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_convolutiondepthwise_activation.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.h b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.h index cd3b6bbf9..8f9b2e058 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.h +++ b/tools/pnnx/src/pass_ncnn/fuse_convolutiondepthwise_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.cpp b/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.cpp index 1db266cca..a62067bf0 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_deconvolution_activation.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.h b/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.h index 14fc2184a..755be492b 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.h +++ b/tools/pnnx/src/pass_ncnn/fuse_deconvolution_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.cpp b/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.cpp index 492a99406..696b6644c 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_deconvolutiondepthwise_activation.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.h b/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.h index befa7affb..8b9bc6e4f 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.h +++ b/tools/pnnx/src/pass_ncnn/fuse_deconvolutiondepthwise_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.cpp b/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.cpp index 3634a14b5..9dfb633d9 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_innerproduct_activation.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.h b/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.h index 8fa626cef..bb0436893 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.h +++ b/tools/pnnx/src/pass_ncnn/fuse_innerproduct_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.cpp b/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.cpp index 889b5d8ea..11eb0b331 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_padding_convolution.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.h b/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.h index 2bb3a9a89..f161141ec 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.h +++ b/tools/pnnx/src/pass_ncnn/fuse_padding_convolution.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.cpp b/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.cpp index 7881723e3..f092c82e6 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_padding_convolutiondepthwise.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.h b/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.h index da3a82313..1923fd93b 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.h +++ b/tools/pnnx/src/pass_ncnn/fuse_padding_convolutiondepthwise.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.cpp b/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.cpp index 7ee0455fe..0623db1e9 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.cpp +++ b/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_transpose_matmul.h" diff --git a/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.h b/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.h index 400e4c5d6..465e186a8 100644 --- a/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.h +++ b/tools/pnnx/src/pass_ncnn/fuse_transpose_matmul.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.cpp b/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.cpp index 0b59ef164..e70a09576 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.cpp +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "insert_reshape_global_pooling.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.h b/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.h index 46687e46c..952020b24 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.h +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_global_pooling.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_linear.cpp b/tools/pnnx/src/pass_ncnn/insert_reshape_linear.cpp index f97691506..203981fc5 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_linear.cpp +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "insert_reshape_linear.h" #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_linear.h b/tools/pnnx/src/pass_ncnn/insert_reshape_linear.h index 6db6537f7..5f0bc3bae 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_linear.h +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_linear.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp b/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp index 6eb46308d..9c089376a 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "insert_reshape_numpy_binaryop_broadcast.h" #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.h b/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.h index 469a14eaf..c32f1f741 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.h +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_numpy_binaryop_broadcast.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.cpp b/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.cpp index 5c5f181be..fb256a4cf 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.cpp +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "insert_reshape_pooling.h" #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.h b/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.h index 45f42da7b..e8d471856 100644 --- a/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.h +++ b/tools/pnnx/src/pass_ncnn/insert_reshape_pooling.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_split.cpp b/tools/pnnx/src/pass_ncnn/insert_split.cpp index 1297f5e98..4e2d47cc5 100644 --- a/tools/pnnx/src/pass_ncnn/insert_split.cpp +++ b/tools/pnnx/src/pass_ncnn/insert_split.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "insert_split.h" #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/insert_split.h b/tools/pnnx/src/pass_ncnn/insert_split.h index fc19b2dd9..b9f03b768 100644 --- a/tools/pnnx/src/pass_ncnn/insert_split.h +++ b/tools/pnnx/src/pass_ncnn/insert_split.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool1d.cpp b/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool1d.cpp index 2ee31d471..ddd9f244b 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool2d.cpp b/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool2d.cpp index 083ef1151..93075e1ae 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool3d.cpp b/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool3d.cpp index 7bad0eeb9..561e4f8b0 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AdaptiveAvgPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool1d.cpp b/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool1d.cpp index 790103ad7..5bb318291 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool2d.cpp b/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool2d.cpp index 22df5d676..82a648474 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool3d.cpp b/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool3d.cpp index 43d093104..f1910c7c6 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AdaptiveMaxPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AvgPool1d.cpp b/tools/pnnx/src/pass_ncnn/nn_AvgPool1d.cpp index 20e0a9474..b785efcdf 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AvgPool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AvgPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AvgPool2d.cpp b/tools/pnnx/src/pass_ncnn/nn_AvgPool2d.cpp index 212e24129..a104de75a 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AvgPool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AvgPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_AvgPool3d.cpp b/tools/pnnx/src/pass_ncnn/nn_AvgPool3d.cpp index 65783a28e..1652b9148 100644 --- a/tools/pnnx/src/pass_ncnn/nn_AvgPool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_AvgPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_BatchNorm1d.cpp b/tools/pnnx/src/pass_ncnn/nn_BatchNorm1d.cpp index a0273e8f6..c7a22c1e3 100644 --- a/tools/pnnx/src/pass_ncnn/nn_BatchNorm1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_BatchNorm1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_BatchNorm2d.cpp b/tools/pnnx/src/pass_ncnn/nn_BatchNorm2d.cpp index 7dbb8cf9d..33320bf5f 100644 --- a/tools/pnnx/src/pass_ncnn/nn_BatchNorm2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_BatchNorm2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_BatchNorm3d.cpp b/tools/pnnx/src/pass_ncnn/nn_BatchNorm3d.cpp index a518320f1..4178e57ef 100644 --- a/tools/pnnx/src/pass_ncnn/nn_BatchNorm3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_BatchNorm3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_CELU.cpp b/tools/pnnx/src/pass_ncnn/nn_CELU.cpp index 1bdf28467..e1f273f6e 100644 --- a/tools/pnnx/src/pass_ncnn/nn_CELU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_CELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ChannelShuffle.cpp b/tools/pnnx/src/pass_ncnn/nn_ChannelShuffle.cpp index ae3ca7507..3a4319ac6 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ChannelShuffle.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ChannelShuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ConstantPad1d.cpp b/tools/pnnx/src/pass_ncnn/nn_ConstantPad1d.cpp index fcdecc6f6..fdd16e42b 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ConstantPad1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ConstantPad1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ConstantPad2d.cpp b/tools/pnnx/src/pass_ncnn/nn_ConstantPad2d.cpp index 0baec2d0c..014312657 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ConstantPad2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ConstantPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ConstantPad3d.cpp b/tools/pnnx/src/pass_ncnn/nn_ConstantPad3d.cpp index 748f42922..1b176e7ef 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ConstantPad3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ConstantPad3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Conv1d.cpp b/tools/pnnx/src/pass_ncnn/nn_Conv1d.cpp index c14215798..f3ef343c1 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Conv1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Conv1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Conv2d.cpp b/tools/pnnx/src/pass_ncnn/nn_Conv2d.cpp index 09a7562e1..e603b5254 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Conv2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Conv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Conv3d.cpp b/tools/pnnx/src/pass_ncnn/nn_Conv3d.cpp index 17fdab2c1..b3297e86e 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Conv3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Conv3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ConvTranspose1d.cpp b/tools/pnnx/src/pass_ncnn/nn_ConvTranspose1d.cpp index 68023bed6..0cd44721f 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ConvTranspose1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ConvTranspose1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ConvTranspose2d.cpp b/tools/pnnx/src/pass_ncnn/nn_ConvTranspose2d.cpp index f304ecfd5..4a02a013b 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ConvTranspose2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ConvTranspose2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ConvTranspose3d.cpp b/tools/pnnx/src/pass_ncnn/nn_ConvTranspose3d.cpp index 94e540c6e..2f27a503e 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ConvTranspose3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ConvTranspose3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ELU.cpp b/tools/pnnx/src/pass_ncnn/nn_ELU.cpp index b54592f26..88a468320 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ELU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Embedding.cpp b/tools/pnnx/src/pass_ncnn/nn_Embedding.cpp index e37f6d047..150e90eb2 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Embedding.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Embedding.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Fold.cpp b/tools/pnnx/src/pass_ncnn/nn_Fold.cpp index d94bc68b0..3ff055db4 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Fold.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Fold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_GELU.cpp b/tools/pnnx/src/pass_ncnn/nn_GELU.cpp index d90b80c61..94ac9f811 100644 --- a/tools/pnnx/src/pass_ncnn/nn_GELU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_GELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_GLU.cpp b/tools/pnnx/src/pass_ncnn/nn_GLU.cpp index 82e3f8494..96030ec0e 100644 --- a/tools/pnnx/src/pass_ncnn/nn_GLU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_GLU.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// 2022 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_GRU.cpp b/tools/pnnx/src/pass_ncnn/nn_GRU.cpp index 5c7a90a26..29e2c7a46 100644 --- a/tools/pnnx/src/pass_ncnn/nn_GRU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_GRU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" #include diff --git a/tools/pnnx/src/pass_ncnn/nn_GroupNorm.cpp b/tools/pnnx/src/pass_ncnn/nn_GroupNorm.cpp index 3414de2dc..00afda571 100644 --- a/tools/pnnx/src/pass_ncnn/nn_GroupNorm.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_GroupNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Hardsigmoid.cpp b/tools/pnnx/src/pass_ncnn/nn_Hardsigmoid.cpp index f93da3a1f..3b05e5d76 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Hardsigmoid.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Hardsigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Hardswish.cpp b/tools/pnnx/src/pass_ncnn/nn_Hardswish.cpp index a2bfc5c4b..5b4ccac7d 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Hardswish.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Hardswish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Hardtanh.cpp b/tools/pnnx/src/pass_ncnn/nn_Hardtanh.cpp index efd2e56ba..183e1bdb9 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Hardtanh.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Hardtanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_InstanceNorm2d.cpp b/tools/pnnx/src/pass_ncnn/nn_InstanceNorm2d.cpp index 828cc1fc4..d317dfd54 100644 --- a/tools/pnnx/src/pass_ncnn/nn_InstanceNorm2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_InstanceNorm2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_LSTM.cpp b/tools/pnnx/src/pass_ncnn/nn_LSTM.cpp index 3b25cc597..ecb1a4866 100644 --- a/tools/pnnx/src/pass_ncnn/nn_LSTM.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_LSTM.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" #include diff --git a/tools/pnnx/src/pass_ncnn/nn_LayerNorm.cpp b/tools/pnnx/src/pass_ncnn/nn_LayerNorm.cpp index a26d70e20..2d31758f6 100644 --- a/tools/pnnx/src/pass_ncnn/nn_LayerNorm.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_LayerNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_LeakyReLU.cpp b/tools/pnnx/src/pass_ncnn/nn_LeakyReLU.cpp index 75257b0dc..6dcd7b61e 100644 --- a/tools/pnnx/src/pass_ncnn/nn_LeakyReLU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_LeakyReLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Linear.cpp b/tools/pnnx/src/pass_ncnn/nn_Linear.cpp index 974f9cf72..9172ff390 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Linear.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_LocalResponseNorm.cpp b/tools/pnnx/src/pass_ncnn/nn_LocalResponseNorm.cpp index 1ad86da35..eabca4e5a 100644 --- a/tools/pnnx/src/pass_ncnn/nn_LocalResponseNorm.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_LocalResponseNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_LogSigmoid.cpp b/tools/pnnx/src/pass_ncnn/nn_LogSigmoid.cpp index 6e1b10ff5..0658c7ef3 100644 --- a/tools/pnnx/src/pass_ncnn/nn_LogSigmoid.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_LogSigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_LogSoftmax.cpp b/tools/pnnx/src/pass_ncnn/nn_LogSoftmax.cpp index c942728c9..24e44a184 100644 --- a/tools/pnnx/src/pass_ncnn/nn_LogSoftmax.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_LogSoftmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_MaxPool1d.cpp b/tools/pnnx/src/pass_ncnn/nn_MaxPool1d.cpp index aeec9b176..b436322ac 100644 --- a/tools/pnnx/src/pass_ncnn/nn_MaxPool1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_MaxPool1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_MaxPool2d.cpp b/tools/pnnx/src/pass_ncnn/nn_MaxPool2d.cpp index 89cc53ee2..344ed21e0 100644 --- a/tools/pnnx/src/pass_ncnn/nn_MaxPool2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_MaxPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_MaxPool3d.cpp b/tools/pnnx/src/pass_ncnn/nn_MaxPool3d.cpp index dd67939a8..d93d43045 100644 --- a/tools/pnnx/src/pass_ncnn/nn_MaxPool3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_MaxPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Mish.cpp b/tools/pnnx/src/pass_ncnn/nn_Mish.cpp index e1d6fb189..7da2597b2 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Mish.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Mish.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_MultiheadAttention.cpp b/tools/pnnx/src/pass_ncnn/nn_MultiheadAttention.cpp index d1bc77c80..1d7e1f4d2 100644 --- a/tools/pnnx/src/pass_ncnn/nn_MultiheadAttention.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_MultiheadAttention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_PReLU.cpp b/tools/pnnx/src/pass_ncnn/nn_PReLU.cpp index 4d8c14458..02b47b20a 100644 --- a/tools/pnnx/src/pass_ncnn/nn_PReLU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_PReLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_PixelShuffle.cpp b/tools/pnnx/src/pass_ncnn/nn_PixelShuffle.cpp index 107c211b6..3f6a14ee7 100644 --- a/tools/pnnx/src/pass_ncnn/nn_PixelShuffle.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_PixelShuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_PixelUnshuffle.cpp b/tools/pnnx/src/pass_ncnn/nn_PixelUnshuffle.cpp index ff259e0a9..e4f55858c 100644 --- a/tools/pnnx/src/pass_ncnn/nn_PixelUnshuffle.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_PixelUnshuffle.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_RMSNorm.cpp b/tools/pnnx/src/pass_ncnn/nn_RMSNorm.cpp index 7fda637c5..c409373d2 100644 --- a/tools/pnnx/src/pass_ncnn/nn_RMSNorm.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_RMSNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_RNN.cpp b/tools/pnnx/src/pass_ncnn/nn_RNN.cpp index 67b3d10eb..3433d3822 100644 --- a/tools/pnnx/src/pass_ncnn/nn_RNN.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_RNN.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ReLU.cpp b/tools/pnnx/src/pass_ncnn/nn_ReLU.cpp index dfe78c6c4..97d248b85 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ReLU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ReLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ReLU6.cpp b/tools/pnnx/src/pass_ncnn/nn_ReLU6.cpp index bed321e35..1c0ed8266 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ReLU6.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ReLU6.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ReflectionPad1d.cpp b/tools/pnnx/src/pass_ncnn/nn_ReflectionPad1d.cpp index 9deb31d59..9b68267e5 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ReflectionPad1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ReflectionPad1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ReflectionPad2d.cpp b/tools/pnnx/src/pass_ncnn/nn_ReflectionPad2d.cpp index c071303b0..4ceccab16 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ReflectionPad2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ReflectionPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ReplicationPad1d.cpp b/tools/pnnx/src/pass_ncnn/nn_ReplicationPad1d.cpp index 75c01df10..ee2fd2164 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ReplicationPad1d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ReplicationPad1d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ReplicationPad2d.cpp b/tools/pnnx/src/pass_ncnn/nn_ReplicationPad2d.cpp index 693337f69..2eb9ba4f2 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ReplicationPad2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ReplicationPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ReplicationPad3d.cpp b/tools/pnnx/src/pass_ncnn/nn_ReplicationPad3d.cpp index 25441d336..cc6d65898 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ReplicationPad3d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ReplicationPad3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_SELU.cpp b/tools/pnnx/src/pass_ncnn/nn_SELU.cpp index bb03092b8..39aae9d21 100644 --- a/tools/pnnx/src/pass_ncnn/nn_SELU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_SELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_SiLU.cpp b/tools/pnnx/src/pass_ncnn/nn_SiLU.cpp index 60da16c81..c9b0509cb 100644 --- a/tools/pnnx/src/pass_ncnn/nn_SiLU.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_SiLU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Sigmoid.cpp b/tools/pnnx/src/pass_ncnn/nn_Sigmoid.cpp index 62639369a..0d9a880c1 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Sigmoid.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Sigmoid.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Softmax.cpp b/tools/pnnx/src/pass_ncnn/nn_Softmax.cpp index d9629e6ef..8c0de6805 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Softmax.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Softmax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Softmax2d.cpp b/tools/pnnx/src/pass_ncnn/nn_Softmax2d.cpp index 152eb3a6a..a28a4b05a 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Softmax2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Softmax2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Tanh.cpp b/tools/pnnx/src/pass_ncnn/nn_Tanh.cpp index f2cc3db3e..a3819fc14 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Tanh.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Tanh.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Unfold.cpp b/tools/pnnx/src/pass_ncnn/nn_Unfold.cpp index 526e5d24c..c97eceef7 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Unfold.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Unfold.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_Upsample.cpp b/tools/pnnx/src/pass_ncnn/nn_Upsample.cpp index 854a2c290..5f1b23730 100644 --- a/tools/pnnx/src/pass_ncnn/nn_Upsample.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_Upsample.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_UpsamplingBilinear2d.cpp b/tools/pnnx/src/pass_ncnn/nn_UpsamplingBilinear2d.cpp index 8803cfa0f..7da44fa01 100644 --- a/tools/pnnx/src/pass_ncnn/nn_UpsamplingBilinear2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_UpsamplingBilinear2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_UpsamplingNearest2d.cpp b/tools/pnnx/src/pass_ncnn/nn_UpsamplingNearest2d.cpp index cc235a446..ce5becc52 100644 --- a/tools/pnnx/src/pass_ncnn/nn_UpsamplingNearest2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_UpsamplingNearest2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/nn_ZeroPad2d.cpp b/tools/pnnx/src/pass_ncnn/nn_ZeroPad2d.cpp index 26fd52fcd..e8fd8bb24 100644 --- a/tools/pnnx/src/pass_ncnn/nn_ZeroPad2d.cpp +++ b/tools/pnnx/src/pass_ncnn/nn_ZeroPad2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/solve_batch_index.cpp b/tools/pnnx/src/pass_ncnn/solve_batch_index.cpp index 4261a4d24..3a4a3b82d 100644 --- a/tools/pnnx/src/pass_ncnn/solve_batch_index.cpp +++ b/tools/pnnx/src/pass_ncnn/solve_batch_index.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "solve_batch_index.h" diff --git a/tools/pnnx/src/pass_ncnn/solve_batch_index.h b/tools/pnnx/src/pass_ncnn/solve_batch_index.h index 645ca4757..5d97fc016 100644 --- a/tools/pnnx/src/pass_ncnn/solve_batch_index.h +++ b/tools/pnnx/src/pass_ncnn/solve_batch_index.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_addmm.cpp b/tools/pnnx/src/pass_ncnn/torch_addmm.cpp index ed97aa37e..b5ad24845 100644 --- a/tools/pnnx/src/pass_ncnn/torch_addmm.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_addmm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_amax.cpp b/tools/pnnx/src/pass_ncnn/torch_amax.cpp index 9307b2b85..46574c718 100644 --- a/tools/pnnx/src/pass_ncnn/torch_amax.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_amax.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_amin.cpp b/tools/pnnx/src/pass_ncnn/torch_amin.cpp index 233212809..c53a3dcbc 100644 --- a/tools/pnnx/src/pass_ncnn/torch_amin.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_amin.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_bmm.cpp b/tools/pnnx/src/pass_ncnn/torch_bmm.cpp index f1e925198..395bc86df 100644 --- a/tools/pnnx/src/pass_ncnn/torch_bmm.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_bmm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_clamp.cpp b/tools/pnnx/src/pass_ncnn/torch_clamp.cpp index c2c25623c..53248646a 100644 --- a/tools/pnnx/src/pass_ncnn/torch_clamp.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_clamp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_clone.cpp b/tools/pnnx/src/pass_ncnn/torch_clone.cpp index 62f9b1a93..0e8e8a887 100644 --- a/tools/pnnx/src/pass_ncnn/torch_clone.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_clone.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_cumsum.cpp b/tools/pnnx/src/pass_ncnn/torch_cumsum.cpp index 5906d8c88..7fc2c9842 100644 --- a/tools/pnnx/src/pass_ncnn/torch_cumsum.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_cumsum.cpp @@ -1,17 +1,6 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// 2023 Xiaomi Corp. (author: Fangjun Kuang) -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_diag.cpp b/tools/pnnx/src/pass_ncnn/torch_diag.cpp index 35349f2cd..d5c0de70a 100644 --- a/tools/pnnx/src/pass_ncnn/torch_diag.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_diag.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_flatten.cpp b/tools/pnnx/src/pass_ncnn/torch_flatten.cpp index e943de38e..26e23f6a9 100644 --- a/tools/pnnx/src/pass_ncnn/torch_flatten.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_flatten.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_istft.cpp b/tools/pnnx/src/pass_ncnn/torch_istft.cpp index 9d894aba7..e720857b7 100644 --- a/tools/pnnx/src/pass_ncnn/torch_istft.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_istft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_logsumexp.cpp b/tools/pnnx/src/pass_ncnn/torch_logsumexp.cpp index ab1899d7c..061bb6680 100644 --- a/tools/pnnx/src/pass_ncnn/torch_logsumexp.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_logsumexp.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_matmul.cpp b/tools/pnnx/src/pass_ncnn/torch_matmul.cpp index 265b65156..72fc54b76 100644 --- a/tools/pnnx/src/pass_ncnn/torch_matmul.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_matmul.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_max.cpp b/tools/pnnx/src/pass_ncnn/torch_max.cpp index 95987da51..511fa7da1 100644 --- a/tools/pnnx/src/pass_ncnn/torch_max.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_max.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_mean.cpp b/tools/pnnx/src/pass_ncnn/torch_mean.cpp index 9bf65d01b..6bbc7cfa6 100644 --- a/tools/pnnx/src/pass_ncnn/torch_mean.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_mean.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_min.cpp b/tools/pnnx/src/pass_ncnn/torch_min.cpp index 3ef2ae47d..b5402b0ca 100644 --- a/tools/pnnx/src/pass_ncnn/torch_min.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_min.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_mm.cpp b/tools/pnnx/src/pass_ncnn/torch_mm.cpp index d24112907..cb8a08783 100644 --- a/tools/pnnx/src/pass_ncnn/torch_mm.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_mm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_norm.cpp b/tools/pnnx/src/pass_ncnn/torch_norm.cpp index 1e859cbd6..a7f2b9b15 100644 --- a/tools/pnnx/src/pass_ncnn/torch_norm.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_norm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_prod.cpp b/tools/pnnx/src/pass_ncnn/torch_prod.cpp index 799a032d6..2d15db9aa 100644 --- a/tools/pnnx/src/pass_ncnn/torch_prod.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_prod.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_roll.cpp b/tools/pnnx/src/pass_ncnn/torch_roll.cpp index c7c295933..843be9b37 100644 --- a/tools/pnnx/src/pass_ncnn/torch_roll.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_roll.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_slice_scatter.cpp b/tools/pnnx/src/pass_ncnn/torch_slice_scatter.cpp index e8ef351ca..a4a90ac80 100644 --- a/tools/pnnx/src/pass_ncnn/torch_slice_scatter.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_slice_scatter.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_squeeze.cpp b/tools/pnnx/src/pass_ncnn/torch_squeeze.cpp index b253569b1..464666fc3 100644 --- a/tools/pnnx/src/pass_ncnn/torch_squeeze.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_squeeze.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_stft.cpp b/tools/pnnx/src/pass_ncnn/torch_stft.cpp index 8993afeb1..3658ca7a0 100644 --- a/tools/pnnx/src/pass_ncnn/torch_stft.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_stft.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_sum.cpp b/tools/pnnx/src/pass_ncnn/torch_sum.cpp index 0aedf2d69..e71aef929 100644 --- a/tools/pnnx/src/pass_ncnn/torch_sum.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_sum.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_t.cpp b/tools/pnnx/src/pass_ncnn/torch_t.cpp index fa18297d3..509caf086 100644 --- a/tools/pnnx/src/pass_ncnn/torch_t.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_t.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_transpose.cpp b/tools/pnnx/src/pass_ncnn/torch_transpose.cpp index f87ac8ace..1f9c287cf 100644 --- a/tools/pnnx/src/pass_ncnn/torch_transpose.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_transpose.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torch_unsqueeze.cpp b/tools/pnnx/src/pass_ncnn/torch_unsqueeze.cpp index 3c8dc24d1..f38ae6a7e 100644 --- a/tools/pnnx/src/pass_ncnn/torch_unsqueeze.cpp +++ b/tools/pnnx/src/pass_ncnn/torch_unsqueeze.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torchaudio_F_inverse_spectrogram.cpp b/tools/pnnx/src/pass_ncnn/torchaudio_F_inverse_spectrogram.cpp index 0c964790f..9b6e46d3e 100644 --- a/tools/pnnx/src/pass_ncnn/torchaudio_F_inverse_spectrogram.cpp +++ b/tools/pnnx/src/pass_ncnn/torchaudio_F_inverse_spectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torchaudio_F_spectrogram.cpp b/tools/pnnx/src/pass_ncnn/torchaudio_F_spectrogram.cpp index 225fab706..6cf1f21d8 100644 --- a/tools/pnnx/src/pass_ncnn/torchaudio_F_spectrogram.cpp +++ b/tools/pnnx/src/pass_ncnn/torchaudio_F_spectrogram.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_ncnn/torchvision_DeformConv2d.cpp b/tools/pnnx/src/pass_ncnn/torchvision_DeformConv2d.cpp index 16af85fea..a5f00fb9d 100644 --- a/tools/pnnx/src/pass_ncnn/torchvision_DeformConv2d.cpp +++ b/tools/pnnx/src/pass_ncnn/torchvision_DeformConv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_ncnn.h" diff --git a/tools/pnnx/src/pass_onnx.cpp b/tools/pnnx/src/pass_onnx.cpp index e112531f6..c91f783ab 100644 --- a/tools/pnnx/src/pass_onnx.cpp +++ b/tools/pnnx/src/pass_onnx.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" diff --git a/tools/pnnx/src/pass_onnx.h b/tools/pnnx/src/pass_onnx.h index f087dfa43..7349b88f9 100644 --- a/tools/pnnx/src/pass_onnx.h +++ b/tools/pnnx/src/pass_onnx.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_PASS_ONNX_H #define PNNX_PASS_ONNX_H diff --git a/tools/pnnx/src/pass_onnx/canonicalize.cpp b/tools/pnnx/src/pass_onnx/canonicalize.cpp index 2ff729814..3afd746d1 100644 --- a/tools/pnnx/src/pass_onnx/canonicalize.cpp +++ b/tools/pnnx/src/pass_onnx/canonicalize.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "canonicalize.h" diff --git a/tools/pnnx/src/pass_onnx/canonicalize.h b/tools/pnnx/src/pass_onnx/canonicalize.h index 6ec55f2d1..19d82baf5 100644 --- a/tools/pnnx/src/pass_onnx/canonicalize.h +++ b/tools/pnnx/src/pass_onnx/canonicalize.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/dead_code_elimination.cpp b/tools/pnnx/src/pass_onnx/dead_code_elimination.cpp index c75c9c912..d7c00db85 100644 --- a/tools/pnnx/src/pass_onnx/dead_code_elimination.cpp +++ b/tools/pnnx/src/pass_onnx/dead_code_elimination.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "dead_code_elimination.h" diff --git a/tools/pnnx/src/pass_onnx/dead_code_elimination.h b/tools/pnnx/src/pass_onnx/dead_code_elimination.h index 7d8b7e0d2..a5d3b69bf 100644 --- a/tools/pnnx/src/pass_onnx/dead_code_elimination.h +++ b/tools/pnnx/src/pass_onnx/dead_code_elimination.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/eliminate_initializer_input.cpp b/tools/pnnx/src/pass_onnx/eliminate_initializer_input.cpp index be447bd26..d8c622f24 100644 --- a/tools/pnnx/src/pass_onnx/eliminate_initializer_input.cpp +++ b/tools/pnnx/src/pass_onnx/eliminate_initializer_input.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_initializer_input.h" diff --git a/tools/pnnx/src/pass_onnx/eliminate_initializer_input.h b/tools/pnnx/src/pass_onnx/eliminate_initializer_input.h index f82b71cd1..d73a54848 100644 --- a/tools/pnnx/src/pass_onnx/eliminate_initializer_input.h +++ b/tools/pnnx/src/pass_onnx/eliminate_initializer_input.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/eliminate_noop.cpp b/tools/pnnx/src/pass_onnx/eliminate_noop.cpp index 5c0ce8167..f2c11a6c5 100644 --- a/tools/pnnx/src/pass_onnx/eliminate_noop.cpp +++ b/tools/pnnx/src/pass_onnx/eliminate_noop.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "eliminate_noop.h" diff --git a/tools/pnnx/src/pass_onnx/eliminate_noop.h b/tools/pnnx/src/pass_onnx/eliminate_noop.h index 3325ae9cf..d82db999b 100644 --- a/tools/pnnx/src/pass_onnx/eliminate_noop.h +++ b/tools/pnnx/src/pass_onnx/eliminate_noop.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/fold_constants.cpp b/tools/pnnx/src/pass_onnx/fold_constants.cpp index 135be2b3a..820a34f43 100644 --- a/tools/pnnx/src/pass_onnx/fold_constants.cpp +++ b/tools/pnnx/src/pass_onnx/fold_constants.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fold_constants.h" diff --git a/tools/pnnx/src/pass_onnx/fold_constants.h b/tools/pnnx/src/pass_onnx/fold_constants.h index f165a96e1..d45d8b6e5 100644 --- a/tools/pnnx/src/pass_onnx/fold_constants.h +++ b/tools/pnnx/src/pass_onnx/fold_constants.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.cpp b/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.cpp index ed940eb66..290def79e 100644 --- a/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.cpp +++ b/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_constant_as_attribute.h" diff --git a/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.h b/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.h index a90c089fe..5bf619269 100644 --- a/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.h +++ b/tools/pnnx/src/pass_onnx/fuse_constant_as_attribute.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/inline_containers.cpp b/tools/pnnx/src/pass_onnx/inline_containers.cpp index a4ea80af6..b0cce825f 100644 --- a/tools/pnnx/src/pass_onnx/inline_containers.cpp +++ b/tools/pnnx/src/pass_onnx/inline_containers.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "inline_containers.h" diff --git a/tools/pnnx/src/pass_onnx/inline_containers.h b/tools/pnnx/src/pass_onnx/inline_containers.h index e3051c5e3..4660a7093 100644 --- a/tools/pnnx/src/pass_onnx/inline_containers.h +++ b/tools/pnnx/src/pass_onnx/inline_containers.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/inline_if_graph.cpp b/tools/pnnx/src/pass_onnx/inline_if_graph.cpp index f4399c018..db4099e22 100644 --- a/tools/pnnx/src/pass_onnx/inline_if_graph.cpp +++ b/tools/pnnx/src/pass_onnx/inline_if_graph.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "inline_containers.h" diff --git a/tools/pnnx/src/pass_onnx/inline_if_graph.h b/tools/pnnx/src/pass_onnx/inline_if_graph.h index e9c1c2f0e..61d8c7888 100644 --- a/tools/pnnx/src/pass_onnx/inline_if_graph.h +++ b/tools/pnnx/src/pass_onnx/inline_if_graph.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/model_stat.cpp b/tools/pnnx/src/pass_onnx/model_stat.cpp index 0cf24be9c..938cee7af 100644 --- a/tools/pnnx/src/pass_onnx/model_stat.cpp +++ b/tools/pnnx/src/pass_onnx/model_stat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "model_stat.h" diff --git a/tools/pnnx/src/pass_onnx/model_stat.h b/tools/pnnx/src/pass_onnx/model_stat.h index 993630b1b..faf5b9412 100644 --- a/tools/pnnx/src/pass_onnx/model_stat.h +++ b/tools/pnnx/src/pass_onnx/model_stat.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool2d.cpp b/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool2d.cpp index 21cf6076d..05a92fd31 100644 --- a/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool2d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool3d.cpp b/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool3d.cpp index a8e3e96be..8dd3a83e4 100644 --- a/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool3d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_AdaptiveAvgPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_AvgPool2d.cpp b/tools/pnnx/src/pass_onnx/nn_AvgPool2d.cpp index 6f5be930e..ca9d2709d 100644 --- a/tools/pnnx/src/pass_onnx/nn_AvgPool2d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_AvgPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_AvgPool3d.cpp b/tools/pnnx/src/pass_onnx/nn_AvgPool3d.cpp index 9fdcfdd72..3e5158f14 100644 --- a/tools/pnnx/src/pass_onnx/nn_AvgPool3d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_AvgPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_BatchNorm2d.cpp b/tools/pnnx/src/pass_onnx/nn_BatchNorm2d.cpp index 96448c0f2..b5c2ccced 100644 --- a/tools/pnnx/src/pass_onnx/nn_BatchNorm2d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_BatchNorm2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_BatchNorm3d.cpp b/tools/pnnx/src/pass_onnx/nn_BatchNorm3d.cpp index afac686a2..3382c39df 100644 --- a/tools/pnnx/src/pass_onnx/nn_BatchNorm3d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_BatchNorm3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_Conv2d.cpp b/tools/pnnx/src/pass_onnx/nn_Conv2d.cpp index 2cd6b7dd7..c3dfd6fb3 100644 --- a/tools/pnnx/src/pass_onnx/nn_Conv2d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_Conv2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_Conv3d.cpp b/tools/pnnx/src/pass_onnx/nn_Conv3d.cpp index f90c23cbb..15d091ddb 100644 --- a/tools/pnnx/src/pass_onnx/nn_Conv3d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_Conv3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_GELU.cpp b/tools/pnnx/src/pass_onnx/nn_GELU.cpp index 22d282367..b3d5be672 100644 --- a/tools/pnnx/src/pass_onnx/nn_GELU.cpp +++ b/tools/pnnx/src/pass_onnx/nn_GELU.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_LayerNorm.cpp b/tools/pnnx/src/pass_onnx/nn_LayerNorm.cpp index fece12e2b..e2e71eb84 100644 --- a/tools/pnnx/src/pass_onnx/nn_LayerNorm.cpp +++ b/tools/pnnx/src/pass_onnx/nn_LayerNorm.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_Linear.cpp b/tools/pnnx/src/pass_onnx/nn_Linear.cpp index 0515a8ea4..c521e0354 100644 --- a/tools/pnnx/src/pass_onnx/nn_Linear.cpp +++ b/tools/pnnx/src/pass_onnx/nn_Linear.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_MaxPool2d.cpp b/tools/pnnx/src/pass_onnx/nn_MaxPool2d.cpp index 518abd434..90eec4517 100644 --- a/tools/pnnx/src/pass_onnx/nn_MaxPool2d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_MaxPool2d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_MaxPool3d.cpp b/tools/pnnx/src/pass_onnx/nn_MaxPool3d.cpp index 04de8bd10..0fdc241d0 100644 --- a/tools/pnnx/src/pass_onnx/nn_MaxPool3d.cpp +++ b/tools/pnnx/src/pass_onnx/nn_MaxPool3d.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/nn_MultiheadAttention.cpp b/tools/pnnx/src/pass_onnx/nn_MultiheadAttention.cpp index df1bd0922..bcdc1369e 100644 --- a/tools/pnnx/src/pass_onnx/nn_MultiheadAttention.cpp +++ b/tools/pnnx/src/pass_onnx/nn_MultiheadAttention.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "pass_onnx.h" #include "ir.h" diff --git a/tools/pnnx/src/pass_onnx/shape_inference.cpp b/tools/pnnx/src/pass_onnx/shape_inference.cpp index e01532ed3..194de908c 100644 --- a/tools/pnnx/src/pass_onnx/shape_inference.cpp +++ b/tools/pnnx/src/pass_onnx/shape_inference.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "shape_inference.h" diff --git a/tools/pnnx/src/pass_onnx/shape_inference.h b/tools/pnnx/src/pass_onnx/shape_inference.h index b484d5265..0ad309c00 100644 --- a/tools/pnnx/src/pass_onnx/shape_inference.h +++ b/tools/pnnx/src/pass_onnx/shape_inference.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2024 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "onnx-ml.pb.h" diff --git a/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.cpp b/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.cpp index b2688852e..11ebe75bb 100644 --- a/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.cpp +++ b/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_shape_list_construct.h" diff --git a/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.h b/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.h index 55d72e630..86151d511 100644 --- a/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.h +++ b/tools/pnnx/src/pass_tnn/fuse_shape_list_construct.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_tnn/fuse_shape_size.cpp b/tools/pnnx/src/pass_tnn/fuse_shape_size.cpp index 062c8bb2b..e55c2ce8f 100644 --- a/tools/pnnx/src/pass_tnn/fuse_shape_size.cpp +++ b/tools/pnnx/src/pass_tnn/fuse_shape_size.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2023 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "fuse_shape_size.h" diff --git a/tools/pnnx/src/pass_tnn/fuse_shape_size.h b/tools/pnnx/src/pass_tnn/fuse_shape_size.h index 2058af643..3d97a204e 100644 --- a/tools/pnnx/src/pass_tnn/fuse_shape_size.h +++ b/tools/pnnx/src/pass_tnn/fuse_shape_size.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_tnn/lower_concat.cpp b/tools/pnnx/src/pass_tnn/lower_concat.cpp index 5a9cb1d66..0f751a109 100644 --- a/tools/pnnx/src/pass_tnn/lower_concat.cpp +++ b/tools/pnnx/src/pass_tnn/lower_concat.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lower_concat.h" diff --git a/tools/pnnx/src/pass_tnn/lower_concat.h b/tools/pnnx/src/pass_tnn/lower_concat.h index 84fd76a54..e43b22abe 100644 --- a/tools/pnnx/src/pass_tnn/lower_concat.h +++ b/tools/pnnx/src/pass_tnn/lower_concat.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_tnn/lower_convolution_activation.cpp b/tools/pnnx/src/pass_tnn/lower_convolution_activation.cpp index a4d76c557..8f852f6a7 100644 --- a/tools/pnnx/src/pass_tnn/lower_convolution_activation.cpp +++ b/tools/pnnx/src/pass_tnn/lower_convolution_activation.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lower_convolution_activation.h" diff --git a/tools/pnnx/src/pass_tnn/lower_convolution_activation.h b/tools/pnnx/src/pass_tnn/lower_convolution_activation.h index 91d85f755..77711010a 100644 --- a/tools/pnnx/src/pass_tnn/lower_convolution_activation.h +++ b/tools/pnnx/src/pass_tnn/lower_convolution_activation.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/pass_tnn/lower_power.cpp b/tools/pnnx/src/pass_tnn/lower_power.cpp index a35edaa5f..308fba152 100644 --- a/tools/pnnx/src/pass_tnn/lower_power.cpp +++ b/tools/pnnx/src/pass_tnn/lower_power.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "lower_power.h" diff --git a/tools/pnnx/src/pass_tnn/lower_power.h b/tools/pnnx/src/pass_tnn/lower_power.h index 35bbedf63..5c8c869ec 100644 --- a/tools/pnnx/src/pass_tnn/lower_power.h +++ b/tools/pnnx/src/pass_tnn/lower_power.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2025 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "ir.h" diff --git a/tools/pnnx/src/save_ncnn.cpp b/tools/pnnx/src/save_ncnn.cpp index 7d945bf23..299392f01 100644 --- a/tools/pnnx/src/save_ncnn.cpp +++ b/tools/pnnx/src/save_ncnn.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "save_ncnn.h" #include diff --git a/tools/pnnx/src/save_ncnn.h b/tools/pnnx/src/save_ncnn.h index 21ef39134..b9e1cdd14 100644 --- a/tools/pnnx/src/save_ncnn.h +++ b/tools/pnnx/src/save_ncnn.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_SAVE_NCNN_H #define PNNX_SAVE_NCNN_H diff --git a/tools/pnnx/src/save_onnx.cpp b/tools/pnnx/src/save_onnx.cpp index 3ef3a772a..3d089c1f8 100644 --- a/tools/pnnx/src/save_onnx.cpp +++ b/tools/pnnx/src/save_onnx.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "save_onnx.h" diff --git a/tools/pnnx/src/save_onnx.h b/tools/pnnx/src/save_onnx.h index 9a4099872..902dd1eaa 100644 --- a/tools/pnnx/src/save_onnx.h +++ b/tools/pnnx/src/save_onnx.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2022 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_SAVE_ONNX_H #define PNNX_SAVE_ONNX_H diff --git a/tools/pnnx/src/storezip.cpp b/tools/pnnx/src/storezip.cpp index 6a7747b19..d930bb909 100644 --- a/tools/pnnx/src/storezip.cpp +++ b/tools/pnnx/src/storezip.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "storezip.h" diff --git a/tools/pnnx/src/storezip.h b/tools/pnnx/src/storezip.h index 352d70b21..dd213f185 100644 --- a/tools/pnnx/src/storezip.h +++ b/tools/pnnx/src/storezip.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_STOREZIP_H #define PNNX_STOREZIP_H diff --git a/tools/pnnx/src/utils.cpp b/tools/pnnx/src/utils.cpp index f7e52eebe..ab17104d7 100644 --- a/tools/pnnx/src/utils.cpp +++ b/tools/pnnx/src/utils.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "utils.h" diff --git a/tools/pnnx/src/utils.h b/tools/pnnx/src/utils.h index d3ae5a1ec..d9b6a195e 100644 --- a/tools/pnnx/src/utils.h +++ b/tools/pnnx/src/utils.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef PNNX_UTILS_H #define PNNX_UTILS_H diff --git a/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool1d.py b/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool1d.py index 62cc45086..af1d6cde0 100644 --- a/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool1d.py +++ b/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool2d.py b/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool2d.py index 449e10b12..f3c6e094b 100644 --- a/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool2d.py +++ b/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool3d.py b/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool3d.py index a4bd1c7a0..ba7fdc21d 100644 --- a/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool3d.py +++ b/tools/pnnx/tests/ncnn/test_F_adaptive_avg_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool1d.py b/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool1d.py index dfef51ac6..9761b1573 100644 --- a/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool1d.py +++ b/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool2d.py b/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool2d.py index 6c6b006cb..ba4eb0b24 100644 --- a/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool2d.py +++ b/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool3d.py b/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool3d.py index 205606053..32c3562ca 100644 --- a/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool3d.py +++ b/tools/pnnx/tests/ncnn/test_F_adaptive_max_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_alpha_dropout.py b/tools/pnnx/tests/ncnn/test_F_alpha_dropout.py index de8181c19..89fc029b0 100644 --- a/tools/pnnx/tests/ncnn/test_F_alpha_dropout.py +++ b/tools/pnnx/tests/ncnn/test_F_alpha_dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_avg_pool1d.py b/tools/pnnx/tests/ncnn/test_F_avg_pool1d.py index fedaf6aba..7933fb022 100644 --- a/tools/pnnx/tests/ncnn/test_F_avg_pool1d.py +++ b/tools/pnnx/tests/ncnn/test_F_avg_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_avg_pool2d.py b/tools/pnnx/tests/ncnn/test_F_avg_pool2d.py index 22085f146..bef6da44d 100644 --- a/tools/pnnx/tests/ncnn/test_F_avg_pool2d.py +++ b/tools/pnnx/tests/ncnn/test_F_avg_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_avg_pool3d.py b/tools/pnnx/tests/ncnn/test_F_avg_pool3d.py index 31f370882..692174034 100644 --- a/tools/pnnx/tests/ncnn/test_F_avg_pool3d.py +++ b/tools/pnnx/tests/ncnn/test_F_avg_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_batch_norm.py b/tools/pnnx/tests/ncnn/test_F_batch_norm.py index b4b85e6b0..bca795fa8 100644 --- a/tools/pnnx/tests/ncnn/test_F_batch_norm.py +++ b/tools/pnnx/tests/ncnn/test_F_batch_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_celu.py b/tools/pnnx/tests/ncnn/test_F_celu.py index da7f879dc..867cdd06c 100644 --- a/tools/pnnx/tests/ncnn/test_F_celu.py +++ b/tools/pnnx/tests/ncnn/test_F_celu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_conv1d.py b/tools/pnnx/tests/ncnn/test_F_conv1d.py index c6ca20194..dfd5d5c46 100644 --- a/tools/pnnx/tests/ncnn/test_F_conv1d.py +++ b/tools/pnnx/tests/ncnn/test_F_conv1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_conv2d.py b/tools/pnnx/tests/ncnn/test_F_conv2d.py index 20dd1c952..58f214639 100644 --- a/tools/pnnx/tests/ncnn/test_F_conv2d.py +++ b/tools/pnnx/tests/ncnn/test_F_conv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_conv3d.py b/tools/pnnx/tests/ncnn/test_F_conv3d.py index 36f2518b3..9561c6f2d 100644 --- a/tools/pnnx/tests/ncnn/test_F_conv3d.py +++ b/tools/pnnx/tests/ncnn/test_F_conv3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_conv_transpose1d.py b/tools/pnnx/tests/ncnn/test_F_conv_transpose1d.py index ff23f77ab..3a798897e 100644 --- a/tools/pnnx/tests/ncnn/test_F_conv_transpose1d.py +++ b/tools/pnnx/tests/ncnn/test_F_conv_transpose1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_conv_transpose2d.py b/tools/pnnx/tests/ncnn/test_F_conv_transpose2d.py index 5913f07ab..005093d24 100644 --- a/tools/pnnx/tests/ncnn/test_F_conv_transpose2d.py +++ b/tools/pnnx/tests/ncnn/test_F_conv_transpose2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_conv_transpose3d.py b/tools/pnnx/tests/ncnn/test_F_conv_transpose3d.py index a75d5e0a0..0fb09312d 100644 --- a/tools/pnnx/tests/ncnn/test_F_conv_transpose3d.py +++ b/tools/pnnx/tests/ncnn/test_F_conv_transpose3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_dropout.py b/tools/pnnx/tests/ncnn/test_F_dropout.py index 56c2cff21..94b2e6d67 100644 --- a/tools/pnnx/tests/ncnn/test_F_dropout.py +++ b/tools/pnnx/tests/ncnn/test_F_dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_dropout2d.py b/tools/pnnx/tests/ncnn/test_F_dropout2d.py index d8e013d18..77130fbdb 100644 --- a/tools/pnnx/tests/ncnn/test_F_dropout2d.py +++ b/tools/pnnx/tests/ncnn/test_F_dropout2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_dropout3d.py b/tools/pnnx/tests/ncnn/test_F_dropout3d.py index 5a7c9e518..19acfec2d 100644 --- a/tools/pnnx/tests/ncnn/test_F_dropout3d.py +++ b/tools/pnnx/tests/ncnn/test_F_dropout3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_elu.py b/tools/pnnx/tests/ncnn/test_F_elu.py index a5693aa6b..b3bb6070a 100644 --- a/tools/pnnx/tests/ncnn/test_F_elu.py +++ b/tools/pnnx/tests/ncnn/test_F_elu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_embedding.py b/tools/pnnx/tests/ncnn/test_F_embedding.py index 41a565a1f..c59bc97cc 100644 --- a/tools/pnnx/tests/ncnn/test_F_embedding.py +++ b/tools/pnnx/tests/ncnn/test_F_embedding.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_feature_alpha_dropout.py b/tools/pnnx/tests/ncnn/test_F_feature_alpha_dropout.py index b0de4e5c6..32b1f4dd0 100644 --- a/tools/pnnx/tests/ncnn/test_F_feature_alpha_dropout.py +++ b/tools/pnnx/tests/ncnn/test_F_feature_alpha_dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_fold.py b/tools/pnnx/tests/ncnn/test_F_fold.py index 54103fdf2..2a8d94b30 100644 --- a/tools/pnnx/tests/ncnn/test_F_fold.py +++ b/tools/pnnx/tests/ncnn/test_F_fold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_gelu.py b/tools/pnnx/tests/ncnn/test_F_gelu.py index 8df063b15..08d487026 100644 --- a/tools/pnnx/tests/ncnn/test_F_gelu.py +++ b/tools/pnnx/tests/ncnn/test_F_gelu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_glu.py b/tools/pnnx/tests/ncnn/test_F_glu.py index 937253c12..1e8cf907f 100644 --- a/tools/pnnx/tests/ncnn/test_F_glu.py +++ b/tools/pnnx/tests/ncnn/test_F_glu.py @@ -1,14 +1,5 @@ -# Copyright (c) 2022 Xiaomi Corp. (author: Fangjun Kuang) -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_grid_sample.py b/tools/pnnx/tests/ncnn/test_F_grid_sample.py index 95ca812eb..c255b3e6b 100644 --- a/tools/pnnx/tests/ncnn/test_F_grid_sample.py +++ b/tools/pnnx/tests/ncnn/test_F_grid_sample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch diff --git a/tools/pnnx/tests/ncnn/test_F_group_norm.py b/tools/pnnx/tests/ncnn/test_F_group_norm.py index 6b0347950..233c23de8 100644 --- a/tools/pnnx/tests/ncnn/test_F_group_norm.py +++ b/tools/pnnx/tests/ncnn/test_F_group_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_hardsigmoid.py b/tools/pnnx/tests/ncnn/test_F_hardsigmoid.py index 0636575f2..f1eacf794 100644 --- a/tools/pnnx/tests/ncnn/test_F_hardsigmoid.py +++ b/tools/pnnx/tests/ncnn/test_F_hardsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_hardswish.py b/tools/pnnx/tests/ncnn/test_F_hardswish.py index 30fccc477..ebdb33e6a 100644 --- a/tools/pnnx/tests/ncnn/test_F_hardswish.py +++ b/tools/pnnx/tests/ncnn/test_F_hardswish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_hardtanh.py b/tools/pnnx/tests/ncnn/test_F_hardtanh.py index 95c0c2aa1..1236ce9fd 100644 --- a/tools/pnnx/tests/ncnn/test_F_hardtanh.py +++ b/tools/pnnx/tests/ncnn/test_F_hardtanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_interpolate.py b/tools/pnnx/tests/ncnn/test_F_interpolate.py index 691e4379d..6c02a1b83 100644 --- a/tools/pnnx/tests/ncnn/test_F_interpolate.py +++ b/tools/pnnx/tests/ncnn/test_F_interpolate.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_layer_norm.py b/tools/pnnx/tests/ncnn/test_F_layer_norm.py index 7815e4e68..0da4e82a6 100644 --- a/tools/pnnx/tests/ncnn/test_F_layer_norm.py +++ b/tools/pnnx/tests/ncnn/test_F_layer_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_leaky_relu.py b/tools/pnnx/tests/ncnn/test_F_leaky_relu.py index 4606ddce2..44bd5011f 100644 --- a/tools/pnnx/tests/ncnn/test_F_leaky_relu.py +++ b/tools/pnnx/tests/ncnn/test_F_leaky_relu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_local_response_norm.py b/tools/pnnx/tests/ncnn/test_F_local_response_norm.py index 9c92eb9c7..c5451095f 100644 --- a/tools/pnnx/tests/ncnn/test_F_local_response_norm.py +++ b/tools/pnnx/tests/ncnn/test_F_local_response_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_log_softmax.py b/tools/pnnx/tests/ncnn/test_F_log_softmax.py index 4b0d295f6..b541f9060 100644 --- a/tools/pnnx/tests/ncnn/test_F_log_softmax.py +++ b/tools/pnnx/tests/ncnn/test_F_log_softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_logsigmoid.py b/tools/pnnx/tests/ncnn/test_F_logsigmoid.py index 7d2b304a7..3ae31dced 100644 --- a/tools/pnnx/tests/ncnn/test_F_logsigmoid.py +++ b/tools/pnnx/tests/ncnn/test_F_logsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_max_pool1d.py b/tools/pnnx/tests/ncnn/test_F_max_pool1d.py index 50eca9c1c..49debde65 100644 --- a/tools/pnnx/tests/ncnn/test_F_max_pool1d.py +++ b/tools/pnnx/tests/ncnn/test_F_max_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_max_pool2d.py b/tools/pnnx/tests/ncnn/test_F_max_pool2d.py index b3ad4c8d1..ea54d6a6b 100644 --- a/tools/pnnx/tests/ncnn/test_F_max_pool2d.py +++ b/tools/pnnx/tests/ncnn/test_F_max_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_max_pool3d.py b/tools/pnnx/tests/ncnn/test_F_max_pool3d.py index 7708ffe9a..69dc8e9fe 100644 --- a/tools/pnnx/tests/ncnn/test_F_max_pool3d.py +++ b/tools/pnnx/tests/ncnn/test_F_max_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_mish.py b/tools/pnnx/tests/ncnn/test_F_mish.py index 7d94cee80..7bb8ecac3 100644 --- a/tools/pnnx/tests/ncnn/test_F_mish.py +++ b/tools/pnnx/tests/ncnn/test_F_mish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_normalize.py b/tools/pnnx/tests/ncnn/test_F_normalize.py index c39eaf03c..2bb28ad0e 100644 --- a/tools/pnnx/tests/ncnn/test_F_normalize.py +++ b/tools/pnnx/tests/ncnn/test_F_normalize.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_pad.py b/tools/pnnx/tests/ncnn/test_F_pad.py index 885906498..8b8ef87ae 100644 --- a/tools/pnnx/tests/ncnn/test_F_pad.py +++ b/tools/pnnx/tests/ncnn/test_F_pad.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_pixel_shuffle.py b/tools/pnnx/tests/ncnn/test_F_pixel_shuffle.py index 6149b843c..cb883546f 100644 --- a/tools/pnnx/tests/ncnn/test_F_pixel_shuffle.py +++ b/tools/pnnx/tests/ncnn/test_F_pixel_shuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_pixel_unshuffle.py b/tools/pnnx/tests/ncnn/test_F_pixel_unshuffle.py index 2652ba998..64b2cfac5 100644 --- a/tools/pnnx/tests/ncnn/test_F_pixel_unshuffle.py +++ b/tools/pnnx/tests/ncnn/test_F_pixel_unshuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_prelu.py b/tools/pnnx/tests/ncnn/test_F_prelu.py index fc06db52b..4cd614d97 100644 --- a/tools/pnnx/tests/ncnn/test_F_prelu.py +++ b/tools/pnnx/tests/ncnn/test_F_prelu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_relu.py b/tools/pnnx/tests/ncnn/test_F_relu.py index b4fad8237..1c5c4c55e 100644 --- a/tools/pnnx/tests/ncnn/test_F_relu.py +++ b/tools/pnnx/tests/ncnn/test_F_relu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_relu6.py b/tools/pnnx/tests/ncnn/test_F_relu6.py index e93de557b..db84d4042 100644 --- a/tools/pnnx/tests/ncnn/test_F_relu6.py +++ b/tools/pnnx/tests/ncnn/test_F_relu6.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_rms_norm.py b/tools/pnnx/tests/ncnn/test_F_rms_norm.py index f30f72f9a..a7a9bb51a 100644 --- a/tools/pnnx/tests/ncnn/test_F_rms_norm.py +++ b/tools/pnnx/tests/ncnn/test_F_rms_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_selu.py b/tools/pnnx/tests/ncnn/test_F_selu.py index 210b572cd..f6858207b 100644 --- a/tools/pnnx/tests/ncnn/test_F_selu.py +++ b/tools/pnnx/tests/ncnn/test_F_selu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_sigmoid.py b/tools/pnnx/tests/ncnn/test_F_sigmoid.py index f5e0f39d6..7f8ce2b6f 100644 --- a/tools/pnnx/tests/ncnn/test_F_sigmoid.py +++ b/tools/pnnx/tests/ncnn/test_F_sigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_silu.py b/tools/pnnx/tests/ncnn/test_F_silu.py index 78b75ac57..ad992791b 100644 --- a/tools/pnnx/tests/ncnn/test_F_silu.py +++ b/tools/pnnx/tests/ncnn/test_F_silu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_softmax.py b/tools/pnnx/tests/ncnn/test_F_softmax.py index ad6e023e7..1a7bf53d5 100644 --- a/tools/pnnx/tests/ncnn/test_F_softmax.py +++ b/tools/pnnx/tests/ncnn/test_F_softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_tanh.py b/tools/pnnx/tests/ncnn/test_F_tanh.py index 3ae1b598e..bb3e35baa 100644 --- a/tools/pnnx/tests/ncnn/test_F_tanh.py +++ b/tools/pnnx/tests/ncnn/test_F_tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_unfold.py b/tools/pnnx/tests/ncnn/test_F_unfold.py index e8e1a603c..575374e2f 100644 --- a/tools/pnnx/tests/ncnn/test_F_unfold.py +++ b/tools/pnnx/tests/ncnn/test_F_unfold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_upsample.py b/tools/pnnx/tests/ncnn/test_F_upsample.py index 473ab407d..047707bf3 100644 --- a/tools/pnnx/tests/ncnn/test_F_upsample.py +++ b/tools/pnnx/tests/ncnn/test_F_upsample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_upsample_bilinear.py b/tools/pnnx/tests/ncnn/test_F_upsample_bilinear.py index 178794eca..f1f6820a6 100644 --- a/tools/pnnx/tests/ncnn/test_F_upsample_bilinear.py +++ b/tools/pnnx/tests/ncnn/test_F_upsample_bilinear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_F_upsample_nearest.py b/tools/pnnx/tests/ncnn/test_F_upsample_nearest.py index 78f6e6563..0ba8f48a8 100644 --- a/tools/pnnx/tests/ncnn/test_F_upsample_nearest.py +++ b/tools/pnnx/tests/ncnn/test_F_upsample_nearest.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_contiguous.py b/tools/pnnx/tests/ncnn/test_Tensor_contiguous.py index 667968a9d..e6351ebee 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_contiguous.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_contiguous.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_permute.py b/tools/pnnx/tests/ncnn/test_Tensor_permute.py index 01506f42c..6fa6a0be0 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_permute.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_permute.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_repeat.py b/tools/pnnx/tests/ncnn/test_Tensor_repeat.py index ad26ea856..5cdafe509 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_repeat.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_repeat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_reshape.py b/tools/pnnx/tests/ncnn/test_Tensor_reshape.py index af5eca8f9..a3c80d261 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_reshape.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_reshape.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_reshape_as.py b/tools/pnnx/tests/ncnn/test_Tensor_reshape_as.py index 51c999752..a807ff349 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_reshape_as.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_reshape_as.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_slice.py b/tools/pnnx/tests/ncnn/test_Tensor_slice.py index 6c8ef38ab..1bf41c62c 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_slice.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_slice.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_slice_copy.py b/tools/pnnx/tests/ncnn/test_Tensor_slice_copy.py index c82a89fe5..954e16010 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_slice_copy.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_slice_copy.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_Tensor_view.py b/tools/pnnx/tests/ncnn/test_Tensor_view.py index 7bf967621..07fa78c90 100644 --- a/tools/pnnx/tests/ncnn/test_Tensor_view.py +++ b/tools/pnnx/tests/ncnn/test_Tensor_view.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_convnext_tiny.py b/tools/pnnx/tests/ncnn/test_convnext_tiny.py index 9347a3427..3f5e2db56 100644 --- a/tools/pnnx/tests/ncnn/test_convnext_tiny.py +++ b/tools/pnnx/tests/ncnn/test_convnext_tiny.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/pnnx/tests/ncnn/test_mobilenet_v2.py b/tools/pnnx/tests/ncnn/test_mobilenet_v2.py index ea6bddfca..dd0ca65bf 100644 --- a/tools/pnnx/tests/ncnn/test_mobilenet_v2.py +++ b/tools/pnnx/tests/ncnn/test_mobilenet_v2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/ncnn/test_mobilenet_v3_small.py b/tools/pnnx/tests/ncnn/test_mobilenet_v3_small.py index 309f59127..cece27f4a 100644 --- a/tools/pnnx/tests/ncnn/test_mobilenet_v3_small.py +++ b/tools/pnnx/tests/ncnn/test_mobilenet_v3_small.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/ncnn/test_ncnn_fuse_binaryop_eltwise.py b/tools/pnnx/tests/ncnn/test_ncnn_fuse_binaryop_eltwise.py index 549e3aa04..c91a1d2ba 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_fuse_binaryop_eltwise.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_fuse_binaryop_eltwise.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_fuse_pad_conv.py b/tools/pnnx/tests/ncnn/test_ncnn_fuse_pad_conv.py index f8ab12080..07ceeebbf 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_fuse_pad_conv.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_fuse_pad_conv.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_fuse_shufflechannel_slice.py b/tools/pnnx/tests/ncnn/test_ncnn_fuse_shufflechannel_slice.py index 1fc390d3d..6c27abb06 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_fuse_shufflechannel_slice.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_fuse_shufflechannel_slice.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_fuse_transpose_matmul.py b/tools/pnnx/tests/ncnn/test_ncnn_fuse_transpose_matmul.py index 439a72269..a3110e710 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_fuse_transpose_matmul.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_fuse_transpose_matmul.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_interp_expr.py b/tools/pnnx/tests/ncnn/test_ncnn_interp_expr.py index 6c0567121..1b9bca447 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_interp_expr.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_interp_expr.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_numpy_binaryop_broadcast.py b/tools/pnnx/tests/ncnn/test_ncnn_numpy_binaryop_broadcast.py index 67946a29b..fc0cbe7a6 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_numpy_binaryop_broadcast.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_numpy_binaryop_broadcast.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_reshape_expr.py b/tools/pnnx/tests/ncnn/test_ncnn_reshape_expr.py index 77d4ca6ee..f5c930624 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_reshape_expr.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_reshape_expr.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_slice_expr.py b/tools/pnnx/tests/ncnn/test_ncnn_slice_expr.py index 47fc6b504..9a362e9f3 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_slice_expr.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_slice_expr.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_ncnn_solve_batch_index.py b/tools/pnnx/tests/ncnn/test_ncnn_solve_batch_index.py index 5cc9a8cdf..9aa72d2ab 100644 --- a/tools/pnnx/tests/ncnn/test_ncnn_solve_batch_index.py +++ b/tools/pnnx/tests/ncnn/test_ncnn_solve_batch_index.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool1d.py b/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool1d.py index cef5e0528..34ae2734c 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool2d.py b/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool2d.py index 2727ae9ea..8d957a8ea 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool3d.py b/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool3d.py index 92dd9c6ca..bf858dfdb 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AdaptiveAvgPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool1d.py b/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool1d.py index 1f927a3e8..7f5f3f1d2 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool2d.py b/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool2d.py index bfb6df26d..a6ca0efb5 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool3d.py b/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool3d.py index ef5e09e9d..b0373e4f2 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AdaptiveMaxPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AlphaDropout.py b/tools/pnnx/tests/ncnn/test_nn_AlphaDropout.py index f12a27f02..f4d10ea51 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AlphaDropout.py +++ b/tools/pnnx/tests/ncnn/test_nn_AlphaDropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AvgPool1d.py b/tools/pnnx/tests/ncnn/test_nn_AvgPool1d.py index 357c8b67b..e4667e4e2 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AvgPool1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AvgPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AvgPool2d.py b/tools/pnnx/tests/ncnn/test_nn_AvgPool2d.py index 0040d3e76..0523b9300 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AvgPool2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AvgPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_AvgPool3d.py b/tools/pnnx/tests/ncnn/test_nn_AvgPool3d.py index 3cf42ba6a..ca02038b6 100644 --- a/tools/pnnx/tests/ncnn/test_nn_AvgPool3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_AvgPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_BatchNorm1d.py b/tools/pnnx/tests/ncnn/test_nn_BatchNorm1d.py index 06bb0ead2..2310ce366 100644 --- a/tools/pnnx/tests/ncnn/test_nn_BatchNorm1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_BatchNorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_BatchNorm2d.py b/tools/pnnx/tests/ncnn/test_nn_BatchNorm2d.py index 10e3b1e29..3efd12670 100644 --- a/tools/pnnx/tests/ncnn/test_nn_BatchNorm2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_BatchNorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_BatchNorm3d.py b/tools/pnnx/tests/ncnn/test_nn_BatchNorm3d.py index a2b574ac8..923999ed3 100644 --- a/tools/pnnx/tests/ncnn/test_nn_BatchNorm3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_BatchNorm3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_CELU.py b/tools/pnnx/tests/ncnn/test_nn_CELU.py index 36931cc3b..14a824687 100644 --- a/tools/pnnx/tests/ncnn/test_nn_CELU.py +++ b/tools/pnnx/tests/ncnn/test_nn_CELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py b/tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py index 1c31b82a6..c2d17b8e0 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py +++ b/tools/pnnx/tests/ncnn/test_nn_ChannelShuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ConstantPad1d.py b/tools/pnnx/tests/ncnn/test_nn_ConstantPad1d.py index 4e30aff44..47d18625b 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ConstantPad1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ConstantPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ConstantPad2d.py b/tools/pnnx/tests/ncnn/test_nn_ConstantPad2d.py index e8bb36e20..d8e329463 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ConstantPad2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ConstantPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ConstantPad3d.py b/tools/pnnx/tests/ncnn/test_nn_ConstantPad3d.py index ca6faa77e..3c6a7bc33 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ConstantPad3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ConstantPad3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Conv1d.py b/tools/pnnx/tests/ncnn/test_nn_Conv1d.py index 18aa1a9de..952032120 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Conv1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_Conv1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Conv2d.py b/tools/pnnx/tests/ncnn/test_nn_Conv2d.py index 5cde9e1b5..20d2cf8a3 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Conv2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_Conv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Conv3d.py b/tools/pnnx/tests/ncnn/test_nn_Conv3d.py index b68a937af..6ca8714bd 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Conv3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_Conv3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ConvTranspose1d.py b/tools/pnnx/tests/ncnn/test_nn_ConvTranspose1d.py index d222ba9ca..a85f6a41f 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ConvTranspose1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ConvTranspose1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ConvTranspose2d.py b/tools/pnnx/tests/ncnn/test_nn_ConvTranspose2d.py index 9b0f35dc7..6e8e53a16 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ConvTranspose2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ConvTranspose2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ConvTranspose3d.py b/tools/pnnx/tests/ncnn/test_nn_ConvTranspose3d.py index 4284d86ee..28c6c73d7 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ConvTranspose3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ConvTranspose3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Dropout.py b/tools/pnnx/tests/ncnn/test_nn_Dropout.py index 68883c8ae..cdc1ca7aa 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Dropout.py +++ b/tools/pnnx/tests/ncnn/test_nn_Dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Dropout2d.py b/tools/pnnx/tests/ncnn/test_nn_Dropout2d.py index bb6a8ecb4..237bb9e49 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Dropout2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_Dropout2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Dropout3d.py b/tools/pnnx/tests/ncnn/test_nn_Dropout3d.py index 6088ddf0f..cfd5bc6e1 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Dropout3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_Dropout3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ELU.py b/tools/pnnx/tests/ncnn/test_nn_ELU.py index b2d7617a7..711b6c108 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ELU.py +++ b/tools/pnnx/tests/ncnn/test_nn_ELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Embedding.py b/tools/pnnx/tests/ncnn/test_nn_Embedding.py index b97056fa9..1ac60c5a5 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Embedding.py +++ b/tools/pnnx/tests/ncnn/test_nn_Embedding.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Fold.py b/tools/pnnx/tests/ncnn/test_nn_Fold.py index 8b07b2b5d..aee8e6647 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Fold.py +++ b/tools/pnnx/tests/ncnn/test_nn_Fold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_GELU.py b/tools/pnnx/tests/ncnn/test_nn_GELU.py index 61d839638..b6c95a7a2 100644 --- a/tools/pnnx/tests/ncnn/test_nn_GELU.py +++ b/tools/pnnx/tests/ncnn/test_nn_GELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_GLU.py b/tools/pnnx/tests/ncnn/test_nn_GLU.py index 49a018ee2..8ea3fa6f0 100644 --- a/tools/pnnx/tests/ncnn/test_nn_GLU.py +++ b/tools/pnnx/tests/ncnn/test_nn_GLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_GRU.py b/tools/pnnx/tests/ncnn/test_nn_GRU.py index 3486ac550..5f7a94517 100644 --- a/tools/pnnx/tests/ncnn/test_nn_GRU.py +++ b/tools/pnnx/tests/ncnn/test_nn_GRU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_GroupNorm.py b/tools/pnnx/tests/ncnn/test_nn_GroupNorm.py index c016e7ae2..4d0fac205 100644 --- a/tools/pnnx/tests/ncnn/test_nn_GroupNorm.py +++ b/tools/pnnx/tests/ncnn/test_nn_GroupNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Hardsigmoid.py b/tools/pnnx/tests/ncnn/test_nn_Hardsigmoid.py index de7648250..543bc6b26 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Hardsigmoid.py +++ b/tools/pnnx/tests/ncnn/test_nn_Hardsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Hardswish.py b/tools/pnnx/tests/ncnn/test_nn_Hardswish.py index 91656a2e0..33c95e64e 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Hardswish.py +++ b/tools/pnnx/tests/ncnn/test_nn_Hardswish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Hardtanh.py b/tools/pnnx/tests/ncnn/test_nn_Hardtanh.py index ea342d89c..254b6f645 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Hardtanh.py +++ b/tools/pnnx/tests/ncnn/test_nn_Hardtanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Identity.py b/tools/pnnx/tests/ncnn/test_nn_Identity.py index 679b2e0ba..9516578fe 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Identity.py +++ b/tools/pnnx/tests/ncnn/test_nn_Identity.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_InstanceNorm2d.py b/tools/pnnx/tests/ncnn/test_nn_InstanceNorm2d.py index f65c810fd..3c046b219 100644 --- a/tools/pnnx/tests/ncnn/test_nn_InstanceNorm2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_InstanceNorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_LSTM.py b/tools/pnnx/tests/ncnn/test_nn_LSTM.py index a51f5e940..1e1d22b30 100644 --- a/tools/pnnx/tests/ncnn/test_nn_LSTM.py +++ b/tools/pnnx/tests/ncnn/test_nn_LSTM.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_LayerNorm.py b/tools/pnnx/tests/ncnn/test_nn_LayerNorm.py index 672142208..53e726f3e 100644 --- a/tools/pnnx/tests/ncnn/test_nn_LayerNorm.py +++ b/tools/pnnx/tests/ncnn/test_nn_LayerNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_LeakyReLU.py b/tools/pnnx/tests/ncnn/test_nn_LeakyReLU.py index a0a8b6e54..79d377d9d 100644 --- a/tools/pnnx/tests/ncnn/test_nn_LeakyReLU.py +++ b/tools/pnnx/tests/ncnn/test_nn_LeakyReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Linear.py b/tools/pnnx/tests/ncnn/test_nn_Linear.py index ea79c50db..84d489606 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Linear.py +++ b/tools/pnnx/tests/ncnn/test_nn_Linear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_LocalResponseNorm.py b/tools/pnnx/tests/ncnn/test_nn_LocalResponseNorm.py index ac12886d6..50cc0dea8 100644 --- a/tools/pnnx/tests/ncnn/test_nn_LocalResponseNorm.py +++ b/tools/pnnx/tests/ncnn/test_nn_LocalResponseNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_LogSigmoid.py b/tools/pnnx/tests/ncnn/test_nn_LogSigmoid.py index d74477dc9..c8a2455e9 100644 --- a/tools/pnnx/tests/ncnn/test_nn_LogSigmoid.py +++ b/tools/pnnx/tests/ncnn/test_nn_LogSigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_LogSoftmax.py b/tools/pnnx/tests/ncnn/test_nn_LogSoftmax.py index 27caaa177..7a5d691ba 100644 --- a/tools/pnnx/tests/ncnn/test_nn_LogSoftmax.py +++ b/tools/pnnx/tests/ncnn/test_nn_LogSoftmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_MaxPool1d.py b/tools/pnnx/tests/ncnn/test_nn_MaxPool1d.py index 348dbc661..765c3c6b4 100644 --- a/tools/pnnx/tests/ncnn/test_nn_MaxPool1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_MaxPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_MaxPool2d.py b/tools/pnnx/tests/ncnn/test_nn_MaxPool2d.py index f4feb3008..4fe01d87b 100644 --- a/tools/pnnx/tests/ncnn/test_nn_MaxPool2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_MaxPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_MaxPool3d.py b/tools/pnnx/tests/ncnn/test_nn_MaxPool3d.py index 0de797854..185a979e6 100644 --- a/tools/pnnx/tests/ncnn/test_nn_MaxPool3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_MaxPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Mish.py b/tools/pnnx/tests/ncnn/test_nn_Mish.py index 4ef9f2617..11e65bb57 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Mish.py +++ b/tools/pnnx/tests/ncnn/test_nn_Mish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_MultiheadAttention.py b/tools/pnnx/tests/ncnn/test_nn_MultiheadAttention.py index 9d551cc94..0329f97a2 100644 --- a/tools/pnnx/tests/ncnn/test_nn_MultiheadAttention.py +++ b/tools/pnnx/tests/ncnn/test_nn_MultiheadAttention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_PReLU.py b/tools/pnnx/tests/ncnn/test_nn_PReLU.py index 67c7717f7..c3ee6cf46 100644 --- a/tools/pnnx/tests/ncnn/test_nn_PReLU.py +++ b/tools/pnnx/tests/ncnn/test_nn_PReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_PixelShuffle.py b/tools/pnnx/tests/ncnn/test_nn_PixelShuffle.py index 446a7933d..66d63fc74 100644 --- a/tools/pnnx/tests/ncnn/test_nn_PixelShuffle.py +++ b/tools/pnnx/tests/ncnn/test_nn_PixelShuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_PixelUnshuffle.py b/tools/pnnx/tests/ncnn/test_nn_PixelUnshuffle.py index 68db3508c..9d4707802 100644 --- a/tools/pnnx/tests/ncnn/test_nn_PixelUnshuffle.py +++ b/tools/pnnx/tests/ncnn/test_nn_PixelUnshuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_RMSNorm.py b/tools/pnnx/tests/ncnn/test_nn_RMSNorm.py index e69ad1220..6f4d98777 100644 --- a/tools/pnnx/tests/ncnn/test_nn_RMSNorm.py +++ b/tools/pnnx/tests/ncnn/test_nn_RMSNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_RNN.py b/tools/pnnx/tests/ncnn/test_nn_RNN.py index c2685b51c..2ab57181f 100644 --- a/tools/pnnx/tests/ncnn/test_nn_RNN.py +++ b/tools/pnnx/tests/ncnn/test_nn_RNN.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ReLU.py b/tools/pnnx/tests/ncnn/test_nn_ReLU.py index b3adf2c75..49d8c3218 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ReLU.py +++ b/tools/pnnx/tests/ncnn/test_nn_ReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ReLU6.py b/tools/pnnx/tests/ncnn/test_nn_ReLU6.py index 9dbea33a3..8adc4a353 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ReLU6.py +++ b/tools/pnnx/tests/ncnn/test_nn_ReLU6.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ReflectionPad1d.py b/tools/pnnx/tests/ncnn/test_nn_ReflectionPad1d.py index 39bcf8ce6..bf0fa4515 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ReflectionPad1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ReflectionPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ReflectionPad2d.py b/tools/pnnx/tests/ncnn/test_nn_ReflectionPad2d.py index a2f9e1588..a5cbd8a21 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ReflectionPad2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ReflectionPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ReplicationPad1d.py b/tools/pnnx/tests/ncnn/test_nn_ReplicationPad1d.py index 4ba17a9a8..75cd3a39a 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ReplicationPad1d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ReplicationPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ReplicationPad2d.py b/tools/pnnx/tests/ncnn/test_nn_ReplicationPad2d.py index 5cf663fb2..a345884cd 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ReplicationPad2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ReplicationPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ReplicationPad3d.py b/tools/pnnx/tests/ncnn/test_nn_ReplicationPad3d.py index 5714191df..cbff9f030 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ReplicationPad3d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ReplicationPad3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_SELU.py b/tools/pnnx/tests/ncnn/test_nn_SELU.py index b8cf59006..31705fda1 100644 --- a/tools/pnnx/tests/ncnn/test_nn_SELU.py +++ b/tools/pnnx/tests/ncnn/test_nn_SELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_SiLU.py b/tools/pnnx/tests/ncnn/test_nn_SiLU.py index 3a4d35a67..2f6607bea 100644 --- a/tools/pnnx/tests/ncnn/test_nn_SiLU.py +++ b/tools/pnnx/tests/ncnn/test_nn_SiLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Sigmoid.py b/tools/pnnx/tests/ncnn/test_nn_Sigmoid.py index 246e63084..e1762564d 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Sigmoid.py +++ b/tools/pnnx/tests/ncnn/test_nn_Sigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Softmax.py b/tools/pnnx/tests/ncnn/test_nn_Softmax.py index 73bd40e3a..e00ab6fe3 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Softmax.py +++ b/tools/pnnx/tests/ncnn/test_nn_Softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Softmax2d.py b/tools/pnnx/tests/ncnn/test_nn_Softmax2d.py index ddeb8586a..ad728fa9c 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Softmax2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_Softmax2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Tanh.py b/tools/pnnx/tests/ncnn/test_nn_Tanh.py index a60d1345d..b61021e56 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Tanh.py +++ b/tools/pnnx/tests/ncnn/test_nn_Tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Unfold.py b/tools/pnnx/tests/ncnn/test_nn_Unfold.py index 8d618f761..24323063c 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Unfold.py +++ b/tools/pnnx/tests/ncnn/test_nn_Unfold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_Upsample.py b/tools/pnnx/tests/ncnn/test_nn_Upsample.py index 0644bc17d..52952922b 100644 --- a/tools/pnnx/tests/ncnn/test_nn_Upsample.py +++ b/tools/pnnx/tests/ncnn/test_nn_Upsample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_UpsamplingBilinear2d.py b/tools/pnnx/tests/ncnn/test_nn_UpsamplingBilinear2d.py index 704b2c778..4845440ca 100644 --- a/tools/pnnx/tests/ncnn/test_nn_UpsamplingBilinear2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_UpsamplingBilinear2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_UpsamplingNearest2d.py b/tools/pnnx/tests/ncnn/test_nn_UpsamplingNearest2d.py index 0973bc650..35980fe1c 100644 --- a/tools/pnnx/tests/ncnn/test_nn_UpsamplingNearest2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_UpsamplingNearest2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_nn_ZeroPad2d.py b/tools/pnnx/tests/ncnn/test_nn_ZeroPad2d.py index e8b4cfb17..b06227a94 100644 --- a/tools/pnnx/tests/ncnn/test_nn_ZeroPad2d.py +++ b/tools/pnnx/tests/ncnn/test_nn_ZeroPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_resnet18.py b/tools/pnnx/tests/ncnn/test_resnet18.py index 1a31f7949..55818b99c 100644 --- a/tools/pnnx/tests/ncnn/test_resnet18.py +++ b/tools/pnnx/tests/ncnn/test_resnet18.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/ncnn/test_shufflenet_v2_x1_0.py b/tools/pnnx/tests/ncnn/test_shufflenet_v2_x1_0.py index 430a6579e..4ad35a1e3 100644 --- a/tools/pnnx/tests/ncnn/test_shufflenet_v2_x1_0.py +++ b/tools/pnnx/tests/ncnn/test_shufflenet_v2_x1_0.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/ncnn/test_squeezenet1_1.py b/tools/pnnx/tests/ncnn/test_squeezenet1_1.py index f7c35ae55..f7f4160a9 100644 --- a/tools/pnnx/tests/ncnn/test_squeezenet1_1.py +++ b/tools/pnnx/tests/ncnn/test_squeezenet1_1.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/ncnn/test_torch_abs.py b/tools/pnnx/tests/ncnn/test_torch_abs.py index 8d824a11b..e6e2d9df7 100644 --- a/tools/pnnx/tests/ncnn/test_torch_abs.py +++ b/tools/pnnx/tests/ncnn/test_torch_abs.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_acos.py b/tools/pnnx/tests/ncnn/test_torch_acos.py index 4fc0e43a3..a186a57b0 100644 --- a/tools/pnnx/tests/ncnn/test_torch_acos.py +++ b/tools/pnnx/tests/ncnn/test_torch_acos.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_addmm.py b/tools/pnnx/tests/ncnn/test_torch_addmm.py index 3778dc43d..90db5df6c 100644 --- a/tools/pnnx/tests/ncnn/test_torch_addmm.py +++ b/tools/pnnx/tests/ncnn/test_torch_addmm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_amax.py b/tools/pnnx/tests/ncnn/test_torch_amax.py index 512dfa7d1..0c94aeeee 100644 --- a/tools/pnnx/tests/ncnn/test_torch_amax.py +++ b/tools/pnnx/tests/ncnn/test_torch_amax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_amin.py b/tools/pnnx/tests/ncnn/test_torch_amin.py index dc2d9de87..6a2adb2de 100644 --- a/tools/pnnx/tests/ncnn/test_torch_amin.py +++ b/tools/pnnx/tests/ncnn/test_torch_amin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_asin.py b/tools/pnnx/tests/ncnn/test_torch_asin.py index 24099e592..2963a8471 100644 --- a/tools/pnnx/tests/ncnn/test_torch_asin.py +++ b/tools/pnnx/tests/ncnn/test_torch_asin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_atan.py b/tools/pnnx/tests/ncnn/test_torch_atan.py index bef6aae58..685431776 100644 --- a/tools/pnnx/tests/ncnn/test_torch_atan.py +++ b/tools/pnnx/tests/ncnn/test_torch_atan.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_atan2.py b/tools/pnnx/tests/ncnn/test_torch_atan2.py index f4dcb6eaf..eedd60c50 100644 --- a/tools/pnnx/tests/ncnn/test_torch_atan2.py +++ b/tools/pnnx/tests/ncnn/test_torch_atan2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_bmm.py b/tools/pnnx/tests/ncnn/test_torch_bmm.py index f2654b539..8f62d113c 100644 --- a/tools/pnnx/tests/ncnn/test_torch_bmm.py +++ b/tools/pnnx/tests/ncnn/test_torch_bmm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_cat.py b/tools/pnnx/tests/ncnn/test_torch_cat.py index d02078da0..cb2681d9a 100644 --- a/tools/pnnx/tests/ncnn/test_torch_cat.py +++ b/tools/pnnx/tests/ncnn/test_torch_cat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_ceil.py b/tools/pnnx/tests/ncnn/test_torch_ceil.py index 4ee628adb..e25844212 100644 --- a/tools/pnnx/tests/ncnn/test_torch_ceil.py +++ b/tools/pnnx/tests/ncnn/test_torch_ceil.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_chunk.py b/tools/pnnx/tests/ncnn/test_torch_chunk.py index f4bfaeb4b..de69ccab3 100644 --- a/tools/pnnx/tests/ncnn/test_torch_chunk.py +++ b/tools/pnnx/tests/ncnn/test_torch_chunk.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_clamp.py b/tools/pnnx/tests/ncnn/test_torch_clamp.py index daf2e2a00..79a15ed09 100644 --- a/tools/pnnx/tests/ncnn/test_torch_clamp.py +++ b/tools/pnnx/tests/ncnn/test_torch_clamp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_clone.py b/tools/pnnx/tests/ncnn/test_torch_clone.py index a5ab9e787..f559a9a92 100644 --- a/tools/pnnx/tests/ncnn/test_torch_clone.py +++ b/tools/pnnx/tests/ncnn/test_torch_clone.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_cos.py b/tools/pnnx/tests/ncnn/test_torch_cos.py index f32b1ff4e..16c837320 100644 --- a/tools/pnnx/tests/ncnn/test_torch_cos.py +++ b/tools/pnnx/tests/ncnn/test_torch_cos.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_cumsum.py b/tools/pnnx/tests/ncnn/test_torch_cumsum.py index 27b97b7b1..db37fdfa4 100644 --- a/tools/pnnx/tests/ncnn/test_torch_cumsum.py +++ b/tools/pnnx/tests/ncnn/test_torch_cumsum.py @@ -1,17 +1,6 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# 2023 Xiaomi Corp. (author: Fangjun Kuang) -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_diag.py b/tools/pnnx/tests/ncnn/test_torch_diag.py index 8af8069ef..438e34e6c 100644 --- a/tools/pnnx/tests/ncnn/test_torch_diag.py +++ b/tools/pnnx/tests/ncnn/test_torch_diag.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_einsum.py b/tools/pnnx/tests/ncnn/test_torch_einsum.py index d5a6f8cdb..d84426e43 100644 --- a/tools/pnnx/tests/ncnn/test_torch_einsum.py +++ b/tools/pnnx/tests/ncnn/test_torch_einsum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_exp.py b/tools/pnnx/tests/ncnn/test_torch_exp.py index 5e608687c..06c7f8fb3 100644 --- a/tools/pnnx/tests/ncnn/test_torch_exp.py +++ b/tools/pnnx/tests/ncnn/test_torch_exp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_floor.py b/tools/pnnx/tests/ncnn/test_torch_floor.py index e100d96de..61e8221eb 100644 --- a/tools/pnnx/tests/ncnn/test_torch_floor.py +++ b/tools/pnnx/tests/ncnn/test_torch_floor.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_istft.py b/tools/pnnx/tests/ncnn/test_torch_istft.py index 8ab52908e..d24aa189d 100644 --- a/tools/pnnx/tests/ncnn/test_torch_istft.py +++ b/tools/pnnx/tests/ncnn/test_torch_istft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_log.py b/tools/pnnx/tests/ncnn/test_torch_log.py index a3583f472..80dc29286 100644 --- a/tools/pnnx/tests/ncnn/test_torch_log.py +++ b/tools/pnnx/tests/ncnn/test_torch_log.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_log10.py b/tools/pnnx/tests/ncnn/test_torch_log10.py index 20b8f0939..da59e5cde 100644 --- a/tools/pnnx/tests/ncnn/test_torch_log10.py +++ b/tools/pnnx/tests/ncnn/test_torch_log10.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_logsumexp.py b/tools/pnnx/tests/ncnn/test_torch_logsumexp.py index b5b3ea20a..b90fd051b 100644 --- a/tools/pnnx/tests/ncnn/test_torch_logsumexp.py +++ b/tools/pnnx/tests/ncnn/test_torch_logsumexp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_matmul.py b/tools/pnnx/tests/ncnn/test_torch_matmul.py index e4cd3b9b1..8415994b9 100644 --- a/tools/pnnx/tests/ncnn/test_torch_matmul.py +++ b/tools/pnnx/tests/ncnn/test_torch_matmul.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_max.py b/tools/pnnx/tests/ncnn/test_torch_max.py index 61fcb383d..1f840cf17 100644 --- a/tools/pnnx/tests/ncnn/test_torch_max.py +++ b/tools/pnnx/tests/ncnn/test_torch_max.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_maximum.py b/tools/pnnx/tests/ncnn/test_torch_maximum.py index 616a0978c..6b11d8c06 100644 --- a/tools/pnnx/tests/ncnn/test_torch_maximum.py +++ b/tools/pnnx/tests/ncnn/test_torch_maximum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_mean.py b/tools/pnnx/tests/ncnn/test_torch_mean.py index 20d284ddf..975d60344 100644 --- a/tools/pnnx/tests/ncnn/test_torch_mean.py +++ b/tools/pnnx/tests/ncnn/test_torch_mean.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_min.py b/tools/pnnx/tests/ncnn/test_torch_min.py index da35d659a..e44ac3462 100644 --- a/tools/pnnx/tests/ncnn/test_torch_min.py +++ b/tools/pnnx/tests/ncnn/test_torch_min.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_minimum.py b/tools/pnnx/tests/ncnn/test_torch_minimum.py index 4b3d6e535..2bae011f4 100644 --- a/tools/pnnx/tests/ncnn/test_torch_minimum.py +++ b/tools/pnnx/tests/ncnn/test_torch_minimum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_mm.py b/tools/pnnx/tests/ncnn/test_torch_mm.py index 778ca983d..1c813cbda 100644 --- a/tools/pnnx/tests/ncnn/test_torch_mm.py +++ b/tools/pnnx/tests/ncnn/test_torch_mm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_neg.py b/tools/pnnx/tests/ncnn/test_torch_neg.py index 75197fa16..f0c94b274 100644 --- a/tools/pnnx/tests/ncnn/test_torch_neg.py +++ b/tools/pnnx/tests/ncnn/test_torch_neg.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_norm.py b/tools/pnnx/tests/ncnn/test_torch_norm.py index cb3f12f98..b9363e11a 100644 --- a/tools/pnnx/tests/ncnn/test_torch_norm.py +++ b/tools/pnnx/tests/ncnn/test_torch_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_pow.py b/tools/pnnx/tests/ncnn/test_torch_pow.py index 26c850cba..ef92c41fb 100644 --- a/tools/pnnx/tests/ncnn/test_torch_pow.py +++ b/tools/pnnx/tests/ncnn/test_torch_pow.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_prod.py b/tools/pnnx/tests/ncnn/test_torch_prod.py index 88bff9421..5d450cbb9 100644 --- a/tools/pnnx/tests/ncnn/test_torch_prod.py +++ b/tools/pnnx/tests/ncnn/test_torch_prod.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_reciprocal.py b/tools/pnnx/tests/ncnn/test_torch_reciprocal.py index 83f2c89c9..d62485127 100644 --- a/tools/pnnx/tests/ncnn/test_torch_reciprocal.py +++ b/tools/pnnx/tests/ncnn/test_torch_reciprocal.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_roll.py b/tools/pnnx/tests/ncnn/test_torch_roll.py index 6412ee6ba..1cd7195c0 100644 --- a/tools/pnnx/tests/ncnn/test_torch_roll.py +++ b/tools/pnnx/tests/ncnn/test_torch_roll.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_round.py b/tools/pnnx/tests/ncnn/test_torch_round.py index 23241792e..b67a6b570 100644 --- a/tools/pnnx/tests/ncnn/test_torch_round.py +++ b/tools/pnnx/tests/ncnn/test_torch_round.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_rsqrt.py b/tools/pnnx/tests/ncnn/test_torch_rsqrt.py index b3a34c70d..1faa9c441 100644 --- a/tools/pnnx/tests/ncnn/test_torch_rsqrt.py +++ b/tools/pnnx/tests/ncnn/test_torch_rsqrt.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_sin.py b/tools/pnnx/tests/ncnn/test_torch_sin.py index d984a269e..87f5da799 100644 --- a/tools/pnnx/tests/ncnn/test_torch_sin.py +++ b/tools/pnnx/tests/ncnn/test_torch_sin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_slice_scatter.py b/tools/pnnx/tests/ncnn/test_torch_slice_scatter.py index 977b79d3d..6b78f2030 100644 --- a/tools/pnnx/tests/ncnn/test_torch_slice_scatter.py +++ b/tools/pnnx/tests/ncnn/test_torch_slice_scatter.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_sqrt.py b/tools/pnnx/tests/ncnn/test_torch_sqrt.py index bfd5ddb3d..8ca41e4ce 100644 --- a/tools/pnnx/tests/ncnn/test_torch_sqrt.py +++ b/tools/pnnx/tests/ncnn/test_torch_sqrt.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_square.py b/tools/pnnx/tests/ncnn/test_torch_square.py index d5b5c8af9..3fca9916c 100644 --- a/tools/pnnx/tests/ncnn/test_torch_square.py +++ b/tools/pnnx/tests/ncnn/test_torch_square.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_squeeze.py b/tools/pnnx/tests/ncnn/test_torch_squeeze.py index 807997677..9fd9d45ed 100644 --- a/tools/pnnx/tests/ncnn/test_torch_squeeze.py +++ b/tools/pnnx/tests/ncnn/test_torch_squeeze.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_stack.py b/tools/pnnx/tests/ncnn/test_torch_stack.py index a55ff5962..dbe565620 100644 --- a/tools/pnnx/tests/ncnn/test_torch_stack.py +++ b/tools/pnnx/tests/ncnn/test_torch_stack.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_stft.py b/tools/pnnx/tests/ncnn/test_torch_stft.py index ac403ee7e..4029e2f44 100644 --- a/tools/pnnx/tests/ncnn/test_torch_stft.py +++ b/tools/pnnx/tests/ncnn/test_torch_stft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_sum.py b/tools/pnnx/tests/ncnn/test_torch_sum.py index e32136bf3..5d31881e3 100644 --- a/tools/pnnx/tests/ncnn/test_torch_sum.py +++ b/tools/pnnx/tests/ncnn/test_torch_sum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_t.py b/tools/pnnx/tests/ncnn/test_torch_t.py index 2ade16a38..d1cafeff4 100644 --- a/tools/pnnx/tests/ncnn/test_torch_t.py +++ b/tools/pnnx/tests/ncnn/test_torch_t.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_tan.py b/tools/pnnx/tests/ncnn/test_torch_tan.py index b97bad2fd..5cbf95d93 100644 --- a/tools/pnnx/tests/ncnn/test_torch_tan.py +++ b/tools/pnnx/tests/ncnn/test_torch_tan.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_tanh.py b/tools/pnnx/tests/ncnn/test_torch_tanh.py index 10b1b72ff..3e45872c7 100644 --- a/tools/pnnx/tests/ncnn/test_torch_tanh.py +++ b/tools/pnnx/tests/ncnn/test_torch_tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_tensor_split.py b/tools/pnnx/tests/ncnn/test_torch_tensor_split.py index 0ff57104d..e6b4e2519 100644 --- a/tools/pnnx/tests/ncnn/test_torch_tensor_split.py +++ b/tools/pnnx/tests/ncnn/test_torch_tensor_split.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_transpose.py b/tools/pnnx/tests/ncnn/test_torch_transpose.py index cfd7204d8..b4fac1e0a 100644 --- a/tools/pnnx/tests/ncnn/test_torch_transpose.py +++ b/tools/pnnx/tests/ncnn/test_torch_transpose.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_trunc.py b/tools/pnnx/tests/ncnn/test_torch_trunc.py index c2e42f7b5..a876a0c3a 100644 --- a/tools/pnnx/tests/ncnn/test_torch_trunc.py +++ b/tools/pnnx/tests/ncnn/test_torch_trunc.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_unbind.py b/tools/pnnx/tests/ncnn/test_torch_unbind.py index 8e224612d..ec70a2b4f 100644 --- a/tools/pnnx/tests/ncnn/test_torch_unbind.py +++ b/tools/pnnx/tests/ncnn/test_torch_unbind.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torch_unsqueeze.py b/tools/pnnx/tests/ncnn/test_torch_unsqueeze.py index b15a43419..630fdd1a1 100644 --- a/tools/pnnx/tests/ncnn/test_torch_unsqueeze.py +++ b/tools/pnnx/tests/ncnn/test_torch_unsqueeze.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py b/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py index 5c19cca1d..fdd895377 100644 --- a/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py +++ b/tools/pnnx/tests/ncnn/test_torchaudio_F_inverse_spectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torchaudio_F_spectrogram.py b/tools/pnnx/tests/ncnn/test_torchaudio_F_spectrogram.py index 97395c302..154607fe0 100644 --- a/tools/pnnx/tests/ncnn/test_torchaudio_F_spectrogram.py +++ b/tools/pnnx/tests/ncnn/test_torchaudio_F_spectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py b/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py index e48c4d641..21dd38d20 100644 --- a/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py +++ b/tools/pnnx/tests/ncnn/test_torchaudio_InverseSpectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torchaudio_Spectrogram.py b/tools/pnnx/tests/ncnn/test_torchaudio_Spectrogram.py index 165e8add0..c06f5e252 100644 --- a/tools/pnnx/tests/ncnn/test_torchaudio_Spectrogram.py +++ b/tools/pnnx/tests/ncnn/test_torchaudio_Spectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_torchvision_DeformConv2d.py b/tools/pnnx/tests/ncnn/test_torchvision_DeformConv2d.py index e7eba1016..6853ad70a 100644 --- a/tools/pnnx/tests/ncnn/test_torchvision_DeformConv2d.py +++ b/tools/pnnx/tests/ncnn/test_torchvision_DeformConv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/ncnn/test_vit_b_32.py b/tools/pnnx/tests/ncnn/test_vit_b_32.py index a610bf553..6b1420001 100644 --- a/tools/pnnx/tests/ncnn/test_vit_b_32.py +++ b/tools/pnnx/tests/ncnn/test_vit_b_32.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool1d.py b/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool1d.py index 0ca423687..798035033 100644 --- a/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool1d.py +++ b/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool2d.py b/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool2d.py index bb08c0296..cd1de0153 100644 --- a/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool2d.py +++ b/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool3d.py b/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool3d.py index 8da6d76a7..547c2b49f 100644 --- a/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool3d.py +++ b/tools/pnnx/tests/onnx/test_F_adaptive_avg_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_adaptive_max_pool1d.py b/tools/pnnx/tests/onnx/test_F_adaptive_max_pool1d.py index c61248e4f..d58972c95 100644 --- a/tools/pnnx/tests/onnx/test_F_adaptive_max_pool1d.py +++ b/tools/pnnx/tests/onnx/test_F_adaptive_max_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_adaptive_max_pool2d.py b/tools/pnnx/tests/onnx/test_F_adaptive_max_pool2d.py index caa811e18..f3e57782a 100644 --- a/tools/pnnx/tests/onnx/test_F_adaptive_max_pool2d.py +++ b/tools/pnnx/tests/onnx/test_F_adaptive_max_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_adaptive_max_pool3d.py b/tools/pnnx/tests/onnx/test_F_adaptive_max_pool3d.py index 130694f05..e4f48af7f 100644 --- a/tools/pnnx/tests/onnx/test_F_adaptive_max_pool3d.py +++ b/tools/pnnx/tests/onnx/test_F_adaptive_max_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_avg_pool1d.py b/tools/pnnx/tests/onnx/test_F_avg_pool1d.py index 4458da28a..526bd165a 100644 --- a/tools/pnnx/tests/onnx/test_F_avg_pool1d.py +++ b/tools/pnnx/tests/onnx/test_F_avg_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_avg_pool2d.py b/tools/pnnx/tests/onnx/test_F_avg_pool2d.py index 6e189ad78..1d474f95d 100644 --- a/tools/pnnx/tests/onnx/test_F_avg_pool2d.py +++ b/tools/pnnx/tests/onnx/test_F_avg_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_avg_pool3d.py b/tools/pnnx/tests/onnx/test_F_avg_pool3d.py index a5a61e1b9..6f74b7d5e 100644 --- a/tools/pnnx/tests/onnx/test_F_avg_pool3d.py +++ b/tools/pnnx/tests/onnx/test_F_avg_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_batch_norm.py b/tools/pnnx/tests/onnx/test_F_batch_norm.py index d58a0ae0e..6150916a8 100644 --- a/tools/pnnx/tests/onnx/test_F_batch_norm.py +++ b/tools/pnnx/tests/onnx/test_F_batch_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_celu.py b/tools/pnnx/tests/onnx/test_F_celu.py index dd474e030..fd29c7a5f 100644 --- a/tools/pnnx/tests/onnx/test_F_celu.py +++ b/tools/pnnx/tests/onnx/test_F_celu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_conv1d.py b/tools/pnnx/tests/onnx/test_F_conv1d.py index afa21be78..3f26e34b1 100644 --- a/tools/pnnx/tests/onnx/test_F_conv1d.py +++ b/tools/pnnx/tests/onnx/test_F_conv1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_conv2d.py b/tools/pnnx/tests/onnx/test_F_conv2d.py index b638f43b2..2929e64d0 100644 --- a/tools/pnnx/tests/onnx/test_F_conv2d.py +++ b/tools/pnnx/tests/onnx/test_F_conv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_conv3d.py b/tools/pnnx/tests/onnx/test_F_conv3d.py index 3824ae1c8..fa70d06c3 100644 --- a/tools/pnnx/tests/onnx/test_F_conv3d.py +++ b/tools/pnnx/tests/onnx/test_F_conv3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_conv_transpose1d.py b/tools/pnnx/tests/onnx/test_F_conv_transpose1d.py index e8c7a48dc..cbb368a36 100644 --- a/tools/pnnx/tests/onnx/test_F_conv_transpose1d.py +++ b/tools/pnnx/tests/onnx/test_F_conv_transpose1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_conv_transpose2d.py b/tools/pnnx/tests/onnx/test_F_conv_transpose2d.py index c4f3b35b0..92c738061 100644 --- a/tools/pnnx/tests/onnx/test_F_conv_transpose2d.py +++ b/tools/pnnx/tests/onnx/test_F_conv_transpose2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_conv_transpose3d.py b/tools/pnnx/tests/onnx/test_F_conv_transpose3d.py index 837ab45b3..1dd0d724d 100644 --- a/tools/pnnx/tests/onnx/test_F_conv_transpose3d.py +++ b/tools/pnnx/tests/onnx/test_F_conv_transpose3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_elu.py b/tools/pnnx/tests/onnx/test_F_elu.py index 5126ea81a..46a5e7afc 100644 --- a/tools/pnnx/tests/onnx/test_F_elu.py +++ b/tools/pnnx/tests/onnx/test_F_elu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_gelu.py b/tools/pnnx/tests/onnx/test_F_gelu.py index f93d4848f..f11fcf3ba 100644 --- a/tools/pnnx/tests/onnx/test_F_gelu.py +++ b/tools/pnnx/tests/onnx/test_F_gelu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_hardshrink.py b/tools/pnnx/tests/onnx/test_F_hardshrink.py index 00dbdd6fd..e8da50852 100644 --- a/tools/pnnx/tests/onnx/test_F_hardshrink.py +++ b/tools/pnnx/tests/onnx/test_F_hardshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_hardsigmoid.py b/tools/pnnx/tests/onnx/test_F_hardsigmoid.py index a0f8c7654..7d251799b 100644 --- a/tools/pnnx/tests/onnx/test_F_hardsigmoid.py +++ b/tools/pnnx/tests/onnx/test_F_hardsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_hardswish.py b/tools/pnnx/tests/onnx/test_F_hardswish.py index 78ada9b34..ded8707a1 100644 --- a/tools/pnnx/tests/onnx/test_F_hardswish.py +++ b/tools/pnnx/tests/onnx/test_F_hardswish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_hardtanh.py b/tools/pnnx/tests/onnx/test_F_hardtanh.py index 5043703d9..a0eb4a98c 100644 --- a/tools/pnnx/tests/onnx/test_F_hardtanh.py +++ b/tools/pnnx/tests/onnx/test_F_hardtanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_interpolate.py b/tools/pnnx/tests/onnx/test_F_interpolate.py index 4215ce0ad..477184074 100644 --- a/tools/pnnx/tests/onnx/test_F_interpolate.py +++ b/tools/pnnx/tests/onnx/test_F_interpolate.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_layer_norm.py b/tools/pnnx/tests/onnx/test_F_layer_norm.py index be7b879b3..84bde1799 100644 --- a/tools/pnnx/tests/onnx/test_F_layer_norm.py +++ b/tools/pnnx/tests/onnx/test_F_layer_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_leaky_relu.py b/tools/pnnx/tests/onnx/test_F_leaky_relu.py index bdffaa40e..93c2b1e5f 100644 --- a/tools/pnnx/tests/onnx/test_F_leaky_relu.py +++ b/tools/pnnx/tests/onnx/test_F_leaky_relu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_linear.py b/tools/pnnx/tests/onnx/test_F_linear.py index de9cd4b50..b566f45ab 100644 --- a/tools/pnnx/tests/onnx/test_F_linear.py +++ b/tools/pnnx/tests/onnx/test_F_linear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_local_response_norm.py b/tools/pnnx/tests/onnx/test_F_local_response_norm.py index 10de3fb63..164990f5a 100644 --- a/tools/pnnx/tests/onnx/test_F_local_response_norm.py +++ b/tools/pnnx/tests/onnx/test_F_local_response_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_log_softmax.py b/tools/pnnx/tests/onnx/test_F_log_softmax.py index 8bc657c67..4e6d179c1 100644 --- a/tools/pnnx/tests/onnx/test_F_log_softmax.py +++ b/tools/pnnx/tests/onnx/test_F_log_softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_logsigmoid.py b/tools/pnnx/tests/onnx/test_F_logsigmoid.py index a731936a1..8e6d4fda5 100644 --- a/tools/pnnx/tests/onnx/test_F_logsigmoid.py +++ b/tools/pnnx/tests/onnx/test_F_logsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_max_pool1d.py b/tools/pnnx/tests/onnx/test_F_max_pool1d.py index 1a7e62684..b270856aa 100644 --- a/tools/pnnx/tests/onnx/test_F_max_pool1d.py +++ b/tools/pnnx/tests/onnx/test_F_max_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_max_pool2d.py b/tools/pnnx/tests/onnx/test_F_max_pool2d.py index 5f62a0ab7..7371f64e3 100644 --- a/tools/pnnx/tests/onnx/test_F_max_pool2d.py +++ b/tools/pnnx/tests/onnx/test_F_max_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_max_pool3d.py b/tools/pnnx/tests/onnx/test_F_max_pool3d.py index 9f6125c6a..f9f2b5264 100644 --- a/tools/pnnx/tests/onnx/test_F_max_pool3d.py +++ b/tools/pnnx/tests/onnx/test_F_max_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_mish.py b/tools/pnnx/tests/onnx/test_F_mish.py index 69026d38b..ed425bb70 100644 --- a/tools/pnnx/tests/onnx/test_F_mish.py +++ b/tools/pnnx/tests/onnx/test_F_mish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_normalize.py b/tools/pnnx/tests/onnx/test_F_normalize.py index 612496d6b..8c82df29f 100644 --- a/tools/pnnx/tests/onnx/test_F_normalize.py +++ b/tools/pnnx/tests/onnx/test_F_normalize.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_pad.py b/tools/pnnx/tests/onnx/test_F_pad.py index 758c529d8..c970366bd 100644 --- a/tools/pnnx/tests/onnx/test_F_pad.py +++ b/tools/pnnx/tests/onnx/test_F_pad.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_pixel_shuffle.py b/tools/pnnx/tests/onnx/test_F_pixel_shuffle.py index ceb9d9d76..3e77a4dae 100644 --- a/tools/pnnx/tests/onnx/test_F_pixel_shuffle.py +++ b/tools/pnnx/tests/onnx/test_F_pixel_shuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_pixel_unshuffle.py b/tools/pnnx/tests/onnx/test_F_pixel_unshuffle.py index 6b5d77bed..c21bd8fda 100644 --- a/tools/pnnx/tests/onnx/test_F_pixel_unshuffle.py +++ b/tools/pnnx/tests/onnx/test_F_pixel_unshuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_prelu.py b/tools/pnnx/tests/onnx/test_F_prelu.py index 9e0a91037..2df06dcf8 100644 --- a/tools/pnnx/tests/onnx/test_F_prelu.py +++ b/tools/pnnx/tests/onnx/test_F_prelu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_relu.py b/tools/pnnx/tests/onnx/test_F_relu.py index 3f75e256d..ca117987f 100644 --- a/tools/pnnx/tests/onnx/test_F_relu.py +++ b/tools/pnnx/tests/onnx/test_F_relu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_relu6.py b/tools/pnnx/tests/onnx/test_F_relu6.py index 4a64fafc2..53724d251 100644 --- a/tools/pnnx/tests/onnx/test_F_relu6.py +++ b/tools/pnnx/tests/onnx/test_F_relu6.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_scaled_dot_product_attention.py b/tools/pnnx/tests/onnx/test_F_scaled_dot_product_attention.py index 2802b3794..d21f1b1d2 100644 --- a/tools/pnnx/tests/onnx/test_F_scaled_dot_product_attention.py +++ b/tools/pnnx/tests/onnx/test_F_scaled_dot_product_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_selu.py b/tools/pnnx/tests/onnx/test_F_selu.py index e70f93441..2ae39fa98 100644 --- a/tools/pnnx/tests/onnx/test_F_selu.py +++ b/tools/pnnx/tests/onnx/test_F_selu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_sigmoid.py b/tools/pnnx/tests/onnx/test_F_sigmoid.py index c90e570e0..23ac312bd 100644 --- a/tools/pnnx/tests/onnx/test_F_sigmoid.py +++ b/tools/pnnx/tests/onnx/test_F_sigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_silu.py b/tools/pnnx/tests/onnx/test_F_silu.py index d6cc98726..b3f09149c 100644 --- a/tools/pnnx/tests/onnx/test_F_silu.py +++ b/tools/pnnx/tests/onnx/test_F_silu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_softmax.py b/tools/pnnx/tests/onnx/test_F_softmax.py index 467bb139b..37b034e00 100644 --- a/tools/pnnx/tests/onnx/test_F_softmax.py +++ b/tools/pnnx/tests/onnx/test_F_softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_softmin.py b/tools/pnnx/tests/onnx/test_F_softmin.py index 88a82fea0..210b4580d 100644 --- a/tools/pnnx/tests/onnx/test_F_softmin.py +++ b/tools/pnnx/tests/onnx/test_F_softmin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_softplus.py b/tools/pnnx/tests/onnx/test_F_softplus.py index c261f58d6..757ae7633 100644 --- a/tools/pnnx/tests/onnx/test_F_softplus.py +++ b/tools/pnnx/tests/onnx/test_F_softplus.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_softshrink.py b/tools/pnnx/tests/onnx/test_F_softshrink.py index 7f1fb8838..4de375185 100644 --- a/tools/pnnx/tests/onnx/test_F_softshrink.py +++ b/tools/pnnx/tests/onnx/test_F_softshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_softsign.py b/tools/pnnx/tests/onnx/test_F_softsign.py index 27164f3df..7d3857cb0 100644 --- a/tools/pnnx/tests/onnx/test_F_softsign.py +++ b/tools/pnnx/tests/onnx/test_F_softsign.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_tanh.py b/tools/pnnx/tests/onnx/test_F_tanh.py index b56d513f6..50da2bd89 100644 --- a/tools/pnnx/tests/onnx/test_F_tanh.py +++ b/tools/pnnx/tests/onnx/test_F_tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_tanhshrink.py b/tools/pnnx/tests/onnx/test_F_tanhshrink.py index 7be2bf57c..3443493ac 100644 --- a/tools/pnnx/tests/onnx/test_F_tanhshrink.py +++ b/tools/pnnx/tests/onnx/test_F_tanhshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_upsample.py b/tools/pnnx/tests/onnx/test_F_upsample.py index cd57f7a25..457497a3d 100644 --- a/tools/pnnx/tests/onnx/test_F_upsample.py +++ b/tools/pnnx/tests/onnx/test_F_upsample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_upsample_bilinear.py b/tools/pnnx/tests/onnx/test_F_upsample_bilinear.py index ec4a9d5b8..eb434b265 100644 --- a/tools/pnnx/tests/onnx/test_F_upsample_bilinear.py +++ b/tools/pnnx/tests/onnx/test_F_upsample_bilinear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_F_upsample_nearest.py b/tools/pnnx/tests/onnx/test_F_upsample_nearest.py index 897ba9554..d729cfbb8 100644 --- a/tools/pnnx/tests/onnx/test_F_upsample_nearest.py +++ b/tools/pnnx/tests/onnx/test_F_upsample_nearest.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_expand.py b/tools/pnnx/tests/onnx/test_Tensor_expand.py index ceb01dac4..46428269f 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_expand.py +++ b/tools/pnnx/tests/onnx/test_Tensor_expand.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_permute.py b/tools/pnnx/tests/onnx/test_Tensor_permute.py index a36de4c25..bf73be777 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_permute.py +++ b/tools/pnnx/tests/onnx/test_Tensor_permute.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_repeat.py b/tools/pnnx/tests/onnx/test_Tensor_repeat.py index 569ad548b..398dd7d32 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_repeat.py +++ b/tools/pnnx/tests/onnx/test_Tensor_repeat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_reshape.py b/tools/pnnx/tests/onnx/test_Tensor_reshape.py index 027fb40a0..d39e9aab2 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_reshape.py +++ b/tools/pnnx/tests/onnx/test_Tensor_reshape.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_reshape_as.py b/tools/pnnx/tests/onnx/test_Tensor_reshape_as.py index 6cafae470..33a6c788d 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_reshape_as.py +++ b/tools/pnnx/tests/onnx/test_Tensor_reshape_as.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_select.py b/tools/pnnx/tests/onnx/test_Tensor_select.py index 4f7488b55..dbfb8bb72 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_select.py +++ b/tools/pnnx/tests/onnx/test_Tensor_select.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_slice.py b/tools/pnnx/tests/onnx/test_Tensor_slice.py index 7fe32b4af..18fd5d653 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_slice.py +++ b/tools/pnnx/tests/onnx/test_Tensor_slice.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_Tensor_view.py b/tools/pnnx/tests/onnx/test_Tensor_view.py index 40df090a0..677e75710 100644 --- a/tools/pnnx/tests/onnx/test_Tensor_view.py +++ b/tools/pnnx/tests/onnx/test_Tensor_view.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_convnext_tiny.py b/tools/pnnx/tests/onnx/test_convnext_tiny.py index 2b89fa52a..deadaa174 100644 --- a/tools/pnnx/tests/onnx/test_convnext_tiny.py +++ b/tools/pnnx/tests/onnx/test_convnext_tiny.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/pnnx/tests/onnx/test_mobilenet_v2.py b/tools/pnnx/tests/onnx/test_mobilenet_v2.py index 27a904120..1e51a492a 100644 --- a/tools/pnnx/tests/onnx/test_mobilenet_v2.py +++ b/tools/pnnx/tests/onnx/test_mobilenet_v2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/onnx/test_mobilenet_v3_small.py b/tools/pnnx/tests/onnx/test_mobilenet_v3_small.py index 301215eba..e219c714d 100644 --- a/tools/pnnx/tests/onnx/test_mobilenet_v3_small.py +++ b/tools/pnnx/tests/onnx/test_mobilenet_v3_small.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool1d.py b/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool1d.py index 72732b898..7a15a4f0b 100644 --- a/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool1d.py +++ b/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool2d.py b/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool2d.py index fea8a8666..7184853e9 100644 --- a/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool2d.py +++ b/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool3d.py b/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool3d.py index 39ccf6360..e95bdcb78 100644 --- a/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool3d.py +++ b/tools/pnnx/tests/onnx/test_nn_AdaptiveAvgPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool1d.py b/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool1d.py index 079395dbd..157cf4cd8 100644 --- a/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool1d.py +++ b/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool2d.py b/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool2d.py index 4eadc4bf6..57759baf6 100644 --- a/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool2d.py +++ b/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool3d.py b/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool3d.py index 9b21726a9..6cb8edd7b 100644 --- a/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool3d.py +++ b/tools/pnnx/tests/onnx/test_nn_AdaptiveMaxPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AvgPool1d.py b/tools/pnnx/tests/onnx/test_nn_AvgPool1d.py index bb92fd30a..2d0c7f01d 100644 --- a/tools/pnnx/tests/onnx/test_nn_AvgPool1d.py +++ b/tools/pnnx/tests/onnx/test_nn_AvgPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AvgPool2d.py b/tools/pnnx/tests/onnx/test_nn_AvgPool2d.py index 099de0860..0416413e4 100644 --- a/tools/pnnx/tests/onnx/test_nn_AvgPool2d.py +++ b/tools/pnnx/tests/onnx/test_nn_AvgPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_AvgPool3d.py b/tools/pnnx/tests/onnx/test_nn_AvgPool3d.py index b36ada195..8bf0de6f0 100644 --- a/tools/pnnx/tests/onnx/test_nn_AvgPool3d.py +++ b/tools/pnnx/tests/onnx/test_nn_AvgPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_BatchNorm1d.py b/tools/pnnx/tests/onnx/test_nn_BatchNorm1d.py index c47e0ca94..dc7777894 100644 --- a/tools/pnnx/tests/onnx/test_nn_BatchNorm1d.py +++ b/tools/pnnx/tests/onnx/test_nn_BatchNorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_BatchNorm2d.py b/tools/pnnx/tests/onnx/test_nn_BatchNorm2d.py index b70aabf2c..c2e82f31b 100644 --- a/tools/pnnx/tests/onnx/test_nn_BatchNorm2d.py +++ b/tools/pnnx/tests/onnx/test_nn_BatchNorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_BatchNorm3d.py b/tools/pnnx/tests/onnx/test_nn_BatchNorm3d.py index 412ad4fb2..b00020477 100644 --- a/tools/pnnx/tests/onnx/test_nn_BatchNorm3d.py +++ b/tools/pnnx/tests/onnx/test_nn_BatchNorm3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_CELU.py b/tools/pnnx/tests/onnx/test_nn_CELU.py index d1c246329..cd3e38ee3 100644 --- a/tools/pnnx/tests/onnx/test_nn_CELU.py +++ b/tools/pnnx/tests/onnx/test_nn_CELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ConstantPad1d.py b/tools/pnnx/tests/onnx/test_nn_ConstantPad1d.py index d7b2a543f..4bd917097 100644 --- a/tools/pnnx/tests/onnx/test_nn_ConstantPad1d.py +++ b/tools/pnnx/tests/onnx/test_nn_ConstantPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ConstantPad2d.py b/tools/pnnx/tests/onnx/test_nn_ConstantPad2d.py index bf6d8cefb..9a51ac486 100644 --- a/tools/pnnx/tests/onnx/test_nn_ConstantPad2d.py +++ b/tools/pnnx/tests/onnx/test_nn_ConstantPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ConstantPad3d.py b/tools/pnnx/tests/onnx/test_nn_ConstantPad3d.py index b4ace0f4b..9b7da7a28 100644 --- a/tools/pnnx/tests/onnx/test_nn_ConstantPad3d.py +++ b/tools/pnnx/tests/onnx/test_nn_ConstantPad3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Conv1d.py b/tools/pnnx/tests/onnx/test_nn_Conv1d.py index 51f24ad4e..fd81669f4 100644 --- a/tools/pnnx/tests/onnx/test_nn_Conv1d.py +++ b/tools/pnnx/tests/onnx/test_nn_Conv1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Conv2d.py b/tools/pnnx/tests/onnx/test_nn_Conv2d.py index 31096dbd2..8b2f34963 100644 --- a/tools/pnnx/tests/onnx/test_nn_Conv2d.py +++ b/tools/pnnx/tests/onnx/test_nn_Conv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Conv3d.py b/tools/pnnx/tests/onnx/test_nn_Conv3d.py index 6e5eee3f8..78a905353 100644 --- a/tools/pnnx/tests/onnx/test_nn_Conv3d.py +++ b/tools/pnnx/tests/onnx/test_nn_Conv3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ConvTranspose1d.py b/tools/pnnx/tests/onnx/test_nn_ConvTranspose1d.py index 07f268af3..95cb4c89b 100644 --- a/tools/pnnx/tests/onnx/test_nn_ConvTranspose1d.py +++ b/tools/pnnx/tests/onnx/test_nn_ConvTranspose1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ConvTranspose2d.py b/tools/pnnx/tests/onnx/test_nn_ConvTranspose2d.py index 755e821eb..866cdbc2c 100644 --- a/tools/pnnx/tests/onnx/test_nn_ConvTranspose2d.py +++ b/tools/pnnx/tests/onnx/test_nn_ConvTranspose2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ConvTranspose3d.py b/tools/pnnx/tests/onnx/test_nn_ConvTranspose3d.py index 06bd5398c..348cfec04 100644 --- a/tools/pnnx/tests/onnx/test_nn_ConvTranspose3d.py +++ b/tools/pnnx/tests/onnx/test_nn_ConvTranspose3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ELU.py b/tools/pnnx/tests/onnx/test_nn_ELU.py index c55d82920..484afee52 100644 --- a/tools/pnnx/tests/onnx/test_nn_ELU.py +++ b/tools/pnnx/tests/onnx/test_nn_ELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_GELU.py b/tools/pnnx/tests/onnx/test_nn_GELU.py index ebf85e08e..a3018e1d8 100644 --- a/tools/pnnx/tests/onnx/test_nn_GELU.py +++ b/tools/pnnx/tests/onnx/test_nn_GELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_GRU.py b/tools/pnnx/tests/onnx/test_nn_GRU.py index 98ea95a75..f7c6504dc 100644 --- a/tools/pnnx/tests/onnx/test_nn_GRU.py +++ b/tools/pnnx/tests/onnx/test_nn_GRU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_GroupNorm.py b/tools/pnnx/tests/onnx/test_nn_GroupNorm.py index 750f71288..3ad7ee970 100644 --- a/tools/pnnx/tests/onnx/test_nn_GroupNorm.py +++ b/tools/pnnx/tests/onnx/test_nn_GroupNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Hardshrink.py b/tools/pnnx/tests/onnx/test_nn_Hardshrink.py index 38dd67c46..511af63d4 100644 --- a/tools/pnnx/tests/onnx/test_nn_Hardshrink.py +++ b/tools/pnnx/tests/onnx/test_nn_Hardshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Hardsigmoid.py b/tools/pnnx/tests/onnx/test_nn_Hardsigmoid.py index 43af74714..3214711dd 100644 --- a/tools/pnnx/tests/onnx/test_nn_Hardsigmoid.py +++ b/tools/pnnx/tests/onnx/test_nn_Hardsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Hardswish.py b/tools/pnnx/tests/onnx/test_nn_Hardswish.py index 2f313507f..1f0ef2f01 100644 --- a/tools/pnnx/tests/onnx/test_nn_Hardswish.py +++ b/tools/pnnx/tests/onnx/test_nn_Hardswish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Hardtanh.py b/tools/pnnx/tests/onnx/test_nn_Hardtanh.py index b376bf748..d66b42ee1 100644 --- a/tools/pnnx/tests/onnx/test_nn_Hardtanh.py +++ b/tools/pnnx/tests/onnx/test_nn_Hardtanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_InstanceNorm1d.py b/tools/pnnx/tests/onnx/test_nn_InstanceNorm1d.py index 8295f3daf..90bc2ebd9 100644 --- a/tools/pnnx/tests/onnx/test_nn_InstanceNorm1d.py +++ b/tools/pnnx/tests/onnx/test_nn_InstanceNorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_InstanceNorm2d.py b/tools/pnnx/tests/onnx/test_nn_InstanceNorm2d.py index 75c9f9b3f..a9bb6ad17 100644 --- a/tools/pnnx/tests/onnx/test_nn_InstanceNorm2d.py +++ b/tools/pnnx/tests/onnx/test_nn_InstanceNorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_InstanceNorm3d.py b/tools/pnnx/tests/onnx/test_nn_InstanceNorm3d.py index fad7cf6e9..7b8632f94 100644 --- a/tools/pnnx/tests/onnx/test_nn_InstanceNorm3d.py +++ b/tools/pnnx/tests/onnx/test_nn_InstanceNorm3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_LSTM.py b/tools/pnnx/tests/onnx/test_nn_LSTM.py index 6cc4c525b..17c19dd13 100644 --- a/tools/pnnx/tests/onnx/test_nn_LSTM.py +++ b/tools/pnnx/tests/onnx/test_nn_LSTM.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_LayerNorm.py b/tools/pnnx/tests/onnx/test_nn_LayerNorm.py index 749b6e4bd..7ebc8100e 100644 --- a/tools/pnnx/tests/onnx/test_nn_LayerNorm.py +++ b/tools/pnnx/tests/onnx/test_nn_LayerNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_LeakyReLU.py b/tools/pnnx/tests/onnx/test_nn_LeakyReLU.py index fc0962904..455d9461a 100644 --- a/tools/pnnx/tests/onnx/test_nn_LeakyReLU.py +++ b/tools/pnnx/tests/onnx/test_nn_LeakyReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Linear.py b/tools/pnnx/tests/onnx/test_nn_Linear.py index 71f294678..a420deb54 100644 --- a/tools/pnnx/tests/onnx/test_nn_Linear.py +++ b/tools/pnnx/tests/onnx/test_nn_Linear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_LocalResponseNorm.py b/tools/pnnx/tests/onnx/test_nn_LocalResponseNorm.py index 1a6478f02..8f93b8b35 100644 --- a/tools/pnnx/tests/onnx/test_nn_LocalResponseNorm.py +++ b/tools/pnnx/tests/onnx/test_nn_LocalResponseNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_LogSigmoid.py b/tools/pnnx/tests/onnx/test_nn_LogSigmoid.py index ddb44cbf4..3545b9682 100644 --- a/tools/pnnx/tests/onnx/test_nn_LogSigmoid.py +++ b/tools/pnnx/tests/onnx/test_nn_LogSigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_LogSoftmax.py b/tools/pnnx/tests/onnx/test_nn_LogSoftmax.py index dbe8dc96d..a026034b1 100644 --- a/tools/pnnx/tests/onnx/test_nn_LogSoftmax.py +++ b/tools/pnnx/tests/onnx/test_nn_LogSoftmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_MaxPool1d.py b/tools/pnnx/tests/onnx/test_nn_MaxPool1d.py index 1502fcad9..4f3e98626 100644 --- a/tools/pnnx/tests/onnx/test_nn_MaxPool1d.py +++ b/tools/pnnx/tests/onnx/test_nn_MaxPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_MaxPool2d.py b/tools/pnnx/tests/onnx/test_nn_MaxPool2d.py index d9e266b3f..82d4a88d3 100644 --- a/tools/pnnx/tests/onnx/test_nn_MaxPool2d.py +++ b/tools/pnnx/tests/onnx/test_nn_MaxPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_MaxPool3d.py b/tools/pnnx/tests/onnx/test_nn_MaxPool3d.py index c024b0af3..0f86bb2e4 100644 --- a/tools/pnnx/tests/onnx/test_nn_MaxPool3d.py +++ b/tools/pnnx/tests/onnx/test_nn_MaxPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Mish.py b/tools/pnnx/tests/onnx/test_nn_Mish.py index 481ba7181..c3e515b67 100644 --- a/tools/pnnx/tests/onnx/test_nn_Mish.py +++ b/tools/pnnx/tests/onnx/test_nn_Mish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_MultiheadAttention.py b/tools/pnnx/tests/onnx/test_nn_MultiheadAttention.py index 9d6cc263a..5340a8cb6 100644 --- a/tools/pnnx/tests/onnx/test_nn_MultiheadAttention.py +++ b/tools/pnnx/tests/onnx/test_nn_MultiheadAttention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_PReLU.py b/tools/pnnx/tests/onnx/test_nn_PReLU.py index 306a83140..0851bda8d 100644 --- a/tools/pnnx/tests/onnx/test_nn_PReLU.py +++ b/tools/pnnx/tests/onnx/test_nn_PReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_PixelShuffle.py b/tools/pnnx/tests/onnx/test_nn_PixelShuffle.py index 358ae059e..44192ced6 100644 --- a/tools/pnnx/tests/onnx/test_nn_PixelShuffle.py +++ b/tools/pnnx/tests/onnx/test_nn_PixelShuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_PixelUnshuffle.py b/tools/pnnx/tests/onnx/test_nn_PixelUnshuffle.py index 0eb4ae25e..7c48e0b96 100644 --- a/tools/pnnx/tests/onnx/test_nn_PixelUnshuffle.py +++ b/tools/pnnx/tests/onnx/test_nn_PixelUnshuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_RNN.py b/tools/pnnx/tests/onnx/test_nn_RNN.py index 059cadd89..9b3224df2 100644 --- a/tools/pnnx/tests/onnx/test_nn_RNN.py +++ b/tools/pnnx/tests/onnx/test_nn_RNN.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ReLU.py b/tools/pnnx/tests/onnx/test_nn_ReLU.py index f5699e4cd..95092cd3c 100644 --- a/tools/pnnx/tests/onnx/test_nn_ReLU.py +++ b/tools/pnnx/tests/onnx/test_nn_ReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ReLU6.py b/tools/pnnx/tests/onnx/test_nn_ReLU6.py index bdfc654e3..2f96b85e2 100644 --- a/tools/pnnx/tests/onnx/test_nn_ReLU6.py +++ b/tools/pnnx/tests/onnx/test_nn_ReLU6.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ReflectionPad1d.py b/tools/pnnx/tests/onnx/test_nn_ReflectionPad1d.py index afa647d4d..2ab27a70a 100644 --- a/tools/pnnx/tests/onnx/test_nn_ReflectionPad1d.py +++ b/tools/pnnx/tests/onnx/test_nn_ReflectionPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ReflectionPad2d.py b/tools/pnnx/tests/onnx/test_nn_ReflectionPad2d.py index dd00a255d..6f8c8243e 100644 --- a/tools/pnnx/tests/onnx/test_nn_ReflectionPad2d.py +++ b/tools/pnnx/tests/onnx/test_nn_ReflectionPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ReplicationPad1d.py b/tools/pnnx/tests/onnx/test_nn_ReplicationPad1d.py index d5c190a63..bc48c05c1 100644 --- a/tools/pnnx/tests/onnx/test_nn_ReplicationPad1d.py +++ b/tools/pnnx/tests/onnx/test_nn_ReplicationPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ReplicationPad2d.py b/tools/pnnx/tests/onnx/test_nn_ReplicationPad2d.py index a26b1b505..ca19cd18b 100644 --- a/tools/pnnx/tests/onnx/test_nn_ReplicationPad2d.py +++ b/tools/pnnx/tests/onnx/test_nn_ReplicationPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ReplicationPad3d.py b/tools/pnnx/tests/onnx/test_nn_ReplicationPad3d.py index b219eb9b2..4159ad975 100644 --- a/tools/pnnx/tests/onnx/test_nn_ReplicationPad3d.py +++ b/tools/pnnx/tests/onnx/test_nn_ReplicationPad3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_SELU.py b/tools/pnnx/tests/onnx/test_nn_SELU.py index a78c9e233..18165a76d 100644 --- a/tools/pnnx/tests/onnx/test_nn_SELU.py +++ b/tools/pnnx/tests/onnx/test_nn_SELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_SiLU.py b/tools/pnnx/tests/onnx/test_nn_SiLU.py index e509ddb67..1426fae42 100644 --- a/tools/pnnx/tests/onnx/test_nn_SiLU.py +++ b/tools/pnnx/tests/onnx/test_nn_SiLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Sigmoid.py b/tools/pnnx/tests/onnx/test_nn_Sigmoid.py index 72d5d798e..325b79fac 100644 --- a/tools/pnnx/tests/onnx/test_nn_Sigmoid.py +++ b/tools/pnnx/tests/onnx/test_nn_Sigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Softmax.py b/tools/pnnx/tests/onnx/test_nn_Softmax.py index 4615264db..3a931ded3 100644 --- a/tools/pnnx/tests/onnx/test_nn_Softmax.py +++ b/tools/pnnx/tests/onnx/test_nn_Softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Softmin.py b/tools/pnnx/tests/onnx/test_nn_Softmin.py index 9cb8417f2..84fa9c3c6 100644 --- a/tools/pnnx/tests/onnx/test_nn_Softmin.py +++ b/tools/pnnx/tests/onnx/test_nn_Softmin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Softplus.py b/tools/pnnx/tests/onnx/test_nn_Softplus.py index 445c6341b..0c645f773 100644 --- a/tools/pnnx/tests/onnx/test_nn_Softplus.py +++ b/tools/pnnx/tests/onnx/test_nn_Softplus.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Softshrink.py b/tools/pnnx/tests/onnx/test_nn_Softshrink.py index b86e9239c..1dba9525f 100644 --- a/tools/pnnx/tests/onnx/test_nn_Softshrink.py +++ b/tools/pnnx/tests/onnx/test_nn_Softshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Softsign.py b/tools/pnnx/tests/onnx/test_nn_Softsign.py index da86752ca..1f2abcb82 100644 --- a/tools/pnnx/tests/onnx/test_nn_Softsign.py +++ b/tools/pnnx/tests/onnx/test_nn_Softsign.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Tanh.py b/tools/pnnx/tests/onnx/test_nn_Tanh.py index 083275d27..d92a6707f 100644 --- a/tools/pnnx/tests/onnx/test_nn_Tanh.py +++ b/tools/pnnx/tests/onnx/test_nn_Tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Tanhshrink.py b/tools/pnnx/tests/onnx/test_nn_Tanhshrink.py index 20cabe255..1b3d4af5f 100644 --- a/tools/pnnx/tests/onnx/test_nn_Tanhshrink.py +++ b/tools/pnnx/tests/onnx/test_nn_Tanhshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_Upsample.py b/tools/pnnx/tests/onnx/test_nn_Upsample.py index 1c8774a14..cd1fa0c31 100644 --- a/tools/pnnx/tests/onnx/test_nn_Upsample.py +++ b/tools/pnnx/tests/onnx/test_nn_Upsample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_UpsamplingBilinear2d.py b/tools/pnnx/tests/onnx/test_nn_UpsamplingBilinear2d.py index 4568b85c1..9575816e4 100644 --- a/tools/pnnx/tests/onnx/test_nn_UpsamplingBilinear2d.py +++ b/tools/pnnx/tests/onnx/test_nn_UpsamplingBilinear2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_UpsamplingNearest2d.py b/tools/pnnx/tests/onnx/test_nn_UpsamplingNearest2d.py index ac4893029..2fec69994 100644 --- a/tools/pnnx/tests/onnx/test_nn_UpsamplingNearest2d.py +++ b/tools/pnnx/tests/onnx/test_nn_UpsamplingNearest2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_nn_ZeroPad2d.py b/tools/pnnx/tests/onnx/test_nn_ZeroPad2d.py index daa55b4da..cc2be1767 100644 --- a/tools/pnnx/tests/onnx/test_nn_ZeroPad2d.py +++ b/tools/pnnx/tests/onnx/test_nn_ZeroPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_resnet18.py b/tools/pnnx/tests/onnx/test_resnet18.py index ce9c3b334..8f5a7c4e1 100644 --- a/tools/pnnx/tests/onnx/test_resnet18.py +++ b/tools/pnnx/tests/onnx/test_resnet18.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/onnx/test_shufflenet_v2_x1_0.py b/tools/pnnx/tests/onnx/test_shufflenet_v2_x1_0.py index d753ad279..b06ce6905 100644 --- a/tools/pnnx/tests/onnx/test_shufflenet_v2_x1_0.py +++ b/tools/pnnx/tests/onnx/test_shufflenet_v2_x1_0.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/onnx/test_squeezenet1_1.py b/tools/pnnx/tests/onnx/test_squeezenet1_1.py index 2cfc2524f..dba9754e1 100644 --- a/tools/pnnx/tests/onnx/test_squeezenet1_1.py +++ b/tools/pnnx/tests/onnx/test_squeezenet1_1.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/onnx/test_swin_t.py b/tools/pnnx/tests/onnx/test_swin_t.py index 2983eeb7f..acc5d5550 100644 --- a/tools/pnnx/tests/onnx/test_swin_t.py +++ b/tools/pnnx/tests/onnx/test_swin_t.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/pnnx/tests/onnx/test_torch_cat.py b/tools/pnnx/tests/onnx/test_torch_cat.py index 0d944434d..53a5fe63b 100644 --- a/tools/pnnx/tests/onnx/test_torch_cat.py +++ b/tools/pnnx/tests/onnx/test_torch_cat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_ceil.py b/tools/pnnx/tests/onnx/test_torch_ceil.py index 1ff59b37a..f1436ac67 100644 --- a/tools/pnnx/tests/onnx/test_torch_ceil.py +++ b/tools/pnnx/tests/onnx/test_torch_ceil.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_chunk.py b/tools/pnnx/tests/onnx/test_torch_chunk.py index 2d1400103..3e055a04a 100644 --- a/tools/pnnx/tests/onnx/test_torch_chunk.py +++ b/tools/pnnx/tests/onnx/test_torch_chunk.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_clamp.py b/tools/pnnx/tests/onnx/test_torch_clamp.py index 2d16db74e..b6fda9ae9 100644 --- a/tools/pnnx/tests/onnx/test_torch_clamp.py +++ b/tools/pnnx/tests/onnx/test_torch_clamp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_flatten.py b/tools/pnnx/tests/onnx/test_torch_flatten.py index 6105b1068..9a381a942 100644 --- a/tools/pnnx/tests/onnx/test_torch_flatten.py +++ b/tools/pnnx/tests/onnx/test_torch_flatten.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_floor.py b/tools/pnnx/tests/onnx/test_torch_floor.py index a046e4c24..9c59de299 100644 --- a/tools/pnnx/tests/onnx/test_torch_floor.py +++ b/tools/pnnx/tests/onnx/test_torch_floor.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_logical_and.py b/tools/pnnx/tests/onnx/test_torch_logical_and.py index 61f813177..7a9f43462 100644 --- a/tools/pnnx/tests/onnx/test_torch_logical_and.py +++ b/tools/pnnx/tests/onnx/test_torch_logical_and.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_logical_not.py b/tools/pnnx/tests/onnx/test_torch_logical_not.py index 9a661c171..e6623229f 100644 --- a/tools/pnnx/tests/onnx/test_torch_logical_not.py +++ b/tools/pnnx/tests/onnx/test_torch_logical_not.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_logical_or.py b/tools/pnnx/tests/onnx/test_torch_logical_or.py index 0cc5900f5..1d125b4f9 100644 --- a/tools/pnnx/tests/onnx/test_torch_logical_or.py +++ b/tools/pnnx/tests/onnx/test_torch_logical_or.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_logical_xor.py b/tools/pnnx/tests/onnx/test_torch_logical_xor.py index a49b9abec..d97f5259d 100644 --- a/tools/pnnx/tests/onnx/test_torch_logical_xor.py +++ b/tools/pnnx/tests/onnx/test_torch_logical_xor.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_max.py b/tools/pnnx/tests/onnx/test_torch_max.py index 0ab18bec4..8aa722f61 100644 --- a/tools/pnnx/tests/onnx/test_torch_max.py +++ b/tools/pnnx/tests/onnx/test_torch_max.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_maximum.py b/tools/pnnx/tests/onnx/test_torch_maximum.py index 5e17d5cb2..33b12964d 100644 --- a/tools/pnnx/tests/onnx/test_torch_maximum.py +++ b/tools/pnnx/tests/onnx/test_torch_maximum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_mean.py b/tools/pnnx/tests/onnx/test_torch_mean.py index cf5990575..bd92f451c 100644 --- a/tools/pnnx/tests/onnx/test_torch_mean.py +++ b/tools/pnnx/tests/onnx/test_torch_mean.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_min.py b/tools/pnnx/tests/onnx/test_torch_min.py index e41584afe..97ee0d752 100644 --- a/tools/pnnx/tests/onnx/test_torch_min.py +++ b/tools/pnnx/tests/onnx/test_torch_min.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_minimum.py b/tools/pnnx/tests/onnx/test_torch_minimum.py index 0d8e9a87e..171ee98fb 100644 --- a/tools/pnnx/tests/onnx/test_torch_minimum.py +++ b/tools/pnnx/tests/onnx/test_torch_minimum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_norm.py b/tools/pnnx/tests/onnx/test_torch_norm.py index f7d5f4c30..39d606bf8 100644 --- a/tools/pnnx/tests/onnx/test_torch_norm.py +++ b/tools/pnnx/tests/onnx/test_torch_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_prod.py b/tools/pnnx/tests/onnx/test_torch_prod.py index c36b97c2a..83270ef57 100644 --- a/tools/pnnx/tests/onnx/test_torch_prod.py +++ b/tools/pnnx/tests/onnx/test_torch_prod.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_roll.py b/tools/pnnx/tests/onnx/test_torch_roll.py index 06b8d5796..af7f482ef 100644 --- a/tools/pnnx/tests/onnx/test_torch_roll.py +++ b/tools/pnnx/tests/onnx/test_torch_roll.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_split.py b/tools/pnnx/tests/onnx/test_torch_split.py index b13b041cd..5ffe12240 100644 --- a/tools/pnnx/tests/onnx/test_torch_split.py +++ b/tools/pnnx/tests/onnx/test_torch_split.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_squeeze.py b/tools/pnnx/tests/onnx/test_torch_squeeze.py index b29e4ba2f..0315e2004 100644 --- a/tools/pnnx/tests/onnx/test_torch_squeeze.py +++ b/tools/pnnx/tests/onnx/test_torch_squeeze.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_stack.py b/tools/pnnx/tests/onnx/test_torch_stack.py index 7b04ddd30..158e04ef4 100644 --- a/tools/pnnx/tests/onnx/test_torch_stack.py +++ b/tools/pnnx/tests/onnx/test_torch_stack.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_sum.py b/tools/pnnx/tests/onnx/test_torch_sum.py index 3ae6412f0..e5997fd63 100644 --- a/tools/pnnx/tests/onnx/test_torch_sum.py +++ b/tools/pnnx/tests/onnx/test_torch_sum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_transpose.py b/tools/pnnx/tests/onnx/test_torch_transpose.py index e6a25c441..3700ce7eb 100644 --- a/tools/pnnx/tests/onnx/test_torch_transpose.py +++ b/tools/pnnx/tests/onnx/test_torch_transpose.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_unbind.py b/tools/pnnx/tests/onnx/test_torch_unbind.py index a98fa25c5..958159593 100644 --- a/tools/pnnx/tests/onnx/test_torch_unbind.py +++ b/tools/pnnx/tests/onnx/test_torch_unbind.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_torch_unsqueeze.py b/tools/pnnx/tests/onnx/test_torch_unsqueeze.py index 01bf84076..2e5dd0ea9 100644 --- a/tools/pnnx/tests/onnx/test_torch_unsqueeze.py +++ b/tools/pnnx/tests/onnx/test_torch_unsqueeze.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_albert_attention.py b/tools/pnnx/tests/onnx/test_transformers_albert_attention.py index 52237f7bc..f323d17db 100644 --- a/tools/pnnx/tests/onnx/test_transformers_albert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_albert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_bart_attention.py b/tools/pnnx/tests/onnx/test_transformers_bart_attention.py index 86baae6c6..a50e4b05b 100644 --- a/tools/pnnx/tests/onnx/test_transformers_bart_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_bart_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_bert_attention.py b/tools/pnnx/tests/onnx/test_transformers_bert_attention.py index 0d0457ed6..fdd7269f4 100644 --- a/tools/pnnx/tests/onnx/test_transformers_bert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_bert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_bert_generation_attention.py b/tools/pnnx/tests/onnx/test_transformers_bert_generation_attention.py index 7866b68ad..019a2cf6a 100644 --- a/tools/pnnx/tests/onnx/test_transformers_bert_generation_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_bert_generation_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_blenderbot_attention.py b/tools/pnnx/tests/onnx/test_transformers_blenderbot_attention.py index 6c2d3bc82..1c9c50856 100644 --- a/tools/pnnx/tests/onnx/test_transformers_blenderbot_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_blenderbot_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_camembert_attention.py b/tools/pnnx/tests/onnx/test_transformers_camembert_attention.py index 851baaf81..aed0cf4ce 100644 --- a/tools/pnnx/tests/onnx/test_transformers_camembert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_camembert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_chinese_clip_attention.py b/tools/pnnx/tests/onnx/test_transformers_chinese_clip_attention.py index b6dc58562..a98cbb52b 100644 --- a/tools/pnnx/tests/onnx/test_transformers_chinese_clip_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_chinese_clip_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_clip_attention.py b/tools/pnnx/tests/onnx/test_transformers_clip_attention.py index 582ebae10..ecbd21d01 100644 --- a/tools/pnnx/tests/onnx/test_transformers_clip_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_clip_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_ctrl_attention.py b/tools/pnnx/tests/onnx/test_transformers_ctrl_attention.py index 825937cb3..3257597ee 100644 --- a/tools/pnnx/tests/onnx/test_transformers_ctrl_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_ctrl_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_deberta_attention.py b/tools/pnnx/tests/onnx/test_transformers_deberta_attention.py index df4946c74..487928457 100644 --- a/tools/pnnx/tests/onnx/test_transformers_deberta_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_deberta_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_distilbert_attention.py b/tools/pnnx/tests/onnx/test_transformers_distilbert_attention.py index 75a5263b1..a312e9719 100644 --- a/tools/pnnx/tests/onnx/test_transformers_distilbert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_distilbert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_electra_attention.py b/tools/pnnx/tests/onnx/test_transformers_electra_attention.py index 3914b1de7..6a50f7586 100644 --- a/tools/pnnx/tests/onnx/test_transformers_electra_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_electra_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_flaubert_attention.py b/tools/pnnx/tests/onnx/test_transformers_flaubert_attention.py index 6a277b3a4..5d482c113 100644 --- a/tools/pnnx/tests/onnx/test_transformers_flaubert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_flaubert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_fsmt_attention.py b/tools/pnnx/tests/onnx/test_transformers_fsmt_attention.py index 6a4e32dab..25f93d5de 100644 --- a/tools/pnnx/tests/onnx/test_transformers_fsmt_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_fsmt_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_funnel_attention.py b/tools/pnnx/tests/onnx/test_transformers_funnel_attention.py index 27ac99e7f..9a873a859 100644 --- a/tools/pnnx/tests/onnx/test_transformers_funnel_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_funnel_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_gpt2_attention.py b/tools/pnnx/tests/onnx/test_transformers_gpt2_attention.py index b2683c0a7..8cccf9998 100644 --- a/tools/pnnx/tests/onnx/test_transformers_gpt2_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_gpt2_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_layoutlm_attention.py b/tools/pnnx/tests/onnx/test_transformers_layoutlm_attention.py index 3d617241b..54b284d47 100644 --- a/tools/pnnx/tests/onnx/test_transformers_layoutlm_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_layoutlm_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_lxmert_attention.py b/tools/pnnx/tests/onnx/test_transformers_lxmert_attention.py index f120a700a..ecb5fee18 100644 --- a/tools/pnnx/tests/onnx/test_transformers_lxmert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_lxmert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_marian_attention.py b/tools/pnnx/tests/onnx/test_transformers_marian_attention.py index 81184cd28..c042535d6 100644 --- a/tools/pnnx/tests/onnx/test_transformers_marian_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_marian_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_mbart_attention.py b/tools/pnnx/tests/onnx/test_transformers_mbart_attention.py index 958c3af38..a83593763 100644 --- a/tools/pnnx/tests/onnx/test_transformers_mbart_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_mbart_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_mobilebert_attention.py b/tools/pnnx/tests/onnx/test_transformers_mobilebert_attention.py index a4e91d338..f7c5d54d3 100644 --- a/tools/pnnx/tests/onnx/test_transformers_mobilebert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_mobilebert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_mt5_attention.py b/tools/pnnx/tests/onnx/test_transformers_mt5_attention.py index 432b80aee..d8203c726 100644 --- a/tools/pnnx/tests/onnx/test_transformers_mt5_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_mt5_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_openai_attention.py b/tools/pnnx/tests/onnx/test_transformers_openai_attention.py index 8501d2b82..a5cc42db8 100644 --- a/tools/pnnx/tests/onnx/test_transformers_openai_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_openai_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_pegasus_attention.py b/tools/pnnx/tests/onnx/test_transformers_pegasus_attention.py index 6ef83ae9e..a01f6448e 100644 --- a/tools/pnnx/tests/onnx/test_transformers_pegasus_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_pegasus_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_prophetnet_attention.py b/tools/pnnx/tests/onnx/test_transformers_prophetnet_attention.py index e48d84a8b..ff0aaf751 100644 --- a/tools/pnnx/tests/onnx/test_transformers_prophetnet_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_prophetnet_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_reformer_attention.py b/tools/pnnx/tests/onnx/test_transformers_reformer_attention.py index 2d170804f..631681d99 100644 --- a/tools/pnnx/tests/onnx/test_transformers_reformer_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_reformer_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_roberta_attention.py b/tools/pnnx/tests/onnx/test_transformers_roberta_attention.py index 643ecacac..677f669e3 100644 --- a/tools/pnnx/tests/onnx/test_transformers_roberta_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_roberta_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_squeezebert_attention.py b/tools/pnnx/tests/onnx/test_transformers_squeezebert_attention.py index 428b1c65f..c75d5e777 100644 --- a/tools/pnnx/tests/onnx/test_transformers_squeezebert_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_squeezebert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_t5_attention.py b/tools/pnnx/tests/onnx/test_transformers_t5_attention.py index c2513639b..a24284fe4 100644 --- a/tools/pnnx/tests/onnx/test_transformers_t5_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_t5_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_xlm_attention.py b/tools/pnnx/tests/onnx/test_transformers_xlm_attention.py index 6a21f9eda..d15dadcfc 100644 --- a/tools/pnnx/tests/onnx/test_transformers_xlm_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_xlm_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_transformers_xlm_roberta_attention.py b/tools/pnnx/tests/onnx/test_transformers_xlm_roberta_attention.py index 565d2a05a..0b730127c 100644 --- a/tools/pnnx/tests/onnx/test_transformers_xlm_roberta_attention.py +++ b/tools/pnnx/tests/onnx/test_transformers_xlm_roberta_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/onnx/test_vit_b_32.py b/tools/pnnx/tests/onnx/test_vit_b_32.py index f79e116f1..215ddf665 100644 --- a/tools/pnnx/tests/onnx/test_vit_b_32.py +++ b/tools/pnnx/tests/onnx/test_vit_b_32.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/pnnx/tests/test_F_adaptive_avg_pool1d.py b/tools/pnnx/tests/test_F_adaptive_avg_pool1d.py index ba31bc29b..d39074236 100644 --- a/tools/pnnx/tests/test_F_adaptive_avg_pool1d.py +++ b/tools/pnnx/tests/test_F_adaptive_avg_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_adaptive_avg_pool2d.py b/tools/pnnx/tests/test_F_adaptive_avg_pool2d.py index 7a8135e06..96a37167b 100644 --- a/tools/pnnx/tests/test_F_adaptive_avg_pool2d.py +++ b/tools/pnnx/tests/test_F_adaptive_avg_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_adaptive_avg_pool3d.py b/tools/pnnx/tests/test_F_adaptive_avg_pool3d.py index a8c639759..3ee6a8e38 100644 --- a/tools/pnnx/tests/test_F_adaptive_avg_pool3d.py +++ b/tools/pnnx/tests/test_F_adaptive_avg_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_adaptive_max_pool1d.py b/tools/pnnx/tests/test_F_adaptive_max_pool1d.py index e7c1fe28a..f28f14c22 100644 --- a/tools/pnnx/tests/test_F_adaptive_max_pool1d.py +++ b/tools/pnnx/tests/test_F_adaptive_max_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_adaptive_max_pool2d.py b/tools/pnnx/tests/test_F_adaptive_max_pool2d.py index 73ff8b310..f8b8d55f3 100644 --- a/tools/pnnx/tests/test_F_adaptive_max_pool2d.py +++ b/tools/pnnx/tests/test_F_adaptive_max_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_adaptive_max_pool3d.py b/tools/pnnx/tests/test_F_adaptive_max_pool3d.py index 94fa8325e..99489bf00 100644 --- a/tools/pnnx/tests/test_F_adaptive_max_pool3d.py +++ b/tools/pnnx/tests/test_F_adaptive_max_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_affine_grid.py b/tools/pnnx/tests/test_F_affine_grid.py index 5ad70e3eb..11d18b04e 100644 --- a/tools/pnnx/tests/test_F_affine_grid.py +++ b/tools/pnnx/tests/test_F_affine_grid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_alpha_dropout.py b/tools/pnnx/tests/test_F_alpha_dropout.py index 537130549..747341587 100644 --- a/tools/pnnx/tests/test_F_alpha_dropout.py +++ b/tools/pnnx/tests/test_F_alpha_dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_avg_pool1d.py b/tools/pnnx/tests/test_F_avg_pool1d.py index a45e5f2d4..ac7e5014d 100644 --- a/tools/pnnx/tests/test_F_avg_pool1d.py +++ b/tools/pnnx/tests/test_F_avg_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_avg_pool2d.py b/tools/pnnx/tests/test_F_avg_pool2d.py index 95c6ed24b..664bd4f0f 100644 --- a/tools/pnnx/tests/test_F_avg_pool2d.py +++ b/tools/pnnx/tests/test_F_avg_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_avg_pool3d.py b/tools/pnnx/tests/test_F_avg_pool3d.py index 7d29cc4c1..4cf9f833b 100644 --- a/tools/pnnx/tests/test_F_avg_pool3d.py +++ b/tools/pnnx/tests/test_F_avg_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_batch_norm.py b/tools/pnnx/tests/test_F_batch_norm.py index ebfc38fab..7f2b04208 100644 --- a/tools/pnnx/tests/test_F_batch_norm.py +++ b/tools/pnnx/tests/test_F_batch_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_celu.py b/tools/pnnx/tests/test_F_celu.py index e68f17cda..2bb3b5316 100644 --- a/tools/pnnx/tests/test_F_celu.py +++ b/tools/pnnx/tests/test_F_celu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_conv1d.py b/tools/pnnx/tests/test_F_conv1d.py index c7248e100..6a6252a43 100644 --- a/tools/pnnx/tests/test_F_conv1d.py +++ b/tools/pnnx/tests/test_F_conv1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_conv2d.py b/tools/pnnx/tests/test_F_conv2d.py index b7d3548de..b028aa1d0 100644 --- a/tools/pnnx/tests/test_F_conv2d.py +++ b/tools/pnnx/tests/test_F_conv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_conv3d.py b/tools/pnnx/tests/test_F_conv3d.py index 334e0eb14..1c835c785 100644 --- a/tools/pnnx/tests/test_F_conv3d.py +++ b/tools/pnnx/tests/test_F_conv3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_conv_transpose1d.py b/tools/pnnx/tests/test_F_conv_transpose1d.py index 00699e182..3597c5bc5 100644 --- a/tools/pnnx/tests/test_F_conv_transpose1d.py +++ b/tools/pnnx/tests/test_F_conv_transpose1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_conv_transpose2d.py b/tools/pnnx/tests/test_F_conv_transpose2d.py index 715eca9d3..07752da13 100644 --- a/tools/pnnx/tests/test_F_conv_transpose2d.py +++ b/tools/pnnx/tests/test_F_conv_transpose2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_conv_transpose3d.py b/tools/pnnx/tests/test_F_conv_transpose3d.py index 9ef6d8f42..f8a5fd945 100644 --- a/tools/pnnx/tests/test_F_conv_transpose3d.py +++ b/tools/pnnx/tests/test_F_conv_transpose3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_dropout.py b/tools/pnnx/tests/test_F_dropout.py index 74e1e7bb4..84a79bef4 100644 --- a/tools/pnnx/tests/test_F_dropout.py +++ b/tools/pnnx/tests/test_F_dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_dropout2d.py b/tools/pnnx/tests/test_F_dropout2d.py index 0147817a9..2fd8a88b9 100644 --- a/tools/pnnx/tests/test_F_dropout2d.py +++ b/tools/pnnx/tests/test_F_dropout2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_dropout3d.py b/tools/pnnx/tests/test_F_dropout3d.py index 91b48658a..d468d3315 100644 --- a/tools/pnnx/tests/test_F_dropout3d.py +++ b/tools/pnnx/tests/test_F_dropout3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_elu.py b/tools/pnnx/tests/test_F_elu.py index ac37aff6d..df37c1deb 100644 --- a/tools/pnnx/tests/test_F_elu.py +++ b/tools/pnnx/tests/test_F_elu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_embedding.py b/tools/pnnx/tests/test_F_embedding.py index 0756bc7f7..130210b75 100644 --- a/tools/pnnx/tests/test_F_embedding.py +++ b/tools/pnnx/tests/test_F_embedding.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_feature_alpha_dropout.py b/tools/pnnx/tests/test_F_feature_alpha_dropout.py index b3608b5ef..2763c589b 100644 --- a/tools/pnnx/tests/test_F_feature_alpha_dropout.py +++ b/tools/pnnx/tests/test_F_feature_alpha_dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_fold.py b/tools/pnnx/tests/test_F_fold.py index 68c5b566d..5cabd7663 100644 --- a/tools/pnnx/tests/test_F_fold.py +++ b/tools/pnnx/tests/test_F_fold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_gelu.py b/tools/pnnx/tests/test_F_gelu.py index 5a065e226..ae82498d0 100644 --- a/tools/pnnx/tests/test_F_gelu.py +++ b/tools/pnnx/tests/test_F_gelu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_glu.py b/tools/pnnx/tests/test_F_glu.py index 0c1868683..f0e063233 100644 --- a/tools/pnnx/tests/test_F_glu.py +++ b/tools/pnnx/tests/test_F_glu.py @@ -1,14 +1,5 @@ -# Copyright (c) 2022 Xiaomi Corp. (author: Fangjun Kuang) -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Xiaomi Corp. (author: Fangjun Kuang) +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_grid_sample.py b/tools/pnnx/tests/test_F_grid_sample.py index 8cb6d2145..de44c3074 100644 --- a/tools/pnnx/tests/test_F_grid_sample.py +++ b/tools/pnnx/tests/test_F_grid_sample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_group_norm.py b/tools/pnnx/tests/test_F_group_norm.py index 10ec9d5e6..887388a97 100644 --- a/tools/pnnx/tests/test_F_group_norm.py +++ b/tools/pnnx/tests/test_F_group_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_hardshrink.py b/tools/pnnx/tests/test_F_hardshrink.py index 0836c3bcb..8b129a7ab 100644 --- a/tools/pnnx/tests/test_F_hardshrink.py +++ b/tools/pnnx/tests/test_F_hardshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_hardsigmoid.py b/tools/pnnx/tests/test_F_hardsigmoid.py index e2e581aed..f5ded9ba8 100644 --- a/tools/pnnx/tests/test_F_hardsigmoid.py +++ b/tools/pnnx/tests/test_F_hardsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_hardswish.py b/tools/pnnx/tests/test_F_hardswish.py index 7bd963529..160957524 100644 --- a/tools/pnnx/tests/test_F_hardswish.py +++ b/tools/pnnx/tests/test_F_hardswish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_hardtanh.py b/tools/pnnx/tests/test_F_hardtanh.py index 4847d7b09..a985719db 100644 --- a/tools/pnnx/tests/test_F_hardtanh.py +++ b/tools/pnnx/tests/test_F_hardtanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_instance_norm.py b/tools/pnnx/tests/test_F_instance_norm.py index 4dd278022..012f06ad3 100644 --- a/tools/pnnx/tests/test_F_instance_norm.py +++ b/tools/pnnx/tests/test_F_instance_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_interpolate.py b/tools/pnnx/tests/test_F_interpolate.py index 6338c9979..eddecf740 100644 --- a/tools/pnnx/tests/test_F_interpolate.py +++ b/tools/pnnx/tests/test_F_interpolate.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_layer_norm.py b/tools/pnnx/tests/test_F_layer_norm.py index d2d1a674b..d168ab7d1 100644 --- a/tools/pnnx/tests/test_F_layer_norm.py +++ b/tools/pnnx/tests/test_F_layer_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_leaky_relu.py b/tools/pnnx/tests/test_F_leaky_relu.py index 852237495..bf4076180 100644 --- a/tools/pnnx/tests/test_F_leaky_relu.py +++ b/tools/pnnx/tests/test_F_leaky_relu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_linear.py b/tools/pnnx/tests/test_F_linear.py index 41c44feba..b3e62f931 100644 --- a/tools/pnnx/tests/test_F_linear.py +++ b/tools/pnnx/tests/test_F_linear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_local_response_norm.py b/tools/pnnx/tests/test_F_local_response_norm.py index 35969269e..b88f99be1 100644 --- a/tools/pnnx/tests/test_F_local_response_norm.py +++ b/tools/pnnx/tests/test_F_local_response_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_log_softmax.py b/tools/pnnx/tests/test_F_log_softmax.py index 13181405e..3cb362bc3 100644 --- a/tools/pnnx/tests/test_F_log_softmax.py +++ b/tools/pnnx/tests/test_F_log_softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_logsigmoid.py b/tools/pnnx/tests/test_F_logsigmoid.py index 68daf4819..f8618eb85 100644 --- a/tools/pnnx/tests/test_F_logsigmoid.py +++ b/tools/pnnx/tests/test_F_logsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_lp_pool1d.py b/tools/pnnx/tests/test_F_lp_pool1d.py index 00ad63cbd..216e729a5 100644 --- a/tools/pnnx/tests/test_F_lp_pool1d.py +++ b/tools/pnnx/tests/test_F_lp_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_lp_pool2d.py b/tools/pnnx/tests/test_F_lp_pool2d.py index fd387c37e..29c821b06 100644 --- a/tools/pnnx/tests/test_F_lp_pool2d.py +++ b/tools/pnnx/tests/test_F_lp_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_max_pool1d.py b/tools/pnnx/tests/test_F_max_pool1d.py index 92e604f39..067433f8e 100644 --- a/tools/pnnx/tests/test_F_max_pool1d.py +++ b/tools/pnnx/tests/test_F_max_pool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_max_pool2d.py b/tools/pnnx/tests/test_F_max_pool2d.py index a6a6e162a..cd6215335 100644 --- a/tools/pnnx/tests/test_F_max_pool2d.py +++ b/tools/pnnx/tests/test_F_max_pool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_max_pool3d.py b/tools/pnnx/tests/test_F_max_pool3d.py index 42e52b014..377d6f1fe 100644 --- a/tools/pnnx/tests/test_F_max_pool3d.py +++ b/tools/pnnx/tests/test_F_max_pool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_mish.py b/tools/pnnx/tests/test_F_mish.py index 5c99d6312..09d2f7890 100644 --- a/tools/pnnx/tests/test_F_mish.py +++ b/tools/pnnx/tests/test_F_mish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_normalize.py b/tools/pnnx/tests/test_F_normalize.py index 8c308600a..bd6d996c6 100644 --- a/tools/pnnx/tests/test_F_normalize.py +++ b/tools/pnnx/tests/test_F_normalize.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_pad.py b/tools/pnnx/tests/test_F_pad.py index 3b61dd601..c1fb615d9 100644 --- a/tools/pnnx/tests/test_F_pad.py +++ b/tools/pnnx/tests/test_F_pad.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_pairwise_distance.py b/tools/pnnx/tests/test_F_pairwise_distance.py index 243f61e1b..d31d463f8 100644 --- a/tools/pnnx/tests/test_F_pairwise_distance.py +++ b/tools/pnnx/tests/test_F_pairwise_distance.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_pixel_shuffle.py b/tools/pnnx/tests/test_F_pixel_shuffle.py index 4e5d5c023..78d3a3388 100644 --- a/tools/pnnx/tests/test_F_pixel_shuffle.py +++ b/tools/pnnx/tests/test_F_pixel_shuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_pixel_unshuffle.py b/tools/pnnx/tests/test_F_pixel_unshuffle.py index 1d64e0eb6..8c0904c94 100644 --- a/tools/pnnx/tests/test_F_pixel_unshuffle.py +++ b/tools/pnnx/tests/test_F_pixel_unshuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_prelu.py b/tools/pnnx/tests/test_F_prelu.py index 759073a1f..64985f121 100644 --- a/tools/pnnx/tests/test_F_prelu.py +++ b/tools/pnnx/tests/test_F_prelu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_relu.py b/tools/pnnx/tests/test_F_relu.py index c7337047a..c545d3111 100644 --- a/tools/pnnx/tests/test_F_relu.py +++ b/tools/pnnx/tests/test_F_relu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_relu6.py b/tools/pnnx/tests/test_F_relu6.py index f855be23e..b6105ef2f 100644 --- a/tools/pnnx/tests/test_F_relu6.py +++ b/tools/pnnx/tests/test_F_relu6.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_rms_norm.py b/tools/pnnx/tests/test_F_rms_norm.py index 5dd9e699b..561418305 100644 --- a/tools/pnnx/tests/test_F_rms_norm.py +++ b/tools/pnnx/tests/test_F_rms_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_rrelu.py b/tools/pnnx/tests/test_F_rrelu.py index bec901db2..c34e3f4ac 100644 --- a/tools/pnnx/tests/test_F_rrelu.py +++ b/tools/pnnx/tests/test_F_rrelu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_scaled_dot_product_attention.py b/tools/pnnx/tests/test_F_scaled_dot_product_attention.py index ab84a0e60..a70e97ca0 100644 --- a/tools/pnnx/tests/test_F_scaled_dot_product_attention.py +++ b/tools/pnnx/tests/test_F_scaled_dot_product_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_selu.py b/tools/pnnx/tests/test_F_selu.py index a4d971904..a2193e9ac 100644 --- a/tools/pnnx/tests/test_F_selu.py +++ b/tools/pnnx/tests/test_F_selu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_sigmoid.py b/tools/pnnx/tests/test_F_sigmoid.py index e0a3c4b23..e54d16812 100644 --- a/tools/pnnx/tests/test_F_sigmoid.py +++ b/tools/pnnx/tests/test_F_sigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_silu.py b/tools/pnnx/tests/test_F_silu.py index b56ea131c..b6e90e4f4 100644 --- a/tools/pnnx/tests/test_F_silu.py +++ b/tools/pnnx/tests/test_F_silu.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_softmax.py b/tools/pnnx/tests/test_F_softmax.py index 7092c5b68..bf80eefcc 100644 --- a/tools/pnnx/tests/test_F_softmax.py +++ b/tools/pnnx/tests/test_F_softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_softmin.py b/tools/pnnx/tests/test_F_softmin.py index 34dd08126..d07ee9b59 100644 --- a/tools/pnnx/tests/test_F_softmin.py +++ b/tools/pnnx/tests/test_F_softmin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_softplus.py b/tools/pnnx/tests/test_F_softplus.py index 54ea907a3..27075fd83 100644 --- a/tools/pnnx/tests/test_F_softplus.py +++ b/tools/pnnx/tests/test_F_softplus.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_softshrink.py b/tools/pnnx/tests/test_F_softshrink.py index 170402785..94f14c488 100644 --- a/tools/pnnx/tests/test_F_softshrink.py +++ b/tools/pnnx/tests/test_F_softshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_softsign.py b/tools/pnnx/tests/test_F_softsign.py index 54b79b4ae..acbb77f4a 100644 --- a/tools/pnnx/tests/test_F_softsign.py +++ b/tools/pnnx/tests/test_F_softsign.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_tanh.py b/tools/pnnx/tests/test_F_tanh.py index 8a50279c2..9a01506fd 100644 --- a/tools/pnnx/tests/test_F_tanh.py +++ b/tools/pnnx/tests/test_F_tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_tanhshrink.py b/tools/pnnx/tests/test_F_tanhshrink.py index 5c0c96e75..f121c5443 100644 --- a/tools/pnnx/tests/test_F_tanhshrink.py +++ b/tools/pnnx/tests/test_F_tanhshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_threshold.py b/tools/pnnx/tests/test_F_threshold.py index 1b766d3c6..198842e9f 100644 --- a/tools/pnnx/tests/test_F_threshold.py +++ b/tools/pnnx/tests/test_F_threshold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_unfold.py b/tools/pnnx/tests/test_F_unfold.py index 51f19a4f4..efd552353 100644 --- a/tools/pnnx/tests/test_F_unfold.py +++ b/tools/pnnx/tests/test_F_unfold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_upsample.py b/tools/pnnx/tests/test_F_upsample.py index fa9f0f79a..416981e2e 100644 --- a/tools/pnnx/tests/test_F_upsample.py +++ b/tools/pnnx/tests/test_F_upsample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_upsample_bilinear.py b/tools/pnnx/tests/test_F_upsample_bilinear.py index de2e3d4a5..da5279636 100644 --- a/tools/pnnx/tests/test_F_upsample_bilinear.py +++ b/tools/pnnx/tests/test_F_upsample_bilinear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_F_upsample_nearest.py b/tools/pnnx/tests/test_F_upsample_nearest.py index da42353c6..c25a1f3af 100644 --- a/tools/pnnx/tests/test_F_upsample_nearest.py +++ b/tools/pnnx/tests/test_F_upsample_nearest.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_contiguous.py b/tools/pnnx/tests/test_Tensor_contiguous.py index 38b059717..2b3fe3b5b 100644 --- a/tools/pnnx/tests/test_Tensor_contiguous.py +++ b/tools/pnnx/tests/test_Tensor_contiguous.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_expand.py b/tools/pnnx/tests/test_Tensor_expand.py index ecdaf035c..3a4c7e4a5 100644 --- a/tools/pnnx/tests/test_Tensor_expand.py +++ b/tools/pnnx/tests/test_Tensor_expand.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_fill.py b/tools/pnnx/tests/test_Tensor_fill.py index 2c80d56c4..5dc600fe6 100644 --- a/tools/pnnx/tests/test_Tensor_fill.py +++ b/tools/pnnx/tests/test_Tensor_fill.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_index.py b/tools/pnnx/tests/test_Tensor_index.py index 2156efcd6..5aa510b15 100644 --- a/tools/pnnx/tests/test_Tensor_index.py +++ b/tools/pnnx/tests/test_Tensor_index.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_index_put.py b/tools/pnnx/tests/test_Tensor_index_put.py index 0173ceb8a..3a83b2bdd 100644 --- a/tools/pnnx/tests/test_Tensor_index_put.py +++ b/tools/pnnx/tests/test_Tensor_index_put.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_masked_fill.py b/tools/pnnx/tests/test_Tensor_masked_fill.py index 7b1093a43..2413eef9d 100644 --- a/tools/pnnx/tests/test_Tensor_masked_fill.py +++ b/tools/pnnx/tests/test_Tensor_masked_fill.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_new_empty.py b/tools/pnnx/tests/test_Tensor_new_empty.py index 2e5ca2fbc..832ce7fe3 100644 --- a/tools/pnnx/tests/test_Tensor_new_empty.py +++ b/tools/pnnx/tests/test_Tensor_new_empty.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_new_full.py b/tools/pnnx/tests/test_Tensor_new_full.py index d756f77e5..d3108218d 100644 --- a/tools/pnnx/tests/test_Tensor_new_full.py +++ b/tools/pnnx/tests/test_Tensor_new_full.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_new_ones.py b/tools/pnnx/tests/test_Tensor_new_ones.py index b1ee76b13..ad37de686 100644 --- a/tools/pnnx/tests/test_Tensor_new_ones.py +++ b/tools/pnnx/tests/test_Tensor_new_ones.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_new_zeros.py b/tools/pnnx/tests/test_Tensor_new_zeros.py index d1b4bbcc9..ee0a4b318 100644 --- a/tools/pnnx/tests/test_Tensor_new_zeros.py +++ b/tools/pnnx/tests/test_Tensor_new_zeros.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_permute.py b/tools/pnnx/tests/test_Tensor_permute.py index 7522a7ace..afe99f624 100644 --- a/tools/pnnx/tests/test_Tensor_permute.py +++ b/tools/pnnx/tests/test_Tensor_permute.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_repeat.py b/tools/pnnx/tests/test_Tensor_repeat.py index d20de55b8..f0997040e 100644 --- a/tools/pnnx/tests/test_Tensor_repeat.py +++ b/tools/pnnx/tests/test_Tensor_repeat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_reshape.py b/tools/pnnx/tests/test_Tensor_reshape.py index 9a082f97c..03d1d1c9b 100644 --- a/tools/pnnx/tests/test_Tensor_reshape.py +++ b/tools/pnnx/tests/test_Tensor_reshape.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_reshape_as.py b/tools/pnnx/tests/test_Tensor_reshape_as.py index 37bf0a8e5..411beaefe 100644 --- a/tools/pnnx/tests/test_Tensor_reshape_as.py +++ b/tools/pnnx/tests/test_Tensor_reshape_as.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_select.py b/tools/pnnx/tests/test_Tensor_select.py index 399555bac..5d47e7981 100644 --- a/tools/pnnx/tests/test_Tensor_select.py +++ b/tools/pnnx/tests/test_Tensor_select.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_slice.py b/tools/pnnx/tests/test_Tensor_slice.py index cd34e3096..ade6db6a6 100644 --- a/tools/pnnx/tests/test_Tensor_slice.py +++ b/tools/pnnx/tests/test_Tensor_slice.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_slice_copy.py b/tools/pnnx/tests/test_Tensor_slice_copy.py index 211392c59..ed5c35536 100644 --- a/tools/pnnx/tests/test_Tensor_slice_copy.py +++ b/tools/pnnx/tests/test_Tensor_slice_copy.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_to.py b/tools/pnnx/tests/test_Tensor_to.py index c4ac834c4..8d8653e52 100644 --- a/tools/pnnx/tests/test_Tensor_to.py +++ b/tools/pnnx/tests/test_Tensor_to.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_type_as.py b/tools/pnnx/tests/test_Tensor_type_as.py index cdb7a5400..01c1cd609 100644 --- a/tools/pnnx/tests/test_Tensor_type_as.py +++ b/tools/pnnx/tests/test_Tensor_type_as.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_Tensor_view.py b/tools/pnnx/tests/test_Tensor_view.py index f897910ce..e087d1b1c 100644 --- a/tools/pnnx/tests/test_Tensor_view.py +++ b/tools/pnnx/tests/test_Tensor_view.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_convnext_tiny.py b/tools/pnnx/tests/test_convnext_tiny.py index f7fb3c99c..f16df09d3 100644 --- a/tools/pnnx/tests/test_convnext_tiny.py +++ b/tools/pnnx/tests/test_convnext_tiny.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/pnnx/tests/test_ir_complex.py b/tools/pnnx/tests/test_ir_complex.py index cf1fa3e45..903266c54 100644 --- a/tools/pnnx/tests/test_ir_complex.py +++ b/tools/pnnx/tests/test_ir_complex.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_mobilenet_v2.py b/tools/pnnx/tests/test_mobilenet_v2.py index f6e28955c..752de06d6 100644 --- a/tools/pnnx/tests/test_mobilenet_v2.py +++ b/tools/pnnx/tests/test_mobilenet_v2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/test_mobilenet_v3_small.py b/tools/pnnx/tests/test_mobilenet_v3_small.py index 0949f4bc8..c74541c11 100644 --- a/tools/pnnx/tests/test_mobilenet_v3_small.py +++ b/tools/pnnx/tests/test_mobilenet_v3_small.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/test_nn_AdaptiveAvgPool1d.py b/tools/pnnx/tests/test_nn_AdaptiveAvgPool1d.py index 0e491c397..8755caef2 100644 --- a/tools/pnnx/tests/test_nn_AdaptiveAvgPool1d.py +++ b/tools/pnnx/tests/test_nn_AdaptiveAvgPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AdaptiveAvgPool2d.py b/tools/pnnx/tests/test_nn_AdaptiveAvgPool2d.py index daed9c140..16a452d4d 100644 --- a/tools/pnnx/tests/test_nn_AdaptiveAvgPool2d.py +++ b/tools/pnnx/tests/test_nn_AdaptiveAvgPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AdaptiveAvgPool3d.py b/tools/pnnx/tests/test_nn_AdaptiveAvgPool3d.py index d76f2e3cc..25280a67e 100644 --- a/tools/pnnx/tests/test_nn_AdaptiveAvgPool3d.py +++ b/tools/pnnx/tests/test_nn_AdaptiveAvgPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AdaptiveMaxPool1d.py b/tools/pnnx/tests/test_nn_AdaptiveMaxPool1d.py index 87a8e26ff..2759598e8 100644 --- a/tools/pnnx/tests/test_nn_AdaptiveMaxPool1d.py +++ b/tools/pnnx/tests/test_nn_AdaptiveMaxPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AdaptiveMaxPool2d.py b/tools/pnnx/tests/test_nn_AdaptiveMaxPool2d.py index 915230083..e3604afa3 100644 --- a/tools/pnnx/tests/test_nn_AdaptiveMaxPool2d.py +++ b/tools/pnnx/tests/test_nn_AdaptiveMaxPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AdaptiveMaxPool3d.py b/tools/pnnx/tests/test_nn_AdaptiveMaxPool3d.py index 7223a9ff7..6112a3400 100644 --- a/tools/pnnx/tests/test_nn_AdaptiveMaxPool3d.py +++ b/tools/pnnx/tests/test_nn_AdaptiveMaxPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AlphaDropout.py b/tools/pnnx/tests/test_nn_AlphaDropout.py index 8f6c6bf53..4f23b7218 100644 --- a/tools/pnnx/tests/test_nn_AlphaDropout.py +++ b/tools/pnnx/tests/test_nn_AlphaDropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AvgPool1d.py b/tools/pnnx/tests/test_nn_AvgPool1d.py index cb784dc23..bdeadcf1f 100644 --- a/tools/pnnx/tests/test_nn_AvgPool1d.py +++ b/tools/pnnx/tests/test_nn_AvgPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AvgPool2d.py b/tools/pnnx/tests/test_nn_AvgPool2d.py index 4f642560b..8b876d42f 100644 --- a/tools/pnnx/tests/test_nn_AvgPool2d.py +++ b/tools/pnnx/tests/test_nn_AvgPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_AvgPool3d.py b/tools/pnnx/tests/test_nn_AvgPool3d.py index 639f22256..a01da10b2 100644 --- a/tools/pnnx/tests/test_nn_AvgPool3d.py +++ b/tools/pnnx/tests/test_nn_AvgPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_BatchNorm1d.py b/tools/pnnx/tests/test_nn_BatchNorm1d.py index 409660d02..fa2a73c52 100644 --- a/tools/pnnx/tests/test_nn_BatchNorm1d.py +++ b/tools/pnnx/tests/test_nn_BatchNorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_BatchNorm2d.py b/tools/pnnx/tests/test_nn_BatchNorm2d.py index f76fb7077..da78d53ae 100644 --- a/tools/pnnx/tests/test_nn_BatchNorm2d.py +++ b/tools/pnnx/tests/test_nn_BatchNorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_BatchNorm3d.py b/tools/pnnx/tests/test_nn_BatchNorm3d.py index 2875a49b7..8d86d4b3c 100644 --- a/tools/pnnx/tests/test_nn_BatchNorm3d.py +++ b/tools/pnnx/tests/test_nn_BatchNorm3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_CELU.py b/tools/pnnx/tests/test_nn_CELU.py index 9ecf6307b..24b2268f6 100644 --- a/tools/pnnx/tests/test_nn_CELU.py +++ b/tools/pnnx/tests/test_nn_CELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ChannelShuffle.py b/tools/pnnx/tests/test_nn_ChannelShuffle.py index cc2936d94..3d701ccbb 100644 --- a/tools/pnnx/tests/test_nn_ChannelShuffle.py +++ b/tools/pnnx/tests/test_nn_ChannelShuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ConstantPad1d.py b/tools/pnnx/tests/test_nn_ConstantPad1d.py index 5878f1d1d..c0ab03d67 100644 --- a/tools/pnnx/tests/test_nn_ConstantPad1d.py +++ b/tools/pnnx/tests/test_nn_ConstantPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ConstantPad2d.py b/tools/pnnx/tests/test_nn_ConstantPad2d.py index 70ad1520e..f8dff386f 100644 --- a/tools/pnnx/tests/test_nn_ConstantPad2d.py +++ b/tools/pnnx/tests/test_nn_ConstantPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ConstantPad3d.py b/tools/pnnx/tests/test_nn_ConstantPad3d.py index a81cb0b5e..ad6b4a5a9 100644 --- a/tools/pnnx/tests/test_nn_ConstantPad3d.py +++ b/tools/pnnx/tests/test_nn_ConstantPad3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Conv1d.py b/tools/pnnx/tests/test_nn_Conv1d.py index cc6b7a0c0..c51e81f87 100644 --- a/tools/pnnx/tests/test_nn_Conv1d.py +++ b/tools/pnnx/tests/test_nn_Conv1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Conv2d.py b/tools/pnnx/tests/test_nn_Conv2d.py index d7646fef5..d398c72d2 100644 --- a/tools/pnnx/tests/test_nn_Conv2d.py +++ b/tools/pnnx/tests/test_nn_Conv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Conv3d.py b/tools/pnnx/tests/test_nn_Conv3d.py index 76221d9bc..55ebde385 100644 --- a/tools/pnnx/tests/test_nn_Conv3d.py +++ b/tools/pnnx/tests/test_nn_Conv3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ConvTranspose1d.py b/tools/pnnx/tests/test_nn_ConvTranspose1d.py index afa161135..413207fbb 100644 --- a/tools/pnnx/tests/test_nn_ConvTranspose1d.py +++ b/tools/pnnx/tests/test_nn_ConvTranspose1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ConvTranspose2d.py b/tools/pnnx/tests/test_nn_ConvTranspose2d.py index d8d264b3f..6e1e544e4 100644 --- a/tools/pnnx/tests/test_nn_ConvTranspose2d.py +++ b/tools/pnnx/tests/test_nn_ConvTranspose2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ConvTranspose3d.py b/tools/pnnx/tests/test_nn_ConvTranspose3d.py index 3afbb1b03..c555ab451 100644 --- a/tools/pnnx/tests/test_nn_ConvTranspose3d.py +++ b/tools/pnnx/tests/test_nn_ConvTranspose3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Dropout.py b/tools/pnnx/tests/test_nn_Dropout.py index 31e414164..355a7bac5 100644 --- a/tools/pnnx/tests/test_nn_Dropout.py +++ b/tools/pnnx/tests/test_nn_Dropout.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Dropout2d.py b/tools/pnnx/tests/test_nn_Dropout2d.py index 7b52a1f64..e0a416889 100644 --- a/tools/pnnx/tests/test_nn_Dropout2d.py +++ b/tools/pnnx/tests/test_nn_Dropout2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Dropout3d.py b/tools/pnnx/tests/test_nn_Dropout3d.py index 4e6564745..c8537e358 100644 --- a/tools/pnnx/tests/test_nn_Dropout3d.py +++ b/tools/pnnx/tests/test_nn_Dropout3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ELU.py b/tools/pnnx/tests/test_nn_ELU.py index a296226af..d07e25281 100644 --- a/tools/pnnx/tests/test_nn_ELU.py +++ b/tools/pnnx/tests/test_nn_ELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Embedding.py b/tools/pnnx/tests/test_nn_Embedding.py index 48a74dfb9..569df3dd5 100644 --- a/tools/pnnx/tests/test_nn_Embedding.py +++ b/tools/pnnx/tests/test_nn_Embedding.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Fold.py b/tools/pnnx/tests/test_nn_Fold.py index 8f53639db..6b3cae055 100644 --- a/tools/pnnx/tests/test_nn_Fold.py +++ b/tools/pnnx/tests/test_nn_Fold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_GELU.py b/tools/pnnx/tests/test_nn_GELU.py index 7a2691654..9d8f0ee2f 100644 --- a/tools/pnnx/tests/test_nn_GELU.py +++ b/tools/pnnx/tests/test_nn_GELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_GLU.py b/tools/pnnx/tests/test_nn_GLU.py index 0643f3643..66c01f482 100644 --- a/tools/pnnx/tests/test_nn_GLU.py +++ b/tools/pnnx/tests/test_nn_GLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_GRU.py b/tools/pnnx/tests/test_nn_GRU.py index 036701133..6cf60619d 100644 --- a/tools/pnnx/tests/test_nn_GRU.py +++ b/tools/pnnx/tests/test_nn_GRU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_GroupNorm.py b/tools/pnnx/tests/test_nn_GroupNorm.py index bbfb59dfa..aa3ee0625 100644 --- a/tools/pnnx/tests/test_nn_GroupNorm.py +++ b/tools/pnnx/tests/test_nn_GroupNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Hardshrink.py b/tools/pnnx/tests/test_nn_Hardshrink.py index b9e0a3f36..5fc0f592d 100644 --- a/tools/pnnx/tests/test_nn_Hardshrink.py +++ b/tools/pnnx/tests/test_nn_Hardshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Hardsigmoid.py b/tools/pnnx/tests/test_nn_Hardsigmoid.py index 540202d38..607e28ebb 100644 --- a/tools/pnnx/tests/test_nn_Hardsigmoid.py +++ b/tools/pnnx/tests/test_nn_Hardsigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Hardswish.py b/tools/pnnx/tests/test_nn_Hardswish.py index 26f768159..c9f772925 100644 --- a/tools/pnnx/tests/test_nn_Hardswish.py +++ b/tools/pnnx/tests/test_nn_Hardswish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Hardtanh.py b/tools/pnnx/tests/test_nn_Hardtanh.py index cc540b807..4657410a1 100644 --- a/tools/pnnx/tests/test_nn_Hardtanh.py +++ b/tools/pnnx/tests/test_nn_Hardtanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Identity.py b/tools/pnnx/tests/test_nn_Identity.py index 270355351..bf29d61f7 100644 --- a/tools/pnnx/tests/test_nn_Identity.py +++ b/tools/pnnx/tests/test_nn_Identity.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_InstanceNorm1d.py b/tools/pnnx/tests/test_nn_InstanceNorm1d.py index aa117e425..4d92adc02 100644 --- a/tools/pnnx/tests/test_nn_InstanceNorm1d.py +++ b/tools/pnnx/tests/test_nn_InstanceNorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_InstanceNorm2d.py b/tools/pnnx/tests/test_nn_InstanceNorm2d.py index ac2adfd79..b4f24003f 100644 --- a/tools/pnnx/tests/test_nn_InstanceNorm2d.py +++ b/tools/pnnx/tests/test_nn_InstanceNorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_InstanceNorm3d.py b/tools/pnnx/tests/test_nn_InstanceNorm3d.py index c9fd15c53..594d981d0 100644 --- a/tools/pnnx/tests/test_nn_InstanceNorm3d.py +++ b/tools/pnnx/tests/test_nn_InstanceNorm3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LPPool1d.py b/tools/pnnx/tests/test_nn_LPPool1d.py index 39ed9210e..6b0fa2ee8 100644 --- a/tools/pnnx/tests/test_nn_LPPool1d.py +++ b/tools/pnnx/tests/test_nn_LPPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LPPool2d.py b/tools/pnnx/tests/test_nn_LPPool2d.py index c7e86b149..97ecf844b 100644 --- a/tools/pnnx/tests/test_nn_LPPool2d.py +++ b/tools/pnnx/tests/test_nn_LPPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LSTM.py b/tools/pnnx/tests/test_nn_LSTM.py index d5cf1e06e..a9322d3b2 100644 --- a/tools/pnnx/tests/test_nn_LSTM.py +++ b/tools/pnnx/tests/test_nn_LSTM.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LayerNorm.py b/tools/pnnx/tests/test_nn_LayerNorm.py index 3f28a3770..e6cebd23b 100644 --- a/tools/pnnx/tests/test_nn_LayerNorm.py +++ b/tools/pnnx/tests/test_nn_LayerNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LeakyReLU.py b/tools/pnnx/tests/test_nn_LeakyReLU.py index b34063b96..38fffc689 100644 --- a/tools/pnnx/tests/test_nn_LeakyReLU.py +++ b/tools/pnnx/tests/test_nn_LeakyReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Linear.py b/tools/pnnx/tests/test_nn_Linear.py index 4e445d5a1..fe93b9a62 100644 --- a/tools/pnnx/tests/test_nn_Linear.py +++ b/tools/pnnx/tests/test_nn_Linear.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LocalResponseNorm.py b/tools/pnnx/tests/test_nn_LocalResponseNorm.py index 046fc5e4c..7d999591a 100644 --- a/tools/pnnx/tests/test_nn_LocalResponseNorm.py +++ b/tools/pnnx/tests/test_nn_LocalResponseNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LogSigmoid.py b/tools/pnnx/tests/test_nn_LogSigmoid.py index 0e1f68d67..9ff4afa25 100644 --- a/tools/pnnx/tests/test_nn_LogSigmoid.py +++ b/tools/pnnx/tests/test_nn_LogSigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_LogSoftmax.py b/tools/pnnx/tests/test_nn_LogSoftmax.py index 25fd3604a..9ebe8ada4 100644 --- a/tools/pnnx/tests/test_nn_LogSoftmax.py +++ b/tools/pnnx/tests/test_nn_LogSoftmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_MaxPool1d.py b/tools/pnnx/tests/test_nn_MaxPool1d.py index c9124d61a..f30168ac0 100644 --- a/tools/pnnx/tests/test_nn_MaxPool1d.py +++ b/tools/pnnx/tests/test_nn_MaxPool1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_MaxPool2d.py b/tools/pnnx/tests/test_nn_MaxPool2d.py index 6fbc708a6..507efd6b0 100644 --- a/tools/pnnx/tests/test_nn_MaxPool2d.py +++ b/tools/pnnx/tests/test_nn_MaxPool2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_MaxPool3d.py b/tools/pnnx/tests/test_nn_MaxPool3d.py index 02c058e64..99468ed07 100644 --- a/tools/pnnx/tests/test_nn_MaxPool3d.py +++ b/tools/pnnx/tests/test_nn_MaxPool3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Mish.py b/tools/pnnx/tests/test_nn_Mish.py index a2606bcce..2ad8655a5 100644 --- a/tools/pnnx/tests/test_nn_Mish.py +++ b/tools/pnnx/tests/test_nn_Mish.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_MultiheadAttention.py b/tools/pnnx/tests/test_nn_MultiheadAttention.py index 00ef59201..21ddc894a 100644 --- a/tools/pnnx/tests/test_nn_MultiheadAttention.py +++ b/tools/pnnx/tests/test_nn_MultiheadAttention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_PReLU.py b/tools/pnnx/tests/test_nn_PReLU.py index 0e748499a..61b35e9a9 100644 --- a/tools/pnnx/tests/test_nn_PReLU.py +++ b/tools/pnnx/tests/test_nn_PReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_PixelShuffle.py b/tools/pnnx/tests/test_nn_PixelShuffle.py index e53ba5234..a31c30543 100644 --- a/tools/pnnx/tests/test_nn_PixelShuffle.py +++ b/tools/pnnx/tests/test_nn_PixelShuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_PixelUnshuffle.py b/tools/pnnx/tests/test_nn_PixelUnshuffle.py index b21a98a87..b05a2ab04 100644 --- a/tools/pnnx/tests/test_nn_PixelUnshuffle.py +++ b/tools/pnnx/tests/test_nn_PixelUnshuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_RMSNorm.py b/tools/pnnx/tests/test_nn_RMSNorm.py index a9b70cdb2..6a00ef27b 100644 --- a/tools/pnnx/tests/test_nn_RMSNorm.py +++ b/tools/pnnx/tests/test_nn_RMSNorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_RNN.py b/tools/pnnx/tests/test_nn_RNN.py index 1229af9b3..a17c04f9f 100644 --- a/tools/pnnx/tests/test_nn_RNN.py +++ b/tools/pnnx/tests/test_nn_RNN.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_RReLU.py b/tools/pnnx/tests/test_nn_RReLU.py index 55df6e628..9fa1fc7a6 100644 --- a/tools/pnnx/tests/test_nn_RReLU.py +++ b/tools/pnnx/tests/test_nn_RReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ReLU.py b/tools/pnnx/tests/test_nn_ReLU.py index cfa92e496..e7e48e051 100644 --- a/tools/pnnx/tests/test_nn_ReLU.py +++ b/tools/pnnx/tests/test_nn_ReLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ReLU6.py b/tools/pnnx/tests/test_nn_ReLU6.py index e6d36d4b0..890b4939b 100644 --- a/tools/pnnx/tests/test_nn_ReLU6.py +++ b/tools/pnnx/tests/test_nn_ReLU6.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ReflectionPad1d.py b/tools/pnnx/tests/test_nn_ReflectionPad1d.py index b2c8c823c..23bd6cbe5 100644 --- a/tools/pnnx/tests/test_nn_ReflectionPad1d.py +++ b/tools/pnnx/tests/test_nn_ReflectionPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ReflectionPad2d.py b/tools/pnnx/tests/test_nn_ReflectionPad2d.py index 59984cf23..cf844cb89 100644 --- a/tools/pnnx/tests/test_nn_ReflectionPad2d.py +++ b/tools/pnnx/tests/test_nn_ReflectionPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ReplicationPad1d.py b/tools/pnnx/tests/test_nn_ReplicationPad1d.py index bd084aae7..14f25c257 100644 --- a/tools/pnnx/tests/test_nn_ReplicationPad1d.py +++ b/tools/pnnx/tests/test_nn_ReplicationPad1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ReplicationPad2d.py b/tools/pnnx/tests/test_nn_ReplicationPad2d.py index 8a806f358..f15b7579e 100644 --- a/tools/pnnx/tests/test_nn_ReplicationPad2d.py +++ b/tools/pnnx/tests/test_nn_ReplicationPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ReplicationPad3d.py b/tools/pnnx/tests/test_nn_ReplicationPad3d.py index 988d3a582..903452b73 100644 --- a/tools/pnnx/tests/test_nn_ReplicationPad3d.py +++ b/tools/pnnx/tests/test_nn_ReplicationPad3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_SELU.py b/tools/pnnx/tests/test_nn_SELU.py index bc085a17c..6040fc232 100644 --- a/tools/pnnx/tests/test_nn_SELU.py +++ b/tools/pnnx/tests/test_nn_SELU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_SiLU.py b/tools/pnnx/tests/test_nn_SiLU.py index 92177efdc..6eab738c9 100644 --- a/tools/pnnx/tests/test_nn_SiLU.py +++ b/tools/pnnx/tests/test_nn_SiLU.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Sigmoid.py b/tools/pnnx/tests/test_nn_Sigmoid.py index 7bc2417cc..8841cdea2 100644 --- a/tools/pnnx/tests/test_nn_Sigmoid.py +++ b/tools/pnnx/tests/test_nn_Sigmoid.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Softmax.py b/tools/pnnx/tests/test_nn_Softmax.py index 84db2d884..61d329b65 100644 --- a/tools/pnnx/tests/test_nn_Softmax.py +++ b/tools/pnnx/tests/test_nn_Softmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Softmax2d.py b/tools/pnnx/tests/test_nn_Softmax2d.py index c370903cd..c68bec2ca 100644 --- a/tools/pnnx/tests/test_nn_Softmax2d.py +++ b/tools/pnnx/tests/test_nn_Softmax2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Softmin.py b/tools/pnnx/tests/test_nn_Softmin.py index c73781364..f8a3f6f3a 100644 --- a/tools/pnnx/tests/test_nn_Softmin.py +++ b/tools/pnnx/tests/test_nn_Softmin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Softplus.py b/tools/pnnx/tests/test_nn_Softplus.py index cf7a93109..999618de4 100644 --- a/tools/pnnx/tests/test_nn_Softplus.py +++ b/tools/pnnx/tests/test_nn_Softplus.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Softshrink.py b/tools/pnnx/tests/test_nn_Softshrink.py index 6f7488826..bfd022dcd 100644 --- a/tools/pnnx/tests/test_nn_Softshrink.py +++ b/tools/pnnx/tests/test_nn_Softshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Softsign.py b/tools/pnnx/tests/test_nn_Softsign.py index 4c2b34766..d79346b58 100644 --- a/tools/pnnx/tests/test_nn_Softsign.py +++ b/tools/pnnx/tests/test_nn_Softsign.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Tanh.py b/tools/pnnx/tests/test_nn_Tanh.py index 7a8fb11f7..a0b276250 100644 --- a/tools/pnnx/tests/test_nn_Tanh.py +++ b/tools/pnnx/tests/test_nn_Tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Tanhshrink.py b/tools/pnnx/tests/test_nn_Tanhshrink.py index 7f2bf9241..3122d656f 100644 --- a/tools/pnnx/tests/test_nn_Tanhshrink.py +++ b/tools/pnnx/tests/test_nn_Tanhshrink.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Threshold.py b/tools/pnnx/tests/test_nn_Threshold.py index 6cf5c0a11..2b393b298 100644 --- a/tools/pnnx/tests/test_nn_Threshold.py +++ b/tools/pnnx/tests/test_nn_Threshold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Unfold.py b/tools/pnnx/tests/test_nn_Unfold.py index aece08566..a98203dc8 100644 --- a/tools/pnnx/tests/test_nn_Unfold.py +++ b/tools/pnnx/tests/test_nn_Unfold.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_Upsample.py b/tools/pnnx/tests/test_nn_Upsample.py index ed419f144..c6055b99b 100644 --- a/tools/pnnx/tests/test_nn_Upsample.py +++ b/tools/pnnx/tests/test_nn_Upsample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_UpsamplingBilinear2d.py b/tools/pnnx/tests/test_nn_UpsamplingBilinear2d.py index 600fa61e0..1f7e243e3 100644 --- a/tools/pnnx/tests/test_nn_UpsamplingBilinear2d.py +++ b/tools/pnnx/tests/test_nn_UpsamplingBilinear2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_UpsamplingNearest2d.py b/tools/pnnx/tests/test_nn_UpsamplingNearest2d.py index f3b6f3f1b..511a405ba 100644 --- a/tools/pnnx/tests/test_nn_UpsamplingNearest2d.py +++ b/tools/pnnx/tests/test_nn_UpsamplingNearest2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_nn_ZeroPad2d.py b/tools/pnnx/tests/test_nn_ZeroPad2d.py index 002102a21..6d4e59794 100644 --- a/tools/pnnx/tests/test_nn_ZeroPad2d.py +++ b/tools/pnnx/tests/test_nn_ZeroPad2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_eliminate_noop_cat.py b/tools/pnnx/tests/test_pnnx_eliminate_noop_cat.py index 719939d17..7b661a06f 100644 --- a/tools/pnnx/tests/test_pnnx_eliminate_noop_cat.py +++ b/tools/pnnx/tests/test_pnnx_eliminate_noop_cat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_eliminate_noop_expand.py b/tools/pnnx/tests/test_pnnx_eliminate_noop_expand.py index a96d3c08e..d619dd131 100644 --- a/tools/pnnx/tests/test_pnnx_eliminate_noop_expand.py +++ b/tools/pnnx/tests/test_pnnx_eliminate_noop_expand.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_eliminate_noop_math.py b/tools/pnnx/tests/test_pnnx_eliminate_noop_math.py index 37b8522b0..1a81458f5 100644 --- a/tools/pnnx/tests/test_pnnx_eliminate_noop_math.py +++ b/tools/pnnx/tests/test_pnnx_eliminate_noop_math.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_eliminate_noop_upsample.py b/tools/pnnx/tests/test_pnnx_eliminate_noop_upsample.py index ee40bff42..747406830 100644 --- a/tools/pnnx/tests/test_pnnx_eliminate_noop_upsample.py +++ b/tools/pnnx/tests/test_pnnx_eliminate_noop_upsample.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_expression.py b/tools/pnnx/tests/test_pnnx_expression.py index 4834b13cd..7be29fe97 100644 --- a/tools/pnnx/tests/test_pnnx_expression.py +++ b/tools/pnnx/tests/test_pnnx_expression.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fold_constant.py b/tools/pnnx/tests/test_pnnx_fold_constant.py index f492295b3..2f6f96e67 100644 --- a/tools/pnnx/tests/test_pnnx_fold_constant.py +++ b/tools/pnnx/tests/test_pnnx_fold_constant.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_adjacent_reshape.py b/tools/pnnx/tests/test_pnnx_fuse_adjacent_reshape.py index 8f44987fb..38e280ee4 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_adjacent_reshape.py +++ b/tools/pnnx/tests/test_pnnx_fuse_adjacent_reshape.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_conv1d_batchnorm1d.py b/tools/pnnx/tests/test_pnnx_fuse_conv1d_batchnorm1d.py index 048c8f032..08090cc50 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_conv1d_batchnorm1d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_conv1d_batchnorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_conv2d_batchnorm2d.py b/tools/pnnx/tests/test_pnnx_fuse_conv2d_batchnorm2d.py index b99b06589..bac258601 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_conv2d_batchnorm2d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_conv2d_batchnorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_conv3d_batchnorm3d.py b/tools/pnnx/tests/test_pnnx_fuse_conv3d_batchnorm3d.py index 6a6fea3e4..ee2d9a32c 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_conv3d_batchnorm3d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_conv3d_batchnorm3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_convtranspose1d_batchnorm1d.py b/tools/pnnx/tests/test_pnnx_fuse_convtranspose1d_batchnorm1d.py index c8757aa9e..f52c214f7 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_convtranspose1d_batchnorm1d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_convtranspose1d_batchnorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_convtranspose2d_batchnorm2d.py b/tools/pnnx/tests/test_pnnx_fuse_convtranspose2d_batchnorm2d.py index 906a8ef72..5e675d7bd 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_convtranspose2d_batchnorm2d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_convtranspose2d_batchnorm2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_convtranspose3d_batchnorm3d.py b/tools/pnnx/tests/test_pnnx_fuse_convtranspose3d_batchnorm3d.py index 996cfc2d9..8a186b1f7 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_convtranspose3d_batchnorm3d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_convtranspose3d_batchnorm3d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_input_unpack.py b/tools/pnnx/tests/test_pnnx_fuse_input_unpack.py index 3c3081753..32b5f619c 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_input_unpack.py +++ b/tools/pnnx/tests/test_pnnx_fuse_input_unpack.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_layernorm.py b/tools/pnnx/tests/test_pnnx_fuse_layernorm.py index d8f788ac5..fdc21f9e3 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_layernorm.py +++ b/tools/pnnx/tests/test_pnnx_fuse_layernorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_linear_batchnorm1d.py b/tools/pnnx/tests/test_pnnx_fuse_linear_batchnorm1d.py index a96baed49..b3169841a 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_linear_batchnorm1d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_linear_batchnorm1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py b/tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py index 377f4cc75..baeed81cb 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py +++ b/tools/pnnx/tests/test_pnnx_fuse_multiheadattention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_pad_conv1d.py b/tools/pnnx/tests/test_pnnx_fuse_pad_conv1d.py index 5e1e456f0..0e404f81b 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_pad_conv1d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_pad_conv1d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_pad_conv2d.py b/tools/pnnx/tests/test_pnnx_fuse_pad_conv2d.py index 23d24100c..4bb4abc3b 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_pad_conv2d.py +++ b/tools/pnnx/tests/test_pnnx_fuse_pad_conv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_pixel_unshuffle.py b/tools/pnnx/tests/test_pnnx_fuse_pixel_unshuffle.py index 3a631b62c..691d56f3c 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_pixel_unshuffle.py +++ b/tools/pnnx/tests/test_pnnx_fuse_pixel_unshuffle.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_rmsnorm.py b/tools/pnnx/tests/test_pnnx_fuse_rmsnorm.py index b04fa9344..63d6d2651 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_rmsnorm.py +++ b/tools/pnnx/tests/test_pnnx_fuse_rmsnorm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_scaled_dot_product_attention.py b/tools/pnnx/tests/test_pnnx_fuse_scaled_dot_product_attention.py index c20170137..a96aaccf2 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_scaled_dot_product_attention.py +++ b/tools/pnnx/tests/test_pnnx_fuse_scaled_dot_product_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_select_to_unbind.py b/tools/pnnx/tests/test_pnnx_fuse_select_to_unbind.py index 36f65e496..552c4466f 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_select_to_unbind.py +++ b/tools/pnnx/tests/test_pnnx_fuse_select_to_unbind.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_pnnx_fuse_slice_to_tensor_split.py b/tools/pnnx/tests/test_pnnx_fuse_slice_to_tensor_split.py index 2f5305d88..d915c5373 100644 --- a/tools/pnnx/tests/test_pnnx_fuse_slice_to_tensor_split.py +++ b/tools/pnnx/tests/test_pnnx_fuse_slice_to_tensor_split.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_quantization_shufflenet_v2_x1_0.py b/tools/pnnx/tests/test_quantization_shufflenet_v2_x1_0.py index f223e7e0a..3c3416e31 100644 --- a/tools/pnnx/tests/test_quantization_shufflenet_v2_x1_0.py +++ b/tools/pnnx/tests/test_quantization_shufflenet_v2_x1_0.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/test_resnet18.py b/tools/pnnx/tests/test_resnet18.py index 9e1f71b6d..ecdbc604e 100644 --- a/tools/pnnx/tests/test_resnet18.py +++ b/tools/pnnx/tests/test_resnet18.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/test_shufflenet_v2_x1_0.py b/tools/pnnx/tests/test_shufflenet_v2_x1_0.py index 2e0e7fd2d..ec370d6dc 100644 --- a/tools/pnnx/tests/test_shufflenet_v2_x1_0.py +++ b/tools/pnnx/tests/test_shufflenet_v2_x1_0.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/test_squeezenet1_1.py b/tools/pnnx/tests/test_squeezenet1_1.py index b7bb065f6..44554f8bf 100644 --- a/tools/pnnx/tests/test_squeezenet1_1.py +++ b/tools/pnnx/tests/test_squeezenet1_1.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision.models as models diff --git a/tools/pnnx/tests/test_swin_t.py b/tools/pnnx/tests/test_swin_t.py index 804450a28..0e66d3768 100644 --- a/tools/pnnx/tests/test_swin_t.py +++ b/tools/pnnx/tests/test_swin_t.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/pnnx/tests/test_torch_abs.py b/tools/pnnx/tests/test_torch_abs.py index 9d24e6d30..1ae0858f6 100644 --- a/tools/pnnx/tests/test_torch_abs.py +++ b/tools/pnnx/tests/test_torch_abs.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_acos.py b/tools/pnnx/tests/test_torch_acos.py index 7380f753d..74931c626 100644 --- a/tools/pnnx/tests/test_torch_acos.py +++ b/tools/pnnx/tests/test_torch_acos.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_acosh.py b/tools/pnnx/tests/test_torch_acosh.py index 5d572a4ab..5bb052c46 100644 --- a/tools/pnnx/tests/test_torch_acosh.py +++ b/tools/pnnx/tests/test_torch_acosh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_addmm.py b/tools/pnnx/tests/test_torch_addmm.py index 0a38cabc2..3c78483ee 100644 --- a/tools/pnnx/tests/test_torch_addmm.py +++ b/tools/pnnx/tests/test_torch_addmm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_amax.py b/tools/pnnx/tests/test_torch_amax.py index 7f94f9625..e386e61af 100644 --- a/tools/pnnx/tests/test_torch_amax.py +++ b/tools/pnnx/tests/test_torch_amax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_amin.py b/tools/pnnx/tests/test_torch_amin.py index b18d02bc5..46f1d3424 100644 --- a/tools/pnnx/tests/test_torch_amin.py +++ b/tools/pnnx/tests/test_torch_amin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_arange.py b/tools/pnnx/tests/test_torch_arange.py index 176f8ed33..338894118 100644 --- a/tools/pnnx/tests/test_torch_arange.py +++ b/tools/pnnx/tests/test_torch_arange.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_argmax.py b/tools/pnnx/tests/test_torch_argmax.py index 68f13e46b..e9e7111f0 100644 --- a/tools/pnnx/tests/test_torch_argmax.py +++ b/tools/pnnx/tests/test_torch_argmax.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_argmin.py b/tools/pnnx/tests/test_torch_argmin.py index d080b3ccf..2064073f7 100644 --- a/tools/pnnx/tests/test_torch_argmin.py +++ b/tools/pnnx/tests/test_torch_argmin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_asin.py b/tools/pnnx/tests/test_torch_asin.py index 2b4f3cb05..9b80b2f0b 100644 --- a/tools/pnnx/tests/test_torch_asin.py +++ b/tools/pnnx/tests/test_torch_asin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_asinh.py b/tools/pnnx/tests/test_torch_asinh.py index 9f80fbabc..c2aff966f 100644 --- a/tools/pnnx/tests/test_torch_asinh.py +++ b/tools/pnnx/tests/test_torch_asinh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_atan.py b/tools/pnnx/tests/test_torch_atan.py index 8fd797b91..da0d2bc43 100644 --- a/tools/pnnx/tests/test_torch_atan.py +++ b/tools/pnnx/tests/test_torch_atan.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_atan2.py b/tools/pnnx/tests/test_torch_atan2.py index 27bf5c5de..2feb953d1 100644 --- a/tools/pnnx/tests/test_torch_atan2.py +++ b/tools/pnnx/tests/test_torch_atan2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_atanh.py b/tools/pnnx/tests/test_torch_atanh.py index 2cc2ce60d..76fcd82cd 100644 --- a/tools/pnnx/tests/test_torch_atanh.py +++ b/tools/pnnx/tests/test_torch_atanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_bitwise_and.py b/tools/pnnx/tests/test_torch_bitwise_and.py index 5f9a132fc..62d312e33 100644 --- a/tools/pnnx/tests/test_torch_bitwise_and.py +++ b/tools/pnnx/tests/test_torch_bitwise_and.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_bitwise_left_shift.py b/tools/pnnx/tests/test_torch_bitwise_left_shift.py index 24b501844..9f18d54b6 100644 --- a/tools/pnnx/tests/test_torch_bitwise_left_shift.py +++ b/tools/pnnx/tests/test_torch_bitwise_left_shift.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_bitwise_not.py b/tools/pnnx/tests/test_torch_bitwise_not.py index 544acbe34..e364d3d88 100644 --- a/tools/pnnx/tests/test_torch_bitwise_not.py +++ b/tools/pnnx/tests/test_torch_bitwise_not.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_bitwise_or.py b/tools/pnnx/tests/test_torch_bitwise_or.py index cc56af7d2..6d6412676 100644 --- a/tools/pnnx/tests/test_torch_bitwise_or.py +++ b/tools/pnnx/tests/test_torch_bitwise_or.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_bitwise_right_shift.py b/tools/pnnx/tests/test_torch_bitwise_right_shift.py index cd937e5ed..2f69d4781 100644 --- a/tools/pnnx/tests/test_torch_bitwise_right_shift.py +++ b/tools/pnnx/tests/test_torch_bitwise_right_shift.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_bitwise_xor.py b/tools/pnnx/tests/test_torch_bitwise_xor.py index 835afe7a0..cee71a5a5 100644 --- a/tools/pnnx/tests/test_torch_bitwise_xor.py +++ b/tools/pnnx/tests/test_torch_bitwise_xor.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_bmm.py b/tools/pnnx/tests/test_torch_bmm.py index 692dae0da..f25da2edd 100644 --- a/tools/pnnx/tests/test_torch_bmm.py +++ b/tools/pnnx/tests/test_torch_bmm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_cat.py b/tools/pnnx/tests/test_torch_cat.py index 98e6f8c16..6e59294d7 100644 --- a/tools/pnnx/tests/test_torch_cat.py +++ b/tools/pnnx/tests/test_torch_cat.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_ceil.py b/tools/pnnx/tests/test_torch_ceil.py index bd6379a7b..c0b4cbd4c 100644 --- a/tools/pnnx/tests/test_torch_ceil.py +++ b/tools/pnnx/tests/test_torch_ceil.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_chunk.py b/tools/pnnx/tests/test_torch_chunk.py index 36ba8ba1a..10af964fc 100644 --- a/tools/pnnx/tests/test_torch_chunk.py +++ b/tools/pnnx/tests/test_torch_chunk.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_clamp.py b/tools/pnnx/tests/test_torch_clamp.py index 70506287c..8e8a0b34f 100644 --- a/tools/pnnx/tests/test_torch_clamp.py +++ b/tools/pnnx/tests/test_torch_clamp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_clone.py b/tools/pnnx/tests/test_torch_clone.py index 1ad48ad66..891e6267c 100644 --- a/tools/pnnx/tests/test_torch_clone.py +++ b/tools/pnnx/tests/test_torch_clone.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_complex.py b/tools/pnnx/tests/test_torch_complex.py index c9c03a814..ece7b4174 100644 --- a/tools/pnnx/tests/test_torch_complex.py +++ b/tools/pnnx/tests/test_torch_complex.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_cos.py b/tools/pnnx/tests/test_torch_cos.py index 9d60eb661..62b78c052 100644 --- a/tools/pnnx/tests/test_torch_cos.py +++ b/tools/pnnx/tests/test_torch_cos.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_cosh.py b/tools/pnnx/tests/test_torch_cosh.py index 7190e7f9e..b7812bae7 100644 --- a/tools/pnnx/tests/test_torch_cosh.py +++ b/tools/pnnx/tests/test_torch_cosh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_cross.py b/tools/pnnx/tests/test_torch_cross.py index a3f488078..fb8b208fa 100644 --- a/tools/pnnx/tests/test_torch_cross.py +++ b/tools/pnnx/tests/test_torch_cross.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_cumprod.py b/tools/pnnx/tests/test_torch_cumprod.py index 3125c3cbd..9cb46e3df 100644 --- a/tools/pnnx/tests/test_torch_cumprod.py +++ b/tools/pnnx/tests/test_torch_cumprod.py @@ -1,17 +1,6 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# 2023 Xiaomi Corp. (author: Fangjun Kuang) -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_cumsum.py b/tools/pnnx/tests/test_torch_cumsum.py index 5ae6e874f..fb42f59a9 100644 --- a/tools/pnnx/tests/test_torch_cumsum.py +++ b/tools/pnnx/tests/test_torch_cumsum.py @@ -1,17 +1,6 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# 2023 Xiaomi Corp. (author: Fangjun Kuang) -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# Copyright 2023 Xiaomi Corp. (author: Fangjun Kuang) +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_diag.py b/tools/pnnx/tests/test_torch_diag.py index 45eba9b6f..021cc9162 100644 --- a/tools/pnnx/tests/test_torch_diag.py +++ b/tools/pnnx/tests/test_torch_diag.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_einsum.py b/tools/pnnx/tests/test_torch_einsum.py index c045f4b89..47fc06f85 100644 --- a/tools/pnnx/tests/test_torch_einsum.py +++ b/tools/pnnx/tests/test_torch_einsum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_eq.py b/tools/pnnx/tests/test_torch_eq.py index b58d36431..cf92be79a 100644 --- a/tools/pnnx/tests/test_torch_eq.py +++ b/tools/pnnx/tests/test_torch_eq.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_exp.py b/tools/pnnx/tests/test_torch_exp.py index 507d96a22..d6c72b39a 100644 --- a/tools/pnnx/tests/test_torch_exp.py +++ b/tools/pnnx/tests/test_torch_exp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_fft.py b/tools/pnnx/tests/test_torch_fft_fft.py index b9d0cc3e8..a9a30438b 100644 --- a/tools/pnnx/tests/test_torch_fft_fft.py +++ b/tools/pnnx/tests/test_torch_fft_fft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_fft2.py b/tools/pnnx/tests/test_torch_fft_fft2.py index f6e59e3f1..344e9bfb1 100644 --- a/tools/pnnx/tests/test_torch_fft_fft2.py +++ b/tools/pnnx/tests/test_torch_fft_fft2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_fftn.py b/tools/pnnx/tests/test_torch_fft_fftn.py index b39c86011..7d0111dcb 100644 --- a/tools/pnnx/tests/test_torch_fft_fftn.py +++ b/tools/pnnx/tests/test_torch_fft_fftn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_hfft.py b/tools/pnnx/tests/test_torch_fft_hfft.py index 69b4af078..3b883d154 100644 --- a/tools/pnnx/tests/test_torch_fft_hfft.py +++ b/tools/pnnx/tests/test_torch_fft_hfft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_hfft2.py b/tools/pnnx/tests/test_torch_fft_hfft2.py index 66ba0b36f..fda21c138 100644 --- a/tools/pnnx/tests/test_torch_fft_hfft2.py +++ b/tools/pnnx/tests/test_torch_fft_hfft2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_hfftn.py b/tools/pnnx/tests/test_torch_fft_hfftn.py index de63f1436..ffa5f0906 100644 --- a/tools/pnnx/tests/test_torch_fft_hfftn.py +++ b/tools/pnnx/tests/test_torch_fft_hfftn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_ifft.py b/tools/pnnx/tests/test_torch_fft_ifft.py index 019b440f9..13cfb7709 100644 --- a/tools/pnnx/tests/test_torch_fft_ifft.py +++ b/tools/pnnx/tests/test_torch_fft_ifft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_ifft2.py b/tools/pnnx/tests/test_torch_fft_ifft2.py index bdecfebc9..207dbefab 100644 --- a/tools/pnnx/tests/test_torch_fft_ifft2.py +++ b/tools/pnnx/tests/test_torch_fft_ifft2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_ifftn.py b/tools/pnnx/tests/test_torch_fft_ifftn.py index ea4ad881f..fb45a5364 100644 --- a/tools/pnnx/tests/test_torch_fft_ifftn.py +++ b/tools/pnnx/tests/test_torch_fft_ifftn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_ihfft.py b/tools/pnnx/tests/test_torch_fft_ihfft.py index c0af156b2..b041018ba 100644 --- a/tools/pnnx/tests/test_torch_fft_ihfft.py +++ b/tools/pnnx/tests/test_torch_fft_ihfft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_ihfft2.py b/tools/pnnx/tests/test_torch_fft_ihfft2.py index 54a0b2b06..5a58589ff 100644 --- a/tools/pnnx/tests/test_torch_fft_ihfft2.py +++ b/tools/pnnx/tests/test_torch_fft_ihfft2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_ihfftn.py b/tools/pnnx/tests/test_torch_fft_ihfftn.py index 951f4b07d..f5bc751cf 100644 --- a/tools/pnnx/tests/test_torch_fft_ihfftn.py +++ b/tools/pnnx/tests/test_torch_fft_ihfftn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_irfft.py b/tools/pnnx/tests/test_torch_fft_irfft.py index 8f92dd551..e5aea1b87 100644 --- a/tools/pnnx/tests/test_torch_fft_irfft.py +++ b/tools/pnnx/tests/test_torch_fft_irfft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_irfft2.py b/tools/pnnx/tests/test_torch_fft_irfft2.py index e7a181e4b..5dac1ce67 100644 --- a/tools/pnnx/tests/test_torch_fft_irfft2.py +++ b/tools/pnnx/tests/test_torch_fft_irfft2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_irfftn.py b/tools/pnnx/tests/test_torch_fft_irfftn.py index 81922939f..a4df37e90 100644 --- a/tools/pnnx/tests/test_torch_fft_irfftn.py +++ b/tools/pnnx/tests/test_torch_fft_irfftn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_rfft.py b/tools/pnnx/tests/test_torch_fft_rfft.py index 5ce9f01ae..1847f5d44 100644 --- a/tools/pnnx/tests/test_torch_fft_rfft.py +++ b/tools/pnnx/tests/test_torch_fft_rfft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_rfft2.py b/tools/pnnx/tests/test_torch_fft_rfft2.py index 3bda5d400..067cac362 100644 --- a/tools/pnnx/tests/test_torch_fft_rfft2.py +++ b/tools/pnnx/tests/test_torch_fft_rfft2.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_fft_rfftn.py b/tools/pnnx/tests/test_torch_fft_rfftn.py index 57bd96eb7..16e6380d5 100644 --- a/tools/pnnx/tests/test_torch_fft_rfftn.py +++ b/tools/pnnx/tests/test_torch_fft_rfftn.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_flatten.py b/tools/pnnx/tests/test_torch_flatten.py index 57fd387ea..c91c2d392 100644 --- a/tools/pnnx/tests/test_torch_flatten.py +++ b/tools/pnnx/tests/test_torch_flatten.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_floor.py b/tools/pnnx/tests/test_torch_floor.py index 04b4cb96c..f2a3a2aa4 100644 --- a/tools/pnnx/tests/test_torch_floor.py +++ b/tools/pnnx/tests/test_torch_floor.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_full.py b/tools/pnnx/tests/test_torch_full.py index b2f8905b9..816a26418 100644 --- a/tools/pnnx/tests/test_torch_full.py +++ b/tools/pnnx/tests/test_torch_full.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_full_like.py b/tools/pnnx/tests/test_torch_full_like.py index ba0d85555..f08801423 100644 --- a/tools/pnnx/tests/test_torch_full_like.py +++ b/tools/pnnx/tests/test_torch_full_like.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_gather.py b/tools/pnnx/tests/test_torch_gather.py index 498cb1461..a78fc8304 100644 --- a/tools/pnnx/tests/test_torch_gather.py +++ b/tools/pnnx/tests/test_torch_gather.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_ge.py b/tools/pnnx/tests/test_torch_ge.py index 6b3c8cbbf..f09ecae27 100644 --- a/tools/pnnx/tests/test_torch_ge.py +++ b/tools/pnnx/tests/test_torch_ge.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_gt.py b/tools/pnnx/tests/test_torch_gt.py index b88c7dec4..1bf215025 100644 --- a/tools/pnnx/tests/test_torch_gt.py +++ b/tools/pnnx/tests/test_torch_gt.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_imag.py b/tools/pnnx/tests/test_torch_imag.py index 6e4ce990f..bb9707d49 100644 --- a/tools/pnnx/tests/test_torch_imag.py +++ b/tools/pnnx/tests/test_torch_imag.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_index_select.py b/tools/pnnx/tests/test_torch_index_select.py index aaa5b57ae..77ff8d0ee 100644 --- a/tools/pnnx/tests/test_torch_index_select.py +++ b/tools/pnnx/tests/test_torch_index_select.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_istft.py b/tools/pnnx/tests/test_torch_istft.py index bdcabd966..bb3f7cea3 100644 --- a/tools/pnnx/tests/test_torch_istft.py +++ b/tools/pnnx/tests/test_torch_istft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_le.py b/tools/pnnx/tests/test_torch_le.py index d1b02780c..11a85ffef 100644 --- a/tools/pnnx/tests/test_torch_le.py +++ b/tools/pnnx/tests/test_torch_le.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_lgamma.py b/tools/pnnx/tests/test_torch_lgamma.py index f2ee78e0a..810588486 100644 --- a/tools/pnnx/tests/test_torch_lgamma.py +++ b/tools/pnnx/tests/test_torch_lgamma.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_log.py b/tools/pnnx/tests/test_torch_log.py index f98928d0a..582442349 100644 --- a/tools/pnnx/tests/test_torch_log.py +++ b/tools/pnnx/tests/test_torch_log.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_log10.py b/tools/pnnx/tests/test_torch_log10.py index 5fc2984b6..708cdb6fa 100644 --- a/tools/pnnx/tests/test_torch_log10.py +++ b/tools/pnnx/tests/test_torch_log10.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_logaddexp.py b/tools/pnnx/tests/test_torch_logaddexp.py index 6914dbd62..0288af995 100644 --- a/tools/pnnx/tests/test_torch_logaddexp.py +++ b/tools/pnnx/tests/test_torch_logaddexp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_logical_and.py b/tools/pnnx/tests/test_torch_logical_and.py index 886c82bf4..7ade58457 100644 --- a/tools/pnnx/tests/test_torch_logical_and.py +++ b/tools/pnnx/tests/test_torch_logical_and.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_logical_not.py b/tools/pnnx/tests/test_torch_logical_not.py index 6fa301965..6810861ed 100644 --- a/tools/pnnx/tests/test_torch_logical_not.py +++ b/tools/pnnx/tests/test_torch_logical_not.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_logical_or.py b/tools/pnnx/tests/test_torch_logical_or.py index 571677448..c74f2d8bb 100644 --- a/tools/pnnx/tests/test_torch_logical_or.py +++ b/tools/pnnx/tests/test_torch_logical_or.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_logical_xor.py b/tools/pnnx/tests/test_torch_logical_xor.py index 1490b51c6..a37d44a5c 100644 --- a/tools/pnnx/tests/test_torch_logical_xor.py +++ b/tools/pnnx/tests/test_torch_logical_xor.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_logsumexp.py b/tools/pnnx/tests/test_torch_logsumexp.py index c3f1f5ff8..299ee51f3 100644 --- a/tools/pnnx/tests/test_torch_logsumexp.py +++ b/tools/pnnx/tests/test_torch_logsumexp.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_lt.py b/tools/pnnx/tests/test_torch_lt.py index 8214caa63..58b8fc289 100644 --- a/tools/pnnx/tests/test_torch_lt.py +++ b/tools/pnnx/tests/test_torch_lt.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_masked_select.py b/tools/pnnx/tests/test_torch_masked_select.py index e3f0130a7..166e1073a 100644 --- a/tools/pnnx/tests/test_torch_masked_select.py +++ b/tools/pnnx/tests/test_torch_masked_select.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_matmul.py b/tools/pnnx/tests/test_torch_matmul.py index b47c0a1e4..a875e7268 100644 --- a/tools/pnnx/tests/test_torch_matmul.py +++ b/tools/pnnx/tests/test_torch_matmul.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_max.py b/tools/pnnx/tests/test_torch_max.py index 247b6bf3b..43657f62d 100644 --- a/tools/pnnx/tests/test_torch_max.py +++ b/tools/pnnx/tests/test_torch_max.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_maximum.py b/tools/pnnx/tests/test_torch_maximum.py index 7c0f3ba79..acf4d017e 100644 --- a/tools/pnnx/tests/test_torch_maximum.py +++ b/tools/pnnx/tests/test_torch_maximum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_mean.py b/tools/pnnx/tests/test_torch_mean.py index 9b6d6ffcc..e6691eac6 100644 --- a/tools/pnnx/tests/test_torch_mean.py +++ b/tools/pnnx/tests/test_torch_mean.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_min.py b/tools/pnnx/tests/test_torch_min.py index 9419cc624..9c8842100 100644 --- a/tools/pnnx/tests/test_torch_min.py +++ b/tools/pnnx/tests/test_torch_min.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_minimum.py b/tools/pnnx/tests/test_torch_minimum.py index 1b4d720a7..4d89ddd4a 100644 --- a/tools/pnnx/tests/test_torch_minimum.py +++ b/tools/pnnx/tests/test_torch_minimum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_mm.py b/tools/pnnx/tests/test_torch_mm.py index a59643b53..4ec8540d3 100644 --- a/tools/pnnx/tests/test_torch_mm.py +++ b/tools/pnnx/tests/test_torch_mm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_mv.py b/tools/pnnx/tests/test_torch_mv.py index 7c63164ac..25d07411d 100644 --- a/tools/pnnx/tests/test_torch_mv.py +++ b/tools/pnnx/tests/test_torch_mv.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_narrow.py b/tools/pnnx/tests/test_torch_narrow.py index 8acce84a0..4db74880e 100644 --- a/tools/pnnx/tests/test_torch_narrow.py +++ b/tools/pnnx/tests/test_torch_narrow.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_ne.py b/tools/pnnx/tests/test_torch_ne.py index d9e3c4083..aa54e2aad 100644 --- a/tools/pnnx/tests/test_torch_ne.py +++ b/tools/pnnx/tests/test_torch_ne.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_neg.py b/tools/pnnx/tests/test_torch_neg.py index e3424f217..1ed9f568b 100644 --- a/tools/pnnx/tests/test_torch_neg.py +++ b/tools/pnnx/tests/test_torch_neg.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_norm.py b/tools/pnnx/tests/test_torch_norm.py index 64dbe8035..3d45a8cea 100644 --- a/tools/pnnx/tests/test_torch_norm.py +++ b/tools/pnnx/tests/test_torch_norm.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_ones.py b/tools/pnnx/tests/test_torch_ones.py index 94cd379d5..75eb92d0d 100644 --- a/tools/pnnx/tests/test_torch_ones.py +++ b/tools/pnnx/tests/test_torch_ones.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_ones_like.py b/tools/pnnx/tests/test_torch_ones_like.py index c30132060..902cc768e 100644 --- a/tools/pnnx/tests/test_torch_ones_like.py +++ b/tools/pnnx/tests/test_torch_ones_like.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_positive.py b/tools/pnnx/tests/test_torch_positive.py index 1b4f9def4..4727f844f 100644 --- a/tools/pnnx/tests/test_torch_positive.py +++ b/tools/pnnx/tests/test_torch_positive.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_pow.py b/tools/pnnx/tests/test_torch_pow.py index 85bebce36..dab6c6d6e 100644 --- a/tools/pnnx/tests/test_torch_pow.py +++ b/tools/pnnx/tests/test_torch_pow.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_prod.py b/tools/pnnx/tests/test_torch_prod.py index c04b53833..9ec2f1516 100644 --- a/tools/pnnx/tests/test_torch_prod.py +++ b/tools/pnnx/tests/test_torch_prod.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_real.py b/tools/pnnx/tests/test_torch_real.py index 6e352ca29..4dcac5a1c 100644 --- a/tools/pnnx/tests/test_torch_real.py +++ b/tools/pnnx/tests/test_torch_real.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_reciprocal.py b/tools/pnnx/tests/test_torch_reciprocal.py index e508929c2..b3572a94b 100644 --- a/tools/pnnx/tests/test_torch_reciprocal.py +++ b/tools/pnnx/tests/test_torch_reciprocal.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_repeat_interleave.py b/tools/pnnx/tests/test_torch_repeat_interleave.py index b67418bf8..0fd688fc0 100644 --- a/tools/pnnx/tests/test_torch_repeat_interleave.py +++ b/tools/pnnx/tests/test_torch_repeat_interleave.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_roll.py b/tools/pnnx/tests/test_torch_roll.py index 32e3bde38..2e1dd6670 100644 --- a/tools/pnnx/tests/test_torch_roll.py +++ b/tools/pnnx/tests/test_torch_roll.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_round.py b/tools/pnnx/tests/test_torch_round.py index 0d0be04ba..daf837b43 100644 --- a/tools/pnnx/tests/test_torch_round.py +++ b/tools/pnnx/tests/test_torch_round.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_rsqrt.py b/tools/pnnx/tests/test_torch_rsqrt.py index ec39dae71..ed5b36cf5 100644 --- a/tools/pnnx/tests/test_torch_rsqrt.py +++ b/tools/pnnx/tests/test_torch_rsqrt.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_scatter_add.py b/tools/pnnx/tests/test_torch_scatter_add.py index 7b32dd3ad..96d724eb7 100644 --- a/tools/pnnx/tests/test_torch_scatter_add.py +++ b/tools/pnnx/tests/test_torch_scatter_add.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_sign.py b/tools/pnnx/tests/test_torch_sign.py index b834b7ea1..de6651089 100644 --- a/tools/pnnx/tests/test_torch_sign.py +++ b/tools/pnnx/tests/test_torch_sign.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_sin.py b/tools/pnnx/tests/test_torch_sin.py index b0aa628a3..9ac25b231 100644 --- a/tools/pnnx/tests/test_torch_sin.py +++ b/tools/pnnx/tests/test_torch_sin.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_sinh.py b/tools/pnnx/tests/test_torch_sinh.py index 8f49e7865..026ad3fc4 100644 --- a/tools/pnnx/tests/test_torch_sinh.py +++ b/tools/pnnx/tests/test_torch_sinh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_slice_scatter.py b/tools/pnnx/tests/test_torch_slice_scatter.py index 57538a894..c54621670 100644 --- a/tools/pnnx/tests/test_torch_slice_scatter.py +++ b/tools/pnnx/tests/test_torch_slice_scatter.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_split.py b/tools/pnnx/tests/test_torch_split.py index e89ce8036..aa40df74f 100644 --- a/tools/pnnx/tests/test_torch_split.py +++ b/tools/pnnx/tests/test_torch_split.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_sqrt.py b/tools/pnnx/tests/test_torch_sqrt.py index 6cb88569e..087e1f135 100644 --- a/tools/pnnx/tests/test_torch_sqrt.py +++ b/tools/pnnx/tests/test_torch_sqrt.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_square.py b/tools/pnnx/tests/test_torch_square.py index 65069b0e7..3a5e0447f 100644 --- a/tools/pnnx/tests/test_torch_square.py +++ b/tools/pnnx/tests/test_torch_square.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_squeeze.py b/tools/pnnx/tests/test_torch_squeeze.py index 3d0430d63..ccdfc3594 100644 --- a/tools/pnnx/tests/test_torch_squeeze.py +++ b/tools/pnnx/tests/test_torch_squeeze.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_stack.py b/tools/pnnx/tests/test_torch_stack.py index c25d8be9c..e87e7f1de 100644 --- a/tools/pnnx/tests/test_torch_stack.py +++ b/tools/pnnx/tests/test_torch_stack.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_std.py b/tools/pnnx/tests/test_torch_std.py index 0a2f7699e..b11d480e9 100644 --- a/tools/pnnx/tests/test_torch_std.py +++ b/tools/pnnx/tests/test_torch_std.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_stft.py b/tools/pnnx/tests/test_torch_stft.py index cc280f3e8..29791919d 100644 --- a/tools/pnnx/tests/test_torch_stft.py +++ b/tools/pnnx/tests/test_torch_stft.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_sum.py b/tools/pnnx/tests/test_torch_sum.py index fe3ca6e66..2ad381b08 100644 --- a/tools/pnnx/tests/test_torch_sum.py +++ b/tools/pnnx/tests/test_torch_sum.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_t.py b/tools/pnnx/tests/test_torch_t.py index a953ae03a..2d0e1f866 100644 --- a/tools/pnnx/tests/test_torch_t.py +++ b/tools/pnnx/tests/test_torch_t.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_tan.py b/tools/pnnx/tests/test_torch_tan.py index bd3ca4cf8..2f7ddddd6 100644 --- a/tools/pnnx/tests/test_torch_tan.py +++ b/tools/pnnx/tests/test_torch_tan.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_tanh.py b/tools/pnnx/tests/test_torch_tanh.py index 9157f2dae..a91cfe76e 100644 --- a/tools/pnnx/tests/test_torch_tanh.py +++ b/tools/pnnx/tests/test_torch_tanh.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_tensor_split.py b/tools/pnnx/tests/test_torch_tensor_split.py index 2639fcd3d..b6aad3128 100644 --- a/tools/pnnx/tests/test_torch_tensor_split.py +++ b/tools/pnnx/tests/test_torch_tensor_split.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_tile.py b/tools/pnnx/tests/test_torch_tile.py index ce43222dd..8c747b464 100644 --- a/tools/pnnx/tests/test_torch_tile.py +++ b/tools/pnnx/tests/test_torch_tile.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_topk.py b/tools/pnnx/tests/test_torch_topk.py index e2be60aae..2f0dd113d 100644 --- a/tools/pnnx/tests/test_torch_topk.py +++ b/tools/pnnx/tests/test_torch_topk.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2023 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2023 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_transpose.py b/tools/pnnx/tests/test_torch_transpose.py index f0f18dc45..7ff8d60df 100644 --- a/tools/pnnx/tests/test_torch_transpose.py +++ b/tools/pnnx/tests/test_torch_transpose.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_trunc.py b/tools/pnnx/tests/test_torch_trunc.py index 95e82dbb8..3b7128ff6 100644 --- a/tools/pnnx/tests/test_torch_trunc.py +++ b/tools/pnnx/tests/test_torch_trunc.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_unbind.py b/tools/pnnx/tests/test_torch_unbind.py index b232f289d..ff4d55c19 100644 --- a/tools/pnnx/tests/test_torch_unbind.py +++ b/tools/pnnx/tests/test_torch_unbind.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_unsqueeze.py b/tools/pnnx/tests/test_torch_unsqueeze.py index 6857b1d66..092dece27 100644 --- a/tools/pnnx/tests/test_torch_unsqueeze.py +++ b/tools/pnnx/tests/test_torch_unsqueeze.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_view_as_complex.py b/tools/pnnx/tests/test_torch_view_as_complex.py index c2cedc537..887cbc331 100644 --- a/tools/pnnx/tests/test_torch_view_as_complex.py +++ b/tools/pnnx/tests/test_torch_view_as_complex.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_view_as_real.py b/tools/pnnx/tests/test_torch_view_as_real.py index 06bbe7de9..9a5e959df 100644 --- a/tools/pnnx/tests/test_torch_view_as_real.py +++ b/tools/pnnx/tests/test_torch_view_as_real.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_where.py b/tools/pnnx/tests/test_torch_where.py index a25b93fb6..62f65e495 100644 --- a/tools/pnnx/tests/test_torch_where.py +++ b/tools/pnnx/tests/test_torch_where.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_zeros.py b/tools/pnnx/tests/test_torch_zeros.py index d75707a57..ffea613ff 100644 --- a/tools/pnnx/tests/test_torch_zeros.py +++ b/tools/pnnx/tests/test_torch_zeros.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torch_zeros_like.py b/tools/pnnx/tests/test_torch_zeros_like.py index 8f288367e..bb02de1db 100644 --- a/tools/pnnx/tests/test_torch_zeros_like.py +++ b/tools/pnnx/tests/test_torch_zeros_like.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py b/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py index 92623934a..a1d280a5d 100644 --- a/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py +++ b/tools/pnnx/tests/test_torchaudio_F_inverse_spectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torchaudio_F_spectrogram.py b/tools/pnnx/tests/test_torchaudio_F_spectrogram.py index a21d2364a..5fb4b2fac 100644 --- a/tools/pnnx/tests/test_torchaudio_F_spectrogram.py +++ b/tools/pnnx/tests/test_torchaudio_F_spectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py b/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py index 7080ddd12..81e582b1a 100644 --- a/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py +++ b/tools/pnnx/tests/test_torchaudio_InverseSpectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torchaudio_Spectrogram.py b/tools/pnnx/tests/test_torchaudio_Spectrogram.py index 6f29fd730..67a232551 100644 --- a/tools/pnnx/tests/test_torchaudio_Spectrogram.py +++ b/tools/pnnx/tests/test_torchaudio_Spectrogram.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2024 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2024 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torchvision_DeformConv2d.py b/tools/pnnx/tests/test_torchvision_DeformConv2d.py index 124a9660c..0dd6e2145 100644 --- a/tools/pnnx/tests/test_torchvision_DeformConv2d.py +++ b/tools/pnnx/tests/test_torchvision_DeformConv2d.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2021 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_torchvision_RoIAlign.py b/tools/pnnx/tests/test_torchvision_RoIAlign.py index ae26c9985..2ff9d7338 100644 --- a/tools/pnnx/tests/test_torchvision_RoIAlign.py +++ b/tools/pnnx/tests/test_torchvision_RoIAlign.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_albert_attention.py b/tools/pnnx/tests/test_transformers_albert_attention.py index 210f3c03a..7ce5045d6 100644 --- a/tools/pnnx/tests/test_transformers_albert_attention.py +++ b/tools/pnnx/tests/test_transformers_albert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_bart_attention.py b/tools/pnnx/tests/test_transformers_bart_attention.py index d3b6f056c..e354c83ee 100644 --- a/tools/pnnx/tests/test_transformers_bart_attention.py +++ b/tools/pnnx/tests/test_transformers_bart_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_bert_attention.py b/tools/pnnx/tests/test_transformers_bert_attention.py index fd86573aa..10dcfb57a 100644 --- a/tools/pnnx/tests/test_transformers_bert_attention.py +++ b/tools/pnnx/tests/test_transformers_bert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_bert_generation_attention.py b/tools/pnnx/tests/test_transformers_bert_generation_attention.py index 5aab8aa24..610364d0f 100644 --- a/tools/pnnx/tests/test_transformers_bert_generation_attention.py +++ b/tools/pnnx/tests/test_transformers_bert_generation_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_blenderbot_attention.py b/tools/pnnx/tests/test_transformers_blenderbot_attention.py index d14ce3f94..cf8ba6415 100644 --- a/tools/pnnx/tests/test_transformers_blenderbot_attention.py +++ b/tools/pnnx/tests/test_transformers_blenderbot_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_camembert_attention.py b/tools/pnnx/tests/test_transformers_camembert_attention.py index b6dcce1d8..90de59f4e 100644 --- a/tools/pnnx/tests/test_transformers_camembert_attention.py +++ b/tools/pnnx/tests/test_transformers_camembert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_chinese_clip_attention.py b/tools/pnnx/tests/test_transformers_chinese_clip_attention.py index dc184095b..d8a91eeb4 100644 --- a/tools/pnnx/tests/test_transformers_chinese_clip_attention.py +++ b/tools/pnnx/tests/test_transformers_chinese_clip_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_clip_attention.py b/tools/pnnx/tests/test_transformers_clip_attention.py index 7bc813e29..1f388e105 100644 --- a/tools/pnnx/tests/test_transformers_clip_attention.py +++ b/tools/pnnx/tests/test_transformers_clip_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_ctrl_attention.py b/tools/pnnx/tests/test_transformers_ctrl_attention.py index fdbf1056d..bd33dbd44 100644 --- a/tools/pnnx/tests/test_transformers_ctrl_attention.py +++ b/tools/pnnx/tests/test_transformers_ctrl_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_deberta_attention.py b/tools/pnnx/tests/test_transformers_deberta_attention.py index 3bf6ffbd4..0228dc61a 100644 --- a/tools/pnnx/tests/test_transformers_deberta_attention.py +++ b/tools/pnnx/tests/test_transformers_deberta_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_distilbert_attention.py b/tools/pnnx/tests/test_transformers_distilbert_attention.py index fbdd12da5..4fee67817 100644 --- a/tools/pnnx/tests/test_transformers_distilbert_attention.py +++ b/tools/pnnx/tests/test_transformers_distilbert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_electra_attention.py b/tools/pnnx/tests/test_transformers_electra_attention.py index 14b8127f9..83f270de5 100644 --- a/tools/pnnx/tests/test_transformers_electra_attention.py +++ b/tools/pnnx/tests/test_transformers_electra_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_flaubert_attention.py b/tools/pnnx/tests/test_transformers_flaubert_attention.py index 808d71d0b..a8b3028b1 100644 --- a/tools/pnnx/tests/test_transformers_flaubert_attention.py +++ b/tools/pnnx/tests/test_transformers_flaubert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_fsmt_attention.py b/tools/pnnx/tests/test_transformers_fsmt_attention.py index 7afc12cd4..f30c03614 100644 --- a/tools/pnnx/tests/test_transformers_fsmt_attention.py +++ b/tools/pnnx/tests/test_transformers_fsmt_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_funnel_attention.py b/tools/pnnx/tests/test_transformers_funnel_attention.py index 9042dde10..e0c4c4b3a 100644 --- a/tools/pnnx/tests/test_transformers_funnel_attention.py +++ b/tools/pnnx/tests/test_transformers_funnel_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_gpt2_attention.py b/tools/pnnx/tests/test_transformers_gpt2_attention.py index 0766dad84..02aa246e9 100644 --- a/tools/pnnx/tests/test_transformers_gpt2_attention.py +++ b/tools/pnnx/tests/test_transformers_gpt2_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_layoutlm_attention.py b/tools/pnnx/tests/test_transformers_layoutlm_attention.py index 6c6da6abd..5c3478b5d 100644 --- a/tools/pnnx/tests/test_transformers_layoutlm_attention.py +++ b/tools/pnnx/tests/test_transformers_layoutlm_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_longformer_attention.py b/tools/pnnx/tests/test_transformers_longformer_attention.py index a472ce8e2..a022e1eb0 100644 --- a/tools/pnnx/tests/test_transformers_longformer_attention.py +++ b/tools/pnnx/tests/test_transformers_longformer_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_lxmert_attention.py b/tools/pnnx/tests/test_transformers_lxmert_attention.py index f7545ccee..9bc732be9 100644 --- a/tools/pnnx/tests/test_transformers_lxmert_attention.py +++ b/tools/pnnx/tests/test_transformers_lxmert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_marian_attention.py b/tools/pnnx/tests/test_transformers_marian_attention.py index c1bea17b1..4eb470dd7 100644 --- a/tools/pnnx/tests/test_transformers_marian_attention.py +++ b/tools/pnnx/tests/test_transformers_marian_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_mbart_attention.py b/tools/pnnx/tests/test_transformers_mbart_attention.py index c28c51b73..23b06abdd 100644 --- a/tools/pnnx/tests/test_transformers_mbart_attention.py +++ b/tools/pnnx/tests/test_transformers_mbart_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_mobilebert_attention.py b/tools/pnnx/tests/test_transformers_mobilebert_attention.py index c107a4008..5e1c5201d 100644 --- a/tools/pnnx/tests/test_transformers_mobilebert_attention.py +++ b/tools/pnnx/tests/test_transformers_mobilebert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_mt5_attention.py b/tools/pnnx/tests/test_transformers_mt5_attention.py index bded25b3f..79ca182bf 100644 --- a/tools/pnnx/tests/test_transformers_mt5_attention.py +++ b/tools/pnnx/tests/test_transformers_mt5_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_openai_attention.py b/tools/pnnx/tests/test_transformers_openai_attention.py index bcfd53abc..4440db1ac 100644 --- a/tools/pnnx/tests/test_transformers_openai_attention.py +++ b/tools/pnnx/tests/test_transformers_openai_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_pegasus_attention.py b/tools/pnnx/tests/test_transformers_pegasus_attention.py index 92fdad2ca..d3546d40c 100644 --- a/tools/pnnx/tests/test_transformers_pegasus_attention.py +++ b/tools/pnnx/tests/test_transformers_pegasus_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_prophetnet_attention.py b/tools/pnnx/tests/test_transformers_prophetnet_attention.py index 0c5b218fc..cd1fbf40e 100644 --- a/tools/pnnx/tests/test_transformers_prophetnet_attention.py +++ b/tools/pnnx/tests/test_transformers_prophetnet_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_reformer_attention.py b/tools/pnnx/tests/test_transformers_reformer_attention.py index 8db3687e0..e43edab8d 100644 --- a/tools/pnnx/tests/test_transformers_reformer_attention.py +++ b/tools/pnnx/tests/test_transformers_reformer_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_roberta_attention.py b/tools/pnnx/tests/test_transformers_roberta_attention.py index e053bbdb2..1c674ea1f 100644 --- a/tools/pnnx/tests/test_transformers_roberta_attention.py +++ b/tools/pnnx/tests/test_transformers_roberta_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_squeezebert_attention.py b/tools/pnnx/tests/test_transformers_squeezebert_attention.py index 1030f7dfb..c2eab61b7 100644 --- a/tools/pnnx/tests/test_transformers_squeezebert_attention.py +++ b/tools/pnnx/tests/test_transformers_squeezebert_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_t5_attention.py b/tools/pnnx/tests/test_transformers_t5_attention.py index a20a3267a..9dcfa250f 100644 --- a/tools/pnnx/tests/test_transformers_t5_attention.py +++ b/tools/pnnx/tests/test_transformers_t5_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_xlm_attention.py b/tools/pnnx/tests/test_transformers_xlm_attention.py index 366bc410b..69831e6bc 100644 --- a/tools/pnnx/tests/test_transformers_xlm_attention.py +++ b/tools/pnnx/tests/test_transformers_xlm_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_xlm_roberta_attention.py b/tools/pnnx/tests/test_transformers_xlm_roberta_attention.py index 12d2742d5..c8f6f66bc 100644 --- a/tools/pnnx/tests/test_transformers_xlm_roberta_attention.py +++ b/tools/pnnx/tests/test_transformers_xlm_roberta_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_transformers_xlnet_attention.py b/tools/pnnx/tests/test_transformers_xlnet_attention.py index 186427c0d..e11df5e00 100644 --- a/tools/pnnx/tests/test_transformers_xlnet_attention.py +++ b/tools/pnnx/tests/test_transformers_xlnet_attention.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2025 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2025 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torch.nn as nn diff --git a/tools/pnnx/tests/test_vit_b_32.py b/tools/pnnx/tests/test_vit_b_32.py index 1233d6b1b..560c77158 100644 --- a/tools/pnnx/tests/test_vit_b_32.py +++ b/tools/pnnx/tests/test_vit_b_32.py @@ -1,16 +1,5 @@ -# Tencent is pleased to support the open source community by making ncnn available. -# -# Copyright (C) 2022 THL A29 Limited, a Tencent company. All rights reserved. -# -# Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -# in compliance with the License. You may obtain a copy of the License at -# -# https://opensource.org/licenses/BSD-3-Clause -# -# Unless required by applicable law or agreed to in writing, software distributed -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -# CONDITIONS OF ANY KIND, either express or implied. See the License for the -# specific language governing permissions and limitations under the License. +# Copyright 2022 Tencent +# SPDX-License-Identifier: BSD-3-Clause import torch import torchvision diff --git a/tools/quantize/imreadwrite.cpp b/tools/quantize/imreadwrite.cpp index c09fef801..de3c48078 100644 --- a/tools/quantize/imreadwrite.cpp +++ b/tools/quantize/imreadwrite.cpp @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #include "imreadwrite.h" diff --git a/tools/quantize/imreadwrite.h b/tools/quantize/imreadwrite.h index 5a955dfd3..c178036f8 100644 --- a/tools/quantize/imreadwrite.h +++ b/tools/quantize/imreadwrite.h @@ -1,16 +1,5 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2017 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifndef IMREADWRITE_H #define IMREADWRITE_H diff --git a/tools/quantize/ncnn2int8.cpp b/tools/quantize/ncnn2int8.cpp index 7290f5bd8..ad8498aa4 100644 --- a/tools/quantize/ncnn2int8.cpp +++ b/tools/quantize/ncnn2int8.cpp @@ -1,16 +1,5 @@ -// BUG1989 is pleased to support the open source community by supporting ncnn available. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 +// SPDX-License-Identifier: BSD-3-Clause #ifdef _MSC_VER #define _CRT_SECURE_NO_DEPRECATE diff --git a/tools/quantize/ncnn2table.cpp b/tools/quantize/ncnn2table.cpp index 78695df80..7edbdd151 100644 --- a/tools/quantize/ncnn2table.cpp +++ b/tools/quantize/ncnn2table.cpp @@ -1,20 +1,7 @@ -// Tencent is pleased to support the open source community by making ncnn available. -// -// author:BUG1989 (https://github.com/BUG1989/) Long-term support. -// author:JansonZhu (https://github.com/JansonZhu) Implemented the function of entropy calibration. -// -// Copyright (C) 2019 BUG1989. All rights reserved. -// Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. -// -// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except -// in compliance with the License. You may obtain a copy of the License at -// -// https://opensource.org/licenses/BSD-3-Clause -// -// Unless required by applicable law or agreed to in writing, software distributed -// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, either express or implied. See the License for the -// specific language governing permissions and limitations under the License. +// Copyright 2019 BUG1989 (https://github.com/BUG1989/) Long-term support. +// Copyright 2019 JansonZhu (https://github.com/JansonZhu) Implemented the function of entropy calibration. +// Copyright 2021 Tencent +// SPDX-License-Identifier: BSD-3-Clause #ifdef _MSC_VER #define _CRT_SECURE_NO_DEPRECATE