Skip to content

Commit 7c2ca84

Browse files
authored
[RELEASE-ONLY] Revert buffer ops default enablement on AMD (triton-lang#7456)
Buffer op default enablement is resulting in corresponding PT UT failure #830 Disabling in release branch for stability while we develop a fix for main
1 parent eacb681 commit 7c2ca84

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

python/test/unit/test_knobs.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,10 @@ def test_knobs_scope(fresh_knobs, monkeypatch):
7777

7878
assert fresh_knobs.amd.global_prefetch == 4
7979
assert fresh_knobs.amd.local_prefetch == 3
80-
assert fresh_knobs.amd.use_buffer_ops
8180

8281
# Just to prove that use_buffer_ops is coming from env
8382
monkeypatch.setenv("AMDGCN_USE_BUFFER_OPS", "0")
8483
assert not fresh_knobs.amd.use_buffer_ops
85-
monkeypatch.delenv("AMDGCN_USE_BUFFER_OPS")
86-
assert fresh_knobs.amd.use_buffer_ops
8784

8885
with fresh_knobs.amd.scope():
8986
fresh_knobs.amd.global_prefetch = 5
@@ -97,13 +94,10 @@ def test_knobs_scope(fresh_knobs, monkeypatch):
9794

9895
assert fresh_knobs.amd.global_prefetch == 4
9996
assert fresh_knobs.amd.local_prefetch == 3
100-
assert fresh_knobs.amd.use_buffer_ops
10197

10298
# Just to prove that use_buffer_ops is coming from env
10399
monkeypatch.setenv("AMDGCN_USE_BUFFER_OPS", "0")
104100
assert not fresh_knobs.amd.use_buffer_ops
105-
monkeypatch.delenv("AMDGCN_USE_BUFFER_OPS")
106-
assert fresh_knobs.amd.use_buffer_ops
107101

108102

109103
def test_env_updated(fresh_knobs, monkeypatch):

python/triton/knobs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ class nvidia_knobs(base_knobs):
434434

435435

436436
class amd_knobs(base_knobs):
437-
use_buffer_ops: env_bool = env_bool("AMDGCN_USE_BUFFER_OPS", True)
437+
use_buffer_ops: env_bool = env_bool("AMDGCN_USE_BUFFER_OPS")
438438
dump_amdgcn: env_bool = env_bool("AMDGCN_ENABLE_DUMP")
439439
libhip_path: env_opt_str = env_opt_str("TRITON_LIBHIP_PATH")
440440
lld_path: env_opt_str = env_opt_str("TRITON_HIP_LLD_PATH")

third_party/amd/python/test/test_scalarize_packed_fops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ def checked_packed_fops_asm_bbs():
6464
# check scalarization "fixes"
6565
def test_check_scalarized():
6666
triton.knobs.amd.scalarize_packed_fops = True
67+
triton.knobs.amd.use_buffer_ops = True
68+
6769
kernel = triton.compile(str(Path(__file__).parent / "attn_fwd.ttir"), target=current_target)
6870

6971
# check the specific IR pattern was rewritten

0 commit comments

Comments
 (0)