Skip to content

Commit

Permalink
PR #22454: [Shardy] Create dump directory.
Browse files Browse the repository at this point in the history
Imported from GitHub PR #22454

Copybara import of the project:

--
ad713d8 by Yunlong Liu <[email protected]>:

Update shardy_xla_pass.cc
--
d5bb158 by Yunlong Liu <[email protected]>:

Update BUILD

Merging this change closes #22454

COPYBARA_INTEGRATE_REVIEW=#22454 from yliu120:create_dump_dir d5bb158
PiperOrigin-RevId: 724355015
  • Loading branch information
yliu120 authored and Google-ML-Automation committed Feb 7, 2025
1 parent 0c474b0 commit a2dcb60
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions xla/service/spmd/shardy/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ cc_library(
"@llvm-project//mlir:Support",
"@shardy//shardy/common:file_utils",
"@shardy//shardy/dialect/sdy/transforms/propagation:passes",
"@tsl//tsl/platform:env",
"@tsl//tsl/platform:errors",
"@tsl//tsl/platform:path",
"@tsl//tsl/platform:statusor",
Expand Down
3 changes: 2 additions & 1 deletion xla/service/spmd/shardy/shardy_xla_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ limitations under the License.
#include "xla/tsl/framework/mlir/status_scoped_diagnostic_handler.h"
#include "xla/util.h"
#include "xla/xla_data.pb.h"
#include "tsl/platform/env.h"
#include "tsl/platform/errors.h"
#include "tsl/platform/path.h"
#include "tsl/platform/statusor.h"
Expand Down Expand Up @@ -329,7 +330,7 @@ absl::StatusOr<bool> ShardyXLA::Run(
tsl::io::JoinPath(shardyDir, "shardy", uniqueModuleName(*hloModule));
LOG(INFO) << "Using Shardy output directory: " << shardyDir;
}

TF_RETURN_IF_ERROR(tsl::Env::Default()->RecursivelyCreateDir(shardyDir));
// MLIR pipeline: (1) import, (2) Shardy, and (3) export.

bool enableVerifier = false;
Expand Down

0 comments on commit a2dcb60

Please sign in to comment.