aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/stream_executor/stream_executor_pimpl.h
diff options
context:
space:
mode:
authorGravatar Vijay Vasudevan <vrv@google.com>2015-12-08 09:58:59 -0800
committerGravatar Vijay Vasudevan <vrv@google.com>2015-12-08 09:58:59 -0800
commitddd4aaf5286de24ba70402ee0ec8b836d3aed8c7 (patch)
tree4efdf6cf4d69b45041fd2a02cd2b7327ea9f1f58 /tensorflow/stream_executor/stream_executor_pimpl.h
parentcd53f3c3302c9312c1840389a9988a879b8b9dd5 (diff)
TensorFlow: upstream changes to git.
Change 109695551 Update FAQ Change 109694725 Add a gradient for resize_bilinear op. Change 109694505 Don't mention variables module in docs variables.Variable should be tf.Variable. Change 109658848 Adding an option to create a new thread-pool for each session. Change 109640570 Take the snapshot of stream-executor. + Expose an interface for scratch space allocation in the interface. Change 109638559 Let image_summary accept uint8 input This allows users to do their own normalization / scaling if the default (very weird) behavior of image_summary is undesired. This required a slight tweak to fake_input.cc to make polymorphically typed fake inputs infer if their type attr is not set but has a default. Unfortunately, adding a second valid type to image_summary *disables* automatic implicit conversion from np.float64 to tf.float32, so this change is slightly backwards incompatible. Change 109636969 Add serialization operations for SparseTensor. Change 109636644 Update generated Op docs. Change 109634899 TensorFlow: add a markdown file for producing release notes for our releases. Seed with 0.5.0 with a boring but accurate description. Change 109634502 Let histogram_summary take any realnumbertype It used to take only floats, not it understands ints. Change 109634434 TensorFlow: update locations where we mention python 3 support, update them to current truth. Change 109632108 Move HSV <> RGB conversions, grayscale conversions, and adjust_* ops back to tensorflow - make GPU-capable version of RGBToHSV and HSVToRGB, allows only float input/output - change docs to reflect new size constraints - change HSV format to be [0,1] for all components - add automatic dtype conversion for all adjust_* and grayscale conversion ops - fix up docs Change 109631077 Improve optimizer exceptions 1. grads_and_vars is now a tuple, so must be wrapped when passed to format. 2. Use '%r' instead of '%s' for dtype formatting Base CL: 109697989
Diffstat (limited to 'tensorflow/stream_executor/stream_executor_pimpl.h')
-rw-r--r--tensorflow/stream_executor/stream_executor_pimpl.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/tensorflow/stream_executor/stream_executor_pimpl.h b/tensorflow/stream_executor/stream_executor_pimpl.h
index 5a59a5a26d..f624e0fcdb 100644
--- a/tensorflow/stream_executor/stream_executor_pimpl.h
+++ b/tensorflow/stream_executor/stream_executor_pimpl.h
@@ -71,9 +71,7 @@ class StreamExecutor {
public:
explicit StreamExecutor(PlatformKind kind,
const PluginConfig &plugin_config = PluginConfig());
-
- // Primarily used for testing.
- StreamExecutor(PlatformKind kind,
+ StreamExecutor(const Platform *platform,
internal::StreamExecutorInterface *implementation);
~StreamExecutor();
@@ -81,9 +79,13 @@ class StreamExecutor {
port::Status Init();
port::Status Init(int device_ordinal, DeviceOptions device_options);
+ // DEPRECATED: Do not use; use platform() instead.
// Returns the platform that this StreamExecutor is acting upon.
PlatformKind platform_kind() const { return platform_kind_; }
+ // Returns a reference to the platform that created this executor.
+ const Platform *platform() const { return platform_; }
+
// Retrieves (loads) a kernel for the platform this StreamExecutor is acting
// upon, if one exists.
//
@@ -538,15 +540,18 @@ class StreamExecutor {
// can acquire the lock on their first (mutating) call as well.
mutable mutex mu_;
- // A mapping of pointer (to GPU memory) to string representation of the stack
- // (of the allocating thread) at the time at which the pointer was allocated.
- std::map<void *, AllocRecord> mem_allocs_ GUARDED_BY(mu_);
+ // Reference to the platform that created this executor.
+ const Platform *platform_;
// Pointer to the platform-specific-interface implementation. This is
// delegated to by the interface routines in pointer-to-implementation
// fashion.
std::unique_ptr<internal::StreamExecutorInterface> implementation_;
+ // A mapping of pointer (to GPU memory) to string representation of the stack
+ // (of the allocating thread) at the time at which the pointer was allocated.
+ std::map<void *, AllocRecord> mem_allocs_ GUARDED_BY(mu_);
+
// Memoized BLAS support object -- we only want to create this once when asked
// for a BLAS interface.
std::unique_ptr<blas::BlasSupport> blas_ GUARDED_BY(mu_);