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

[HOTFIX] Remove duplicated group divide when calculation k per group (SWDEV-291574) #989

Merged
merged 1 commit into from
Jun 20, 2021

Conversation

carlushuang
Copy link
Contributor

@carlushuang carlushuang commented Jun 19, 2021

This resolve SWDEV-291574 issue by removing the duplicated group divide while calculating k_per_block, since k already divided by group in above L796.

After this fix, the original problematic config ./bin/MIOpenDriver convfp16 -n 64 -c 256 -H 56 -W 56 -k 256 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 32 -F 2 -t 1 should not be valid for this asm solver, since c_per_bloc = 256/32 = 8, k_per_bloc = 256/32 = 8, this is too small for NCHW asm igemm to support (NCHW fp16 does not support pack c or k)

Beside, if reduce group size to like 2, 4, 8, 16, the solver can successfully calculate the result.
./bin/MIOpenDriver convfp16 -n 64 -c 256 -H 56 -W 56 -k 256 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 4 -F 2 -t 1
./bin/MIOpenDriver convfp16 -n 64 -c 256 -H 56 -W 56 -k 256 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 8 -F 2 -t 1
./bin/MIOpenDriver convfp16 -n 64 -c 256 -H 56 -W 56 -k 256 -y 3 -x 3 -p 1 -q 1 -u 1 -v 1 -l 1 -j 1 -m conv -g 16 -F 2 -t 1

@atamazov atamazov added this to the ROCm 4.3 milestone Jun 19, 2021
@atamazov atamazov changed the title [fix SWDEV-291574] remove duplicated group divide when calculation k per group [HOTFIX][SWDEV-291574] Remove duplicated group divide when calculation k per group Jun 19, 2021
Copy link
Contributor

@atamazov atamazov left a comment

Choose a reason for hiding this comment

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

LGTM!

@atamazov atamazov changed the title [HOTFIX][SWDEV-291574] Remove duplicated group divide when calculation k per group [HOTFIX] Remove duplicated group divide when calculation k per group (SWDEV-291574) Jun 19, 2021
@atamazov
Copy link
Contributor

Regression test is missing. I am not going to delay merging this PR (and cherry-picking it to 4.3), for the sake of speed. But if this PR does not contain a regression test, then I'll open a high priority ticket for this.

Copy link
Contributor

@atamazov atamazov left a comment

Choose a reason for hiding this comment

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

Conditionally approved

@codecov

This comment has been minimized.

Copy link
Contributor

@junliume junliume left a comment

Choose a reason for hiding this comment

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

Agree with @atamazov CI test should be completed in another PR which can combine with #987

@atamazov atamazov merged commit 2d50c69 into develop Jun 20, 2021
atamazov pushed a commit that referenced this pull request Jun 20, 2021
@atamazov atamazov deleted the fix_swdev_291574 branch June 23, 2021 13:17
atamazov pushed a commit that referenced this pull request Jul 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants