-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare for 22.11 public release See merge request cuda-hpc-libraries/cuquantum-sdk/cuquantum-public!14
- Loading branch information
Showing
68 changed files
with
8,235 additions
and
1,970 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# Contributing | ||
|
||
Thank you for your interest in contributing to cuQuantum Python! Based on the type of contribution, it will fall into two categories: | ||
Thank you for your interest in contributing to cuQuantum Python! Based on the type of contribution, it will fall into three categories: | ||
|
||
1. You want to report a bug, feature request, or documentation issue | ||
- File an [issue](https://github.com/NVIDIA/cuQuantum/issues/new) | ||
- File an [issue](https://github.com/NVIDIA/cuQuantum/issues) | ||
describing what you encountered or what you want to see changed. | ||
- The NVIDIA team will evaluate the issues and triage them, scheduling | ||
them for a release. If you believe the issue needs priority attention | ||
comment on the issue to notify the team. | ||
2. You want to implement a feature or bug-fix | ||
- At this time we do not accept code contributions. | ||
3. You want to share your nice work built upon cuQuantum: | ||
- We would love to hear more about your work! Please share with us on [NVIDIA/cuQuantum GitHub Discussions](https://github.com/NVIDIA/cuQuantum/discussions>)! We also take any cuQuantum-related questions on this forum. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
# Contributing | ||
|
||
Thank you for your interest in contributing to cuQuantum Python! Based on the type of contribution, it will fall into two categories: | ||
Thank you for your interest in contributing to cuQuantum Python! Based on the type of contribution, it will fall into three categories: | ||
|
||
1. You want to report a bug, feature request, or documentation issue | ||
- File an [issue](https://github.com/NVIDIA/cuQuantum/issues/new) | ||
- File an [issue](https://github.com/NVIDIA/cuQuantum/issues) | ||
describing what you encountered or what you want to see changed. | ||
- The NVIDIA team will evaluate the issues and triage them, scheduling | ||
them for a release. If you believe the issue needs priority attention | ||
comment on the issue to notify the team. | ||
2. You want to implement a feature or bug-fix | ||
- At this time we do not accept code contributions. | ||
3. You want to share your nice work built upon cuQuantum: | ||
- We would love to hear more about your work! Please share with us on [NVIDIA/cuQuantum GitHub Discussions](https://github.com/NVIDIA/cuQuantum/discussions>)! We also take any cuQuantum-related questions on this forum. |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
|
||
# How does the build system for cuquantum-python work? | ||
# | ||
# - When building a wheel ("pip wheel", "pip install .", or "python setup.py | ||
# bdist_wheel" (discouraged!)), we want to build against the cutensor & | ||
# cuquantum wheels that would be installed to site-packages, so we need | ||
# two things: | ||
# 1. make them the *build-time* dependencies | ||
# 2. set up linker flags to modify rpaths | ||
# | ||
# - For 1. we opt in to use PEP-517, as setup_requires is known to not work | ||
# automatically for users. This is the "price" we pay (by design of | ||
# PEP-517), as it creates a new, "isolated" environment (referred to as | ||
# build isolation) to which all build-time dependencies that live on PyPI | ||
# are installed. Another "price" (also by design) is in the non-editable | ||
# mode (without the "-e" flag) it always builds a wheel for installation. | ||
# | ||
# - For 2. the solution is to create our own bdist_wheel (called first) and | ||
# build_ext (called later) commands. The former would inform the latter | ||
# whether we are building a wheel. | ||
# | ||
# - There is an escape hatch for 1. which is to set "--no-build-isolation". | ||
# Then, users are expected to set CUQUANTUM_ROOT (or CUSTATEVEC_ROOT & | ||
# CUTENSORNET_ROOT) and manage all build-time dependencies themselves. | ||
# This, together with "-e", would not produce any wheel, which is the old | ||
# behavior offered by the environment variable CUQUANTUM_IGNORE_SOLVER=1 | ||
# that we removed and no longer works. | ||
# | ||
# - In any case, the custom build_ext command is in use, which would compute | ||
# the needed compiler flags (depending on it's building a wheel or not) | ||
# and overwrite the incoming Extension instances. | ||
# | ||
# - In any case, the dependencies (on PyPI wheels) are set up by default, | ||
# and "--no-deps" can be passed as usual to tell pip to ignore the | ||
# *run-time* dependencies. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2021-2022, NVIDIA CORPORATION & AFFILIATES | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
# This module implements basic PEP 517 backend support, see e.g. | ||
# - https://peps.python.org/pep-0517/ | ||
# - https://setuptools.pypa.io/en/latest/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks | ||
# Specifically, there are 5 APIs required to create a proper build backend, see below. | ||
# For now it's mostly a pass-through to setuptools, except that we need to determine | ||
# some dependencies at build time. | ||
# | ||
# Note that we purposely do not implement the PEP-660 API hooks so that "pip install ... | ||
# --no-build-isolation -e ." behaves as expected (in-place build/installation without | ||
# creating a wheel). This may require pip>21.3.0. | ||
|
||
from packaging.version import Version | ||
from setuptools import build_meta as _build_meta | ||
|
||
import utils # this is builder.utils (the build system has sys.path set up) | ||
|
||
|
||
prepare_metadata_for_build_wheel = _build_meta.prepare_metadata_for_build_wheel | ||
build_wheel = _build_meta.build_wheel | ||
build_sdist = _build_meta.build_sdist | ||
|
||
|
||
# Note: this function returns a list of *build-time* dependencies, so it's not affected | ||
# by "--no-deps" based on the PEP-517 design. | ||
def get_requires_for_build_wheel(config_settings=None): | ||
# set up version constraints: note that CalVer like 22.03 is normalized to | ||
# 22.3 by setuptools, so we must follow the same practice in the constraints; | ||
# also, we don't need the patch number here | ||
cuqnt_require = [f'custatevec-cu{utils.cuda_major_ver}~=1.1', # ">=1.1.0,<2" | ||
f'cutensornet-cu{utils.cuda_major_ver}~=2.0', # ">=2.0.0,<3" | ||
] | ||
|
||
return _build_meta.get_requires_for_build_wheel(config_settings) + cuqnt_require | ||
|
||
|
||
# Note: We have never promised to support sdist (CUQNT-514). We really cannot | ||
# care less about the correctness here. If we are lucky, setuptools would do | ||
# the right thing for us, but even if it's wrong let's not worry about it. | ||
def get_requires_for_build_sdist(config_settings=None): | ||
return _build_meta.get_requires_for_build_sdist(config_settings) |
Oops, something went wrong.