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

Delegate IREE source fetching to shortfin/CMakeLists.txt. #762

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

ScottTodd
Copy link
Member

@ScottTodd ScottTodd commented Jan 6, 2025

This simplification will help with #760.

Pros:

  • Now there are fewer places that use a ref pin
  • Workflows are now simpler

Cons:

  • Workflows will be several seconds slower since FetchContent always fetches all submodules
  • The SHORTFIN_IREE_SOURCE_DIR option is no longer tested

This will make it easier to update the ref. This will slow workflows down a bit since FetchContent always fetches all submodules.
@ScottTodd ScottTodd marked this pull request as ready for review January 6, 2025 18:34
@ScottTodd ScottTodd requested a review from marbre January 6, 2025 18:34
Comment on lines +1 to 4
# Keep in sync with SHORTFIN_IREE_GIT_TAG in CMakeLists.txt
-f https://iree.dev/pip-release-links.html
iree-base-compiler==3.1.0rc20241204
iree-base-runtime==3.1.0rc20241204
Copy link
Member Author

Choose a reason for hiding this comment

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

@marbre did you experiment with having the CMake file pull from this requirements file?

I guess we can also just add a comment in this other location pointing back here too:

# Pins
set(SHORTFIN_IREE_GIT_TAG "iree-3.1.0rc20241220")

Copy link
Collaborator

Choose a reason for hiding this comment

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

A few weeks ago I send #502 and #503, but the former reads in a separate file. However, we should be able to parse the version from a requirements file. I remember we had something very hacky and not really stable in one of the IREE bare-metal Arm workflows but we probably should handle it all inside CMake with a regex.

Copy link
Member Author

Choose a reason for hiding this comment

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

We discussed this a bit offline. I think having two locations that point to each other is pretty manageable without any extra tooling support. Having five locations with only some pointing to the others is not. So for now I think keeping the requirements and CMakeLists only loosely linked via comments is sufficient.

@@ -44,6 +44,7 @@ add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

# Pins
# Keep in sync with requirements-iree-compiler.txt.
Copy link
Member Author

Choose a reason for hiding this comment

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

Update this if moving the requirements file in #765.

Copy link
Collaborator

@marbre marbre left a comment

Choose a reason for hiding this comment

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

  • Workflows will be several seconds slower since FetchContent always fetches all submodules

It actually not as bad as we have set

set(IREE_SUBMODULES "third_party/benchmark third_party/cpuinfo third_party/flatcc third_party/hip-build-deps third_party/googletest")

as well as
GIT_SHALLOW TRUE

  • The SHORTFIN_IREE_SOURCE_DIR option is no longer tested

That's the only downside I see but we can read a workflow later if we really need it.

@ScottTodd
Copy link
Member Author

Ah, I'd forgotten about that detail of git submodules. Thanks for the reminder!

@ScottTodd ScottTodd merged commit 1d841c7 into nod-ai:main Jan 7, 2025
24 of 28 checks passed
@ScottTodd ScottTodd deleted the workflow-iree-ref branch January 7, 2025 15:48
monorimet pushed a commit that referenced this pull request Jan 8, 2025
This simplification will help with
#760.

Pros:

* Now there are fewer places that use a ref pin
* Workflows are now simpler

Cons: 

* ~~Workflows will be several seconds slower since FetchContent always
fetches all submodules~~
* The `SHORTFIN_IREE_SOURCE_DIR` option is no longer tested
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.

2 participants