-
Notifications
You must be signed in to change notification settings - Fork 1
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
Simplified install and more infos in README #1
Open
JonathanALevine
wants to merge
3
commits into
marty1885:master
Choose a base branch
from
JonathanALevine:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,48 @@ | ||
# ttVecAdd | ||
|
||
A simple vector-addition on Tenstorrent devices using tt-Metalium. | ||
A simple vector-addition demo on Tenstorrent devices using tt-Metalium. | ||
|
||
## How to use | ||
This demo works on grayskull e150 and e75. | ||
|
||
|
||
Before building this project. Setup the enviroment variables that Metalium needs | ||
## Setup | ||
Before building this project. Setup the enviroment variables in `setup_env.sh` that Metalium needs, e.g.: | ||
|
||
```bash | ||
export ARCH_NAME=grayskull | ||
export TT_METAL_HOME=/path/to/your/root/of/tt-metal/ | ||
export TT_METAL_ENV=dev | ||
``` | ||
|
||
Then build the project | ||
`ln -s $(pwd)/vecadd_kernels $TT_METAL_HOME/ttvecadd_kernels` in `setup_env.sh` will also create a link in the root of TT_METAL_HOME (this is needed at this time because tt-metal looks in its root dir for kernels). | ||
|
||
## Build | ||
```bash | ||
cd ttVecAdd | ||
# HACK: Metalium only searches kernels under it's directories | ||
ln -s vecadd_kernels $TT_METAL_HOME/vecadd_kernels | ||
|
||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
``` | ||
|
||
To run | ||
|
||
``` | ||
➜ ./ttvecadd | ||
## Run | ||
```bash | ||
$ ./ttvecadd | ||
Metal | INFO | Initializing device 0 | ||
Device | INFO | Opening user mode device driver | ||
2024-03-26 10:24:40.877 | INFO | SiliconDriver - Detected 1 PCI device : [0] | ||
Metal | INFO | AI CLK for device 0 is: 1300 MHz | ||
Metal | INFO | DPRINT enabled on device 0, worker core (x=0,y=0) (physical (x=1,y=1)). | ||
Metal | INFO | DPRINT Server attached device 0 | ||
Verif | INFO | Created a random vector of size 512 | ||
Verif | INFO | Created a random vector of size 512 | ||
2024-04-07 19:02:21.965 | INFO | SiliconDriver - Detected 1 PCI device : {0} | ||
Metal | INFO | AI CLK for device 0 is: 1202 MHz | ||
Verif | INFO | Created a random vector of size 32768 | ||
Verif | INFO | Created a random vector of size 32768 | ||
Kernel execution finished | ||
Partial results: (note we are running under BFP16. It's going to be less accurate) | ||
17.625 + 8.1875 = 25.875 | ||
6.34375 + 17.125 = 23.5 | ||
5.0625 + 4.3125 = 9.375 | ||
17.375 + 4.53125 = 21.875 | ||
3.25 + 10.5625 = 13.8125 | ||
17 + 3.25 = 20.25 | ||
7.40625 + 6.8125 = 14.25 | ||
17.875 + 0.369141 = 18.25 | ||
15.75 + 10.75 = 26.5 | ||
15.1875 + 15.8125 = 31 | ||
2.32812 + 2.26562 = 4.59375 | ||
4.25 + 3.46875 = 7.71875 | ||
0.0114746 + 7.4375 = 7.4375 | ||
4.09375 + 6.9375 = 11.0625 | ||
3.89062 + 7.03125 = 10.9375 | ||
6.84375 + 6.0625 = 12.9375 | ||
0.0195312 + 3.71875 = 3.73438 | ||
9.4375 + 7.6875 = 17.125 | ||
6.8125 + 4.96875 = 11.8125 | ||
4.25 + 5.46875 = 9.75 | ||
Metal | INFO | Closing device 0 | ||
Metal | INFO | DPRINT Server dettached device 0 | ||
Device | INFO | Closing user mode device drivers | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export ARCH_NAME=grayskull | ||
export TT_METAL_HOME=~/Desktop/devs/tt-metal/ | ||
export TT_METAL_ENV=dev | ||
|
||
mkdir build | ||
|
||
ln -s $(pwd)/vecadd_kernels $TT_METAL_HOME/ttvecadd_kernels |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super sure this should be in the repository. Foremost, the path is for your specific setup and not everyone have tt-metal on their dekstop.
I'm more leaning towards removing this file for the sake of generality. What's your thought?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point.
How about keeping the file, but changing the variable TT_METAL_HOME to
TT_METAL_HOME=/path/to/your/root/of/tt-metal/
What do you think?