Skip to content

Commit

Permalink
addressed comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sdjukicTT committed Feb 21, 2025
1 parent f417828 commit 90d1d7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/module_builder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ void ModuleBuilder::convertFromTTIRToTTNN(
mlir::PassManager ttir_to_ttnn_pm(mlir_module.get()->getName());

mlir::tt::ttnn::TTIRToTTNNBackendPipelineOptions options;
options.systemDescPath = "system_desc.ttsys";
options.systemDescPath = system_desc_path;
mlir::tt::ttnn::createTTIRToTTNNBackendPipeline(ttir_to_ttnn_pm, options);

// Run the pass manager.
Expand Down
2 changes: 2 additions & 0 deletions src/common/module_builder.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class ModuleBuilder {
// code. Currently hardcoded to one, as we only support one-chip execution.
size_t getNumAddressableDevices() const { return 1; }

static constexpr char const* system_desc_path = "system_desc.ttsys";

private:
// Creates VHLO module from the input program code.
mlir::OwningOpRef<mlir::ModuleOp>
Expand Down
3 changes: 2 additions & 1 deletion src/common/pjrt_implementation/client_instance.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ ClientInstance::ClientInstance(std::unique_ptr<Platform> platform)
}

ClientInstance::~ClientInstance() {
std::remove(ModuleBuilder::system_desc_path);
DLOG_F(LOG_DEBUG, "ClientInstance::~ClientInstance");
}

Expand Down Expand Up @@ -164,7 +165,7 @@ void ClientInstance::BindApi(PJRT_Api *api) {
tt_pjrt_status ClientInstance::PopulateDevices() {
DLOG_F(LOG_DEBUG, "ClientInstance::PopulateDevices");
auto [system_desc, chip_ids] = tt::runtime::getCurrentSystemDesc();
system_desc.store("system_desc.ttsys");
system_desc.store(ModuleBuilder::system_desc_path);
int devices_count = chip_ids.size();

devices_.resize(devices_count);
Expand Down

0 comments on commit 90d1d7f

Please sign in to comment.