Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove duplicate check #28242

Merged
merged 1 commit into from Apr 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 3 additions & 10 deletions tensorflow/compiler/jit/mark_for_compilation_pass.cc
Expand Up @@ -256,8 +256,7 @@ class MarkForCompilationPassImpl {
// Nodes that XLA can compile are put in `compilation_candidates_`.
Status FindCompilationCandidates();

bool CompilationDisallowedByXlaCompileAttr(Node* node,
const DeviceType& jit_device_type);
bool CompilationDisallowedByXlaCompileAttr(Node* node);

// Populates `clusters_`.
Status BuildInitialClusterSet();
Expand Down Expand Up @@ -869,7 +868,7 @@ Status MarkForCompilationPassImpl::FindCompilationCandidates() {
VLOG(4) << "Device type for " << node->name() << ": "
<< device_type.type_string();

if (CompilationDisallowedByXlaCompileAttr(node, device_type)) {
if (CompilationDisallowedByXlaCompileAttr(node)) {
VLOG(2) << "Not clustering " << node->name()
<< ": disallowed by _XlaCompile attribute";
continue;
Expand Down Expand Up @@ -955,17 +954,11 @@ Status MarkForCompilationPassImpl::FindCompilationCandidates() {
}

bool MarkForCompilationPassImpl::CompilationDisallowedByXlaCompileAttr(
Node* node, const DeviceType& device_type) {
Node* node) {
if (debug_options_.ignore_xla_compile_attr) {
return false;
}

const XlaOpRegistry::DeviceRegistration* registration;
if (!XlaOpRegistry::GetCompilationDevice(device_type.type(), &registration)) {
VLOG(2) << "Rejecting " << node->name() << ": could not find JIT device.";
return false;
}

// If there is a _XlaCompile annotation, use its value.
bool compile = false;
Status status = GetNodeAttr(node->attrs(), kXlaCompileAttr, &compile);
Expand Down