-
Notifications
You must be signed in to change notification settings - Fork 639
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
[LLVMGPU] Enable scf.forall distr. on vectorDistribute Pipeline #19420
base: main
Are you sure you want to change the base?
Conversation
f6c10c5
to
6719bb3
Compare
f96b601
to
f442fdf
Compare
502f954
to
7267b8b
Compare
f06be62
to
08aa578
Compare
f4b62d0
to
651af59
Compare
bc4deee
to
44709eb
Compare
44709eb
to
d5f856a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems a bit strange that the vector sizes have changed in vector distribute and some of the read/writes from global to shared memory have disappeared in tile and fuse. Do you know what caused these differences?
// CHECK-DAG: %[[LHS_RD:.+]] = vector.transfer_read %[[B0]]{{.*}} vector<1xf16> | ||
// CHECK-DAG: vector.transfer_write %[[LHS_RD]] | ||
// Note that to simplify the test we are not showing the mapping of the RHS_RD | ||
// to its buffer as it goes through an scf.if/else control structure | ||
// involving allocas. | ||
// CHECK-DAG: %[[RHS_RD:.+]] = vector.transfer_read {{.*}} vector<1xf16> | ||
// CHECK-DAG: vector.transfer_write %[[RHS_RD]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happened to these reads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These happen if the tensor.extract_slices are pushed up in the block. Buffer optimization is kicking in.
// CHECK-DAG: %[[LHS_RD:.+]] = vector.transfer_read {{.*}} vector<4xf32> | ||
// CHECK-DAG: vector.transfer_write %[[LHS_RD]] | ||
// CHECK-DAG: %[[RHS_RD:.+]] = vector.transfer_read {{.*}} vector<1xf32> | ||
// CHECK-DAG: vector.transfer_write %[[RHS_RD]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
// CHECK-SAME: -> (vector<1x1x1xf32>, vector<1x1x1xf32>, vector<1x2x1x4x1x4xf32>) | ||
// CHECK-COUNT-24: amdgpu.mfma {{.*}} {blocks = 1 : i32, k = 8 : i32, m = 32 : i32, n = 32 : i32} blgp = none : vector<4xf16>, vector<4xf16>, vector<16xf32> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why has the number of mfmas changed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The distribution now happens on tile sizes of any length (previously, it was limited to 3). That's why there is a change in count.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there are 3 separate things happening here. Can you split out the 3 commit into separate PRs (The workgroup reordering, slice optimization, and forall distribution enablement)?
Enables
scf.forall
distribution on the vector distribute pipeline.