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

Fix build error #1999

Merged
merged 1 commit into from
Sep 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 21 additions & 20 deletions torch/csrc/jit/codegen/cuda/compute_at_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,37 +97,38 @@ class TORCH_CUDA_CU_API IterDomainGraph {
Expr* second,
bool forward,
const DisjointSets<IterDomain*>& id_map);
}

bool hasSelfMapping() const {
return self_mapping_info_.has_value();
}
return self_mapping_info_.has_value();
}

private:
void build(Fusion* fusion);
private:
void build(Fusion* fusion);

void initializeId(IterDomain* id, bool is_view_rfactor_id, bool is_leaf_id);
void initializeId(IterDomain* id, bool is_view_rfactor_id, bool is_leaf_id);

// Checks if exprsMap then if forward will map outputs else inputs in exact
// and permissive map.
void mapThroughExpr(Expr* first, Expr* second, bool forward);
// Checks if exprsMap then if forward will map outputs else inputs in exact
// and permissive map.
void mapThroughExpr(Expr* first, Expr* second, bool forward);

DisjointSets<IterDomain*> permissive_nodes_;
DisjointSets<IterDomain*> exact_nodes_;
DisjointSets<IterDomain*> loop_nodes_;
DisjointSets<IterDomain*> permissive_nodes_;
DisjointSets<IterDomain*> exact_nodes_;
DisjointSets<IterDomain*> loop_nodes_;

// Consumers and producers is not symmetric like the other sets
std::unordered_map<IterDomain*, VectorOfUniqueEntries<IterDomain*>> consumers_;
std::unordered_map<IterDomain*, VectorOfUniqueEntries<IterDomain*>> producers_;
// Consumers and producers is not symmetric like the other sets
std::unordered_map<IterDomain*, VectorOfUniqueEntries<IterDomain*>>
consumers_;
std::unordered_map<IterDomain*, VectorOfUniqueEntries<IterDomain*>>
producers_;

DisjointSets<IterDomain*> sibling_sets_;
DisjointSets<IterDomain*> sibling_sets_;

VectorOfUniqueEntries<IterDomain*> all_ids_;
VectorOfUniqueEntries<IterDomain*> all_ids_;

std::unordered_set<IterDomain*> view_rfactor_ids_;
std::unordered_set<IterDomain*> view_rfactor_ids_;

c10::optional<std::tuple<TensorView*, IterDomain*, IterDomain*, std::string>>
self_mapping_info_ = c10::nullopt;
c10::optional<std::tuple<TensorView*, IterDomain*, IterDomain*, std::string>>
self_mapping_info_ = c10::nullopt;
};

class TrivialReductionInfo;
Expand Down