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

Install CIRCT out of Conda #1675

Merged
merged 10 commits into from
Dec 7, 2023
Merged

Install CIRCT out of Conda #1675

merged 10 commits into from
Dec 7, 2023

Conversation

abejgonzalez
Copy link
Contributor

@abejgonzalez abejgonzalez commented Dec 1, 2023

The CIRCT community has some scripts to help install updated versions / update versions of CIRCT in repos. This PR is to see how well this works in Chipyard. There are two potential implementations of using these scripts:

  1. This PR. I.e. handle CIRCT installation/updating separate from Conda. Allows us to remove the conda-feedstock for CIRCT and have less things inside of Conda (environment bloat).
  2. Update the conda-feedstock to automatically update and publish using these scripts. I.e. the conda-feedstock will download CIRCT, put it in the conda location, and publish it. This will keep the same type of flow as before (all in conda) and will just require us to update firtool ourselves (maybe we can write a script to autoupdate it).

EDIT: We decided on #1 since it's shifts the burden of us having to maintain a feedstock to the CIRCT devs who already publish a working version of CIRCT.

Any thoughts?

Side Update: Moves the env.sh generation into the conda setup part of build-setup.sh. Thus if a later part of the flow fails you still have a env.sh to diagnose and manually do other parts of the setup.

Related PRs / Issues:

Type of change:

  • Bug fix
  • New feature
  • Other enhancement

Impact:

  • RTL change
  • Software change (RISC-V software)
  • Build system change
  • Other

Contributor Checklist:

  • Did you set main as the base branch?
  • Is this PR's title suitable for inclusion in the changelog and have you added a changelog:<topic> label?
  • Did you state the type-of-change/impact?
  • Did you delete any extraneous prints/debugging code?
  • Did you mark the PR with a changelog: label?
  • (If applicable) Did you update the conda .conda-lock.yml file if you updated the conda requirements file?
  • (If applicable) Did you add documentation for the feature?
  • (If applicable) Did you add a test demonstrating the PR?
  • (If applicable) Did you mark the PR as Please Backport?

@seldridge
Copy link
Member

I'm glad to see these GitHub actions getting some use. I'm also glad that the factoring of circt/install-circt to be predominantly shell-based is working for you. If I ever find some time, I plan to convert circt/update-circt to also be similarly shell-based.

These things should be usable by flows which aren't GitHub Actions, i.e.

@abejgonzalez abejgonzalez changed the title Install circt out of conda Install CIRCT out of conda Dec 1, 2023
@abejgonzalez abejgonzalez changed the title Install CIRCT out of conda Install CIRCT out of Conda Dec 1, 2023
@@ -14,12 +14,25 @@ runs:
conda-lock install --conda $(which conda) -n ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-esp-tools ./conda-reqs/conda-lock-reqs/conda-requirements-esp-tools-linux-64.conda-lock.yml
conda deactivate

echo "Add extra toolchain collateral to RISC-V install area"
echo "Add extra toolchain collateral + CIRCT to RISC-V install area"
git submodule update --init ./conda-reqs/install-circt
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we move this submodule to tools? Since the install-circt stuff can be run in a non-conda environment.

Copy link
Contributor

@jerryz123 jerryz123 left a comment

Choose a reason for hiding this comment

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

Since the CIRCT stuff is not conda-specific, I think it can be outside of the conda directory.

@abejgonzalez abejgonzalez merged commit 516e624 into main Dec 7, 2023
52 checks passed
@jerryz123 jerryz123 deleted the install-circt-out-of-conda branch January 21, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants