r"""Simple function wrapper for the master function
(*args, **kwargs)
| 34 | r"""Apply this function only to the master GPU.""" |
| 35 | @functools.wraps(func) |
| 36 | def wrapper(*args, **kwargs): |
| 37 | r"""Simple function wrapper for the master function""" |
| 38 | if get_rank() == 0: |
| 39 | return func(*args, **kwargs) |
| 40 | else: |
| 41 | return None |
| 42 | return wrapper |
| 43 | |
| 44 |
nothing calls this directly
no test coverage detected