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

Load system desc pass #132

Closed
nsmithtt opened this issue Jul 12, 2024 · 1 comment · Fixed by #289
Closed

Load system desc pass #132

nsmithtt opened this issue Jul 12, 2024 · 1 comment · Fixed by #289
Assignees
Labels
enhancement New feature or request flatbuffer

Comments

@nsmithtt
Copy link
Contributor

Create a load system desc pass for loading system descs from disk into the compiler:

include/ttmlir/Dialect/TTIR/Passes.td:

 def TTIRLoadSystemDesc: Pass<"ttir-load-system-desc", "::mlir::ModuleOp"> {
...
    list<Option> options = [
        Option<"path", "path", "std::string", "", "System desc path">,
    ];
}

The pass itself can be something like:

    if (not path.empty()) {
      // Load the system desc from path
    } else if (not module->hasAttr(tt::SystemDescAttr::name)) {
      module->setAttr(tt::SystemDescAttr::name,
                      tt::SystemDescAttr::getDefault(&getContext()));
    }

This way tests can just run --ttir-load-system-desc with no path argument and get the default system desc, which is just an 8x8 WH system.

@tapspatel
Copy link
Contributor

Part of this issue will be to include default pass for all variables in the Flatbuffer

tapspatel added a commit that referenced this issue Jul 22, 2024
@tapspatel tapspatel added enhancement New feature or request flatbuffer labels Aug 1, 2024
tapspatel added a commit that referenced this issue Aug 3, 2024
tapspatel added a commit that referenced this issue Aug 3, 2024
tapspatel added a commit that referenced this issue Aug 3, 2024
tapspatel added a commit that referenced this issue Aug 5, 2024
tapspatel added a commit that referenced this issue Aug 5, 2024
tapspatel added a commit that referenced this issue Aug 5, 2024
tapspatel added a commit that referenced this issue Aug 5, 2024
tapspatel added a commit that referenced this issue Aug 5, 2024
tapspatel added a commit that referenced this issue Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flatbuffer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants