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

[CK_TILE] Add EnvLogging and missing gemm args checks #1896

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

aledudek
Copy link
Contributor

Proposed changes

Please describe the motivation behind the pull request, whether it enables a new feature or fixes a bug. If there are associated pull requests or issues, please link them to the pull request.

Checklist

Please put an x into the boxes that apply. You can also fill these out after creating the PR. If you're not sure, please don't hesitate to ask.

  • I have added tests relevant to the introduced functionality, and the unit tests are passing locally
  • I have added the test to REGRESSION_TESTS list defined at the top of CMakeLists.txt in tests/CMakeLists.txt, IF the test takes more than 30 seconds to run.
  • I have added inline documentation which enables the maintainers with understanding the motivation
  • I have removed the stale documentation which is no longer relevant after this pull request
  • (If this change is user-facing) I have added release notes which provide the end users with a brief summary of the improvement from this pull request
  • I have run clang-format on all changed files
  • Any dependent changes have been merged

Discussion

If this is a relatively large or complex change, feel free to start a discussion by explaining why you chose the solution you did and what alternatives you considered

Copy link
Collaborator

@aosewski aosewski left a comment

Choose a reason for hiding this comment

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

Small thing to fix. Other than that looks good!

};
} // end namespace internal

// static inside function hides the variable and provides
Copy link
Contributor

@mozga-amd mozga-amd Feb 20, 2025

Choose a reason for hiding this comment

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

static -> Static... here, other. UpperCase at the beginning

}
}

if(value_env_str == "disable" || value_env_str == "disabled" || value_env_str == "0" ||
Copy link
Contributor

@mozga-amd mozga-amd Feb 21, 2025

Choose a reason for hiding this comment

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

Either:
What do you think about turning these strings into a map, an enum, or another structure… to avoid explicitly listing the arguments here?

Or:
To avoid explicitly listing arguments separated by ||, you can use ck_tile::is_any_of.

Or:
std::any_of and static constexpr const char* array[]

Here and below

throw std::runtime_error("Invalid value for env variable");
}

return false; // shouldn't reach here
Copy link
Contributor

@mozga-amd mozga-amd Feb 21, 2025

Choose a reason for hiding this comment

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

The comment seems to be unnecessary?

std::cerr << "N is not a multiple of vector load size for C tensor!" << std::endl;
if(ck_tile::EnvIsEnabled(CK_TILE_ENV(CK_TILE_LOGGING)))
{
std::cerr << "N is not a multiple of vector load size for C tensor!"
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it could be fine to add FAILED, WARNING? at the beginning?

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