Skip to content

Commit 3676902

Browse files
committed
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into develop
2 parents 1514449 + 1ef64dd commit 3676902

File tree

289 files changed

+2401
-1002
lines changed

Some content is hidden

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

289 files changed

+2401
-1002
lines changed

.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: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ jobs:
5353

5454
slice:
5555
name: Slice test
56+
needs: check-bypass
5657
if: ${{ inputs.can-skip != 'true' && needs.check-bypass.outputs.can-skip != 'true' }}
5758
runs-on:
5859
group: slice

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/hlir/dialect/operator/transforms/pd_to_cinn_pass.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -742,9 +742,7 @@ class SplitOpPattern : public pir::OpRewritePattern<paddle::dialect::SplitOp> {
742742
using pir::OpRewritePattern<paddle::dialect::SplitOp>::OpRewritePattern;
743743

744744
bool Match(paddle::dialect::SplitOp op) const override {
745-
const bool is_denied = CompatibleInfo::IsDeniedForCinn(*op.operation());
746-
747-
return !is_denied && PatternConstraint(op);
745+
return PatternConstraint(op);
748746
}
749747

750748
void Rewrite(paddle::dialect::SplitOp op,

paddle/cinn/runtime/cpu/host_intrinsics.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,12 @@ inline int64_t FN_INT64(logical_right_shift)(int64_t x, int64_t y) {
280280
}
281281

282282
#undef FN_INT64
283+
284+
int64_t cinn_get_value_in_kernel_args(void* v_args, int idx) {
285+
cinn_pod_value_t* args = static_cast<cinn_pod_value_t*>(v_args);
286+
return args[idx].operator int64_t();
287+
}
288+
283289
} // extern "C"
284290

285291
CINN_REGISTER_HELPER(host_intrinsics) {
@@ -469,5 +475,11 @@ CINN_REGISTER_HELPER(host_intrinsics) {
469475
.AddInputType<int>()
470476
.End();
471477

478+
REGISTER_EXTERN_FUNC_HELPER(cinn_get_value_in_kernel_args, host_target)
479+
.SetRetType<int64_t>()
480+
.AddInputType<void*>() // args
481+
.AddInputType<int>() // index
482+
.End();
483+
472484
return true;
473485
}

paddle/cinn/runtime/cpu/host_intrinsics.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,6 @@ inline float FN_FP32(cbrt)(float x);
121121
inline double FN_FP64(cbrt)(double x);
122122

123123
#undef FN_FP64
124+
125+
int64_t cinn_get_value_in_kernel_args(void* v_args, int idx);
124126
}

0 commit comments

Comments
 (0)