You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2026/10/01 17:58:48 UTC
(tvm) 01/02: [TEST][Script] Expect fully qualified operator printer names
This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch tqchen/printer-refinement
in repository https://gitbox.apache.org/repos/asf/tvm.git
commit f7ae6a96174404838257ea2703f4fffcfbddd442
Author: Tianqi Chen <tq...@users.noreply.github.com>
AuthorDate: Thu Oct 1 16:54:53 2026 +0000
[TEST][Script] Expect fully qualified operator printer names
---
tests/python/tirx/codegen/test_ptx_addr.py | 2 +-
tests/python/tirx/codegen/test_ptx_dialect.py | 2 +-
tests/python/tirx/test_op_namespace_cleanup.py | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/python/tirx/codegen/test_ptx_addr.py b/tests/python/tirx/codegen/test_ptx_addr.py
index 77e3f83e89..a3b8449c4f 100644
--- a/tests/python/tirx/codegen/test_ptx_addr.py
+++ b/tests/python/tirx/codegen/test_ptx_addr.py
@@ -51,7 +51,7 @@ def test_ptx_addr_registration_and_table_capabilities():
op = Op.get("tirx.ptx.addr")
assert int(op.get_attr("TCallEffectKind")) == CallEffectKind.Pure.value
- assert op.get_attr("TScriptPrinterName") == "ptx.addr"
+ assert op.get_attr("TScriptPrinterName") == "tirx.ptx.addr"
assert "tirx.ptx.addr" in CODEGEN_REGISTRY
addresses = [slot for entry in TABLE.values() for slot in entry.operands if slot.kind == "addr"]
diff --git a/tests/python/tirx/codegen/test_ptx_dialect.py b/tests/python/tirx/codegen/test_ptx_dialect.py
index 7868a9edfd..20c2638204 100644
--- a/tests/python/tirx/codegen/test_ptx_dialect.py
+++ b/tests/python/tirx/codegen/test_ptx_dialect.py
@@ -67,7 +67,7 @@ def test_ptx_registration():
# *escaped* family: `and`/`or`/`not` (ISA 9.7.9) are Python keywords and
# print as `T.ptx.and_`. Identity for every other family.
family = escape_token(entry.family) # several entries may share a mnemonic
- assert op.get_attr("TScriptPrinterName") == f"ptx.{family}", entry.name
+ assert op.get_attr("TScriptPrinterName") == f"tirx.ptx.{family}", entry.name
assert entry.op_name in CODEGEN_REGISTRY, entry.name
diff --git a/tests/python/tirx/test_op_namespace_cleanup.py b/tests/python/tirx/test_op_namespace_cleanup.py
index 08d4f4e09f..8742546b81 100644
--- a/tests/python/tirx/test_op_namespace_cleanup.py
+++ b/tests/python/tirx/test_op_namespace_cleanup.py
@@ -393,8 +393,8 @@ def test_registered_tirx_ops_have_exactly_one_category():
assert device_namespace in device_namespaces, op_name
printer_name = _op_attr(op_name, "TScriptPrinterName")
assert printer_name is not None, op_name
- assert printer_name.startswith(device_namespace + "."), op_name
- assert _has_path(T, printer_name), op_name
+ assert printer_name.startswith("tirx." + device_namespace + "."), op_name
+ assert _has_path(T, printer_name.removeprefix("tirx.")), op_name
else:
assert category == "builtin"
assert device_namespace is None, op_name