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

[XLA:GPU] propagate the algorithm flag of dot op to cublasGemm custom call. #17595

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

copybara-service[bot]
Copy link

@copybara-service copybara-service bot commented Sep 25, 2024

[XLA:GPU] propagate the algorithm flag of dot op to cublasGemm custom call.

we have the algorithm flag of dot op. we handle it in triton emitter, now let's push it to cublas via gemm_rewriter. Otherwise the cublas call uses the default f32_f32_f32 algorithm and loses the competition with triton.

As a result of this change it get clear that only Ampere ran bf16 version of cublas kernel. Hopper uses tf32 for that because it does not have the b16 version for this case.

DotBF16ForBf16Bf16F32Tests was removed because the algorithm BF16_BF16_F32 expects F32 input and F32 output with the BF16 arithmetics inside cublas.

@copybara-service copybara-service bot force-pushed the test_678604330 branch 2 times, most recently from e6af262 to a965de6 Compare September 25, 2024 14:21
@copybara-service copybara-service bot changed the title [XLA:GPU] propagate algorithm to cublas [XLA:GPU] we have the algorithm flag of dot op. we handle it in triton emitter, now let's push it to cublas via gemm_rewriter. Sep 25, 2024
@copybara-service copybara-service bot changed the title [XLA:GPU] we have the algorithm flag of dot op. we handle it in triton emitter, now let's push it to cublas via gemm_rewriter. [XLA:GPU] we have the algorithm flag of dot op. we handle it in triton emitter, now let's push it to cublas via gemm_rewriter. Sep 25, 2024
@copybara-service copybara-service bot force-pushed the test_678604330 branch 2 times, most recently from faa4741 to ed0fa94 Compare September 26, 2024 16:37
@copybara-service copybara-service bot changed the title [XLA:GPU] we have the algorithm flag of dot op. we handle it in triton emitter, now let's push it to cublas via gemm_rewriter. [XLA:GPU] propagate the algorithm flag of dot op to cublasGemm custom call. Sep 26, 2024
@copybara-service copybara-service bot force-pushed the test_678604330 branch 10 times, most recently from f988fe1 to a83908c Compare September 27, 2024 14:34
… call.

we have the algorithm flag of dot op. we handle it in triton emitter, now let's push it to cublas via gemm_rewriter. Otherwise the cublas call uses the default f32_f32_f32 algorithm and loses the competition with triton.

As a result of this change it get clear that only Ampere ran bf16 version of cublas kernel. Hopper uses tf32 for that because it does not have the b16 version for this case.

DotBF16ForBf16Bf16F32Tests was removed because the algorithm BF16_BF16_F32 expects F32 input and F32 output with the BF16 arithmetics inside cublas.

PiperOrigin-RevId: 679595014
@copybara-service copybara-service bot merged commit 31b180c into main Sep 27, 2024
@copybara-service copybara-service bot deleted the test_678604330 branch September 27, 2024 15:18
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.

1 participant