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

[PIR] Add Op output type check for CSE #64656

Merged

Conversation

SigureMo
Copy link
Member

@SigureMo SigureMo commented May 28, 2024

PR Category

Execute Infrastructure

PR Types

Bug fixes

Description

CSE 的 equal 判断里添加了对 OP 输出 type 的检查

如下所示,这些 assign_value attributes 都是一样的,但是输出 type 不一样,按理说正常组网 infermeta 是不会出现这种情况,这个模型是 PT 转换得来,可能是 PT 或者老 IR 组网的时候哪里有 trick 对输出 type 进行了重新 set

    (%1892) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<1xf32>
    (%1893) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<2000xi64>
    (%1894) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<1xf32>
    (%1895) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1xi32>
    (%1896) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x10xf32>
    (%1897) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<1xi64>
    (%1898) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x5xf32>
    (%1899) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x5xf32>
    (%1900) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x5xf32>
    (%1901) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x5xf32>
    (%1902) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x5xf32>
    (%1903) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x9xf32>
    (%1904) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x9xf32>
    (%1905) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x9xf32>
    (%1906) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x9xf32>
    (%1907) = "pd_op.assign_value" () {dtype:(pd_op.DataType)float32,persistable:[false],place:(pd_op.Place)Place(undefined:0),shape:[(Int32)1],stop_gradient:[false],values:[(Double)1.77113e+27]} : () -> builtin.tensor<-1x9xf32>

PCard-66972

Copy link

paddle-bot bot commented May 28, 2024

你的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.

@yuanlehome yuanlehome merged commit 07f1d35 into PaddlePaddle:develop May 29, 2024
32 checks passed
@SigureMo SigureMo deleted the pir/add-op-output-check-for-cse branch May 29, 2024 02:24
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.

2 participants