thunder.core.proxies.FutureTensorProxy¶
- class thunder.core.proxies.FutureTensorProxy(name=None, *, like=None, shape=None, device=None, dtype=None, prefix=None, history=None, tags=None)[source]¶
Bases:
Proxy,TensorProxyInterface- Parameters:
name (str | None) –
like (TensorProxy | FutureTensorProxy | None) –
shape (ShapeLike | None) –
device (devices.Device | None) –
dtype (dtypes.dtype | None) –
prefix (None | str) –
history (None | tuple) –
tags (set | None) –
- __init__(name=None, *, like=None, shape=None, device=None, dtype=None, prefix=None, history=None, tags=None)[source]¶
Methods
__init__([name, like, shape, device, dtype, ...])get_default_prefix()- rtype:
replace(**changes)Return a copy of the FutureTensorProxy object with new values for the specified fields as given to the constructor as arguments.
replace_name([name, disambiguate])Return a copy of this proxy with the given name.
type_string()wait()- rtype:
Attributes
devicedtypegradnamendimnumelprefixReturn the prefix for this proxy instance.
requires_gradshapetagstrue_dtype- replace(**changes)[source]¶
Return a copy of the FutureTensorProxy object with new values for the specified fields as given to the constructor as arguments. Valid keyword arguments are
name,history,shape,dtype,device.likeis also a valid keyword and will take metadata from the tensor proxy argument in preference to the old values but overridable by keyword arguments. Note that the copy will use the current (environment) tracectx.