Skip to content

Conversation

@Hongqing-work
Copy link
Contributor

@Hongqing-work Hongqing-work commented Aug 22, 2024

PR Category

CINN

PR Types

New features

Description

Pcard-67164
This PR support input dynamic dim specification.
More information about this can be found in PR67384
This json format example:

{
    "batch_size": {
        "input_bind": [
            ["input_ids", 0],
            ["attention_mask", 0],
            ["position_ids", 0]
        ],
        "min": 2
    },
    "sequence_length": {
        "input_bind": [
            ["input_ids", 1],
            ["attention_mask", 1],
            ["position_ids", 1]
        ],
        "max": 128
    }
}

@paddle-bot
Copy link

paddle-bot bot commented Aug 22, 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.

@Hongqing-work Hongqing-work changed the title [CINN]Add inference config for input shape constraint [CINN]Apply input dynamic dim specification Aug 29, 2024
@Hongqing-work Hongqing-work marked this pull request as ready for review August 29, 2024 02:38
Comment on lines +1107 to +1117
/*
* CINN related FLAG
* Name: FLAGS_cinn_specify_input_dynamic_dim
* Since Version: develop
* Value Range: bool, default=false
* Example: FLAGS_cinn_specify_input_dynamic_dim=true will use file set by
* FLAGS_cinn_input_dynamic_dim_spec_file to specify input dynamic dimention.
*/
PHI_DEFINE_EXPORTED_bool(cinn_specify_input_dynamic_dim,
false,
"Whether to specify input dynamic dimention.");
Copy link
Contributor

Choose a reason for hiding this comment

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

这个flag是不可以不用添加?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

之后考虑给path指定默认值,所以这里需要一个直接表明是否开启的开关

Copy link
Contributor

@Aurelius84 Aurelius84 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 flags

/*
* CINN related FLAG
* Name: FLAGS_cinn_input_dynamic_dim_spec_file
* Since Version: develop
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Since Version: develop
* Since Version: 3.0 beta2

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顺带修改

@Hongqing-work Hongqing-work merged commit 22f3066 into PaddlePaddle:develop Aug 31, 2024
@Hongqing-work Hongqing-work deleted the add-shape-config branch September 5, 2024 08: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.

5 participants