MCPcopy Create free account
hub / github.com/apache/tvm-ffi / populate_object_table

Function populate_object_table

tests/scripts/benchmark_dlpack.py:407–411  ·  view source on GitHub ↗
(num_classes: int)

Source from the content-addressed store, hash-verified

405
406
407def populate_object_table(num_classes: int) -> None:
408 nop = tvm_ffi.get_global_func("testing.nop")
409 dummy_instances = [type(f"DummyClass{i}", (object,), {})() for i in range(num_classes)]
410 for instance in dummy_instances:
411 nop(instance)
412
413
414def main() -> None: # noqa: PLR0915

Callers 1

mainFunction · 0.85

Calls 1

nopFunction · 0.85

Tested by

no test coverage detected