Skip to content

Commit

Permalink
Merge branch 'jf/monomorphize-unconstrained' of https://github.com/no…
Browse files Browse the repository at this point in the history
…ir-lang/noir into jf/monomorphize-unconstrained
  • Loading branch information
jfecher committed Jan 6, 2025
2 parents a3db9cc + ed9da6e commit 409bca8
Show file tree
Hide file tree
Showing 88 changed files with 2,377 additions and 1,598 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/formatting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0
with:
targets: x86_64-unknown-linux-gnu
components: clippy, rustfmt
Expand All @@ -51,7 +51,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0
with:
targets: x86_64-unknown-linux-gnu
components: clippy, rustfmt
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-acvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

# These steps are in a specific order so crate dependencies are updated first
- name: Publish acir_field
Expand Down Expand Up @@ -74,4 +74,4 @@ jobs:
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
with:
update_existing: true
filename: .github/ACVM_PUBLISH_FAILED.md
filename: .github/ACVM_PUBLISH_FAILED.md
6 changes: 3 additions & 3 deletions .github/workflows/publish-es-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
ref: ${{ inputs.noir-ref }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-nargo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx$(sw_vers -productVersion) --show-sdk-platform-version)" >> $GITHUB_ENV
- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0
with:
targets: ${{ matrix.target }}

Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
ref: ${{ inputs.tag || env.GITHUB_REF }}

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0
with:
targets: ${{ matrix.target }}

Expand Down
137 changes: 111 additions & 26 deletions .github/workflows/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- name: Compare gates reports
id: gates_diff
uses: noir-lang/noir-gates-diff@84ada11295b9a1e1da7325af4e45e2db9f775175
uses: noir-lang/noir-gates-diff@60c57a6e3b67bf1553a5774ded82920150f2210e
with:
report: gates_report.json
summaryQuantile: 0.9 # only display the 10% most significant circuit size diffs in the summary (defaults to 20%)
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Compare Brillig bytecode size reports
id: brillig_bytecode_diff
uses: noir-lang/noir-gates-diff@84ada11295b9a1e1da7325af4e45e2db9f775175
uses: noir-lang/noir-gates-diff@60c57a6e3b67bf1553a5774ded82920150f2210e
with:
report: gates_report_brillig.json
header: |
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Compare Brillig execution reports
id: brillig_execution_diff
uses: noir-lang/noir-gates-diff@84ada11295b9a1e1da7325af4e45e2db9f775175
uses: noir-lang/noir-gates-diff@c1503343c3e264925ef67c68a2a5eeadd245a77b
with:
report: gates_report_brillig_execution.json
header: |
Expand Down Expand Up @@ -217,10 +217,24 @@ jobs:
./memory_report.sh
mv memory_report.json ../memory_report.json
- name: Upload memory report
- name: Upload compilation memory report
uses: actions/upload-artifact@v4
with:
name: in_progress_memory_report
name: in_progress_compilation_mem_report
path: memory_report.json
retention-days: 3
overwrite: true

- name: Generate execution memory report
working-directory: ./test_programs
run: |
./memory_report.sh 0 1
mv memory_report.json ../memory_report.json
- name: Upload execution memory report
uses: actions/upload-artifact@v4
with:
name: in_progress_execution_mem_report
path: memory_report.json
retention-days: 3
overwrite: true
Expand Down Expand Up @@ -428,11 +442,11 @@ jobs:
- name: Parse compilation report
id: compilation_report
uses: noir-lang/noir-bench-report@e408e131e96c3615b4f820d7d642360fb4d6e2f4
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
with:
report: compilation_report.json
header: |
# Compilation Report
Compilation Report
memory_report: false

- name: Add memory report to sticky comment
Expand All @@ -456,6 +470,8 @@ jobs:
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-inner }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-reset }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/private-kernel-tail }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-private }
- project: { repo: AztecProtocol/aztec-packages, path: noir-projects/noir-protocol-circuits/crates/rollup-base-public }

name: External repo memory report - ${{ matrix.project.repo }}/${{ matrix.project.path }}
steps:
Expand Down Expand Up @@ -487,32 +503,55 @@ jobs:
path: test-repo
ref: ${{ matrix.project.ref }}

