Skip to content

Commit

Permalink
Merge branch 'main' into feature/oqc_client_upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
nkushida-oqc authored Nov 14, 2024
2 parents 6fda6a5 + d003d13 commit 2cfef34
Show file tree
Hide file tree
Showing 52 changed files with 619 additions and 310 deletions.
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ labels: [triage]
body:
- type: markdown
attributes:
value: Thank you for helping us improve CUDA Quantum.
value: Thank you for helping us improve CUDA-Q.

- type: checkboxes
attributes:
Expand Down Expand Up @@ -60,7 +60,7 @@ body:
attributes:
label: Environment
description: |
For the CUDA Quantum version, please give the actual version number
For the CUDA-Q version, please give the actual version number
(_e.g._ 0.3.0) if you are using a release version, or the first 7-8
characters of the commit hash if you have built from source. If you are
using the python interface _and_ have not built it from source, you can
Expand All @@ -69,7 +69,7 @@ body:
is relevant to the list.
# Keep the trailing spaces on the following lines
value: |
- **CUDA Quantum version**:
- **CUDA-Q version**:
- **Python version**:
- **C++ compiler**:
- **Operating system**:
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ labels: [enhancement]
body:
- type: markdown
attributes:
value: Thank you for helping us improve CUDA Quantum.
value: Thank you for helping us improve CUDA-Q.

- type: checkboxes
attributes:
Expand Down
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Thanks for helping us improve CUDA Quantum!
Thanks for helping us improve CUDA-Q!
⚠️ The pull request title should be concise and understandable for all.
⚠️ If your pull request fixes an open issue, please link to the issue.
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: 'ubuntu-latest'
permissions:
packages: read # required to fetch internal or private CodeQL packs
security-events: write
# read permissions below are only required for workflows in private repositories
actions: read
Expand All @@ -47,10 +48,11 @@ jobs:
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# For analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
- language: c-cpp
build-mode: none # Consider setting this to manual and providing a build command to get more accurate scanning
- language: python
build-mode: none
build-mode: none # Consider setting this to manual and providing a build command to get more accurate scanning
# FIXME: enable code scanning for C++
# - language: c-cpp
# build-mode: manual # Consider setting this to manual and providing a build command to get more accurate scanning

steps:
- name: Checkout repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/config/gitlab_commits.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
nvidia-mgpu-repo: cuda-quantum/cuquantum-mgpu.git
nvidia-mgpu-commit: b63a90466dc49d7c0c950984d3a882097b7db870
nvidia-mgpu-commit: 5ecebd6b7642e8526baf5930634f2f854aef9ea7
35 changes: 15 additions & 20 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ jobs:
NGC_CLI_API_KEY: ${{ secrets.NGC_CREDENTIALS }}
NGC_CLI_ORG: ${{ env.NGC_QUANTUM_ORG }}
NGC_CLI_TEAM: cuda-quantum
# When a new REST version is introduced, NVQC_REST_PAYLOAD_VERSION needs to be updated in lockstep with the new nightly CUDA Quantum image.
# When a new REST version is introduced, NVQC_REST_PAYLOAD_VERSION needs to be updated in lockstep with the new nightly CUDA Quantum image.
# Otherwise, deployment of the test function will fail.
run: |
# We run with CUDAQ_SER_CODE_EXEC set. The final NVQC deployment may
Expand Down Expand Up @@ -268,7 +268,7 @@ jobs:
filelist="targettests/*/*.cpp"
echo "testlist=$filelist" >> $GITHUB_OUTPUT
fi
- name: Setup anyon account
# This step is currently bypassed during nightly runs due to
# maintenance. Restore the if check to the original value when
Expand Down Expand Up @@ -405,18 +405,15 @@ jobs:
fi
shell: bash

- name: Submit to IQM Demo server
- name: Submit to a mocked IQM Resonance server
if: (success() || failure()) && (inputs.target == 'iqm' || github.event_name == 'schedule' || inputs.target == 'nightly')
run: |
# Must install iqm-cortex-cli to authenticate
pip install iqm-cortex-cli
echo "### Submit to IQM Demo server" >> $GITHUB_STEP_SUMMARY
# IQM demo server info is from: https://demo.qc.iqm.fi/cocos/info/
cortex init --config-file ${HOME}/.config/iqm-cortex-cli/config.json --tokens-file ${HOME}/.cache/iqm-cortex-cli/tokens.json --auth-server-url https://demo.qc.iqm.fi/auth --client-id iqm_client --realm cortex --username '${{ secrets.IQM_USER }}'
cortex auth login --username '${{ secrets.IQM_USER }}' --password '${{ secrets.IQM_PASSWORD }}'
echo ":white_check_mark: Successfully installed iqm-cortex-cli and logged in" >> $GITHUB_STEP_SUMMARY
# Use the demo machine, which is Adonis architecture
export IQM_SERVER_URL="https://demo.qc.iqm.fi/cocos"
echo "### Submit to IQM Resonance" >> $GITHUB_STEP_SUMMARY
# Create a json file with the Resonance auth token
echo "{ \"access_token\": \"${{ secrets.IQM_TOKEN }}\" }" > .resonance.api-token.json
export IQM_TOKENS_FILE=".resonance.api-token.json"
# Use IQM Resonance Pyrite mock, which implements the Adonis architecture
export IQM_SERVER_URL="https://cocos.resonance.meetiqm.com/pyrite:test"
export CUDAQ_LOG_LEVEL="info"
set +e # Allow script to keep going through errors
test_err_sum=0
Expand All @@ -443,8 +440,6 @@ jobs:
;;
esac
done
set -e # Re-enable exit code error checking
cortex auth logout -f
echo ":white_check_mark: Successfully logged out of IQM" >> $GITHUB_STEP_SUMMARY
if [ ! $test_err_sum -eq 0 ]; then
echo "::error::${test_err_sum} tests failed. See step summary for a list of failures"
Expand Down Expand Up @@ -801,7 +796,7 @@ jobs:
python_version=${{ inputs.python_version || env.python_version }}
workflow_id=${{ inputs.workflow_id }}
# Helper to get the *valid* Publishing run Id for a commit hash
# Notes: runs that have 'CUDA Quantum Python wheels' jobs skipped are not considered.
# Notes: runs that have 'CUDA-Q Python wheels' jobs skipped are not considered.
function get_publishing_run_id {
# Find all Publishing runs, we'll look into its jobs' status later
if [[ -z "$1" ]]; then
Expand All @@ -810,9 +805,9 @@ jobs:
publishing_run_ids=$(gh run list --commit $1 --workflow Publishing --json databaseId --jq .[].databaseId)
fi
for run_id in $publishing_run_ids ; do
# Look into its jobs: if "CUDA Quantum Python wheels" matrix build was performed,
# then we have multiple jobs, like "CUDA Quantum Python wheels (python_arm64....")
cuda_wheel_build_jobs=$(gh run view $run_id --jq '.jobs.[] | select(.name | startswith("CUDA Quantum Python wheels (python_")).name' --json jobs)
# Look into its jobs: if "CUDA-Q Python wheels" matrix build was performed,
# then we have multiple jobs, like "CUDA-Q Python wheels (python_arm64....")
cuda_wheel_build_jobs=$(gh run view $run_id --jq '.jobs.[] | select(.name | startswith("CUDA-Q Python wheels (python_")).name' --json jobs)
if [ ! -z "$cuda_wheel_build_jobs" ]; then
# This is a valid run that produces wheel artifacts
echo $run_id
Expand All @@ -828,7 +823,7 @@ jobs:
echo "Using artifacts from workflow id $workflow_id"
# Allow error when trying to download wheel artifacts since they might be expired.
set +e
gh run download $workflow_id --name "x86_64-py$python_version-wheels"
gh run download $workflow_id --name "x86_64-cu12-py$python_version-wheels"
retVal=$?
set -e
if [ $retVal -ne 0 ]; then
Expand All @@ -840,7 +835,7 @@ jobs:
python_version_filename=$(echo "${python_version//.}")
# Install Python and the wheel
apt-get update && apt-get install -y --no-install-recommends python$python_version python3-pip
wheelfile=$(find . -name "cuda_quantum_cu11*cp$python_version_filename*x86_64.whl")
wheelfile=$(find . -name "cuda_quantum_cu12*cp$python_version_filename*x86_64.whl")
python$python_version -m pip install $wheelfile
echo "skipped=false" >> $GITHUB_OUTPUT
else
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/nvqc_regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ jobs:
# Test NVQC Python examples + Python MLIR execution tests (not IR tests)
python3 -m pip install pytest
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
# Disabling building_kernels as the state is not yet supported on NVQC
for ex in `find examples/python python/tests/mlir/target -name '*.py' ! -name '*building_kernels*'`; do
filename=$(basename -- "$ex")
filename="${filename%.*}"
echo "Testing $filename:"
Expand Down Expand Up @@ -262,7 +263,7 @@ jobs:
python_version=${{ inputs.python_version || env.python_version }}
workflow_id=${{ inputs.workflow_id }}
# Helper to get the *valid* Publishing run Id for a commit hash
# Notes: runs that have 'CUDA Quantum Python wheels' jobs skipped are not considered.
# Notes: runs that have 'CUDA-Q Python wheels' jobs skipped are not considered.
function get_publishing_run_id {
# Find all Publishing runs, we'll look into its jobs' status later
if [[ -z "$1" ]]; then
Expand All @@ -271,9 +272,9 @@ jobs:
publishing_run_ids=$(gh run -R NVIDIA/cuda-quantum list --commit $1 --workflow Publishing --json databaseId --jq .[].databaseId)
fi
for run_id in $publishing_run_ids ; do
# Look into its jobs: if "CUDA Quantum Python wheels" matrix build was performed,
# then we have multiple jobs, like "CUDA Quantum Python wheels (python_arm64....")
cuda_wheel_build_jobs=$(gh run -R NVIDIA/cuda-quantum view $run_id --jq '.jobs.[] | select(.name | startswith("CUDA Quantum Python wheels (python_")).name' --json jobs)
# Look into its jobs: if "CUDA-Q Python wheels" matrix build was performed,
# then we have multiple jobs, like "CUDA-Q Python wheels (python_arm64....")
cuda_wheel_build_jobs=$(gh run -R NVIDIA/cuda-quantum view $run_id --jq '.jobs.[] | select(.name | startswith("CUDA-Q Python wheels (python_")).name' --json jobs)
if [ ! -z "$cuda_wheel_build_jobs" ]; then
# This is a valid run that produces wheel artifacts
echo $run_id
Expand Down Expand Up @@ -301,7 +302,7 @@ jobs:
python_version_filename=$(echo "${python_version//.}")
# Install Python and the wheel
apt-get update && apt-get install -y --no-install-recommends python$python_version python3-pip
wheelfile=$(find . -name "cuda_quantum_cu11*cp$python_version_filename*x86_64.whl")
wheelfile=$(find . -name "cuda_quantum_cu12*cp$python_version_filename*x86_64.whl")
python$python_version -m pip install $wheelfile
echo "skipped=false" >> $GITHUB_OUTPUT
else
Expand All @@ -320,7 +321,7 @@ jobs:
set +e # Allow script to keep going through errors
python$python_version -m pip install pytest
test_err_sum=0
for ex in `find examples/python python/tests/mlir/target -name '*.py'; do
for ex in `find examples/python python/tests/mlir/target -name '*.py'`; do
filename=$(basename -- "$ex")
filename="${filename%.*}"
echo "Testing $filename:"
Expand Down
Loading

0 comments on commit 2cfef34

Please sign in to comment.