Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ repos:
files: \.(c|cc|cxx|cpp|cu|cl|h|hpp|hxx|proto|py|mm|m|metal)$
exclude: (?!.*third_party)^.*$|(?!.*book)^.*$
exclude: ^(third-party/|metal/|web/)
- repo: local
hooks:
- id: gitdiff
name: gitdiff
entry: git diff
language: system
files: \.(c|cc|cxx|cpp|cu|cl|h|hpp|hxx|proto|py|mm|m|metal)$
exclude: (?!.*third_party)^.*$|(?!.*book)^.*$
exclude: ^(third-party/|metal/|web/)
21 changes: 16 additions & 5 deletions lite/api/tools/opt_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -536,11 +536,22 @@ void OptBase::PrintAllSupportedOpsInMdformat() {
"android_nnapi",
"qualcomm_qnn",
"kunlunxin_xtcl"};
const std::vector<std::string> readable_valid_targets = {
"ARM", "OpenCL", "Metal", "百度 XPU", "Host",
"x86", "寒武纪 MLU", "华为昇腾 NPU", "联发科 APU", "华为麒麟 NPU",
"颖脉 NNA", "TIM-VX", "亿智 NPU", "Android NNAPI", "高通 QNN",
"昆仑芯 XTCL"};
const std::vector<std::string> readable_valid_targets = {"ARM",
"OpenCL",
"Metal",
"百度 XPU",
"Host",
"x86",
"寒武纪 MLU",
"华为昇腾 NPU",
"联发科 APU",
"华为麒麟 NPU",
"颖脉 NNA",
"TIM-VX",
"亿智 NPU",
"Android NNAPI",
"高通 QNN",
"昆仑芯 XTCL"};
// Print the first row: OP_nam taget1 target2 ...
std::cout << "| "
<< "OP_name ";
Expand Down
2 changes: 1 addition & 1 deletion lite/backends/opencl/cl_kernel/cl_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY CLASS, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. */
#pragma once
Expand Down
2 changes: 2 additions & 0 deletions tools/codestyle/clang_format.hook
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ if ! [[ $version == *"$VERSION"* ]]; then
fi

clang-format $@

echo "$(git diff)"