aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/profiler
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <bsteiner@google.com>2017-08-04 15:30:53 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-08-04 15:34:51 -0700
commit0815de21239955e346b562e899640649c8d2b9cb (patch)
tree064a9da2aa7d84db1095944fb9394a838d47c2a2 /tensorflow/core/profiler
parent0ba2a1f6db399cbb5be3e71acdad1123af29348a (diff)
Merge changes from github.
END_PUBLIC --- Commit cf375f067 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: Adds cudnn_rnn_ops_op_lib and cudnn_rnn_kernels to contrib_ops_op_lib and contrib_kernels respectively. PiperOrigin-RevId: 164170971 --- Commit 95ec58e27 authored by Asim Shankar<ashankar@google.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: C API: Make TF_TensorFromTensor return an error instead of just logging it. PiperOrigin-RevId: 164167582 --- Commit 15175c870 authored by Jonathan Hseu<jhseu@google.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: Build fixes. - Allow var_list as a positional argument in CrossShardOptimizer. - Set the number of shards to 1 when not running on TPU, to allow evaluate() and predict() on CPU/GPU to work. PiperOrigin-RevId: 164161640 --- Commit bd3e894f7 authored by Yao Zhang<yaozhang@google.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: Support freeze mode for fused batch norm. PiperOrigin-RevId: 164149032 --- Commit e6b6b84c0 authored by Asim Shankar<ashankar@google.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: C API: TF_Tensors will always be in host memory. This change undoes some experimentation in commit 22651083406ca01ac9d481e3367a3510d25f88cd and restores TF_Tensor behavior to what is was prior to that change. PiperOrigin-RevId: 164146670 --- Commit 8bf3f88f7 authored by Peter Hawkins<phawkins@google.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: [TF:XLA] Add _XLASend and _XLARecv TF ops that wrap the XLA Send/Recv HLO ops. PiperOrigin-RevId: 164124764 --- Commit 626d3200f authored by Peter Hawkins<phawkins@google.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: [XLA] Add test blacklist mechanism for XLA C++ unit tests. PiperOrigin-RevId: 164124423 --- Commit 359cc5f5e authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: Document dict ordering in nest and make it consistent with sonnet. PiperOrigin-RevId: 164114335 --- Commit 05813b531 authored by A. Unique TensorFlower<gardener@tensorflow.org> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: Go: Update generated wrapper functions for TensorFlow ops. PiperOrigin-RevId: 164089206 --- Commit c451f465d authored by Anna R<annarev@google.com> Committed by Benoit Steiner<benoitsteiner@users.noreply.github.com>: BEGIN_PUBLIC Automated g4 rollback of changelist 164078808 PiperOrigin-RevId: 164318935
Diffstat (limited to 'tensorflow/core/profiler')
-rw-r--r--tensorflow/core/profiler/internal/tfprof_node.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/tensorflow/core/profiler/internal/tfprof_node.cc b/tensorflow/core/profiler/internal/tfprof_node.cc
index 69198019cd..70b91c37e4 100644
--- a/tensorflow/core/profiler/internal/tfprof_node.cc
+++ b/tensorflow/core/profiler/internal/tfprof_node.cc
@@ -25,7 +25,7 @@ bool CountAsAcceleratorTime(const string& device) {
}
bool CountAsCPUTime(const string& device) {
- return RE2::FullMatch(device, ".*/(gpu|cpu):\\d+");
+ return RE2::FullMatch(device, ".*/(gpu|cpu|device:sycl):\\d+");
}
bool IsCanonicalDevice(const string& device) { return CountAsCPUTime(device); }
@@ -145,7 +145,7 @@ void TFGraphNode::AddStepStat(int64 step, const string& device,
// See run_metadata_test.py
// It can be /job:0/replica:0/xxxx/gpu:0, or simply /gpu:0.
// It can has some ad-hoc suffix, such as /stream:xx or /memcpy:xx.
- if (IsCanonicalDevice(device)) {
+ if (IsCanonicalDevice(dev)) {
if (!canonical_device_.empty()) {
if (canonical_device_ != dev) {
fprintf(stderr, "Unexpected: graph node changed device: %s->%s.\n",
@@ -155,7 +155,11 @@ void TFGraphNode::AddStepStat(int64 step, const string& device,
} else {
canonical_device_ = dev;
// TODO(xpan): Support things other than gpu?
- host_device_ = StringReplace(dev, "gpu:\\d+", "cpu:0");
+ if (dev.find("sycl") != dev.npos) {
+ host_device_ = StringReplace(dev, "device:sycl:\\d+", "cpu:0");
+ } else {
+ host_device_ = StringReplace(dev, "gpu:\\d+", "cpu:0");
+ }
AddOpType(canonical_device_);
}
}
@@ -229,7 +233,8 @@ TensorShapeProto VecToShapeProto(const std::vector<int64> shape_vec) {
}
bool IsPlacedOnAccelerator(const string& device) {
- return device.find("gpu") != device.npos;
+ return device.find("gpu") != device.npos ||
+ device.find("sycl") != device.npos;
}
} // namespace tfprof
} // namespace tensorflow