- name: Generate compilation report
- name: Generate compilation memory report
working-directory: ./test-repo/${{ matrix.project.path }}
run: |
mv /home/runner/work/noir/noir/scripts/test_programs/memory_report.sh ./memory_report.sh
chmod +x ./memory_report.sh
./memory_report.sh 1
# Rename the memory report as the execution report is about to write to the same file
cp memory_report.json compilation_memory_report.json
- name: Generate execution memory report
working-directory: ./test-repo/${{ matrix.project.path }}
run: |
./memory_report.sh 1 1
- name: Move compilation report
id: report
id: compilation_mem_report
shell: bash
run: |
PACKAGE_NAME=${{ matrix.project.path }}
PACKAGE_NAME=$(basename $PACKAGE_NAME)
mv ./test-repo/${{ matrix.project.path }}/compilation_memory_report.json ./memory_report_$PACKAGE_NAME.json
echo "memory_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
- name: Upload compilation memory report
uses: actions/upload-artifact@v4
with:
name: compilation_mem_report_${{ steps.compilation_mem_report.outputs.memory_report_name }}
path: memory_report_${{ steps.compilation_mem_report.outputs.memory_report_name }}.json
retention-days: 3
overwrite: true

- name: Move execution report
id: execution_mem_report
shell: bash
run: |
PACKAGE_NAME=${{ matrix.project.path }}
PACKAGE_NAME=$(basename $PACKAGE_NAME)
mv ./test-repo/${{ matrix.project.path }}/memory_report.json ./memory_report_$PACKAGE_NAME.json
echo "memory_report_name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
- name: Upload memory report
- name: Upload execution memory report
uses: actions/upload-artifact@v4
with:
name: memory_report_${{ steps.report.outputs.memory_report_name }}
path: memory_report_${{ steps.report.outputs.memory_report_name }}.json
name: execution_mem_report_${{ steps.execution_mem_report.outputs.memory_report_name }}
path: memory_report_${{ steps.execution_mem_report.outputs.memory_report_name }}.json
retention-days: 3
overwrite: true

upload_memory_report:
name: Upload memory report
upload_compilation_memory_report:
name: Upload compilation memory report
needs: [generate_memory_report, external_repo_memory_report]
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
if: always()
Expand All @@ -526,34 +565,80 @@ jobs:
- name: Download initial memory report
uses: actions/download-artifact@v4
with:
name: in_progress_memory_report
name: in_progress_compilation_mem_report

- name: Download matrix memory reports
uses: actions/download-artifact@v4
with:
pattern: memory_report_*
pattern: compilation_mem_report_*
path: ./reports

- name: Merge memory reports using jq
run: |
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
./merge-bench-reports.sh memory_report
- name: Parse memory report
id: memory_report
uses: noir-lang/noir-bench-report@e408e131e96c3615b4f820d7d642360fb4d6e2f4
- name: Parse compilation memory report
id: compilation_mem_report
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
with:
report: memory_report.json
header: |
# Memory Report
Compilation Memory Report
memory_report: true

- name: Add memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: memory
message: ${{ steps.memory_report.outputs.markdown }}
header: compilation_memory
message: ${{ steps.compilation_mem_report.outputs.markdown }}

upload_execution_memory_report:
name: Upload execution memory report
needs: [generate_memory_report, external_repo_memory_report]
# We want this job to run even if one variation of the matrix in `external_repo_memory_report` fails
if: always()
runs-on: ubuntu-latest
permissions:
pull-requests: write

steps:
- uses: actions/checkout@v4

- name: Download initial memory report
uses: actions/download-artifact@v4
with:
name: in_progress_execution_mem_report

- name: Download matrix memory reports
uses: actions/download-artifact@v4
with:
pattern: execution_mem_report_*
path: ./reports

- name: Merge memory reports using jq
run: |
mv ./.github/scripts/merge-bench-reports.sh merge-bench-reports.sh
./merge-bench-reports.sh memory_report
# Rename the memory report as to not clash with the compilation memory report file name
cp memory_report.json execution_memory_report.json
- name: Parse execution memory report
id: execution_mem_report
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
with:
report: execution_memory_report.json
header: |
Execution Memory Report
memory_report: true

- name: Add execution memory report to sticky comment
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: execution_memory
message: ${{ steps.execution_mem_report.outputs.markdown }}

upload_execution_report:
name: Upload execution report
Expand Down Expand Up @@ -585,11 +670,11 @@ jobs:
- name: Parse execution report
id: execution_report
uses: noir-lang/noir-bench-report@e408e131e96c3615b4f820d7d642360fb4d6e2f4
uses: noir-lang/noir-bench-report@6ba151d7795042c4ff51864fbeb13c0a6a79246c
with:
report: execution_report.json
header: |
# Execution Report
Execution Report
execution_report: true

- name: Add memory report to sticky comment
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-js-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup toolchain
uses: dtolnay/rust-toolchain@1.74.1
uses: dtolnay/rust-toolchain@1.75.0

- uses: Swatinem/rust-cache@v2
with:
Expand Down
Loading

0 comments on commit 409bca8

Please sign in to comment.