Skip to content

218 warpsize patch #2916

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

Open
wants to merge 5 commits into
base: r2.18-rocm-enhanced
Choose a base branch
from
Open

Conversation

i-chaochen
Copy link

backported two big commits for fixing warp size

  1. tensorflow@b3e793e
  2. tensorflow@a35cf48

beckerhe and others added 2 commits April 1, 2025 23:23
There was a check in place that works around a performance bug in ptxas from CUDA 12.1. This check has various problems:

1. It's untested and the way it's implemented it can't be easily test.
2. The version check doesn't work library compilation which we transition towards as it's checking the version of a local ptxas binary
3. It's unclear whether the workaround is still needed with the new MLIR emitters.

So I'm removing it here since it blocks me from making more refactoring around PTX compilation.

PiperOrigin-RevId: 698720761
pemeliya and others added 2 commits April 7, 2025 05:54
Imported from GitHub PR openxla/xla#17814

This PR openxla/xla#11880 created a latent bug on ROCM side which was really hard to track.
Due to [gemm_algorithm_picker](https://github.com/ROCm/xla/blob/58cd0e78dc19075e7c935d7cdb31676ce868e64c/xla/service/gpu/autotuning/gemm_algorithm_picker.cc#L299), the problem occurs only for non-zero beta when the output matrix is large enough (so it cannot be filled with two first runs). This results in buffer comparator errors like:

```
[ RUN      ] CublasLtGemmRewriteTest.LargerBiasMultipleUsersNoRewrite
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
E0000 00:00:1727688442.093248 2145761 buffer_comparator.cc:157] Difference at 10069: -522.617, expected -261.495
E0000 00:00:1727688442.093370 2145761 buffer_comparator.cc:157] Difference at 10070: -520.456, expected -260.414
E0000 00:00:1727688442.093376 2145761 buffer_comparator.cc:157] Difference at 10071: -523.774, expected -262.073
E0000 00:00:1727688442.093381 2145761 buffer_comparator.cc:157] Difference at 10072: -524.935, expected -262.654
E0000 00:00:1727688442.093385 2145761 buffer_comparator.cc:157] Difference at 10073: -520.083, expected -260.228
E0000 00:00:1727688442.093389 2145761 buffer_comparator.cc:157] Difference at 10074: -522.771, expected -261.572
E0000 00:00:1727688442.093393 2145761 buffer_comparator.cc:157] Difference at 10075: -519.994, expected -260.183
E0000 00:00:1727688442.093396 2145761 buffer_comparator.cc:157] Difference at 10076: -524.838, expected -262.605
E0000 00:00:1727688442.093400 2145761 buffer_comparator.cc:157] Difference at 10077: -520.376, expected -260.374
E0000 00:00:1727688442.093404 2145761 buffer_comparator.cc:157] Difference at 10078: -521.808, expected -261.09
2024-09-30 09:27:22.093423: E xla/service/gpu/autotuning/gemm_algorithm_picker.cc:348] Results mismatch between different GEMM algorithms. This is likely a bug/unexpected loss of precision.
E0000 00:00:1727688442.095749 2145761 buffer_comparator.cc:157] Difference at 10069: -783.74, expected -261.495
E0000 00:00:1727688442.095766 2145761 buffer_comparator.cc:157] Difference at 10070: -780.498, expected -260.414
E0000 00:00:1727688442.095770 2145761 buffer_comparator.cc:157] Difference at 10071: -785.475, expected -262.073
E0000 00:00:1727688442.095774 2145761 buffer_comparator.cc:157] Difference at 10072: -787.216, expected -262.654
E0000 00:00:1727688442.095778 2145761 buffer_comparator.cc:157] Difference at 10073: -779.939, expected -260.228
E0000 00:00:1727688442.095782 2145761 buffer_comparator.cc:157] Difference at 10074: -783.97, expected -261.572
E0000 00:00:1727688442.095785 2145761 buffer_comparator.cc:157] Difference at 10075: -779.805, expected -260.183
E0000 00:00:1727688442.095789 2145761 buffer_comparator.cc:157] Difference at 10076: -787.071, expected -262.605
E0000 00:00:1727688442.095793 2145761 buffer_comparator.cc:157] Difference at 10077: -780.378, expected -260.374
E0000 00:00:1727688442.095797 2145761 buffer_comparator.cc:157] Difference at 10078: -782.526, expected -261.09
```

but in fact it was just because of uninitialized buffers.
@xla-rotation could you please take a look ?

Copybara import of the project:

--
58cd0e78dc19075e7c935d7cdb31676ce868e64c by Pavel Emeliyanenko <[email protected]>:

buffer_comparator init fix

Merging this change closes tensorflow#17814

PiperOrigin-RevId: 683569591
…hardware limit per dim.

PiperOrigin-RevId: 691903035
@i-chaochen i-chaochen requested a review from pemeliya April 6, 2025 21:56
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.

4 participants