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

feat: git subtree move in hugr-llvm #1601

Merged
merged 114 commits into from
Nov 22, 2024
Merged

feat: git subtree move in hugr-llvm #1601

merged 114 commits into from
Nov 22, 2024

Conversation

doug-q
Copy link
Collaborator

@doug-q doug-q commented Oct 21, 2024

Due to the LLVM dependency the package is excluded from default CI runs, except check which does not require llvm.

A separate job for building and testing is added that runs on push to main.

Succesful CI run: https://github.com/CQCL/hugr/actions/runs/11860727905

doug-q and others added 30 commits May 24, 2024 14:52
Co-authored-by: doug-q <[email protected]>
feat: Emission for Call nodes
chore: Add issue-to-project.yml, enable coverage
They were pointing to an invalid source directory.
fix: sum type tag elision logic reversed
test: add a test for sum type tags
feat: Support `FunctionType` values
Note that this extension is not intended to be complete, just enough to
get started.

We include some simplification of test infrastructure, although it is
not strictly necessary. An earlier approach required these changes.
We take this opportunity to move some auxilliary code out of emit.rs,
and to fix up some docs in fat.rs.

BREAKING CHANGE: `Namer::new` takes an additional parameter.

---------

Co-authored-by: Alec Edgington <[email protected]>
We take the opportunity to tidy up cfg.rs a bit.

`impl Copy for FatNode` will now work, and many other methods now have
more appropriate lifetime constraints. The borrow checker will thank
you.

We add `FatNode::try_new_hierarchy_view`.
@ss2165 ss2165 self-assigned this Nov 15, 2024
@ss2165 ss2165 removed the run-ci-checks Special label to force running all checks in CI label Nov 15, 2024
@ss2165 ss2165 force-pushed the doug/init-hugr-llvm-subtree branch from e7509de to 3f281d3 Compare November 18, 2024 15:00
@ss2165
Copy link
Member

ss2165 commented Nov 20, 2024

tket2 rotation lowering moved to eldarion here: https://github.com/CQCL-DEV/eldarion/pull/195
requires tket2 re-export: CQCL/tket2#697

.github/workflows/ci-rs.yml Outdated Show resolved Hide resolved
Comment on lines 244 to 246
tests-stable-llvm:
needs: changes
if: ${{ needs.changes.outputs.llvm == 'true' && github.event_name == 'push'}}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note that llvm will always be true when triggered by a push to main (due to overrides).

We'll probably want some flag to run this on pull_requests too. Maybe we could add an override output to the changes job, and write this here.

if: ${{ ( needs.changes.outputs.llvm == 'true' && github.event_name == 'push' ) || needs.changes.outputs.override == 'true' }}

Though the logic is getting a bit muddy.

strategy:
matrix:
llvm-version:
- ["14.0", "14-0"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are these different versions?
Can you add a comment explaining what they are?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, you could also call name them instead

          - version: "14.0"
            action: "14-0"

hugr-llvm/.gitattributes Outdated Show resolved Hide resolved
hugr-llvm/.gitignore Outdated Show resolved Hide resolved
hugr-llvm/README.md Outdated Show resolved Hide resolved
hugr-llvm/README.md Outdated Show resolved Hide resolved
hugr-llvm/pyproject.toml Outdated Show resolved Hide resolved
hugr-llvm/poetry.lock Outdated Show resolved Hide resolved
- name: Build benchmarks with all features
run: cargo bench --verbose --no-run --workspace --all-features
run: cargo bench --verbose --no-run --workspace --exclude hugr-llvm --all-features
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't --all-features include hugr-llvm anyways, since it's an optional dep of hugr?

Copy link
Member

Choose a reason for hiding this comment

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

yes you're right, the excluding only makes sense for tests

@ss2165 ss2165 requested a review from aborgna-q November 22, 2024 13:18
.github/workflows/ci-rs.yml Outdated Show resolved Hide resolved
strategy:
matrix:
llvm-version:
- ["14.0", "14-0"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, you could also call name them instead

          - version: "14.0"
            action: "14-0"

Comment on lines +142 to +144
run: cargo test --verbose --all-features --no-run
- name: Tests with all features
run: cargo test --verbose --workspace --all-features
run: cargo test --verbose --all-features
Copy link
Collaborator

Choose a reason for hiding this comment

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

This does compile hugr-llvm due to the hugr/llvm feature, it just doesn't run the dependency tests.

I'm guessing we don't need to install llvm as long as no test actually tries to access it at runtime?

Copy link
Member

Choose a reason for hiding this comment

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

yes correct

Co-authored-by: Agustín Borgna <[email protected]>
@ss2165 ss2165 enabled auto-merge November 22, 2024 14:33
@ss2165 ss2165 disabled auto-merge November 22, 2024 14:37
@ss2165 ss2165 merged commit 1b94d45 into main Nov 22, 2024
21 of 23 checks passed
@ss2165 ss2165 deleted the doug/init-hugr-llvm-subtree branch November 22, 2024 14:44
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.

10 participants