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

Support static graph code-gen for bincount #54686

Merged
merged 6 commits into from
Jun 26, 2023
Merged

Conversation

sanbuphy
Copy link
Contributor

PR types

Others

PR changes

Others

Description

#53267

@paddle-bot
Copy link

paddle-bot bot commented Jun 15, 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.

@paddle-bot paddle-bot bot added contributor External developers status: proposed labels Jun 15, 2023
@sanbuphy
Copy link
Contributor Author

@heavyrain-lzy 麻烦研发大哥看看

scalar:
minlength:
data_type : int
support_tensor : true
Copy link
Contributor

Choose a reason for hiding this comment

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

由于GetExpectedKernelType特殊,建议修改如下:

  1. 这里配置:
  get_expected_kernel_type :
    bincount : GetBincountExpectedKernelType
  1. paddle/fluid/operators/generator/get_expected_kernel_func.cc增加函数:
phi::KernelKey GetBincountExpectedKernelType(
      const framework::ExecutionContext &ctx,
      const framework::OperatorWithKernel* op_ptr) {
    auto data_type =
        ctx.HasInput("Weights")
            ? op_ptr->IndicateVarDataType(ctx, "Weights")
            : op_ptr->IndicateVarDataType(ctx, "X");
    return phi::KernelKey(data_type, ctx.device_context().GetPlace());
}
  1. paddle/fluid/operators/generator/get_expected_kernel_func.h添加d对应函数声明:
phi::KernelKey GetBincountExpectedKernelType(
      const framework::ExecutionContext &ctx,
      const framework::OperatorWithKernel* op_ptr);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

GetExpectedKernelType

感谢研发大哥,请问是怎么的出“GetExpectedKernelType”的结论的呢?我可以怎么调试复线知道要调整这个地方

Copy link
Contributor

Choose a reason for hiding this comment

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

GetExpectedKernelType

感谢研发大哥,请问是怎么的出“GetExpectedKernelType”的结论的呢?我可以怎么调试复线知道要调整这个地方

目前

kernel :
  data_type : 

中的data_type仅仅允许配置根据输入tensor,如data_type : x或者一个DataType类型的attribute如data_type : dtype,或者二者的结合data_type : dtype > x。不支持两个tensor优先级配置配置,如data_type : weights > x

@sanbuphy sanbuphy requested a review from heavyrain-lzy June 16, 2023 01:51
@heavyrain-lzy
Copy link
Contributor

rerun一下coverage,貌似随机挂

@heavyrain-lzy
Copy link
Contributor

如果多次rerun均失败,请comment

@sanbuphy
Copy link
Contributor Author

如果多次rerun均失败,请comment

多次return 仍然失败

@heavyrain-lzy
Copy link
Contributor

如果多次rerun均失败,请comment

多次return 仍然失败

但是coverage是在环境准备阶段就失败了,感觉不是代码的问题。建议重新提交一个commit,将所有的CI都重新触发一下。非常感谢您的贡献!

@sanbuphy
Copy link
Contributor Author

如果多次rerun均失败,请comment

多次return 仍然失败

但是coverage是在环境准备阶段就失败了,感觉不是代码的问题。建议重新提交一个commit,将所有的CI都重新触发一下。非常感谢您的贡献!

收到,已return所有Ci

@sanbuphy
Copy link
Contributor Author

如果多次rerun均失败,请comment

多次return 仍然失败

但是coverage是在环境准备阶段就失败了,感觉不是代码的问题。建议重新提交一个commit,将所有的CI都重新触发一下。非常感谢您的贡献!

还是挂coverage

@heavyrain-lzy
Copy link
Contributor

如果多次rerun均失败,请comment

多次return 仍然失败

但是coverage是在环境准备阶段就失败了,感觉不是代码的问题。建议重新提交一个commit,将所有的CI都重新触发一下。非常感谢您的贡献!

还是挂coverage

现在rerun一下,已经把test_trt_convert_gelu禁掉

@sanbuphy
Copy link
Contributor Author

@heavyrain-lzy 现在应该没问题了

Copy link
Contributor

@heavyrain-lzy heavyrain-lzy left a comment

Choose a reason for hiding this comment

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

LGTM

@luotao1 luotao1 merged commit b547c4a into PaddlePaddle:develop Jun 26, 2023
@sanbuphy sanbuphy deleted the binop branch June 26, 2023 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants