-
Notifications
You must be signed in to change notification settings - Fork 115
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
Translating the MM TTNN Python benchmark to C++ #18269
Comments
FYI @cmaryanTT @bbradelTT |
I talked to @mbahnasTT This issue is related to a customer using ttnn C++ api, and not the python api, and finding the C++ api slower somehow than what is achieved via python in https://github.com/tenstorrent/tt-metal/blob/main/tech_reports/GEMM_FLOPS/GEMM_FLOPS.md. @mbahnasTT will provide me with the customer's code. Probably the two actions after that would be to:
|
@mbahnasTT I took at the code. I'd expect them to have similar performance as bfloat16 HiFi2 reading from DRAM if their inputs are large enough. Do you know what performance they are achieving and with which input sizes and data types? Also, do you know if they want to have sharded L1 processing? |
@bbradelTT I'll ask them in the meeting tomorrow. |
@mbahnasTT if that is the case, they might want to look at tests/ttnn/unit_tests/gtests/tensor/test_vector_conversion.cpp and ttnn/unit_tests/gtests/test_graph_add.cpp for ideas about how to created L1 sharded tensors. They will need to be careful about properly setting all the parameters. |
@bbradelTT I believe it's very hard for them to fetch for ideas in the code, we need to provide them with the exact benchmark code like we did with the python version with the exact combinations there. Please tell me when this code can be ready to provide to them? |
@edwinleeTT will translate tests/ttnn/unit_tests/benchmarks/test_benchmark.py to C++. I'll edit the description. |
@mbahnasTT I've started working on the Cpp version and have created a draft PR with the progress so far. This doesn't have all the functionality of the Python test yet, but should be enough to illustrate a matmul. It can be run by checking out the "elee/ttnn_bench_port" branch, then building the tests with the following:
Then run the following to run the new test:
You should see the following when it finishes:
|
Describe the bug
Optimizing the Mattel TTNN c++ benchmark, to match the perf of the python version.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Based on Yu Gao's assessment, the needed work is around:
Screenshots
If applicable, add screenshots to help explain your problem.
Please complete the following environment information:
Additional context
Add any other context about the problem here.
** Action **
Translate tests/ttnn/unit_tests/benchmarks/test_benchmark.py to C++ by creating a file at tests/ttnn/unit_tests/gtests/benchmarks/test_benchmark.cpp
The text was updated successfully, but these errors were encountered: