Skip to content

Commit

Permalink
Merge branch 'develop' into add_pd_op
Browse files Browse the repository at this point in the history
  • Loading branch information
PolaKuma authored Jan 14, 2025
2 parents 1f76a96 + 4f7808b commit d5de8a2
Show file tree
Hide file tree
Showing 591 changed files with 8,638 additions and 13,486 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/Codestyle-Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,16 @@ on:
branches: [ "develop" ]

jobs:
check-bypass:
uses: ./.github/workflows/check-bypass.yml
with:
workflow-name: 'codestyle'
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}

pre-commit:
if: github.repository_owner == 'PaddlePaddle'
needs: check-bypass
if: ${{ github.repository_owner == 'PaddlePaddle' && needs.check-bypass.outputs.can-skip != 'true' }}
runs-on: ubuntu-latest
env:
PR_ID: ${{ github.event.pull_request.number }}
Expand All @@ -19,7 +27,7 @@ jobs:
ref: ${{ github.event.pull_request.base.ref }}
fetch-depth: 1000

- name: Merge pr
- name: Merge PR to test branch
run: |
git fetch origin pull/${PR_ID}/merge
git checkout -b test FETCH_HEAD
Expand All @@ -34,7 +42,6 @@ jobs:
run: |
pip install pre-commit==2.17.0 cpplint==1.6.0 clang-format==13.0.0
- name: Check pre-commit
env:
SKIP_CLANG_TIDY_CHECK: "ON"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/PR-CI-Clone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
submodules: 'recursive'
fetch-depth: 1000

- name: Merge pr
- name: Merge PR to test branch
run: |
git fetch origin pull/${PR_ID}/merge
git checkout -b test FETCH_HEAD
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/check-bypass.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
on:
workflow_call:
inputs:
workflow-name:
required: true
type: string
secrets:
github-token:
required: true
outputs:
can-skip:
description: "Whether the workflow can be skipped."
value: ${{ jobs.check-bypass.outputs.can-skip }}

jobs:
check-bypass:
name: Check Bypass
runs-on: ubuntu-latest
permissions:
contents: read
env:
CI_TEAM_MEMBERS: '["SigureMo", "risemeup1", "tianshuo78520a", "0x3878f", "swgu98", "luotao1"]'
outputs:
can-skip: ${{ steps.check-bypass.outputs.can-skip }}
steps:
- id: check-bypass
name: Check Bypass
uses: PFCCLab/ci-bypass@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
non-pull-request-event-strategy: 'always-skipped'
type: 'composite'
composite-rule: |
{
"any": [
{
"type": "labeled",
"label": ["skip-ci: ${{ inputs.workflow-name }}", "skip-ci: all"],
"username": ${{ env.CI_TEAM_MEMBERS }}
},
{
"type": "commented",
"comment-pattern": [".*/skip-ci ${{ inputs.workflow-name }}.*", ".*/skip-ci all.*"],
"username": ${{ env.CI_TEAM_MEMBERS }}
}
]
}
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ PaddlePaddle uses this [Git branching model](http://nvie.com/posts/a-successful-
pre-commit install
```

Our pre-commit configuration requires clang-format 3.8 for auto-formating C/C++ code and yapf for Python.
Our pre-commit configuration requires clang-format 3.8 for auto-formatting C/C++ code and yapf for Python.

Once installed, `pre-commit` checks the style of code and documentation in every commit. We will see something like the following when you run `git commit`:

Expand All @@ -52,7 +52,7 @@ PaddlePaddle uses this [Git branching model](http://nvie.com/posts/a-successful-
Check for broken symlinks................................................Passed
Detect Private Key...................................(no files to check)Skipped
Fix End of Files.....................................(no files to check)Skipped
clang-formater.......................................(no files to check)Skipped
clang-format.........................................(no files to check)Skipped
[my-cool-stuff c703c041] add test file
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 233
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ PaddlePaddle always take code security seriously. However, due to the complexity

### Code security tools

PaddlePaddle security team attaches great importance to the security of the framework. In order to find and fix security issues as soon as possible, we are continuously conducting code security audit and developing automatic vunerability discovery tools. We have already open sourced some of them to the community, hoping this could encourage people to contribute and improve the safety and robustness of PaddlePaddle. [This tool](https://github.com/PaddlePaddle/PaddleSleeve/tree/main/CodeSecurity) includes two parts. The dynamic part includes some op fuzzer samples. And the static part includes some CodeQL samples. Both of them are aim to find vulnerabilities in PaddlePaddle framework codebase. By referring the samples, security researchers can write their own fuzzers or QLs to test more PaddlePaddle modules, and find more code security issues.
PaddlePaddle security team attaches great importance to the security of the framework. In order to find and fix security issues as soon as possible, we are continuously conducting code security audit and developing automatic vulnerability discovery tools. We have already open sourced some of them to the community, hoping this could encourage people to contribute and improve the safety and robustness of PaddlePaddle. [This tool](https://github.com/PaddlePaddle/PaddleSleeve/tree/main/CodeSecurity) includes two parts. The dynamic part includes some op fuzzer samples. And the static part includes some CodeQL samples. Both of them are aim to find vulnerabilities in PaddlePaddle framework codebase. By referring the samples, security researchers can write their own fuzzers or QLs to test more PaddlePaddle modules, and find more code security issues.

### Reporting vulnerabilities

Expand Down
159 changes: 12 additions & 147 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,22 @@ extend-exclude = [
# Skip `intermidiate` check in these files
"test/cpp/eager/task_tests/CMakeLists.txt",
"test/cpp/eager/task_tests/hook_test_intermidiate.cc",
# Skip `creater` check in these files
"paddle/fluid/inference/tensorrt/convert/CMakeLists.txt",
"paddle/fluid/inference/tensorrt/convert/generic_and_custom_plugin_creater.cc",
"paddle/fluid/inference/tensorrt/convert/test_custom_plugin_creater.cc",
]

[default]
# Ignore 1-3 letter words, refer to https://github.com/crate-ci/typos/issues/1079
extend-ignore-words-re = ["^[a-zA-Z]{1,3}$"]
# refer to https://github.com/crate-ci/typos/blob/master/docs/reference.md#example-configurations
extend-ignore-re = [
# Ignore lines by `# typos: disable-line`
"(?Rm)^.*(#|//)\\s*typos:\\s*disable-line$",
# Ignore block by `# typos: off` and `# typos: on`
"(?s)(#|//)\\s*typos:\\s*off.*?\\n\\s*(#|//)\\s*typos:\\s*on"
]

