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

[Autotuner] Installation/ Sanity checks #2025

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

luarss
Copy link
Contributor

@luarss luarss commented May 22, 2024

  • Make etc/DependencyInstaller.sh install Autotuner by default.
  • Runtime sanity check. If the parameter is not a flow variable, raise a Warning <- should this be an error?

@vvbandeira

…totuner docs

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
@oharboe
Copy link
Collaborator

oharboe commented May 23, 2024

@luarss @maliberty Does this lock down the versions required in the system install for Python?

That would be very bad as it is going to be version hell for other non-OpenROAD requirements on that same machine...

If this is the case, I would recommend not installing into the system but using venv instead. That way autotuner can lock down versions of modules without worrying about non-OpenROAD python requirements.

@luarss
Copy link
Contributor Author

luarss commented May 23, 2024

@oharboe I see. Tentatively I have thought of creating a “supported Python versions” list where we will route dependency installation for corresponding Python versions, but an easy way out is also to make Autotuner optional like you mentioned

@oharboe
Copy link
Collaborator

oharboe commented May 23, 2024

@oharboe I see. Tentatively I have thought of creating a “supported Python versions” list where we will route dependency installation for corresponding Python versions, but an easy way out is also to make Autotuner optional like you mentioned

Are you familiar with venv?

It is designed to easily and robustly solve exactly the problem you are facing, unless I misunderstand.

With venv you create a "light weight installation"(takes at most a few seconds to set up) of Python where you can specify exactly the versions of modules that you want today using requirements.txt without disturbing the system installation.

@luarss
Copy link
Contributor Author

luarss commented May 23, 2024

@oharboe You mean something like this?

#!/bin/bash

venv_name="my_env"
python3 -m venv "$venv_name"
source "$venv_name/bin/activate"
pip install -r requirements.txt
deactivate

@oharboe
Copy link
Collaborator

oharboe commented May 23, 2024

@oharboe You mean something like this?

#!/bin/bash

venv_name="my_env"
python3 -m venv "$venv_name"
source "$venv_name/bin/activate"
pip install -r requirements.txt
deactivate

Yes.

luarss added 11 commits May 23, 2024 17:24
… to error

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
…o ray (bugfix wip)

Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Copy link
Collaborator

@oharboe oharboe left a comment

Choose a reason for hiding this comment

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

nit

flow/Makefile Outdated Show resolved Hide resolved
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Copy link
Collaborator

@oharboe oharboe left a comment

Choose a reason for hiding this comment

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

Write a unittest with mocking for python code so that it can be regression and implementation tested easily and add to CI.

github copilot/chatgpt will do 95% of the work in my experience.

@luarss luarss self-assigned this Jun 4, 2024
@luarss luarss added autotuner Flow autotuner and removed In Progress labels Jun 4, 2024
luarss and others added 4 commits June 6, 2024 22:52
Signed-off-by: Song Luar <espsluar@gmail.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
@luarss luarss marked this pull request as ready for review June 11, 2024 13:35
@luarss luarss requested a review from vvbandeira June 30, 2024 09:30
luarss and others added 2 commits July 3, 2024 14:17
Signed-off-by: Jack Luar <39641663+luarss@users.noreply.github.com>
Signed-off-by: Song Luar <espsluar@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autotuner Flow autotuner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants