Skip to content

[NNPA] Update configurations for test cases of backend test for dynamic dimensions #2831

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

Merged
merged 10 commits into from
Jun 12, 2024

Conversation

imaihal
Copy link
Collaborator

@imaihal imaihal commented May 21, 2024

As written in issue #2817, some backend tests with dynamic shapes for NNPA was disabled by usingNO_DYNAMIC_SHAPE_TEST flag.
This PR enables some of them by fixing legality check and using --dimParam option. There are still test cases with NO_DYNAMIC_SHAPE_TEST.

Enabled 22 test cases in dynamic backend tests. (test cases with NO_DYNAMIC_SHAPE_TEST from 30 to 8)

@imaihal imaihal requested review from negiyas and tungld May 22, 2024 01:25
@@ -103,7 +103,8 @@ bool checkLegalityPoolOpsCommon(POOLOP op, Value Y) {
// Check "MaxPool2D/AvgPool2D Parameter Restrictions". These restrictions are
// described in "zDNN API Reference". Input tensor N(batchNum) and C(Channel)
// dimensions must always match the output tensor's respective dimensions.
if (shapeInput[0] != shapeOutput[0] || shapeInput[1] != shapeOutput[1])
if ((inputType.hasStaticShape() && outputType.hasStaticShape()) &&
(shapeInput[0] != shapeOutput[0] || shapeInput[1] != shapeOutput[1]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we use DimAnalysis to check dynamic dims here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done. Thanks!

test_globalaveragepool_cpu,zdnn_meanreduce2d,NO_DYNAMIC_SHAPE_TEST
test_globalaveragepool_precomputed_cpu,zdnn_meanreduce2d,NO_DYNAMIC_SHAPE_TEST
test_globalaveragepool_cpu,zdnn_meanreduce2d,NO_DYNAMIC_SHAPE_TEST # Height and Width dimension must be static dimension.
test_globalaveragepool_precomputed_cpu,zdnn_meanreduce2d,NO_DYNAMIC_SHAPE_TEST # Height and Width dimension must be static dimension.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comments here look the same as ==LIM==, are they necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed. Thanks.

test_basic_conv_with_padding_cpu,zdnn_conv2d,NO_DYNAMIC_SHAPE_TEST
test_basic_conv_without_padding_cpu,zdnn_conv2d,NO_DYNAMIC_SHAPE_TEST
test_basic_conv_with_padding_cpu,zdnn_conv2d,NO_DYNAMIC_SHAPE_TEST # Height and/or width must be static dimensions.
test_basic_conv_without_padding_cpu,zdnn_conv2d,NO_DYNAMIC_SHAPE_TEST # Height and/or width must be static dimensions.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Comments here look the same as ==LIM==, are they necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed. Thanks.

@imaihal imaihal changed the title [NNPA] Update configurations for test cases of backend test for dynamic dimentions [NNPA] Update configurations for test cases of backend test for dynamic dimensions Jun 5, 2024
@imaihal imaihal requested a review from tungld June 12, 2024 04:57
Copy link
Collaborator

@tungld tungld left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@imaihal imaihal merged commit bddc9e9 into onnx:main Jun 12, 2024
7 checks passed
@imaihal imaihal deleted the backendtest_dynamic branch June 12, 2024 07:25
@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #14960 [push] [NNPA] Update configurat... started at 03:26

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #13985 [push] [NNPA] Update configurat... started at 03:35

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #14955 [push] [NNPA] Update configurat... started at 02:26

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #14955 [push] [NNPA] Update configurat... passed after 1 hr 27 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #14960 [push] [NNPA] Update configurat... passed after 2 hr 10 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #13985 [push] [NNPA] Update configurat... passed after 2 hr 19 min

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.

3 participants