[default.extend-words]
# PaddlePaddle specific words
Expand All @@ -32,84 +43,15 @@ Halfs = 'Halfs'
kinf = 'kinf'
pash = 'pash'
unpacket = "unpacket"
vaccum = 'vaccum'

# These words need to be fixed
Creater = 'Creater'
creater = 'creater'
dito = 'dito'
devide = 'devide'
documention = 'documention'
doens = 'doens'
doen = 'doen'
doubel = 'doubel'
dobule = 'dobule'
Dowloading = 'Dowloading'
downsteram = 'downsteram'
fetchs = 'fetchs'
Flattend = 'Flattend'
flattend = 'flattend'
flattern = 'flattern'
Flattern = 'Flattern'
filpped = 'filpped'
flaot = 'flaot'
follwed = 'follwed'
folowing = 'folowing'
formater = 'formater'
formating = 'formating'
foramt = 'foramt'
formate = 'formate'
formt = 'formt'
forwrad = 'forwrad'
forwad = 'forwad'
forword = 'forword'
founf = 'founf'
framwork = 'framwork'
frequence = 'frequence'
fron = 'fron'
fullfill = 'fullfill'
Indexs = 'Indexs'
indexs = 'indexs'
indiates = 'indiates'
indeces = 'indeces'
inferrence = 'inferrence'
Infered = 'Infered'
infered = 'infered'
infering = 'infering'
informations = 'informations'
imformation = 'imformation'
infomation = 'infomation'
Infor = 'Infor'
infor = 'infor'
inheritted = 'inheritted'
initilization = 'initilization'
initilized = 'initilized'
initalized = 'initalized'
initalize = 'initalize'
intialize = 'intialize'
inital = 'inital'
Inouts = 'Inouts'
intputs = 'intputs'
inputed = 'inputed'
intput = 'intput'
Intput = 'Intput'
inser = 'inser'
insid = 'insid'
insepection = 'insepection'
intall = 'intall'
instanciate = 'instanciate'
occured = 'occured'
Ocurred = 'Ocurred'
occures = 'occures'
offets = 'offets'
offseted = 'offseted'
Operants = 'Operants'
operants = 'operants'
oeprations = 'oeprations'
Opeartion = 'Opeartion'
operaion = 'operaion'
oppotunity = 'oppotunity'
optimzed = 'optimzed'
optmize = 'optmize'
optin = 'optin'
Optin = 'Optin'
rder = 'rder'
Expand Down Expand Up @@ -190,79 +132,23 @@ protocal = 'protocal'
PROTOCAL = 'PROTOCAL'
pyrhon = 'pyrhon'
pthon = 'pthon'
qucik = 'qucik'
quitted = 'quitted'
runned = 'runned'
readed = 'readed'
recived = 'recived'
recevied = 'recevied'
reveived = 'reveived'
recieved = 'recieved'
recieves = 'recieves'
recive = 'recive'
receving = 'receving'
recommand = 'recommand'
recomplie = 'recomplie'
recored = 'recored'
Recusive = 'Recusive'
recusive = 'recusive'
recursivly = 'recursivly'
Recursivly = 'Recursivly'
reduntant = 'reduntant'
Refered = 'Refered'
refered = 'refered'
registed = 'registed'
regist = 'regist'
Regist = 'Regist'
Registe = 'Registe'
registe = 'registe'
REGIST = 'REGIST'
Regiter = 'Regiter'
releated = 'releated'
realease = 'realease'
relase = 'relase'
reomve = 'reomve'
Reoder = 'Reoder'
repeatly = 'repeatly'
repeate = 'repeate'
repalce = 'repalce'
represention = 'represention'
requied = 'requied'
Reqiured = 'Reqiured'
Requred = 'Requred'
requirments = 'requirments'
Reseting = 'Reseting'
reseted = 'reseted'
resouce = 'resouce'
retore = 'retore'
rewriten = 'rewriten'
rewrited = 'rewrited'
Runing = 'Runing'
runing = 'runing'
SMAE = 'SMAE'
satifies = 'satifies'
sclar = 'sclar'
sacle = 'sacle'
schduler = 'schduler'
sheduler = 'sheduler'
shedule = 'shedule'
scheule = 'scheule'
serach = 'serach'
seconde = 'seconde'
Seleceted = 'Seleceted'
sence = 'sence'
seperately = 'seperately'
seperate = 'seperate'
sepearate = 'sepearate'
seperating = 'seperating'
seperator = 'seperator'
sequnce = 'sequnce'
seqence = 'seqence'
sequece = 'sequece'
sequnece = 'sequnece'
sequentail = 'sequentail'
serailize = 'serailize'
settting = 'settting'
setted = 'setted'
shoule = 'shoule'
shoud = 'shoud'
Expand Down Expand Up @@ -322,14 +208,6 @@ suppport = 'suppport'
SWTICH = 'SWTICH'
Swith = 'Swith'
sysyem = 'sysyem'
targt = 'targt'
Taget = 'Taget'
templat = 'templat'
temporaily = 'temporaily'
temporily = 'temporily'
Temperarily = 'Temperarily'
temporaly = 'temporaly'
Temperary = 'Temperary'
tenosr = 'tenosr'
iterm = 'iterm'
termiante = 'termiante'
Expand Down Expand Up @@ -395,19 +273,6 @@ unsed = 'unsed'
uesd = 'uesd'
usefull = 'usefull'
usless = 'usless'
vaccum = 'vaccum'
valud = 'valud'
VAILD = 'VAILD'
valus = 'valus'
valuse = 'valuse'
Varible = 'Varible'
varaible = 'varaible'
vecotr = 'vecotr'
verson = 'verson'
vesion = 'vesion'
Vetical = 'Vetical'
vunerability = 'vunerability'
varn = 'varn'
warpped = 'warpped'
warpper = 'warpper'
Warpper = 'Warpper'
Expand Down
2 changes: 1 addition & 1 deletion cmake/external/openvino.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/openvino/convert.patch
native_convert)

