MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / process_args

Function process_args

python/paddle/distributed/launch/plugins/__init__.py:28–42  ·  view source on GitHub ↗
(ctx)

Source from the content-addressed store, hash-verified

26
27
28def process_args(ctx):
29 # reset device by args
30 # argdev = ctx.args.gpus or ctx.args.xpus or ctx.args.npus
31 argdev = ctx.args.devices
32 if argdev:
33 for d in argdev.split(','):
34 if d not in ctx.node.device.labels:
35 ctx.logger.error(
36 f'Device not found {d} from {argdev} for setting {ctx.node.device.labels}'
37 )
38
39 if ctx.args.ips:
40 ips = ctx.args.ips.split(',')
41 if '127.0.0.1' in ips and len(ips) != 1:
42 raise ValueError("127.0.0.1 in ips is not allowed in multi-nodes.")
43
44
45def collective_compatible(ctx):

Callers

nothing calls this directly

Calls 3

ValueErrorClass · 0.85
splitMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected