[QDP] centralized Python tests and default to single-process pytest to avoid CUDA OOM#1147
Open
viiccwen wants to merge 5 commits intoapache:mainfrom
Open
[QDP] centralized Python tests and default to single-process pytest to avoid CUDA OOM#1147viiccwen wants to merge 5 commits intoapache:mainfrom
viiccwen wants to merge 5 commits intoapache:mainfrom
Conversation
ryankert01
requested changes
Mar 8, 2026
Member
ryankert01
left a comment
There was a problem hiding this comment.
Thanks for the fast fix! Some comments
Member
|
I looked into it and discovered the peak memory is around 10gb! It runs blazingly fast on a gpu server(A6000). |
Contributor
|
@viiccwen take a look about conflicts |
20c5405 to
034a1ac
Compare
ryankert01
approved these changes
Mar 12, 2026
ryankert01
requested changes
Mar 13, 2026
Member
ryankert01
left a comment
There was a problem hiding this comment.
need resolve the conflicts
034a1ac to
989944e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
closes #1146
Changes
Why
This PR moves QDP Python tests into the top-level
testing/qdp_python/tree, switches the default Python test run to single-process (no-n auto), documents optional use of-n auto/-n Nfor faster runs, and fixes ty diagnostics for the affected tests.How
Test layout
qdp/qdp-python/tests/test_dlpack_validation.py→testing/qdp_python/test_dlpack_validation.pyqdp/qdp-python/tests/test_quantum_data_loader.py→testing/qdp_python/test_quantum_data_loader.pyAll Python tests are now under
testing/and discovered by rootpytestwithtestpaths = ["testing"].Makefile
test_pythonnow runs:uv run pytest --cov --cov-report=term-missing --cov-report=html:htmlcov(single process; coverage sources from
[tool.coverage.run]in pyproject when set).Documentation
make test_pythonoruv run pytest ...).-n autoor-n Nwhen compute/GPU allow.qdp/qdp-python/teststotesting/qdp_python.Type-checking (ty)
qumat_qdpandqumat_qdp.*toallowed-unresolved-importsso the optionalqumat_qdp.loaderimport does not cause unresolved-import errors.loader_clsfixture that skips whenQuantumDataLoaderis not available and returns the class (for type narrowing).QuantumDataLoader(...)usages withloader_cls(...)and removed redundantassert QuantumDataLoader is not None.# type: ignoreon the import fallback.get_backend_config(backend_name)to a variable, addedassert cfg is not None, then usedcfg.copy()to satisfy ty (possibly-missing-attributeon optional dict).Other
Checklist