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

Adding sqrt op in ttmlir e2e #438

Merged
merged 1 commit into from
Aug 20, 2024
Merged

Conversation

sdjordjevicTT
Copy link
Contributor

@sdjordjevicTT sdjordjevicTT commented Aug 19, 2024

We need to implement the square root operation end-to-end for the next milestone of bringing up LLama.

Solves: #418

@sdjordjevicTT sdjordjevicTT force-pushed the sdjordjevic/implement_sqrt_op branch from b67e196 to 92f6c69 Compare August 19, 2024 21:12
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.

Awesome

@tapspatel
Copy link
Contributor

tapspatel commented Aug 19, 2024

You can add your sqrt.mlir to automatically generate ttnn files. I added docs on how to do that here: https://docs.tenstorrent.com/tt-mlir/ttrt.html#adding-llvm-lit-config-options-inside-a-mlir-file-to-create-flatbuffer-binaries.

  1. Copy your .mlir file into /test/ttmlir/Silicon/TTNN
  2. Add relevant llvm-lit configs (for ex: --ttir-load-system-desc="path=%system_desc_path%")

To test (see https://docs.tenstorrent.com/tt-mlir/ttrt.html#generate-flatbuffer-files-using-llvm-lit)

  1. cmake --build build -- check-ttmlir
  2. ttrt run build/test/ttmlir/Silicon/TTNN

Inside build/test/ttmlir/Silicon, your sqrt.ttnn file should've been generated.

@sdjordjevicTT
Copy link
Contributor Author

You can add your sqrt.mlir to automatically generate ttnn files. I added docs on how to do that here: https://docs.tenstorrent.com/tt-mlir/ttrt.html#adding-llvm-lit-config-options-inside-a-mlir-file-to-create-flatbuffer-binaries.

  1. Copy your .mlir file into /test/ttmlir/Silicon/TTNN
  2. Add relevant llvm-lit configs (for ex: --ttir-load-system-desc="path=%system_desc_path%")

To test (see https://docs.tenstorrent.com/tt-mlir/ttrt.html#generate-flatbuffer-files-using-llvm-lit)

  1. cmake --build build -- check-ttmlir
  2. ttrt run build/test/ttmlir/Silicon/TTNN

Inside build/test/ttmlir/Silicon, your sqrt.ttnn file should've been generated.

Great, thanks for this @tapspatel

@sdjordjevicTT sdjordjevicTT force-pushed the sdjordjevic/implement_sqrt_op branch from 92f6c69 to 902674a Compare August 20, 2024 12:08
@sdjordjevicTT sdjordjevicTT merged commit 43e75fb into main Aug 20, 2024
7 checks passed
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.

4 participants