MCPcopy Index your code
hub / github.com/apache/tvm / load_module

Function load_module

tests/python/relax/test_runtime_sampling_flashinfer.py:33–43  ·  view source on GitHub ↗
(name: str, static_modules: list[tvm.runtime.Module])

Source from the content-addressed store, hash-verified

31@pytest.mark.skip(reason="Requires FlashInfer enabled and proper setup")
32def 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

Callers 1

test_samplingFunction · 0.70

Calls 3

relpathMethod · 0.80
export_libraryMethod · 0.45
load_moduleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…