Skip to content

Commit a22512a

Browse files
[SDAA]change sdaa whl name and add pre-commit check for sdaa c files (#1334)
1 parent 316faf8 commit a22512a

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repos:
99
- id: detect-private-key
1010
- id: end-of-file-fixer
1111
- id: trailing-whitespace
12-
files: (.*\.(py|bzl|md|rst|c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|cmake|yaml|yml|hook)|BUILD|.*\.BUILD|WORKSPACE|CMakeLists\.txt)$
12+
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)$
1313
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
1414
rev: v1.1.14
1515
hooks:
@@ -65,15 +65,15 @@ repos:
6565
description: Format files with ClangFormat.
6666
entry: bash ./tools/codestyle/clang_format.hook -i
6767
language: system
68-
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|mm|m)$
68+
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|xpu|kps|mm|m|scpp)$
6969
- repo: local
7070
hooks:
7171
- id: cpplint-cpp-source
7272
name: cpplint
7373
description: Check C++ code style using cpplint.py.
7474
entry: bash ./tools/codestyle/cpplint_pre_commit.hook
7575
language: system
76-
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx)$
76+
files: \.(c|cc|cxx|cpp|cu|h|hpp|hxx|scpp)$
7777
args:
7878
- --extensions=c,cc,cxx,cpp,cu,cuh,h,hpp,hxx,kps
7979
- --filter=-readability/fn_size,-build/include_what_you_use,-build/c++11,-whitespace/parens

backends/sdaa/CMakeLists.txt

100755100644
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.10)
22

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

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

14-
set(PLUGIN_NAME "paddle-custom-sdaa")
14+
set(PLUGIN_NAME "paddle-sdaa")
1515
if(DEFINED ENV{PLUGIN_VERSION})
1616
set(PLUGIN_VERSION $ENV{PLUGIN_VERSION})
1717
else()
@@ -180,7 +180,7 @@ add_custom_command(
180180
COMMAND python3 ${CMAKE_CURRENT_BINARY_DIR}/setup.py bdist_wheel
181181
DEPENDS ${PLUGIN_NAME}
182182
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/python/sdaa-ext/.timestamp
183-
COMMENT "Packing paddle-custom-sdaa whl packages------>>>")
183+
COMMENT "Packing paddle-sdaa whl packages------>>>")
184184

185185
add_custom_target(
186186
python_package ALL

backends/sdaa/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ cd backends/sdaa
5353
bash compile.sh
5454

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

5959
### Verification

backends/sdaa/README_cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ cd backends/sdaa
5353
bash compile.sh
5454

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

5959
### 基础功能检查

backends/sdaa/sdaa_ext/setup.py.in

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ library_dirs = [
3838
'${CUSTOM_SDAA_C_OPS_LIB}'
3939
]
4040
libraries = [
41-
':libpaddle-custom-sdaa.so',
41+
':libpaddle-sdaa.so',
4242
':libsdcops.so',
4343
':libtecodnn.so',
4444
':libtecoblas.so',

0 commit comments

Comments
 (0)