A unique identifier for a particular "logical execution" of an XLA model. A logical execution might encompass multiple executions of one or more HloModules. Runs that are part of the same logical execution can communicate via collective ops (e.g. kAllToAll), whereas runs that are part of different logical executions are isolated.
| 47 | // communicate via collective ops (e.g. kAllToAll), whereas runs that are part |
| 48 | // of different logical executions are isolated. |
| 49 | class RunId { |
| 50 | public: |
| 51 | // Creates a new, unique RunId. |
| 52 | RunId(); |
| 53 | |
| 54 | RunId(const RunId&) = default; |
| 55 | RunId& operator=(const RunId&) = default; |
| 56 | friend bool operator==(const RunId& a, const RunId& b); |
| 57 | std::string ToString() const; |
| 58 | |
| 59 | template <typename H> |
| 60 | friend H AbslHashValue(H h, const RunId& id) { |
| 61 | return H::combine(std::move(h), id.data_); |
| 62 | } |
| 63 | |
| 64 | private: |
| 65 | int64 data_; |
| 66 | }; |
| 67 | |
| 68 | // Callback used by the GPU backend only. This is an "one-sided" version of |
| 69 | // ThenDoHostCallback that enqueues a callback onto a stream. The difference |
no outgoing calls
no test coverage detected