Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfeiBai committed Mar 4, 2024
1 parent babb296 commit 63dc2c8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions torch_xla/csrc/lowering_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,11 @@ void LoweringContext::SetResult(size_t index, xla::XlaOp op) {
xla::StatusOr<xla::XlaComputation> LoweringContext::BuildXla() {
xla::StatusOr<xla::XlaComputation> xla;

// check whether build for cond/body computation or not, and skip Tuple step if yes
// check whether build for cond/body computation or not, and skip Tuple step
// if yes
if (!root_tuple_.empty() & (root_tuple_.size() == 1) &
(get_name_string() == "condctx") or
(get_name_string() == "bodyctx")) {
((get_name_string() == "condctx") or
(get_name_string() == "bodyctx"))) {
xla = builder()->Build(root_tuple_.at(0));
} else if (!root_tuple_.empty()) {
xla::XlaOp root = xla::Tuple(builder(), root_tuple_);
Expand Down

0 comments on commit 63dc2c8

Please sign in to comment.