Skip to content

Hip kernel fix#1178

Merged
reyna-abhyankar merged 5 commits intoflexflow:repo-refactorfrom
reyna-abhyankar:hip-kernel-fix
Jan 17, 2024
Merged

Hip kernel fix#1178
reyna-abhyankar merged 5 commits intoflexflow:repo-refactorfrom
reyna-abhyankar:hip-kernel-fix

Conversation

@reyna-abhyankar
Copy link
Collaborator

@reyna-abhyankar reyna-abhyankar commented Oct 7, 2023

Description of changes:

Fix hip kernels for recently merged operators

Related Issues:

Linked Issues:

  • Issue #

Issues closed by this PR:

  • Closes #

This change is Reviewable

Copy link
Collaborator

@lockshaw lockshaw left a comment

Choose a reason for hiding this comment

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

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @lambda7xx and @reyna-abhyankar)


lib/kernels/src/hip/combine_kernels.cpp line 58 at r1 (raw file):

                    GenericTensorAccessorR const &input,
                    GenericTensorAccessorW const &output,
                    DataType data_type) {

Is this necessary, or can you get the data type from GenericTensorAccessor?


lib/kernels/src/hip/concat_kernels.cpp line 42 at r1 (raw file):

                    GenericTensorAccessorW const &output,
                    std::vector<GenericTensorAccessorR> const &inputs,
                    int num_inputs,

This can just be derived from inputs.size()


lib/kernels/src/hip/concat_kernels.cpp line 43 at r1 (raw file):

                    std::vector<GenericTensorAccessorR> const &inputs,
                    int num_inputs,
                    ff_dim_t legion_axis) {

Uh, if this is an ff_dim_t why is it called legion_axis? Shouldn't it probably just be axis (no ff needed as it's in the type)


lib/kernels/src/hip/concat_kernels.cpp line 77 at r1 (raw file):

  assert(num_inputs <= MAX_NUM_INPUTS);
  ArrayShape shape = output_grad.shape;
  calc_blk_size(num_blocks, output_blk_size, shape, legion_axis);

Suggestion:

  calc_blk_size(num_blocks, output_blk_size, output_grad.shape, legion_axis);

@reyna-abhyankar reyna-abhyankar marked this pull request as draft November 1, 2023 18:08
@reyna-abhyankar reyna-abhyankar marked this pull request as ready for review January 1, 2024 20:17
Copy link
Collaborator

@lockshaw lockshaw left a comment

Choose a reason for hiding this comment

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

Reviewed 8 of 8 files at r2, all commit messages.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @lambda7xx and @reyna-abhyankar)

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