Extended ScratchSpace to expose its underlying scratch tensor object.

PiperOrigin-RevId: 167649551
This commit is contained in:
Eugene Brevdo 2017-09-05 16:37:32 -07:00 committed by TensorFlower Gardener
parent db43fe68e0
commit 6078160299

View File

@ -313,6 +313,9 @@ class ScratchSpace {
int64 size() const { return scratch_tensor_.NumElements(); }
const string& debug_info() const { return debug_info_; }
Tensor& tensor() { return scratch_tensor_; }
const Tensor& tensor() const { return scratch_tensor_; }
// Returns true if this ScratchSpace is in host memory.
bool on_host() const { return on_host_; }