Skip to content

[BACKEND][PPU] Add PPU backend - #1

Draft
tianyi-dialect wants to merge 3 commits into
mainfrom
main_ppu
Draft

[BACKEND][PPU] Add PPU backend#1
tianyi-dialect wants to merge 3 commits into
mainfrom
main_ppu

Conversation

@tianyi-dialect

Copy link
Copy Markdown
Owner

No description provided.

Comment thread third_party/nvidia/backend/driver.py Outdated
@@ -866,6 +861,7 @@ def get_device_interface(self):

@staticmethod
def is_active():
return False

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please do not change other backends.


# Verify results
# Verify results — third_party backends (PPU etc.) have slightly different
# dot accumulation precision vs NVIDIA; use a looser tolerance there.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please do not change comments here.

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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

from triton._flagtree_backend import FLAGTREE_BACKEND
if FLAGTREE_BACKEND == "ppu" ...

Comment thread python/test/tle/unit/test_tle_cumsum.py Outdated
return target.backend == "cuda"


@pytest.mark.skipif(not _is_nvidia_backend(), reason="PTX-specific regression guard only applies to NVIDIA backend")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

from triton._flagtree_backend import FLAGTREE_BACKEND
Skip only if FLAGTREE_BACKEND == "ppu"

Comment thread python/triton/knobs.py
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")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

# flagtree ppu

Comment thread python/triton/knobs.py Outdated
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")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please move this func after amd_knobs

Comment thread python/triton/knobs.py Outdated
@@ -680,10 +564,9 @@ class proton_knobs(base_knobs):
runtime = runtime_knobs()
language = language_knobs()
nvidia = nvidia_knobs()
ppu = ppu_knobs()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please move this line after amd_knobs

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