set(OPENVINO_PATCH_COMMAND
git checkout -- . && git fetch --depth=1 origin <OPENVINO_COMMIT> && git
git checkout -- . && git fetch --depth=1 origin ${OPENVINO_COMMIT} && git
checkout ${OPENVINO_COMMIT} && patch -Np1 -d ${SOURCE_DIR} <
${native_convert} || true)

Expand Down
1 change: 1 addition & 0 deletions cmake/hip.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ find_package_and_include(rocprim)
find_package_and_include(hipsparse)
find_package_and_include(rocsparse)
find_package_and_include(rocfft)
find_package_and_include(rocsolver)

if(CCACHE_PATH)
set(HIP_HIPCC_EXECUTABLE ${CCACHE_PATH} ${HIP_HIPCC_EXECUTABLE})
Expand Down
2 changes: 1 addition & 1 deletion cmake/operators.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ function(op_library TARGET)

# pybind USE_OP
if(${pybind_flag} EQUAL 0)
# NOTE(*): activation use macro to regist the kernels, set use_op manually.
# NOTE(*): activation use macro to register the kernels, set use_op manually.
if(${TARGET} STREQUAL "activation")
file(APPEND ${pybind_file} "USE_OP_ITSELF(relu);\n")
elseif(${TARGET} STREQUAL "fake_dequantize")
Expand Down
10 changes: 10 additions & 0 deletions cmake/simd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
set(AVX512F_FLAG "-mavx512f")
set(Wno_Maybe_Uninitialized "-Wno-maybe-uninitialized")
set(FMA_FLAG "-mfma")
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.0)
set(NO_INLINE "-fno-inline")
else()
set(NO_INLINE "")
endif()
elseif(MSVC)
set(MMX_FLAG "/arch:MMX")
set(SSE2_FLAG "/arch:SSE2")
Expand All @@ -22,6 +27,11 @@ elseif(MSVC)
set(AVX512F_FLAG "/arch:AVX512")
set(Wno_Maybe_Uninitialized "/wd4701")
set(FMA_FLAG "/arch:AVX2")
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 12.0)
set(NO_INLINE "/Ob0")
else()
set(NO_INLINE "")
endif()
endif()

set(CMAKE_REQUIRED_FLAGS_RETAINED ${CMAKE_REQUIRED_FLAGS})
Expand Down
Loading

0 comments on commit d5de8a2

Please sign in to comment.