Skip to content

[SDAA]change sdaa whl name and add pre-commit check for sdaa c files #1334

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 4, 2024
Merged
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
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake|yaml|yml|hook)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists\.txt)$
files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake|yaml|yml|hook|scpp)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists\.txt)$
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
rev: v1.1.14
hooks:
Expand Down Expand Up @@ -65,15 +65,15 @@ repos:
description: Format files with ClangFormat.
entry: bash ./tools/codestyle/clang_format.hook -i
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|mm|m)$
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|mm|m|scpp)$
- repo: local
hooks:
- id: cpplint-cpp-source
name: cpplint
description: Check C++ code style using cpplint.py.
entry: bash ./tools/codestyle/cpplint_pre_commit.hook
language: system
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|scpp)$
args:
- --extensions=c,cc,cxx,cpp,cu,cuh,h,hpp,hxx,kps
- --filter=-readability/fn_size,-build/include_what_you_use,-build/c++11,-whitespace/parens
Expand Down
6 changes: 3 additions & 3 deletions backends/sdaa/CMakeLists.txt
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10)

project(paddle-custom-sdaa CXX C)
project(paddle-sdaa CXX C)
add_definitions(-std=c++14)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")

Expand All @@ -11,7 +11,7 @@ option(WITH_SW "compile with sw arch support" OFF)
option(WITH_GIT_COMMIT "compile with git commit print" ON)
option(WITH_PADDLE_INFO "compile with paddle commit/version print" ON)

set(PLUGIN_NAME "paddle-custom-sdaa")
set(PLUGIN_NAME "paddle-sdaa")
if(DEFINED ENV{PLUGIN_VERSION})
set(PLUGIN_VERSION $ENV{PLUGIN_VERSION})
else()
Expand Down Expand Up @@ -180,7 +180,7 @@ add_custom_command(
COMMAND python3 ${CMAKE_CURRENT_BINARY_DIR}/setup.py bdist_wheel
DEPENDS ${PLUGIN_NAME}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python/sdaa-ext/.timestamp
COMMENT "Packing paddle-custom-sdaa whl packages------>>>")
COMMENT "Packing paddle-sdaa whl packages------>>>")

add_custom_target(
python_package ALL
Expand Down
2 changes: 1 addition & 1 deletion backends/sdaa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cd backends/sdaa
bash compile.sh

# 6. install the generated whl package, which is under build/dist directory
pip install -U build/dist/*.whl
pip install build/dist/*.whl --force-reinstall
```

### Verification
Expand Down
2 changes: 1 addition & 1 deletion backends/sdaa/README_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cd backends/sdaa
bash compile.sh

# 6. 编译产出在 build/dist 路径下,使用 pip 安装
pip install -U build/dist/*.whl
pip install build/dist/*.whl --force-reinstall
```

### 基础功能检查
Expand Down
2 changes: 1 addition & 1 deletion backends/sdaa/sdaa_ext/setup.py.in
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ library_dirs = [
'${CUSTOM_SDAA_C_OPS_LIB}'
]
libraries = [
':libpaddle-custom-sdaa.so',
':libpaddle-sdaa.so',
':libsdcops.so',
':libtecodnn.so',
':libtecoblas.so',
Expand Down