Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfeiBai committed Mar 4, 2024
1 parent bbbff36 commit 323ffe6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions torch_xla/csrc/lowering_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ void LoweringContext::SetResult(size_t index, xla::XlaOp op) {

xla::StatusOr<xla::XlaComputation> LoweringContext::BuildXla() {
xla::StatusOr<xla::XlaComputation> xla;
// check while_loop and skip Tuple 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")) {
xla = builder()->Build(root_tuple_.at(0));
Expand Down
3 changes: 1 addition & 2 deletions torch_xla/csrc/lowering_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ class LoweringContext : public torch::lazy::LoweringContext {
xla::XlaOp GetOutputOp(const torch::lazy::Output& output);

// Build the XLA computation capturing all the operations created with the
// embedded XLA builder (returned by the builder() API) with check whether
// build for cond/body computation or not.
// embedded XLA builder (returned by the builder() API).
xla::StatusOr<xla::XlaComputation> BuildXla();

// Build the XLA computation capturing all the operations created with the
Expand Down

0 comments on commit 323ffe6

Please sign in to comment.