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

refactor 2d inner reduction heuristics #3333

Merged
merged 8 commits into from
Nov 11, 2024

Conversation

liqiangxl
Copy link
Collaborator

Following #3331
refactor 2d inner reduction heuristics, prepare for further heuristics tunning.

@liqiangxl
Copy link
Collaborator Author

!build

@liqiangxl
Copy link
Collaborator Author

!test --diff --diff-bench

@liqiangxl liqiangxl requested a review from jjsjann123 November 6, 2024 13:35
@liqiangxl liqiangxl marked this pull request as ready for review November 6, 2024 13:36
@jjsjann123
Copy link
Collaborator

Following #3331 refactor 2d inner reduction heuristics, prepare for further heuristics tunning.

should the target of this one be llu/clean_2d_inner_reduction_heuristics instead? That'll make review easier.

@liqiangxl
Copy link
Collaborator Author

!test --diff --diff-bench

@liqiangxl
Copy link
Collaborator Author

Following #3331 refactor 2d inner reduction heuristics, prepare for further heuristics tunning.

should the target of this one be llu/clean_2d_inner_reduction_heuristics instead? That'll make review easier.

Yes, clean_2d_inner_reduction_heuristics is merged into main and this PR is then rebased on main. It is ready for review.

Copy link
Collaborator

@jjsjann123 jjsjann123 left a comment

Choose a reason for hiding this comment

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

LGTM, one small question on code change.

// Max vectorization factor
int64_t vect_factor = std::min(
scheduler_utils::lastPow2(max_unroll), (int64_t)max_vectorize_factor);
int64_t after_vect = total_reduction_numel / vect_factor;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was a ceilDiv earlier.
Is it an intended change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, vect_factor was derived from inner most dim, total_reduction_numel must be disivible by vect_factor

@liqiangxl liqiangxl merged commit ca3bac1 into main Nov 11, 2024
62 of 64 checks passed
@liqiangxl liqiangxl deleted the llu/refactor_2d_inner_reduction_heuristics branch November 11, 2024 14:23
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