Skip to content

Commit

Permalink
Merge pull request tensorflow#18765 from Intel-tensorflow/agramesh/St…
Browse files Browse the repository at this point in the history
…ring_fix

[INTEL MKL] Fix compilation failure.
  • Loading branch information
martinwicke authored Apr 23, 2018
2 parents b95d8cc + 8f558d6 commit 540ac23
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tensorflow/core/graph/mkl_layout_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -547,14 +547,14 @@ class MklLayoutRewritePass : public GraphOptimizationPass {

// If Op has been specifically assigned to a non-CPU device, then No.
if (!n->assigned_device_name().empty() &&
!StringPiece(n->assigned_device_name()).contains(kCPUDeviceSubStr)) {
!str_util::StrContains(n->assigned_device_name(),kCPUDeviceSubStr)) {
result = false;
reason = "Op has been assigned a runtime device that is not CPU.";
}

// If user has specifically assigned this op to a non-CPU device, then No.
if (!n->def().device().empty() &&
!StringPiece(n->def().device()).contains(kCPUDeviceSubStr)) {
!str_util::StrContains(n->def().device(),kCPUDeviceSubStr)) {
result = false;
reason = "User has assigned a device that is not CPU.";
}
Expand Down Expand Up @@ -2691,14 +2691,14 @@ class MklLayoutRewritePass : public GraphOptimizationPass {

// If Op has been specifically assigned to a non-CPU device, then No.
if (!n->assigned_device_name().empty() &&
!StringPiece(n->assigned_device_name()).contains(kCPUDeviceSubStr)) {
!str_util::StrContains(n->assigned_device_name(),kCPUDeviceSubStr)) {
result = false;
reason = "Op has been assigned a runtime device that is not CPU.";
}

// If user has specifically assigned this op to a non-CPU device, then No.
if (!n->def().device().empty() &&
!StringPiece(n->def().device()).contains(kCPUDeviceSubStr)) {
!str_util::StrContains(n->def().device(),kCPUDeviceSubStr)) {
result = false;
reason = "User has assigned a device that is not CPU.";
}
Expand Down

0 comments on commit 540ac23

Please sign in to comment.