|
Uni20
Asynchronous tensor and runtime library.
|
Reverse-mode accumulation endpoint with staged input/output gradient channels. More...
#include <reverse_value.hpp>
Public Types | |
| using | value_type = T |
Public Member Functions | |
| Async< T > & | backprop () & |
| Finalize and return mutable access to the backprop async channel. | |
| Async< T > | backprop () && |
| Finalize and move out the backprop async channel. | |
| Async< T > const & | backprop () const & |
| Finalize and return const access to the backprop async channel. | |
| Async< T > | final () |
| Finalize and return the underlying async gradient channel. | |
| T | final_wait () |
| Finalize and synchronously wait for the terminal gradient value. | |
| void | finalize () const |
| Ensure the reverse queue has been started exactly once. | |
| T | get_wait () |
| Wait for and return the final gradient value. | |
| ReadBuffer< T > | input () const |
| Get the input-gradient read buffer from the earliest reverse epoch. | |
| Async< T > & | last_value () & |
| Access the latest internal async value without forcing finalization. | |
| Async< T > | last_value () && |
| Move out the latest internal async value without forcing finalization. | |
| Async< T > const & | last_value () const & |
| Access the latest internal async value without forcing finalization. | |
| template<typename U > | |
| ReverseValue & | operator+= (Async< U > const &v) |
| Accumulate an async source into this reverse channel. | |
| template<typename U > | |
| ReverseValue & | operator+= (ReadBuffer< U > v) |
| Accumulate a read buffer source into this channel. | |
| template<typename U > | |
| ReverseValue & | operator+= (ReverseValue< U > const &v) |
| Accumulate another reverse channel into this channel. | |
| template<typename U > | |
| ReverseValue & | operator-= (Async< U > const &v) |
| Subtract an async source from this reverse channel. | |
| template<typename U > | |
| ReverseValue & | operator-= (ReadBuffer< U > v) |
| Subtract a read-buffer source from this channel. | |
| template<typename U > | |
| ReverseValue & | operator-= (ReverseValue< U > const &v) |
| Subtract another reverse channel from this channel. | |
| template<typename U > | |
| ReverseValue & | operator= (Async< U > &&v) |
| Move-assign from an async source by scheduling an async move. | |
| template<typename U > | |
| ReverseValue & | operator= (Async< U > const &v) |
| Assign from an async source by scheduling an async copy. | |
| ReverseValue & | operator= (ReverseValue &&other) noexcept |
| Move assignment finalizes any pending chain before transfer. | |
| template<typename U > requires std::constructible_from<T, U&&> | |
| ReverseValue & | operator= (U &&v) |
| Immediately assign a terminal gradient value. | |
| WriteBuffer< T > | output () |
| Get the output-gradient write buffer for downstream accumulation. | |
| ReadBuffer< T > | read () const |
Alias for input(). | |
| ReverseValue () | |
| Construct a new, uninitialized ReverseValue. | |
| ReverseValue (ReverseValue &&) noexcept=default | |
| Move constructor. | |
| ReverseValue (ReverseValue const &)=delete | |
| Non-copyable. | |
| void | start () |
| Explicitly start the reverse queue. | |
| void | wait () |
| Finalize and synchronously wait for the terminal gradient to complete. | |
| ~ReverseValue () | |
| Access as an Async<T> (read-only use). | |
Reverse-mode accumulation endpoint with staged input/output gradient channels.
| T | Gradient value type. |
| using uni20::async::ReverseValue< T >::value_type = T |
|
inline |
Construct a new, uninitialized ReverseValue.
|
defaultnoexcept |
Move constructor.
|
delete |
Non-copyable.
|
inline |
Access as an Async<T> (read-only use).
Get the final gradient value; also finalizes the computation chain.
Destructor finalizes the reverse queue if needed.
|
inline |
Finalize and return mutable access to the backprop async channel.
|
inline |
Finalize and move out the backprop async channel.
|
inline |
Finalize and return const access to the backprop async channel.
|
inline |
Finalize and return the underlying async gradient channel.
|
inline |
Finalize and synchronously wait for the terminal gradient value.
|
inline |
Ensure the reverse queue has been started exactly once.
|
inline |
Wait for and return the final gradient value.
|
inline |
Get the input-gradient read buffer from the earliest reverse epoch.
|
inline |
Access the latest internal async value without forcing finalization.
|
inline |
Move out the latest internal async value without forcing finalization.
|
inline |
Access the latest internal async value without forcing finalization.
|
inline |
Accumulate an async source into this reverse channel.
| U | Source value type. |
| v | Source async value. |
*this.
|
inline |
Accumulate a read buffer source into this channel.
| U | Source value type. |
| v | Source read buffer. |
*this.
|
inline |
Accumulate another reverse channel into this channel.
| U | Source value type. |
| v | Source reverse value. |
*this.
|
inline |
Subtract an async source from this reverse channel.
| U | Source value type. |
| v | Source async value. |
*this.
|
inline |
Subtract a read-buffer source from this channel.
| U | Source value type. |
| v | Source read buffer. |
*this.
|
inline |
Subtract another reverse channel from this channel.
| U | Source value type. |
| v | Source reverse value. |
*this.
|
inline |
Move-assign from an async source by scheduling an async move.
| U | Source value type. |
| v | Source async value. |
*this.
|
inline |
Assign from an async source by scheduling an async copy.
| U | Source value type. |
| v | Source async value. |
*this.
|
inlinenoexcept |
Move assignment finalizes any pending chain before transfer.
| other | Source reverse value. |
*this.
|
inline |
Immediately assign a terminal gradient value.
| U | Source type constructible as T. |
| v | Source value. |
*this.
|
inline |
Get the output-gradient write buffer for downstream accumulation.
|
inline |
Alias for input().
|
inline |
Explicitly start the reverse queue.
|
inline |
Finalize and synchronously wait for the terminal gradient to complete.