-
Notifications
You must be signed in to change notification settings - Fork 90
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
#13128: Enhance build_metal.sh #13141
Conversation
"TT_UMD_BUILD_TESTS -> Do we want to build umd unit tests? Does this option need to be coordinated with UMD? if so, would suggest reaching out to @joelsmithTT @broskoTT @pjanevskiTT. Is this a necessary change for getting rid of ARCH_NAME for tt-metal codebase? |
Yes, I was going to submit a PR to them today. Will keep them in the loop.
It is sort of complicated to talk through all the scenarios, but adding this switch is sort of common sense cleanup for both projects. By default, umd unit tests are not built. If It won't be a drastic change from what already happens, based on their use of EXCLUDE_FROM_ALL token in their tests. |
b6b1ce8
to
449c93e
Compare
you're changing a lot more than just controlling which tests to build in this PR, can you separate it out? We also currently have no way to test |
Guilty as charged. Will separate it out. |
|
||
build_dir="build_$build_type" | ||
|
||
|
||
# Set the python environment directory if not already set | ||
if [ -z "$PYTHON_ENV_DIR" ]; then |
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.
Is this needed in the CMake system? Don't think so right?
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.
Not sure actually.
@@ -273,7 +276,7 @@ install(TARGETS ttnn | |||
) | |||
if(WITH_PYTHON_BINDINGS) | |||
# Install .so into src files for pybinds implementation | |||
install(FILES ${PROJECT_BINARY_DIR}/lib/_ttnn.so |
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.
How does the install target know which file to copy over? I don't see this declared anywhere else
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.
The CMake target "ttnn" is a shared library target. CMake will always know where it is building it, so we don't have to tell CMake where it is. We just need to say "install target", just like we are doing a few lines above (line 272).
@@ -37,7 +37,7 @@ jobs: | |||
echo "TT_METAL_HOME=$(pwd)" >> $GITHUB_ENV | |||
- name: Build UMD device and tests | |||
run: | | |||
cmake -B build -G Ninja | |||
cmake -B build -G Ninja -DTT_UMD_BUILD_TESTS=ON |
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.
What the heck - why are we building the tests on the TG machine? We should be downloading build artifacts. Sounds like an issue to write up to do after
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.
Can you write up said issue? I don't know what a TG machine is yet.
Eventually, we don't want to be building UMD tests at all in tt-metal CI, because UMD Is an external third party library, and they are starting to run their own CI.
: ' | ||
TLDR: Follow the steps outlined below to build metal. For more in-depth information, keep reading | ||
|
||
Steps: |
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.
There was really nothing from here you wanted to keep as comments?
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.
Correct, I want a single source of truth on documentation.
Anything worth documenting should be in README.md.
@@ -1,6 +1,6 @@ | |||
|
|||
add_executable(watcher_dump ${CMAKE_CURRENT_SOURCE_DIR}/watcher_dump.cpp) | |||
target_link_libraries(watcher_dump PRIVATE test_metal_common_libs) |
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.
Damn, good catch
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.
Had to fix a build failure, after separating the libraries and executables from the tests.
Splitting this PR into: |
Ticket
#13128
Problem description
Currently, we build tt-metal, ttnn, and tt-umd unit tests, or we build no tests.
Additionally, our users have no control over where build artifacts are installed when building from source.
What's changed
build_metal.sh
--help
Checklist