Skip to content

Commit f164405

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into fix-cumsum
2 parents 04d985f + 9df3eef commit f164405

File tree

254 files changed

+3729
-1197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

254 files changed

+3729
-1197
lines changed

.github/workflows/Slice-baseline.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ name: Slice-baseline-paddle
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
PR_ID:
7+
required: false
8+
type: string
9+
COMMIT_ID:
10+
required: false
11+
type: string
512
schedule:
613
- cron: '0 20 * * 0'
714

@@ -43,3 +50,5 @@ jobs:
4350
docker_build_image: ${{ needs.build-docker.outputs.docker_build_image }}
4451
slice-check: 'true'
4552
SLICE_TEST_MODE: insert_baseline
53+
MANUALLY_PR_ID: ${{ inputs.PR_ID }}
54+
MANUALLY_COMMIT_ID: ${{ inputs.COMMIT_ID }}

.github/workflows/_Linux-XPU.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ jobs:
206206
CCACHE_DIR: /root/.ccache
207207
CCACHE_MAXSIZE: 150G
208208
CCACHE_LIMIT_MULTIPLE: 0.8
209-
IF_KUNLUN3: "OFF"
209+
IF_KUNLUN3: "ON"
210210
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
211211
home_dir: ${{ github.workspace }}/../../../..
212212
FLAGS_use_stride_kernel: "0"

.github/workflows/_Slice.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,12 @@ on:
2020
type: string
2121
required: false
2222
default: 'paddle'
23+
MANUALLY_PR_ID:
24+
type: string
25+
required: false
26+
MANUALLY_COMMIT_ID:
27+
type: string
28+
required: false
2329

2430
env:
2531
PR_ID: ${{ github.event.pull_request.number || '0' }}
@@ -47,6 +53,7 @@ jobs:
4753

4854
slice:
4955
name: Slice test
56+
needs: check-bypass
5057
if: ${{ inputs.can-skip != 'true' && needs.check-bypass.outputs.can-skip != 'true' }}
5158
runs-on:
5259
group: slice
@@ -105,7 +112,11 @@ jobs:
105112
if [[ "${{ inputs.SLICE_BENCHMARK_FRAMEWORKS }}" == "torch" ]];then
106113
python3.10 -m pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118
107114
else
108-
python3.10 -m pip install $wheel_link
115+
if [[ "${{ inputs.MANUALLY_PR_ID }}" == "" ]]; then
116+
python3.10 -m pip install $wheel_link
117+
else
118+
python3.10 -m pip install https://paddle-github-action.bj.bcebos.com/PR/build/${{ inputs.MANUALLY_PR_ID }}/${{ inputs.MANUALLY_COMMIT_ID }}/paddlepaddle_gpu-0.0.0-cp310-cp310-linux_x86_64.whl
119+
fi
109120
fi
110121
python3.10 -m pip install -r PaddleTest/framework/e2e/api_benchmark/requirement.txt
111122
cd PaddleTest/framework/slice_benchmark

ci/check_approval.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,12 @@ if [ "${ALL_PADDLE_ENFORCE}" != "" ] && [ "${PR_ID}" != "" ]; then
309309
check_approval 1 luotao1 zhangbo9674 phlrain
310310
fi
311311

312+
CHINESE_CHECK=$(git diff -U0 upstream/$BRANCH |grep "^+" |grep -P '[\p{Han}]')
313+
if [ "${CHINESE_CHECK}" != "" ] && [ "${PR_ID}" != "" ]; then
314+
echo_line="Not recommended to use Chinese. You must have one RD (tianshuo78520a or swgu98 or zhangbo9674 or risemeup1) approval."
315+
check_approval 1 tianshuo78520a swgu98 zhangbo9674 risemeup1
316+
fi
317+
312318
ALL_ADDED_LINES=$(git diff -U0 upstream/$BRANCH |grep "^+" || true)
313319
ALL_PADDLE_CHECK=$(echo $ALL_ADDED_LINES |grep -zoE "(PADDLE_ENFORCE[A-Z_]{0,9}|PADDLE_THROW)\(.[^,\);]*.[^;]*\);\s" || true)
314320
VALID_PADDLE_CHECK=$(echo "$ALL_PADDLE_CHECK" | grep -zoE '(PADDLE_ENFORCE[A-Z_]{0,9}|PADDLE_THROW)\(([^,;]+,)*[^";]*errors::.[^"]*".[^";]{20,}.[^;]*\);\s' || true)

ci/kunlun_test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,10 @@ set +x
159159
git clone --depth 1000 https://gitee.com/paddlepaddle/PaddleX.git
160160
cd PaddleX
161161
pip install -e .
162+
pip install numpy==1.24.4 pypdfium2
162163

163164
#install paddle x dependency
164-
paddlex --install PaddleClas
165+
paddlex --install PaddleClas -y
165166

166167
#download paddle dataset
167168
wget -q https://paddle-model-ecology.bj.bcebos.com/paddlex/data/cls_flowers_examples.tar -P ./dataset

cmake/cinn.cmake

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,21 @@ else()
2626
endif()
2727

2828
if(NOT DEFINED ENV{runtime_include_dir})
29-
message(
30-
STATUS
31-
"set runtime_include_dir: ${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/cuda")
32-
set(ENV{runtime_include_dir} "${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/cuda")
33-
add_definitions(
34-
-DRUNTIME_INCLUDE_DIR="${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/cuda")
29+
if(WITH_GPU)
30+
message(
31+
STATUS
32+
"set runtime_include_dir: ${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/cuda")
33+
set(ENV{runtime_include_dir} "${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/cuda")
34+
add_definitions(
35+
-DRUNTIME_INCLUDE_DIR="${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/cuda")
36+
elseif(WITH_ROCM)
37+
message(
38+
STATUS
39+
"set runtime_include_dir: ${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/hip")
40+
set(ENV{runtime_include_dir} "${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/hip")
41+
add_definitions(
42+
-DRUNTIME_INCLUDE_DIR="${CMAKE_SOURCE_DIR}/paddle/cinn/runtime/hip")
43+
endif()
3544
endif()
3645

3746
if(WITH_TESTING)
@@ -118,6 +127,10 @@ if(WITH_ROCM)
118127
add_definitions(-DCINN_WITH_HIP)
119128
endif()
120129
link_libraries(${ROCM_HIPRTC_LIB})
130+
131+
message(
132+
STATUS "copy paddle/cinn/common/float16.h to $ENV{runtime_include_dir}")
133+
file(COPY paddle/cinn/common/float16.h DESTINATION $ENV{runtime_include_dir})
121134
endif()
122135

123136
set(cinnapi_src CACHE INTERNAL "" FORCE)

doc/README_cn.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 致读者和开发者
2+
感谢您阅读 PaddlePaddle 文档。
3+
4+
**2018年9月17日** 起,**0.15.0 及 develop** 分支的文档源码已迁移至 [FluidDoc Repo](https://github.com/PaddlePaddle/FluidDoc) 仓库 ,并将在该仓库中持续更新。
5+
6+
请前往 FluidDoc 仓库获取最新文档。

paddle/cinn/backends/codegen_device_util.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ ir::Module CreateSwitchWithBroadcastConditionModule(
4444
ir::Argument(kernel_args, ir::Argument::IO::kOutput),
4545
ir::Argument(kernel_args_num, ir::Argument::IO::kInput),
4646
ir::Argument(tensor_shape_args, ir::Argument::IO::kOutput)};
47-
4847
const auto &symbolic_arg_define = [&]() -> std::vector<ir::Expr> {
4948
std::vector<ir::Expr> arg_defs;
5049
for (const auto &item : symbolic_shape_var_index) {
5150
ir::Expr call_get_value_in_kernel_args =
5251
ir::Call::Make(Int(64),
53-
runtime::intrinsic::get_value_in_cuda_kernel_args,
52+
runtime::intrinsic::get_value_in_kernel_args,
5453
{kernel_args, ir::Expr(item.first)},
5554
{},
5655
ir::CallType::Extern,
@@ -384,7 +383,7 @@ void detail::CollectBucketStrategyHostFunctionVisitor::ProcessArgs(
384383
if (args[i].is_var()) {
385384
ir::Expr call_get_value_in_kernel_args =
386385
ir::Call::Make(Int(64),
387-
runtime::intrinsic::get_value_in_cuda_kernel_args,
386+
runtime::intrinsic::get_value_in_kernel_args,
388387
{kernel_args_, ir::Expr(i)},
389388
{},
390389
ir::CallType::Extern,

paddle/cinn/backends/codegen_invoke_module.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class CodeGenSwitchHost : public CodeGenInvokeModule {
6868
: CodeGenInvokeModule(m, b, vars) {}
6969
// only support call of args get function and inner case host function call
7070
llvm::Value *Visit(const ir::Call *op) override {
71-
if (op->name == runtime::intrinsic::get_value_in_cuda_kernel_args) {
71+
if (op->name == runtime::intrinsic::get_value_in_kernel_args) {
7272
return CodeGenLLVM::Visit(op);
7373
} else {
7474
return LowerInnerCaseCall(op);

paddle/cinn/backends/hip/codegen_hip_dev.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ namespace backends {
1919
namespace hip {
2020

2121
const std::string CodeGenHipDevice::source_header_ = // NOLINT
22-
R"(#include "cinn_hip_runtime_source.h"
22+
R"(#define CINN_WITH_HIP
23+
#include "float16.h"
24+
using cinn::common::float16;
25+
#include "cinn_hip_runtime_source.h"
2326
)";
2427

2528
const std::string &CodeGenHipDevice::GetSourceHeader() {

0 commit comments

Comments
 (0)