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

Delete FP8 Scaling Factors in GEMM Rewriter #16841

Closed
wants to merge 1 commit into from

Conversation

philipphack
Copy link
Contributor

Removes the scaling factors of C and D (matrix bias and result) from FP8 Custom Calls created in the GEMM rewriter when their data types are not FP8. See #15795.

@reedwm reedwm self-requested a review September 6, 2024 00:04
@NaiyerRizz NaiyerRizz self-assigned this Sep 6, 2024
Comment on lines 1089 to 1090
one = instr->AddInstruction(
HloInstruction::CreateConstant(LiteralUtil::One(F32)));
Copy link
Member

Choose a reason for hiding this comment

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

Why not unconditionally create this, as was done before? Even before, it's possible this was unused. I worry this may be accidentally used without being initialized in the future.

copybara-service bot pushed a commit that referenced this pull request Sep 27, 2024
Imported from GitHub PR #16841

Removes the scaling factors of C and D (matrix bias and result) from FP8 Custom Calls created in the GEMM rewriter when their data types are not FP8. See #15795.
Copybara import of the project:

--
fd9750f by Philipp Hack <[email protected]>:

Removes superfluous FP8 scaling factors in GEMM rewriter.

Merging this change closes #16841

FUTURE_COPYBARA_INTEGRATE_REVIEW=#16841 from philipphack:u_fp8_scales_xla fd9750f
PiperOrigin-RevId: 679766659
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Sep 27, 2024
Imported from GitHub PR openxla/xla#16841

Removes the scaling factors of C and D (matrix bias and result) from FP8 Custom Calls created in the GEMM rewriter when their data types are not FP8. See openxla/xla#15795.
Copybara import of the project:

--
fd9750fa8474fe72fe641c7b3bc005ff30396e0a by Philipp Hack <[email protected]>:

Removes superfluous FP8 scaling factors in GEMM rewriter.

Merging this change closes #16841

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#16841 from philipphack:u_fp8_scales_xla fd9750fa8474fe72fe641c7b3bc005ff30396e0a
PiperOrigin-RevId: 679766659
copybara-service bot pushed a commit that referenced this pull request Sep 28, 2024
Imported from GitHub PR #16841

Removes the scaling factors of C and D (matrix bias and result) from FP8 Custom Calls created in the GEMM rewriter when their data types are not FP8. See #15795.
Copybara import of the project:

--
fd9750f by Philipp Hack <[email protected]>:

Removes superfluous FP8 scaling factors in GEMM rewriter.

Merging this change closes #16841

FUTURE_COPYBARA_INTEGRATE_REVIEW=#16841 from philipphack:u_fp8_scales_xla fd9750f
PiperOrigin-RevId: 679766659
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Sep 28, 2024
Imported from GitHub PR openxla/xla#16841

Removes the scaling factors of C and D (matrix bias and result) from FP8 Custom Calls created in the GEMM rewriter when their data types are not FP8. See openxla/xla#15795.
Copybara import of the project:

--
fd9750fa8474fe72fe641c7b3bc005ff30396e0a by Philipp Hack <[email protected]>:

Removes superfluous FP8 scaling factors in GEMM rewriter.

Merging this change closes #16841

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#16841 from philipphack:u_fp8_scales_xla fd9750fa8474fe72fe641c7b3bc005ff30396e0a
PiperOrigin-RevId: 679766659
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Sep 28, 2024
Imported from GitHub PR openxla/xla#16841

Removes the scaling factors of C and D (matrix bias and result) from FP8 Custom Calls created in the GEMM rewriter when their data types are not FP8. See openxla/xla#15795.
Copybara import of the project:

--
fd9750fa8474fe72fe641c7b3bc005ff30396e0a by Philipp Hack <[email protected]>:

Removes superfluous FP8 scaling factors in GEMM rewriter.

Merging this change closes #16841

PiperOrigin-RevId: 679784586
hsharsha added a commit to ROCm/xla that referenced this pull request Oct 8, 2024
openxla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test
hsharsha added a commit to ROCm/xla that referenced this pull request Oct 8, 2024
openxla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test
copybara-service bot pushed a commit that referenced this pull request Oct 14, 2024
Imported from GitHub PR #18062

#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b
PiperOrigin-RevId: 685632239
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 14, 2024
Imported from GitHub PR openxla/xla#18062

openxla/xla#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b8de0785d43e18dbdb0773307870084e32 by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

openxla/xla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b8de0785d43e18dbdb0773307870084e32
PiperOrigin-RevId: 685632239
copybara-service bot pushed a commit that referenced this pull request Oct 14, 2024
Imported from GitHub PR #18062

#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b
PiperOrigin-RevId: 685632239
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 14, 2024
Imported from GitHub PR openxla/xla#18062

openxla/xla#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b8de0785d43e18dbdb0773307870084e32 by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

openxla/xla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b8de0785d43e18dbdb0773307870084e32
PiperOrigin-RevId: 685632239
copybara-service bot pushed a commit that referenced this pull request Oct 14, 2024
Imported from GitHub PR #18062

#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b
PiperOrigin-RevId: 685632239
copybara-service bot pushed a commit that referenced this pull request Oct 14, 2024
Imported from GitHub PR #18062

#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b
PiperOrigin-RevId: 685632239
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 14, 2024
Imported from GitHub PR openxla/xla#18062

openxla/xla#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b8de0785d43e18dbdb0773307870084e32 by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

openxla/xla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b8de0785d43e18dbdb0773307870084e32
PiperOrigin-RevId: 685632239
copybara-service bot pushed a commit that referenced this pull request Oct 21, 2024
Imported from GitHub PR #18062

#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b
PiperOrigin-RevId: 688022433
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 21, 2024
Imported from GitHub PR openxla/xla#18062

openxla/xla#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b8de0785d43e18dbdb0773307870084e32 by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

openxla/xla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b8de0785d43e18dbdb0773307870084e32
PiperOrigin-RevId: 688022433
copybara-service bot pushed a commit that referenced this pull request Oct 21, 2024
Imported from GitHub PR #18062

#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b
PiperOrigin-RevId: 688022433
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 21, 2024
Imported from GitHub PR openxla/xla#18062

openxla/xla#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b8de0785d43e18dbdb0773307870084e32 by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

openxla/xla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b8de0785d43e18dbdb0773307870084e32
PiperOrigin-RevId: 688022433
copybara-service bot pushed a commit that referenced this pull request Oct 21, 2024
Imported from GitHub PR #18062

#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

COPYBARA_INTEGRATE_REVIEW=#18062 from ROCm:ci_fix_gemm_rewriter_fp8_tests_20241008 be4da5b
PiperOrigin-RevId: 688034088
copybara-service bot pushed a commit to tensorflow/tensorflow that referenced this pull request Oct 21, 2024
Imported from GitHub PR openxla/xla#18062

openxla/xla#16841 removes scaling factor constants in gemm_rewriter for FP8 data types. This patch address the same in the gemm_rewriter_test
Copybara import of the project:

--
be4da5b8de0785d43e18dbdb0773307870084e32 by Harsha HS <[email protected]>:

[ROCm] Fix gemm_rewriter_test for AMD GCN Arch

openxla/xla#16841 removes scaling factor
constants in gemm_rewriter for FP8 data types. This patch address
the same in the gemm_rewriter_test

Merging this change closes #18062

PiperOrigin-RevId: 688034088
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