Skip to content

Cherry-pick: [ROCm] Fix bf16 upcast handling for libdevice calls.#793

Open
magaonka-amd wants to merge 1 commit intoROCm:rocm-jaxlib-v0.9.2from
magaonka-amd:fix/bf16-libdevice-upcast-v092
Open

Cherry-pick: [ROCm] Fix bf16 upcast handling for libdevice calls.#793
magaonka-amd wants to merge 1 commit intoROCm:rocm-jaxlib-v0.9.2from
magaonka-amd:fix/bf16-libdevice-upcast-v092

Conversation

@magaonka-amd
Copy link
Copy Markdown

Imported from GitHub PR openxla#39871

📝 Summary of Changes
arguments always up/down casted for bf16 - there are no native libdevice functions for bf16

🎯 Justification
with current implementation up/down cast are omitted for bf16, which is not correct

🚀 Kind of Contribution
Please remove what does not apply: 🐛 Bug Fix 🧪 Tests

Imported from GitHub PR openxla#39871

📝 Summary of Changes
arguments always up/down casted for bf16 - there are no native libdevice functions for bf16

🎯 Justification
with current implementation up/down cast are omitted for bf16, which is not correct

🚀 Kind of Contribution
Please remove what does not apply: 🐛 Bug Fix 🧪 Tests

📊 Benchmark (for Performance Improvements)
Please measure and include speedups for one of the public HLOs in
`compiler/xla/tools/benchmarks/hlo/`.

🧪 Unit Tests:
Added new test:
//xla/backends/gpu/codegen/triton/transforms/tests:triton_xla_math_to_libdevice_rocm.mlir

🧪 Execution Tests:
What execution tests were added? For example, a new optimization should be
tested with an end-to-end execution test triggering the optimization and
asserting correctness. Please provide test cases running with at most 2 GPUs.

Copybara import of the project:

--
b197577 by Zoran Jovanovic <zjovanov@amd.com>:

[ROCm] Fix bf16 upcast handling for libdevice calls.

--
e537018 by Zoran Jovanovic <zjovanov@amd.com>:

Review comments.

--
76e617e by Zoran Jovanovic <zjovanov@amd.com>:

Rmoved unnecessary file inclusion.

Merging this change closes openxla#39871

COPYBARA_INTEGRATE_REVIEW=openxla#39871 from ROCm:rocm-fix-bf16-libdevice-upcast-3 76e617e
PiperOrigin-RevId: 892211779
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.

2 participants