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
device
dtype
grad
name
ndim
numel
prefix
Return the prefix for this proxy instance.
requires_grad
shape
tags
true_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
.like
is 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.