(name: str, static_modules: list[tvm.runtime.Module])
| 31 | @pytest.mark.skip(reason="Requires FlashInfer enabled and proper setup") |
| 32 | def test_sampling(): |
| 33 | def load_module(name: str, static_modules: list[tvm.runtime.Module]): |
| 34 | assert len(static_modules) > 0 |
| 35 | if len(static_modules) == 1: |
| 36 | return static_modules[0] |
| 37 | static_mod = static_modules[0] |
| 38 | for mod in static_modules[1:]: |
| 39 | static_mod.import_module(mod) |
| 40 | temp = utils.tempdir() |
| 41 | mod_path = temp.relpath(f"{name}.so") |
| 42 | static_mod.export_library(mod_path) |
| 43 | return tvm.runtime.load_module(mod_path) |
| 44 | |
| 45 | # Test configuration |
| 46 | batch_size = 10 |
no test coverage detected
searching dependent graphs…