okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
ddbfa1d5c
main
1"""The hipBLASLt tuning tables in the AMD engine packages: what a package holds per card family, and the one rule that decides at a start 2whether a table is used (strata_control/hipblaslt_tuning.py). Folders are throwaways; no GPU tool is run. 3 4The packages' hipBLASLt versions below are the ones the 0.2.x release packages bundle (docs/AMD_HIP.md, Ready-made packages): Windows ROCm 510.2.0a20260930 carries 1.5.0 (100500), the Linux 7.10.0a20251120 wheels 1.2.0 (100200), Linux Strix Halo's 7.14.1 1.4.1 (100401).""" 6from __future__import annotations 7 8import contextlib 9import io 10import json 11import os 12import sys 13import tempfile 14import unittest 15from pathlib import Path 16from unittest import mock 17 18from strata_control import hipblaslt_tuning as ht 19 20ROOT = Path (__file__ ).resolve ().parents [2 ] 21TABLES = ROOT / "tools" / "hip" 22sys .path .insert (0 ,str (ROOT / "packaging" )) 23import package_engine # noqa: E402 24import stage_tuning # noqa: E402 25 26#: (platform, variant) -> (archs of the package, hipBLASLt version it bundles, architectures that must carry a table) 27PACKAGES = { 28 ("windows-x86_64" ,"rx9070" ): (("gfx1200" ,"gfx1201" ),100500 , {"gfx1201" }), 29 ("windows-x86_64" ,"rdna3" ): (("gfx1100" ,"gfx1101" ,"gfx1102" ,"gfx1151" ),100500 , {"gfx1100" ,"gfx1151" }), 30 ("linux-x86_64" ,"rx9070" ): (("gfx1200" ,"gfx1201" ),100200 ,set ()),# no table for 1.2.0 on RDNA4 (docs/AMD_HIP.md) 31 ("linux-x86_64" ,"rx7900" ): (("gfx1100" ,"gfx1101" ,"gfx1102" ),100200 , {"gfx1100" }), 32 ("linux-x86_64" ,"halo" ): (("gfx1151" ,),100401 , {"gfx1151" }), 33# 0.2.2 RX 6000 packages: hipBLASLt ships no gfx1030 / gfx1031 kernels at any version, so no table, plain hipBLAS 34 ("windows-x86_64" ,"rdna2" ): (("gfx1030" ,"gfx1031" ),100500 ,set ()), 35 ("linux-x86_64" ,"rx6000" ): (("gfx1030" ,"gfx1031" ),100400 ,set ()), 36} 37 38 39ON = {ht .SWITCH :"on" }# the switch that uses a matching table whatever "auto" does 40AUTO = {} 41 42 43def fake_table (folder :Path ,arch :str ,version :int ,* ,header :str | None = None )-> Path : 44folder .mkdir (parents = True ,exist_ok = True ) 45path = folder / ht .table_name (arch ,version ) 46path .write_text (f"# solution ids are scoped to this hipBLASLt version and device architecture\n" 47f" { header or f' { ht . HEADER } { arch } { version } ' } \nbf16 128 2560 128 4096 73754\n" ,encoding = "utf-8" ) 48return path 49 50 51def fake_package (root :Path ,* ,version :int | None = 100500 ,tables = (("gfx1201" ,100500 ),),build = True )-> Path : 52folder = root / "0.2.1-pkg" 53folder .mkdir (parents = True ) 54meta = {"version" :"0.2.1" ,"backend" :"hip" } 55if version is not None : 56meta ["hipblaslt_version" ]= version 57if build : 58 (folder / "BUILD.json" ).write_text (json .dumps (meta ),encoding = "utf-8" ) 59for arch ,ver in tables : 60fake_table (folder / ht .TABLE_DIR ,arch ,ver ) 61return folder 62 63 64class TempDir (unittest .TestCase ): 65def setUp (self ): 66self .dir = tempfile .TemporaryDirectory () 67self .addCleanup (self .dir .cleanup ) 68self .root = Path (self .dir .name ) 69 70 71class Decision (TempDir ): 72"""Match, mismatch, switch, the person's own choice.""" 73 74def test_a_table_for_this_card_and_this_hipblaslt_is_used (self ): 75pkg = fake_package (self .root ) 76d = ht .resolve (pkg , ["gfx1201" ],environ = ON ) 77self .assertEqual (d .path ,pkg / "tuning" / "gfx1201-hipblaslt-100500.txt" ) 78self .assertIn ("gfx1201-hipblaslt-100500.txt" ,d .message ) 79self .assertIn (ht .SWITCH ,d .message )# the line tells how to turn it off 80self .assertEqual (d .level ,"info" ) 81 82def test_a_table_for_another_hipblaslt_version_is_not_used_and_the_log_says_why (self ): 83pkg = fake_package (self .root ,version = 100200 ,tables = (("gfx1201" ,100500 ),)) 84d = ht .resolve (pkg , ["gfx1201" ],environ = ON ) 85self .assertIsNone (d .path ) 86self .assertEqual (d .level ,"warn" ) 87self .assertIn ("100200" ,d .message ) 88self .assertIn ("100500" ,d .message ) 89self .assertIn ("plain hipBLAS" ,d .message ) 90 91def test_a_card_without_a_table_in_the_package_gets_plain_hipblas_and_one_line (self ): 92pkg = fake_package (self .root ) 93d = ht .resolve (pkg , ["gfx1200" ],environ = ON ) 94self .assertIsNone (d .path ) 95self .assertIn ("none for gfx1200" ,d .message ) 96 97def test_the_card_that_has_a_table_is_found_among_several (self ): 98pkg = fake_package (self .root ,tables = (("gfx1100" ,100500 ), ("gfx1151" ,100500 ))) 99self .assertEqual (ht .resolve (pkg , ["gfx1101" ,"gfx1151" ],environ = ON ).path .name ,"gfx1151-hipblaslt-100500.txt" ) 100 101def test_a_package_that_does_not_say_its_hipblaslt_is_not_guessed_at (self ): 102pkg = fake_package (self .root ,version = None ) 103d = ht .resolve (pkg , ["gfx1201" ],environ = ON ) 104self .assertIsNone (d .path ) 105self .assertEqual (d .level ,"warn" ) 106self .assertIn ("hipblaslt_version" ,d .message ) 107 108def test_an_unreadable_card_is_a_note_not_a_guess (self ): 109d = ht .resolve (fake_package (self .root ), [],environ = ON ) 110self .assertIsNone (d .path ) 111self .assertIn ("could not be read" ,d .message ) 112 113def test_a_table_whose_header_disagrees_with_its_name_is_not_used (self ): 114pkg = fake_package (self .root ,tables = ()) 115fake_table (pkg / "tuning" ,"gfx1201" ,100500 ,header = f" { ht . HEADER } gfx1201 100401" ) 116d = ht .resolve (pkg , ["gfx1201" ],environ = ON ) 117self .assertIsNone (d .path ) 118self .assertIn ("header" ,d .message ) 119 120def test_the_switch_turns_it_off_in_the_environment_and_in_the_run_config (self ): 121pkg = fake_package (self .root ) 122for word in ("off" ,"OFF" ,"0" ,"no" ,"false" ,"none" ): 123d = ht .resolve (pkg , ["gfx1201" ],environ = {ht .SWITCH :word }) 124self .assertIsNone (d .path ,word ) 125self .assertIn ("off" ,d .message ) 126self .assertIsNone (ht .resolve (pkg , ["gfx1201" ],environ = AUTO ,cfg = {"hipblaslt_table" :False }).path ) 127self .assertIsNotNone (ht .resolve (pkg , ["gfx1201" ],environ = AUTO ,cfg = {"hipblaslt_table" :True }).path ) 128self .assertIsNone (ht .resolve (pkg , ["gfx1201" ],environ = {ht .SWITCH :"off" },cfg = {"hipblaslt_table" :True }).path )# the environment wins 129for word in ("on" ,"ON" ,"1" ,"yes" ,"true" ): 130self .assertIsNotNone (ht .resolve (pkg , ["gfx1201" ],environ = {ht .SWITCH :word }).path ,word ) 131 132def test_auto_follows_the_one_constant_and_says_what_is_available (self ): 133pkg = fake_package (self .root ) 134with mock .patch .object (ht ,"AUTO_USES_TABLE" ,False ): 135d = ht .resolve (pkg , ["gfx1201" ],environ = AUTO ) 136self .assertIsNone (d .path ) 137self .assertIn ("gfx1201-hipblaslt-100500.txt" ,d .message ) 138self .assertIn (f" { ht . SWITCH } =on" ,d .message ) 139self .assertEqual (ht .mode (AUTO ),"auto" ) 140with mock .patch .object (ht ,"AUTO_USES_TABLE" ,True ): 141d = ht .resolve (pkg , ["gfx1201" ],environ = AUTO ) 142self .assertEqual (d .path ,pkg / "tuning" / "gfx1201-hipblaslt-100500.txt" ) 143self .assertIsNone (ht .resolve (pkg , ["gfx1201" ],environ = {ht .SWITCH :"off" }).path ) 144 145def test_the_default_is_the_owners_decision (self ): 146"""A table changes the bits of the prompt's dense GEMMs (notes-021-hip.md); the owner chose: on by default for Strix Halo only.""" 147self .assertFalse (ht .AUTO_USES_TABLE ) 148self .assertEqual (ht .AUTO_ARCHS , ("gfx1151" ,)) 149 150def test_auto_uses_the_table_on_strix_halo_only (self ): 151for arch ,used in (("gfx1151" ,True ), ("gfx1201" ,False ), ("gfx1100" ,False )): 152root = self .root / arch 153root .mkdir () 154pkg = fake_package (root ,tables = ((arch ,100500 ),)) 155d = ht .resolve (pkg , [arch ],environ = AUTO ) 156self .assertEqual (d .path is not None ,used , (arch ,d .message )) 157self .assertIsNone (ht .resolve (pkg , [arch ],environ = {ht .SWITCH :"off" }).path ) 158 159def test_a_table_the_person_set_is_never_replaced (self ): 160pkg = fake_package (self .root ) 161mine = str (self .root / "mine.txt" ) 162for environ ,cfg in (({ht .ENGINE_VAR :mine }, {}), ({}, {"env" : {ht .ENGINE_VAR :mine }})): 163d = ht .resolve (pkg , ["gfx1201" ],environ = environ ,cfg = cfg ) 164self .assertIsNone (d .path ) 165self .assertIn (mine ,d .message ) 166out = ht .apply ({"backend" :"hip" ,** cfg },pkg , ["gfx1201" ],environ = environ ,say = lambda line :None ) 167self .assertEqual ((out .get ("env" )or {}).get (ht .ENGINE_VAR ,mine ),mine ) 168 169 170class Apply (TempDir ): 171def test_apply_says_so_once_and_leaves_the_table_to_the_engine (self ): 172pkg = fake_package (self .root ) 173cfg = {"backend" :"hip" ,"env" : {"STRATA_RESIDENT_PIN" :"0" }} 174lines = [] 175out = ht .apply (cfg ,pkg , ["gfx1201" ],environ = ON ,say = lines .append ) 176self .assertIs (out ,cfg )# the engine finds tuning/ beside itself: no path in the config 177self .assertNotIn (ht .ENGINE_VAR ,out ["env" ]) 178self .assertEqual (len (lines ),1 ) 179self .assertTrue (lines [0 ].startswith ("[strata] hipBLASLt tuning table" )) 180 181def test_a_config_level_switch_reaches_the_engine_as_the_env_variable (self ): 182pkg = fake_package (self .root ) 183for value ,word in ((False ,"off" ), (True ,"on" )): 184cfg = {"backend" :"hip" ,"hipblaslt_table" :value ,"env" : {"STRATA_RESIDENT_PIN" :"0" }} 185out = ht .apply (cfg ,pkg , ["gfx1201" ],environ = {},say = lambda line :None ) 186self .assertEqual (out ["env" ][ht .SWITCH ],word ) 187self .assertEqual (out ["env" ]["STRATA_RESIDENT_PIN" ],"0" ) 188self .assertNotIn (ht .SWITCH ,cfg ["env" ])# the caller's config is untouched 189# the shell's own switch, or a table the person named, is not overridden 190cfg = {"backend" :"hip" ,"hipblaslt_table" :False } 191self .assertIs (ht .apply (cfg ,pkg , ["gfx1201" ],environ = {ht .SWITCH :"on" },say = lambda line :None ),cfg ) 192self .assertIs (ht .apply (cfg ,pkg , ["gfx1201" ],environ = {ht .ENGINE_VAR :"x.txt" },say = lambda line :None ),cfg ) 193 194def test_apply_with_a_mismatch_leaves_the_config_alone_and_warns (self ): 195pkg = fake_package (self .root ,version = 100200 ) 196cfg = {"backend" :"hip" } 197lines = [] 198self .assertIs (ht .apply (cfg ,pkg , ["gfx1201" ],environ = ON ,say = lines .append ),cfg ) 199self .assertEqual (len (lines ),1 ) 200self .assertIn ("note" ,lines [0 ]) 201 202def test_other_backends_and_packages_without_tables_are_silent (self ): 203lines = [] 204pkg = fake_package (self .root ) 205cfg = {"backend" :"cuda" } 206self .assertIs (ht .apply (cfg ,pkg , ["gfx1201" ],environ = ON ,say = lines .append ),cfg ) 207bare = self .root / "cuda-pkg" 208bare .mkdir () 209 (bare / "BUILD.json" ).write_text (json .dumps ({"version" :"0.2.1" }),encoding = "utf-8" ) 210out = ht .apply ({"backend" :"hip" },bare , ["gfx1201" ],environ = ON ,say = lines .append ) 211self .assertNotIn ("env" ,out ) 212self .assertEqual (lines , []) 213 214def test_the_server_start_applies_it_for_a_component_engine (self ): 215from serve import server 216pkg = fake_package (self .root ) 217 (pkg / "strata" ).write_text ("x" ,encoding = "utf-8" ) 218cfg = {"exe" :"component:strata-engine" ,"backend" :"hip" } 219out = io .StringIO () 220with mock .patch .object (server .engine_component ,"expand" ,return_value = str (pkg / "strata" )), \ 221mock .patch .object (ht ,"present_archs" ,return_value = ["gfx1201" ]), \ 222mock .patch .dict (os .environ , {},clear = False ),contextlib .redirect_stdout (out ): 223os .environ .pop (ht .SWITCH ,None ) 224os .environ .pop (ht .ENGINE_VAR ,None ) 225self .assertNotIn (ht .ENGINE_VAR ,server .child_env (server .with_component_engine (cfg )))# "auto" is off by default 226os .environ [ht .SWITCH ]= "on" 227started = server .with_component_engine (cfg ) 228env = server .child_env (started ) 229self .assertNotIn (ht .ENGINE_VAR ,env )# the engine finds the table beside itself; the shell's switch reaches it 230self .assertEqual (env [ht .SWITCH ],"on" ) 231os .environ [ht .SWITCH ]= "off" 232self .assertNotIn (ht .ENGINE_VAR ,server .child_env (server .with_component_engine (cfg ))) 233self .assertIn ("hipBLASLt tuning table" ,out .getvalue ()) 234 235def test_present_archs_picks_the_configured_card_on_linux (self ): 236with mock .patch ("strata_control.engine_component.hip_archs_present" ,return_value = ["gfx1100" ,"gfx1201" ]): 237if os .name != "nt" : 238self .assertEqual (ht .present_archs ({"gpu" :1 }), ["gfx1201" ]) 239self .assertEqual (ht .present_archs ({"gpu" : [1 ,0 ]}), ["gfx1201" ,"gfx1100" ]) 240self .assertEqual (ht .present_archs ({}), ["gfx1100" ,"gfx1201" ]) 241 242 243class PackageContents (TempDir ): 244"""What each package of the release matrix carries, from the real tables of tools/hip.""" 245 246def test_every_release_package_carries_the_tables_its_cards_have (self ): 247for (platform ,variant ), (archs ,version ,wanted )in PACKAGES .items (): 248stage = self .root / f" { platform } - { variant } " 249stage .mkdir () 250copied = ht .stage_tables (stage ,archs ,version ,TABLES ) 251self .assertEqual ({n .split ("-" )[0 ]for n in copied },wanted , (platform ,variant )) 252on_disk = {p .name for p in (stage / "tuning" ).glob ("*.txt" )}if (stage / "tuning" ).is_dir ()else set () 253self .assertEqual (on_disk ,set (copied ), (platform ,variant )) 254for arch in wanted :# the file the engine start will pick is there and its own header agrees 255self .assertTrue (ht .header_ok (stage / "tuning" / ht .table_name (arch ,version ),arch ,version ), (platform ,arch )) 256 257def test_the_missing_report_names_the_architectures_without_a_table (self ): 258left = ht .missing_report (("gfx1100" ,"gfx1101" ,"gfx1102" ),100200 ,TABLES ) 259self .assertEqual (sorted (left ), ["gfx1101" ,"gfx1102" ]) 260self .assertEqual (ht .missing_report (("gfx1201" ,),100200 ,TABLES ), {"gfx1201" : [100202 ,100500 ]}) 261 262def test_every_table_in_the_repo_has_a_header_that_matches_its_name (self ): 263tables = ht .tables_in (TABLES ) 264self .assertGreater (len (tables ),8 ) 265for (arch ,version ),path in tables .items (): 266self .assertTrue (ht .header_ok (path ,arch ,version ),path .name ) 267 268def test_version_from_header_reads_the_rocm_tree (self ): 269inc = self .root / "include" / "hipblaslt" 270inc .mkdir (parents = True ) 271 (inc / "hipblaslt-version.h" ).write_text ("#define HIPBLASLT_VERSION_MAJOR 1\n#define HIPBLASLT_VERSION_MINOR 5\n" 272"#define HIPBLASLT_VERSION_PATCH 0\n" ,encoding = "utf-8" ) 273self .assertEqual (ht .version_from_header (self .root ),100500 ) 274self .assertIsNone (ht .version_from_header (self .root / "nowhere" )) 275 276def test_stage_tuning_writes_the_version_and_the_tables (self ): 277stage = self .root / "stage" 278stage .mkdir () 279 (stage / "BUILD.json" ).write_text (json .dumps ({"version" :"0.2.1" ,"archs" : ["gfx1151" ]}),encoding = "utf-8" ) 280with contextlib .redirect_stdout (io .StringIO ()): 281self .assertEqual (stage_tuning .main (["--stage" ,str (stage ),"--archs" ,"gfx1151" ,"--version" ,"100401" ]),0 ) 282meta = json .loads ((stage / "BUILD.json" ).read_text (encoding = "utf-8" )) 283self .assertEqual (meta ["hipblaslt_version" ],100401 ) 284self .assertEqual (meta ["archs" ], ["gfx1151" ])# what was there stays 285self .assertTrue ((stage / "tuning" / "gfx1151-hipblaslt-100401.txt" ).is_file ()) 286 287def test_stage_tuning_can_demand_a_table (self ): 288stage = self .root / "stage" 289stage .mkdir () 290with contextlib .redirect_stdout (io .StringIO ()),self .assertRaises (SystemExit )as caught : 291stage_tuning .main (["--stage" ,str (stage ),"--archs" ,"gfx1201" ,"--version" ,"100200" ,"--expect" ,"gfx1201" ]) 292self .assertIn ("gfx1201" ,str (caught .exception )) 293 294def test_stage_tuning_refuses_a_rocm_whose_version_it_cannot_read (self ): 295stage = self .root / "stage" 296stage .mkdir () 297with self .assertRaises (SystemExit ): 298stage_tuning .main (["--stage" ,str (stage ),"--archs" ,"gfx1201" ,"--rocm" ,str (self .root / "no-rocm" )]) 299 300 301class PackagedAndHashed (TempDir ): 302"""packaging/package_engine.py: the tables are files of the package (hashed, so signed with it) and a bad AMD stage is refused.""" 303 304def stage (self ,** kw ): 305src = self .root / "src" 306src .mkdir () 307 (src / "strata" ).write_bytes (b"engine" * 100 ) 308 (src / "libamdhip64.so.7" ).write_bytes (b"hip" * 100 ) 309 (src / "BUILD.json" ).write_text (json .dumps ({"version" :"0.2.1" ,** kw }),encoding = "utf-8" ) 310return src 311 312def build (self ,src ,archs = ("gfx1201" ,),tree = False ): 313out = self .root / "out" 314out .mkdir (exist_ok = True ) 315with mock .patch .object (package_engine ,"_bundle_missing_libraries" ,return_value = []): 316return package_engine .build (src ,"hip" ,"0.2.1" ,"linux-x86_64" ,out ,entry = "strata" ,archs = archs ,build_id = "t" ,tree = tree , 317variant = "rx9070" ) 318 319def test_the_tables_are_listed_and_hashed_in_the_manifest_even_without_tree (self ): 320src = self .stage (hipblaslt_version = 100500 ) 321fake_table (src / "tuning" ,"gfx1201" ,100500 ) 322folder = self .build (src ) 323listed = {f ["path" ]:f for f in json .loads ((folder / "engine-component.json" ).read_text (encoding = "utf-8" ))["files" ]} 324self .assertIn ("tuning/gfx1201-hipblaslt-100500.txt" ,listed ) 325self .assertEqual (len (listed ["tuning/gfx1201-hipblaslt-100500.txt" ]["sha256" ]),64 ) 326 (folder / "tuning" / "gfx1201-hipblaslt-100500.txt" ).write_text ("changed" ,encoding = "utf-8" )# a swapped table fails the start's hash check 327from strata_control import engine_component as ec 328with self .assertRaises (ec .ComponentProblem ): 329ec .verify (ec .read_manifest (folder ),full = True ) 330 331def test_an_amd_stage_without_a_hipblaslt_version_is_refused (self ): 332src = self .stage () 333with self .assertRaises (SystemExit )as caught : 334self .build (src ) 335self .assertIn ("hipblaslt_version" ,str (caught .exception )) 336 337def test_a_table_for_another_version_or_card_than_the_package_is_refused (self ): 338src = self .stage (hipblaslt_version = 100500 ) 339fake_table (src / "tuning" ,"gfx1201" ,100202 ) 340with self .assertRaises (SystemExit )as caught : 341self .build (src ) 342self .assertIn ("100202" ,str (caught .exception )) 343other = self .root / "other" 344other .mkdir () 345src2 = other / "src" 346src2 .mkdir () 347 (src2 / "strata" ).write_bytes (b"e" ) 348 (src2 / "BUILD.json" ).write_text (json .dumps ({"hipblaslt_version" :100500 }),encoding = "utf-8" ) 349fake_table (src2 / "tuning" ,"gfx1100" ,100500 ) 350with mock .patch .object (package_engine ,"_bundle_missing_libraries" ,return_value = []),self .assertRaises (SystemExit )as caught : 351package_engine .build (src2 ,"hip" ,"0.2.1" ,"linux-x86_64" ,other / "out" ,entry = "strata" ,archs = ("gfx1201" ,),build_id = "t" ) 352self .assertIn ("gfx1100" ,str (caught .exception )) 353 354def test_a_cuda_package_needs_no_hipblaslt_version (self ): 355src = self .stage () 356out = self .root / "out" 357out .mkdir () 358with mock .patch .object (package_engine ,"_bundle_missing_libraries" ,return_value = []): 359package_engine .build (src ,"cuda" ,"0.2.1" ,"linux-x86_64" ,out ,entry = "strata" ,archs = ("sm_86" ,),build_id = "t" ) 360 361 362class SetupFindsThePackageTable (TempDir ): 363"""setup.py outside the app (a git checkout, or the old Windows zip that START-HERE unpacks): the engine folder's own tuning/ comes first.""" 364 365def load_setup (self ): 366import importlib .util 367spec = importlib .util .spec_from_file_location ("setup_hipblaslt_copy" ,ROOT / "setup.py" ) 368module = importlib .util .module_from_spec (spec ) 369spec .loader .exec_module (module ) 370return module 371 372def test_the_engine_folders_table_wins_over_tools_hip_and_the_switch_turns_it_off (self ): 373setup = self .load_setup () 374pkg = self .root / "engine" 375fake_table (pkg / "tuning" ,"gfx1201" ,100500 ) 376seen = [] 377with mock .patch .object (setup ,"ok" ,seen .append ),mock .patch .object (setup ,"say" ,seen .append ), \ 378mock .patch .object (setup ,"warn" ,seen .append ),mock .patch .dict (os .environ , {},clear = False ): 379os .environ .pop (ht .SWITCH ,None ) 380self .assertEqual (setup .hipblaslt_table ("gfx1201" , [],100500 , [pkg / "tuning" ]),pkg / "tuning" / "gfx1201-hipblaslt-100500.txt" ) 381self .assertEqual (setup .hipblaslt_table ("gfx1201" , [],100500 ),TABLES / "gfx1201-hipblaslt-100500.txt" ) 382self .assertIsNone (setup .hipblaslt_table ("gfx1201" , [],100200 , [pkg / "tuning" ]))# no table for 1.2.0: warned, plain 383os .environ [ht .SWITCH ]= "off" 384self .assertIsNone (setup .hipblaslt_table ("gfx1201" , [],100500 , [pkg / "tuning" ])) 385self .assertTrue (any ("no hipBLASLt tuning table" in str (line )for line in seen )) 386 387 388if __name__ == "__main__" : 389unittest .main ()