Skip to content

[Inductor cutlass backend] Experimental extended Cutlass op generator - #119009

Closed
kadeng wants to merge 31 commits into
gh/kadeng/24/basefrom
gh/kadeng/24/head
Closed

kadeng wants to merge 31 commits into
gh/kadeng/24/basefrom
gh/kadeng/24/head

Conversation

@kadeng

@kadeng kadeng commented Feb 2, 2024 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py which imports all symbols from generator.py overrides some functions from that file and reexports everything such that it can be used as a drop-in replacement for generator.py

Test Plan:

  • CI
  • python test/inductor/test_max_autotune.py

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

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Feb 2, 2024 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 3791138 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.

kadeng added 11 commits February 2, 2024 17:33
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
…p generator"

So far we have relied on the "generator.py" from
third_party/cutlass/python/cutlass_library/ to generate Cutlass op
configurations to be tried in autotuning. These op configs are not
sufficient to ensure good performance and dtype coverage in all cases.

This diff introduces an extended variant of that generator.py,
provided both as a source file and as a diff ( so that it may be applied
to future versions of cutlass_library.generator )

Test Plan:
* CI
* python test/inductor/test_max_autotune.py

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

[ghstack-poisoned]
@aakhundov

Copy link
Copy Markdown
Contributor

@kadeng while I understand the motivation, I believe, this will be hard to keep in sync with the upstream CUTLASS generator. Few questions:

  1. What's the scale of the change introduced in the generator_extended.py in this diff compared to the original generator in CUTLASS? Is the whole thing new, or most is copy/pasted and adapted in some small places?

  2. What's the scale of the perf benefit the extended generator brings? Is this benefitting perf across the board or tailored for specific cases?

  3. Instead of adding a whole new extended generator, can we post-process the ops that the original CUTLASS generator returns (e.g., change / filter / duplicate with new attribute values)?

  4. The PR summary mentions the diff, but I don't see it in the changed files: there is only generator_extended.py. Where is the diff?

  5. Is it feasible to upstream the changes in the extended generator to nvidia/cutlass? This way, we won't have to worry about keeping the local and upstream version in sync.

Thanks!

@kadeng

kadeng commented Mar 5, 2024

Copy link
Copy Markdown
Contributor Author

@kadeng while I understand the motivation, I believe, this will be hard to keep in sync with the upstream CUTLASS generator. Few questions:

I agree, that's also why I separated out this change and called it experimental, so we can discuss separately whether we want to keep it.

  1. What's the scale of the change introduced in the generator_extended.py in this diff compared to the original generator in CUTLASS? Is the whole thing new, or most is copy/pasted and adapted in some small places?

It's mostly small changes. It will bring some slight performance improvements for smaller shapes, and these changes were part of the benchmarking in my WP note. A full ablation study has not been done, but the main reason these changes exist is to attempt to overcome Cutlass performance weaknesses ( compared to Triton ) for some shapes where at least one dimension is small ( e.g. < 32 ). I made these changes after some suggestions by Cutlass devs.

  1. What's the scale of the perf benefit the extended generator brings? Is this benefitting perf across the board or tailored for specific cases?

Specific cases, and it's minor. It's mostly to make Cutlass more competitive with Triton for some shapes, but these are usually covered well by Triton as well, so if Cutlass has an edge there, it is usually a small one, if at all.

  1. Instead of adding a whole new extended generator, can we post-process the ops that the original CUTLASS generator returns (e.g., change / filter / duplicate with new attribute values)?

I would consider that less safe than doing it like this.

  1. The PR summary mentions the diff, but I don't see it in the changed files: there is only generator_extended.py. Where is the diff?

That's a remnant from a previous code version. I will update the description. At the moment the generator_extended.py itself works like a runtime patch to cutlass_library.generator by importing all from that package, selectively overriding some functions. That's easier to maintain and read.

  1. Is it feasible to upstream the changes in the extended generator to nvidia/cutlass? This way, we won't have to worry about keeping the local and upstream version in sync.

I agree, that's preferable.

So, to summarize. I would agree that it can make sense to cut out these changes and instead try to get corresponding changes upstreamed in Cutlass itself. Agreed? If yes, I would remove this PR from the stack.

@aakhundov

Copy link
Copy Markdown
Contributor

So, to summarize. I would agree that it can make sense to cut out these changes and instead try to get corresponding changes upstreamed in Cutlass itself. Agreed? If yes, I would remove this PR from the stack.

Given the marginal improvements in special cases, I think, we should not land this and bear the maintenance burden in syncing with upstream CUTLASS changes. Upstreaming to nvidia/cutlass sounds more preferable.

@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/24/head branch April 11, 2024 02:04
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.

2 participants