MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / deco

Function deco

imperative/python/test/unit/core/test_custom_op.py:41–56  ·  view source on GitHub ↗
(test_func)

Source from the content-addressed store, hash-verified

39
40def build_and_clean(*srcs):
41 def deco(test_func):
42 custom_op_srcs = [os.path.join(cur_dir_path, "custom_opsrc", s) for s in srcs]
43
44 def wrapper(*args, **kwargs):
45 lib_path = custom_op_tools.build_and_load(
46 "test_op",
47 custom_op_srcs,
48 extra_include_paths=extra_include_paths,
49 build_dir=build_path,
50 extra_ldflags=extra_ld_flags,
51 verbose=True,
52 )
53 test_func(*args, **kwargs)
54 custom.unload(lib_path)
55
56 return wrapper
57
58 return deco
59

Callers

nothing calls this directly

Calls 1

joinMethod · 0.80

Tested by

no test coverage detected