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

Refactor schema generation #701

Merged
merged 20 commits into from
Oct 16, 2023
Merged

Refactor schema generation #701

merged 20 commits into from
Oct 16, 2023

Conversation

weinbe58
Copy link
Member

Code Gen for various parts of the schema create a Results object that stores the main results for the codegen.

These objects have some internal API's that make it useful for composing results objects together, namely slice and append as these are the two things that need to be done when composing the pwl and pwc sequences together during code generation.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 13, 2023

PR Preview Action v1.4.4
Preview removed because the pull request was closed.
2023-10-16 20:55 UTC

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #701 (91b5da7) into main (630b3e2) will decrease coverage by 0.48%.
The diff coverage is 83.79%.

❗ Current head 91b5da7 differs from pull request most recent head 5d4efde. Consider uploading reports for the commit 5d4efde to get more accurate results

@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
- Coverage   85.38%   84.91%   -0.48%     
==========================================
  Files          89       91       +2     
  Lines        7563     7682     +119     
==========================================
+ Hits         6458     6523      +65     
- Misses       1105     1159      +54     
Files Coverage Δ
src/bloqade/ir/analysis/scan_variables.py 85.79% <100.00%> (+0.15%) ⬆️
src/bloqade/ir/routine/braket.py 89.74% <100.00%> (-0.26%) ⬇️
src/bloqade/ir/routine/quera.py 82.81% <100.00%> (ø)
src/bloqade/codegen/hardware/piecewise_linear.py 93.07% <93.07%> (ø)
src/bloqade/codegen/hardware/piecewise_constant.py 87.09% <87.09%> (ø)
src/bloqade/codegen/hardware/quera.py 77.55% <69.76%> (-14.73%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@weinbe58
Copy link
Member Author

weinbe58 commented Oct 13, 2023

In the next PR I/John intend to tackle the error messages. Currently we do a basic validation (on structure only, not based on what API accepts) and code generation in the same sweep but the next implementation will split the errors into a separate scan while keeping the code written here as just the emission of the task IR.

@weinbe58 weinbe58 requested a review from Roger-luo October 13, 2023 17:34
src/bloqade/codegen/hardware/piecewise_constant.py Outdated Show resolved Hide resolved
src/bloqade/codegen/hardware/piecewise_linear.py Outdated Show resolved Hide resolved
src/bloqade/codegen/hardware/piecewise_linear.py Outdated Show resolved Hide resolved
src/bloqade/codegen/hardware/quera.py Outdated Show resolved Hide resolved
@weinbe58 weinbe58 enabled auto-merge (squash) October 16, 2023 20:47
@johnzl-777 johnzl-777 self-requested a review October 16, 2023 20:47
@weinbe58 weinbe58 merged commit 5a88e6d into main Oct 16, 2023
7 checks passed
@weinbe58 weinbe58 deleted the refactor-schema-generation branch October 16, 2023 20:50
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