jactorch.parallel.user_scattered#

Classes

Functions

use_user_scattered(inputs, kwargs, device_ids)

Class UserScatteredDataParallel

class UserScatteredDataParallel[source]#

Bases: DataParallel

__init__(module, device_ids=None, output_device=None, dim=0)#

Initialize internal Module state, shared by both nn.Module and ScriptModule.

Parameters:
Return type:

None

forward(*inputs, **kwargs)#

Define the computation performed at every call.

Should be overridden by all subclasses.

Note

Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.

Parameters:
Return type:

Any

gather(outputs, output_device)#
Parameters:
Return type:

Any

parallel_apply(replicas, inputs, kwargs)#
Parameters:
Return type:

List[Any]

replicate(module, device_ids)#
Parameters:
Return type:

List[T]

scatter(inputs, kwargs, device_ids)[source]#
use_copy_stream = True#

Functions

use_user_scattered(inputs, kwargs, device_ids, use_stream=True)[source]#