[BACKEND][PPU] Add PPU backend - #1
Draft
tianyi-dialect wants to merge 3 commits into
Draft
Conversation
zhzhcookie
reviewed
Jul 21, 2026
| @@ -866,6 +861,7 @@ def get_device_interface(self): | |||
|
|
|||
| @staticmethod | |||
| def is_active(): | |||
| return False | |||
There was a problem hiding this comment.
Please do not change other backends.
zhzhcookie
reviewed
Jul 21, 2026
|
|
||
| # Verify results | ||
| # Verify results — third_party backends (PPU etc.) have slightly different | ||
| # dot accumulation precision vs NVIDIA; use a looser tolerance there. |
There was a problem hiding this comment.
Please do not change comments here.
zhzhcookie
reviewed
Jul 21, 2026
| backend = triton.runtime.driver.active.get_current_target().backend | ||
| atol = 1e-4 if backend == "cuda" else 1e-3 | ||
| rtol = 1e-4 if backend == "cuda" else 1e-3 | ||
| torch.testing.assert_close(c, expected, atol=atol, rtol=rtol) |
There was a problem hiding this comment.
from triton._flagtree_backend import FLAGTREE_BACKEND
if FLAGTREE_BACKEND == "ppu" ...
zhzhcookie
reviewed
Jul 21, 2026
| return target.backend == "cuda" | ||
|
|
||
|
|
||
| @pytest.mark.skipif(not _is_nvidia_backend(), reason="PTX-specific regression guard only applies to NVIDIA backend") |
There was a problem hiding this comment.
from triton._flagtree_backend import FLAGTREE_BACKEND
Skip only if FLAGTREE_BACKEND == "ppu"
zhzhcookie
reviewed
Jul 21, 2026
| nvshmem_home: env_opt_str = env_opt_str("NVSHMEM_HOME") | ||
| tle_raw_clang: env_opt_str = env_opt_str("CLANG") | ||
| tle_raw_clang_flags: env_opt_str = env_opt_str("CLANG_FLAGS") | ||
|
|
zhzhcookie
reviewed
Jul 21, 2026
| disable_ppu_llc_opt: env_bool = env_bool("DISABLE_PPU_LLC_OPT") | ||
| ppu_llc_options: env_opt_str = env_opt_str("PPU_LLC_OPTIONS") | ||
| dump_compile_log: env_bool = env_bool("TRITON_DUMP_COMPILE_LOG") | ||
| libdevice_path: env_opt_str = env_opt_str("TRITON_LIBDEVICE_PATH") |
There was a problem hiding this comment.
Please move this func after amd_knobs
zhzhcookie
reviewed
Jul 21, 2026
| @@ -680,10 +564,9 @@ class proton_knobs(base_knobs): | |||
| runtime = runtime_knobs() | |||
| language = language_knobs() | |||
| nvidia = nvidia_knobs() | |||
| ppu = ppu_knobs() | |||
There was a problem hiding this comment.
Please move this line after amd_knobs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.