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

Function wrapper

imperative/python/megengine/distributed/helper.py:158–164  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

156
157 @functools.wraps(func)
158 def wrapper(*args, **kwargs):
159 if not is_distributed():
160 return func(*args, **kwargs)
161
162 ret = func(*args, **kwargs)
163 group_barrier()
164 return ret
165
166 return wrapper
167

Callers

nothing calls this directly

Calls 3

is_distributedFunction · 0.85
group_barrierFunction · 0.85
funcFunction · 0.50

Tested by

no test coverage detected