-
Notifications
You must be signed in to change notification settings - Fork 77
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
installation: add mechanism for symlinking mlir-opt when creating venv #3660
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3660 +/- ##
=======================================
Coverage 91.29% 91.29%
=======================================
Files 466 466
Lines 58353 58353
Branches 5623 5623
=======================================
Hits 53275 53275
Misses 3629 3629
Partials 1449 1449 ☔ View full report in Codecov by Sentry. |
this would mess with my autoenv setup https://github.com/hyperupcall/autoenv that also uses .env files (but those .env files aren't valid makefiles so including those results in errors) maybe just supply the argument when running make venv?
|
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.
Maybe some minor confusing (?) points:
- we ignore
.env
since it is supposed to be a per-user file, and this change subverts it to be explicitly included along with potentially other vars - based on 1) can we just keep the
XDSL_MLIR_OPT
check for symlinking? do we need to tie it with.env
? One could still use it and maybe export it withexport $(cat .env | xargs)
or similar. - what happens if I also have export in the shell the variable
XDSL_MLIR_OPT
along with another path in.env
?
What takes precedence? I can't tell off the top of my head. UV_ENV_FILE
allows the use of several.env
files (different names) and with this we are associating ourmlir-opt
variable to only be in.env
.
I think I mentioned this at the time, but for tools like |
do you need the repo or an installation directory? if it is the latter, doesn't |
All great points. There were a few things that I was thinking about and I think I should revisit:
Joren: The whole point is that I would like to just Chris:
|
Actually maybe before I do anything, could anyone get UV_ENV_FILE to do anything at all? Maybe I'm just not holding it right |
I tried it, I think the idea there is to make the environment specified in the |
repo, in particular the tablegen files in the repo |
what is llvm-config? |
Ah then I think we would need to agree on a mechanism and then add more things to it, if you need a repo can also add the repo address |
I've added just the ability to put mlir-opt in the venv, will open a new PR for .env things |
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.
Looks good to me, I would just change the variable name and point to mlir-opt directly instead.
Should this be documented in the readme as well?
Makefile
Outdated
@@ -29,6 +29,9 @@ uv-installed: | |||
.PHONY: ${VENV_DIR}/ | |||
${VENV_DIR}/: uv-installed | |||
XDSL_VERSION_OVERRIDE="0+dynamic" uv sync ${VENV_EXTRAS} | |||
@if [ ! -z "$(XDSL_MLIR_BIN)" ]; 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.
I would probably rename this MLIR_OPT_PATH
and point directly to mlir-opt instead?
For the last couple of years, I've had a custom-built llvm bin folder in my path. This has mostly been OK but sometimes resulted in weird build errors. With this mechanism, we can have the best of both worlds, with having a normal mlir-opt in the path except for when the venv is activated: