Skip to content
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

cinn(dynamic): support run exp sub subgraph with dynamic shape graph #59640

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

6clc
Copy link
Contributor

@6clc 6clc commented Dec 3, 2023

PR types

Others

PR changes

Others

Description

Pcard-78120

  • 修改broadcast的compute,使得output shape和input shape 一致的计算支持动态形状
  • 联调bucket机制,在不进行op schedule、group schedule的情况下可以跑通流程
  • 增加exp sub动态形状的子图单测。单测对应的host kernel和 cuda kernel如下
|| function fn_exp_subtract (kernel_args, kernel_args_num, kernel_stream)
|| {
||   int32 S0 = cinn_get_value_in_cuda_kernel_args(kernel_args, 3)
||   int32 S1 = cinn_get_value_in_cuda_kernel_args(kernel_args, 4)
||   if (true) {
||     cinn_call_cuda_kernel(fn_exp_subtract__COND_true__kernel, kernel_args, kernel_args_num, 1, 1, 1, 1, 1, 1, kernel_stream)
||   }
|| }

cuda kernel

|| function fn_exp_subtract__COND_true__kernel (_var_0, _var_1, _var, S0, S1)
|| {
||   {
||     serial for (i, 0, S0)
||     {
||       serial for (j, 0, 128)
||       {
||         var[i, j] = cinn_nvgpu_exp_fp32(var_0[i, j])
||       }
||     }
||     serial for (i, 0, S1)
||     {
||       serial for (j, 0, 128)
||       {
||         var_1[i, j] = (var[i, j] - var_0[i, j])
||       }
||     }
||   }
|| }

Copy link

paddle-bot bot commented Dec 3, 2023

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link

paddle-bot bot commented Dec 3, 2023

✅ This PR's description meets the template requirements!
Please wait for other CI results.

Copy link
Member

@zhhsplendid zhhsplendid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -0,0 +1,81 @@
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2022 -> 2023

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

收到,下个pr中修改。

Copy link
Contributor

@zhangbo9674 zhangbo9674 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for cinn_instruction

@zhhsplendid zhhsplendid merged commit ab38416 into PaddlePaddle:develop Dec 4, 2023
SigureMo pushed a commit to gouzil/Paddle that referenced this pull request Dec 5, 2023
…addlePaddle#59640)

 修改broadcast的compute,使得output shape和input shape 一致的计算支持动态形状
 联调bucket机制,在不进行op schedule、group schedule的情况下可以跑通流程
 增加exp sub动态形状的子图单测。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants