| 111 | } |
| 112 | |
| 113 | Status XlaResource::SetValue(const xla::XlaOp& value) { |
| 114 | if (type_ == DT_INVALID) { |
| 115 | return errors::InvalidArgument( |
| 116 | "Resource '", name_, |
| 117 | "' must be initialized with a valid type before use."); |
| 118 | } |
| 119 | value_ = value; |
| 120 | return Status::OK(); |
| 121 | } |
| 122 | |
| 123 | Status XlaResource::SetZeroValue(xla::XlaBuilder* builder) { |
| 124 | if (type_ == DT_INVALID) { |
no test coverage detected