Skip to content

[Inductor Cutlass backend] Development feature flag - #119597

Closed
kadeng wants to merge 13 commits into
gh/kadeng/32/basefrom
gh/kadeng/32/head
Closed

kadeng wants to merge 13 commits into
gh/kadeng/32/basefrom
gh/kadeng/32/head

Conversation

@kadeng

@kadeng kadeng commented Feb 9, 2024 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @muchulee8 @aakhundov @ColinPeppler @amjames

Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Feb 9, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/119597

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 4c8816f with merge base 86063b4 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
@kadeng kadeng added topic: not user facing topic category and removed release notes: fx release notes category labels Feb 27, 2024
@kadeng
kadeng marked this pull request as ready for review February 27, 2024 10:44
Introducing a feature flag for development purposes, which allows
to disable the CUTLASS backend entirely.

This flag is not intended to be used by users, it is for development
purposes to ensure a working codebase when features are incrementally
added over the course of multiple commits / PRs and it cannot
be ensured that the cutlass backend is functional in-between
incremental commits.

To disable the cutlass backend, set the private variable
cutlass_utils._DISABLE_CUTLASS_BACKEND to True

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 muchulee8 aakhundov ColinPeppler amjames

[ghstack-poisoned]

# This is a feature flag. If _DISABLE_CUTLASS_BACKEND is set to true,
# then the CUDA / CUTLASS backend is entirely disabled, including it's unit tests
_DISABLE_CUTLASS_BACKEND = False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lets use torch._inductor.config for this.

@kadeng kadeng Mar 5, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't think we should do that, for the following reasons:

  • This is not intended as config setting that may be changed.
  • It's a constant to disable experimental or partially implemented features so I can split the PR into multiple parts.
  • If I would make this a config option, the expectation would be that it's permissible to change it.
  • It would become part of the public interface, so I can't just remove it later.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree that the flag is confusing. My impression is that the main purpose of having this flag is splitting the PRs in this stack? How much sense does this flag make after you PRs are landed? Are you going to remove this flag in one of the PRs in the stack, as it's no longer relevant? If so, maybe simply disable some of the unit tests in the middle of the stack (when they are not supposed to pass) and enable back in a subsequent PR, to achieve what you want?

@kadeng kadeng Mar 5, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

You got that correctly, it's for splitting the PR. Yes, I can remove it afterwards if you prefer. I would have to remove all references to it, though, which are quite a few, so I would create a separate PR for that.

I'm not just disabling tests but rather the entire backend such that it's not possible to get to a functionally broken state just by leaving out some of the later PRs. When I split the PR, it also means the changes are not applied atomically ( e.g. all together or none at all) anymore.

All of that said, @jansel if you insist I can make it a public config option. I consider it a minor detail.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@jansel if the flag will be removed after all the PRs land, would it be acceptable to keep it around in-between?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's actually split the PR into logical chunks (each with their own set of tests).

Splitting the tests from the code they are testing is kind of defeating the point of splitting up the PR.

I also want CI the be running on this code. So we should have tests that patch this flag enabled and run it.

@kadeng
kadeng requested a review from jansel March 5, 2024 15:52

@jansel jansel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

See comments.

@kadeng

kadeng commented Mar 11, 2024

Copy link
Copy Markdown
Contributor Author

Closing. The PR stack is being restructured here: #121492

@kadeng kadeng closed this Mar 11, 2024
@github-actions
github-actions Bot deleted the gh/kadeng/32/head branch April 11, 2024 02:03
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