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

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues. #18825

Closed
wants to merge 1 commit into from

Conversation

sergachev
Copy link
Contributor

No description provided.

copybara-service bot pushed a commit that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR #18825

Copybara import of the project:

--
2c9840f by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18825 from openxla:gemm_fusion_effective_parameters 2c9840f
PiperOrigin-RevId: 691406714
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR openxla/xla#18825

Copybara import of the project:

--
2c9840fb8e499db7510b7847cc12c45e6c2eeaee by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18825 from openxla:gemm_fusion_effective_parameters 2c9840fb8e499db7510b7847cc12c45e6c2eeaee
PiperOrigin-RevId: 691406714
copybara-service bot pushed a commit that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR #18825

Copybara import of the project:

--
2c9840f by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18825 from openxla:gemm_fusion_effective_parameters 2c9840f
PiperOrigin-RevId: 691406714
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR openxla/xla#18825

Copybara import of the project:

--
2c9840fb8e499db7510b7847cc12c45e6c2eeaee by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18825 from openxla:gemm_fusion_effective_parameters 2c9840fb8e499db7510b7847cc12c45e6c2eeaee
PiperOrigin-RevId: 691406714
copybara-service bot pushed a commit that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR #18825

Copybara import of the project:

--
2c9840f by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18825 from openxla:gemm_fusion_effective_parameters 2c9840f
PiperOrigin-RevId: 691406714
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR openxla/xla#18825

Copybara import of the project:

--
2c9840fb8e499db7510b7847cc12c45e6c2eeaee by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18825 from openxla:gemm_fusion_effective_parameters 2c9840fb8e499db7510b7847cc12c45e6c2eeaee
PiperOrigin-RevId: 691406714
copybara-service bot pushed a commit that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR #18825

Copybara import of the project:

--
2c9840f by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18825 from openxla:gemm_fusion_effective_parameters 2c9840f
PiperOrigin-RevId: 691406714
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 30, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR openxla/xla#18825

Copybara import of the project:

--
2c9840fb8e499db7510b7847cc12c45e6c2eeaee by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18825 from openxla:gemm_fusion_effective_parameters 2c9840fb8e499db7510b7847cc12c45e6c2eeaee
PiperOrigin-RevId: 691406714
@loislo
Copy link
Member

loislo commented Oct 31, 2024

gemm_fusion_autotuner fails in a few tests

F1030 15:35:52.295284 614 gemm_fusion_autotuner.cc:1041] Non-OK-status: has_executable.status()
Status: FAILED_PRECONDITION: Can not propagate dim orders and requirements.
=== Source Location Trace: ===
[third_party/tensorflow/compiler/xla/util.h:279][third_party/tensorflow/compiler/xla/service/gpu/triton_fusion_analysis.cc:164][third_party/tensorflow/compiler/xla/service/gpu/triton_fusion_analysis.cc:285][third_party/tensorflow/compiler/xla/service/gpu/triton_fusion_analysis.cc:197][third_party/tensorflow/compiler/xla/service/gpu/fusions/triton/triton_fusion_emitter_legacy_matmul.cc:1978][third_party/tensorflow/compiler/xla/service/gpu/fusions/triton/triton_fusion_emitter.cc:1113][third_party/tensorflow/compiler/xla/service/gpu/fusions/triton/triton_fusion_emitter.cc:1170][third_party/tensorflow/compiler/xla/service/gpu/fusions/triton.cc:105][third_party/tensorflow/compiler/xla/service/gpu/fusions/triton.cc:137][third_party/tensorflow/compiler/xla/service/gpu/fusions/triton.cc:212][third_party/tensorflow/compiler/xla/service/gpu/ir_emitter_unnested.cc:1505][third_party/tensorflow/compiler/xla/service/gpu/ir_emitter_unnested.cc:2942][third_party/tensorflow/compiler/xla/service/gpu/compile_module_to_llvm_ir.cc:256][third_party/tensorflow/compiler/xla/service/gpu/gpu_compiler.cc:2250][third_party/tensorflow/compiler/xla/service/gpu/gpu_compiler.cc:2366][third_party/tensorflow/compiler/xla/service/gpu/autotuning/gemm_fusion_autotuner.cc:974]Failure occured when compiling fusion gemm_fusion_dot.1811 with config '{block_m:64,block_n:16,block_k:32,split_k:16,num_stages:1,num_warps:4,num_ctas:1}'

@sergachev
Copy link
Contributor Author

Which ones? gemm_fusion_autotuner_test and xla/service/gpu/fusions/triton/... pass.

@loislo
Copy link
Member

loislo commented Oct 31, 2024

Which ones? gemm_fusion_autotuner_test and xla/service/gpu/fusions/triton/... pass.

it is an internal test

@sergachev
Copy link
Contributor Author

I didn't guess yet what's the reason. Could you share the HLO of the failing fusion? Or maybe just its epilogue without shapes?

@loislo
Copy link
Member

loislo commented Oct 31, 2024

I didn't guess yet what's the reason. Could you share the HLO of the failing fusion? Or maybe just its epilogue without shapes?

The HLO has
dot = dot(param_0, param_1)
bitcast = bitcast(dot)
transpose = transpose(bitcast)
convert = convert(transpose)
param_2 = param(2)
bitcast_2 = bitcast(param_2)
broadcast = broadcast(bitcast_2)
convert_2 = convert(broadcast)
multiply = multiply(convert, convert_2)
ROOT convert_3 = convert(multiply)

@sergachev
Copy link
Contributor Author

#19112 was merged, hopefully the problem you've seen got resolved. Please try to test / submit this one again.

copybara-service bot pushed a commit that referenced this pull request Nov 15, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR #18825

Copybara import of the project:

--
37dc0d2 by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18825 from openxla:gemm_fusion_effective_parameters 37dc0d2
PiperOrigin-RevId: 696815211
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Nov 15, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR openxla/xla#18825

Copybara import of the project:

--
37dc0d2f706bf681b1eff2088eb8d1000abf79b8 by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18825 from openxla:gemm_fusion_effective_parameters 37dc0d2f706bf681b1eff2088eb8d1000abf79b8
PiperOrigin-RevId: 696815211
copybara-service bot pushed a commit that referenced this pull request Nov 15, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR #18825

Copybara import of the project:

--
37dc0d2 by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18825 from openxla:gemm_fusion_effective_parameters 37dc0d2
PiperOrigin-RevId: 696815211
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Nov 15, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR openxla/xla#18825

Copybara import of the project:

--
37dc0d2f706bf681b1eff2088eb8d1000abf79b8 by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18825 from openxla:gemm_fusion_effective_parameters 37dc0d2f706bf681b1eff2088eb8d1000abf79b8
PiperOrigin-RevId: 696815211
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Nov 15, 2024
…eir broadcasts in the epilogues.

Imported from GitHub PR openxla/xla#18825

Copybara import of the project:

--
37dc0d2f706bf681b1eff2088eb8d1000abf79b8 by Ilia Sergachev <isergachev@nvidia.com>:

[GPU] GEMM fusions: let fusing effective parameters and their broadcasts in the epilogues.

Merging this change closes #18825

PiperOrigin-RevId: 696963468
@sergachev sergachev deleted the gemm_fusion_effective_parameters branch November 15, 2024 20:44
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