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

Update docs for EmitC testing #1918

Merged
merged 4 commits into from
Jan 22, 2025
Merged

Update docs for EmitC testing #1918

merged 4 commits into from
Jan 22, 2025

Conversation

svuckovicTT
Copy link
Contributor

Small cleanup on docs + adding docs for EmitC testing:

  • Moved ttnn-standalone's README to docs
  • Added Testing section
  • Added EmitC specific section
  • Updated "adding an op" section
    • Added matmul EmitC test in order fit here
  • Updated --ttir-to-emitc-pipeline pipeline to do input generation by default

Copy link
Contributor

@nsmithtt nsmithtt left a comment

Choose a reason for hiding this comment

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

Thanks you for the docs!! One minor comment, otherwise looks great.

```bash
source env/activate
cmake --build build -- check-ttmlir
```
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 keep this ## Test subsection and this little snippet of bash right here and then also link to the greater testing docs page you created?

Everything below this comment that you've removed is OK for removal, it's just kind of nice while going through the build flow to have a quick validation step that the thing you built does something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed!

Copy link
Contributor

@azecevicTT azecevicTT left a comment

Choose a reason for hiding this comment

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

Props for writing docs.

@@ -304,9 +306,9 @@ under `test/ttmlir/Silicon`. The process is similar to [adding a compiler unit t

In our specific case, we create a unit test here: `test/ttmlir/Silicon/TTNN/simple_matmul.mlir`:
Copy link
Contributor

Choose a reason for hiding this comment

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

.../TTNN/matmul/simple_matmul.mlir

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, I'll remove it completely as there's a string right below.

To locally run EmitC tests:

```bash
llvm-lit -sv test/ttmlir/EmitC/TTNN # Generate flatbuffers and .cpp files
Copy link
Contributor

Choose a reason for hiding this comment

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

To keep it consistent with Lit testing the script should be

# comment
command

# comment
command
...

(or change Lit testing to style in this file, but I find the style with a new line more readable)

@svuckovicTT svuckovicTT merged commit 9e5980e into main Jan 22, 2025
23 checks passed
@svuckovicTT svuckovicTT deleted the svuckovic/update-docs-emitc branch January 22, 2025 16:09
@svuckovicTT svuckovicTT linked an issue Jan 23, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EmitC EmitC related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add EmitC test commands for local repro
3 participants