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

Added Pipeline/Transformation from TTIR -> Flatbuffer (#314) #406

Merged
merged 3 commits into from
Aug 21, 2024

Conversation

vprajapati-tt
Copy link
Contributor

Implemented

  • Able to call ttir-to-ttnn-backend-pipeline and ttnn-to-flatbuffer
  • Emits a Capsule to be digested by TTRT (TODO Load Binary from Capsule in TTRT #405)
  • Cleaned up CMake and Python bindings Structure

@vprajapati-tt vprajapati-tt marked this pull request as ready for review August 15, 2024 19:13
python/Passes.cpp Outdated Show resolved Hide resolved
ctx->appendDialectRegistry(registry);

const auto pipeline =
mlir::PassPipelineInfo::lookup("ttir-to-ttnn-backend-pipeline");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just call createTTIRToTTNNBackendPipeline directly?

  TTIRToTTNNBackendPipelineOptions options;
  //.. maybe set options ..
  createTTIRToTTNNBackendPipeline(pm, options);
  if (mlir::failed(pm.run(moduleOp))) {
      throw std::runtime_error("Failed to run pass manager");
  }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran it this way in case there was a more involved method to call Pipeline Options. If it's just as simple as editing the struct then that sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned offline, this task will be completed later while I focus on getting E2E working with explorer. Refer to #446 for when that gets completed.

python/Passes.cpp Outdated Show resolved Hide resolved
python/Passes.cpp Outdated Show resolved Hide resolved
python/Passes.cpp Outdated Show resolved Hide resolved
python/CMakeLists.txt Outdated Show resolved Hide resolved
include/ttmlir/Bindings/Python/TTMLIRModule.h Outdated Show resolved Hide resolved
@vprajapati-tt vprajapati-tt requested a review from nsmithtt August 20, 2024 15:16
@vprajapati-tt vprajapati-tt merged commit 56297cc into main Aug 21, 2024
7 checks passed
@vprajapati-tt vprajapati-tt deleted the vprajapati/issue-314 branch August 21, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants