diff --git a/.gitattributes b/.gitattributes index 113fbed9945be7be562c959847859b9bfbac8c9c..0b4a2b1a8f86763ca6e8ec5bbde5286dd7e8fe30 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1755,3 +1755,7 @@ videollama2/lib/python3.10/site-packages/decord.libs/libswscale-8e37dcfd.so.5.3. videollama2/lib/python3.10/site-packages/decord.libs/libavdevice-bf61e037.so.58.5.100 filter=lfs diff=lfs merge=lfs -text videollama2/lib/python3.10/site-packages/decord.libs/libx264-555fb44a.so.164 filter=lfs diff=lfs merge=lfs -text videollama2/lib/python3.10/site-packages/decord.libs/libvpx-5769b0ce.so.6.4.0 filter=lfs diff=lfs merge=lfs -text +videollama2/lib/python3.10/site-packages/decord.libs/libpostproc-88b722f8.so.55.3.100 filter=lfs diff=lfs merge=lfs -text +vllm/lib/python3.10/site-packages/cupy/_core/dlpack.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +vllm/lib/python3.10/site-packages/cupy/_core/fusion.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text +vllm/lib/python3.10/site-packages/cupy/_core/_carray.cpython-310-x86_64-linux-gnu.so filter=lfs diff=lfs merge=lfs -text diff --git a/videollama2/lib/python3.10/site-packages/attrs/__pycache__/__init__.cpython-310.pyc b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8e4357c0393570b2d1e355820ac7afda69a483ff Binary files /dev/null and b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/__init__.cpython-310.pyc differ diff --git a/videollama2/lib/python3.10/site-packages/attrs/__pycache__/converters.cpython-310.pyc b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/converters.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1088c43ebf10fc0fb6b35363d778fd48ca94066b Binary files /dev/null and b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/converters.cpython-310.pyc differ diff --git a/videollama2/lib/python3.10/site-packages/attrs/__pycache__/exceptions.cpython-310.pyc b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/exceptions.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2396a65268f8a19302542d7b7c9544db204ff8fe Binary files /dev/null and b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/exceptions.cpython-310.pyc differ diff --git a/videollama2/lib/python3.10/site-packages/attrs/__pycache__/filters.cpython-310.pyc b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/filters.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..98819a19e69055fe98c5c73c79669503bc4bc389 Binary files /dev/null and b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/filters.cpython-310.pyc differ diff --git a/videollama2/lib/python3.10/site-packages/attrs/__pycache__/validators.cpython-310.pyc b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/validators.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0ec1362d5917fdb0feae9be5d250770932f0b8b8 Binary files /dev/null and b/videollama2/lib/python3.10/site-packages/attrs/__pycache__/validators.cpython-310.pyc differ diff --git a/videollama2/lib/python3.10/site-packages/attrs/py.typed b/videollama2/lib/python3.10/site-packages/attrs/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/videollama2/lib/python3.10/site-packages/attrs/validators.py b/videollama2/lib/python3.10/site-packages/attrs/validators.py new file mode 100644 index 0000000000000000000000000000000000000000..037e124f29f32d37c1642d159bf828de44f7c349 --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/attrs/validators.py @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: MIT + +from attr.validators import * # noqa: F403 diff --git a/videollama2/lib/python3.10/site-packages/decord.libs/libpostproc-88b722f8.so.55.3.100 b/videollama2/lib/python3.10/site-packages/decord.libs/libpostproc-88b722f8.so.55.3.100 new file mode 100644 index 0000000000000000000000000000000000000000..d69fdf07dc8e9f454794b4f92eda82e0e3c14728 --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/decord.libs/libpostproc-88b722f8.so.55.3.100 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:94f8b2c0b25e7ecce3e6648c20fc25839c0000b07616d797d02983dc75efe9f8 +size 120064 diff --git a/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/INSTALLER b/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/METADATA b/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..5db6a5b6d12a7a6b23c60cb265c99ea1df74e88e --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/METADATA @@ -0,0 +1,122 @@ +Metadata-Version: 2.1 +Name: kiwisolver +Version: 1.4.5 +Summary: A fast implementation of the Cassowary constraint solver +Author-email: The Nucleic Development Team +Maintainer-email: "Matthieu C. Dartiailh" +License: ========================= + The Kiwi licensing terms + ========================= + Kiwi is licensed under the terms of the Modified BSD License (also known as + New or Revised BSD), as follows: + + Copyright (c) 2013, Nucleic Development Team + + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, this + list of conditions and the following disclaimer in the documentation and/or + other materials provided with the distribution. + + Neither the name of the Nucleic Development Team nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + About Kiwi + ---------- + Chris Colbert began the Kiwi project in December 2013 in an effort to + create a blisteringly fast UI constraint solver. Chris is still the + project lead. + + The Nucleic Development Team is the set of all contributors to the Nucleic + project and its subprojects. + + The core team that coordinates development on GitHub can be found here: + http://github.com/nucleic. The current team consists of: + + * Chris Colbert + + Our Copyright Policy + -------------------- + Nucleic uses a shared copyright model. Each contributor maintains copyright + over their contributions to Nucleic. But, it is important to note that these + contributions are typically only changes to the repositories. Thus, the Nucleic + source code, in its entirety is not the copyright of any single person or + institution. Instead, it is the collective copyright of the entire Nucleic + Development Team. If individual contributors want to maintain a record of what + changes/contributions they have specific copyright on, they should indicate + their copyright in the commit message of the change, when they commit the + change to one of the Nucleic repositories. + + With this in mind, the following banner should be used in any source code file + to indicate the copyright and license terms: + + #------------------------------------------------------------------------------ + # Copyright (c) 2013, Nucleic Development Team. + # + # Distributed under the terms of the Modified BSD License. + # + # The full license is in the file LICENSE, distributed with this software. + #------------------------------------------------------------------------------ + +Project-URL: homepage, https://github.com/nucleic/kiwi +Project-URL: documentation, https://kiwisolver.readthedocs.io/en/latest/ +Project-URL: repository, https://github.com/nucleic/kiwi +Project-URL: changelog, https://github.com/nucleic/kiwi/blob/main/releasenotes.rst +Classifier: License :: OSI Approved :: BSD License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Requires-Python: >=3.7 +Description-Content-Type: text/x-rst +License-File: LICENSE +Requires-Dist: typing-extensions ; python_version < "3.8" + +Welcome to Kiwi +=============== + +.. image:: https://travis-ci.org/nucleic/kiwi.svg?branch=main + :target: https://travis-ci.org/nucleic/kiwi +.. image:: https://github.com/nucleic/kiwi/workflows/Continuous%20Integration/badge.svg + :target: https://github.com/nucleic/kiwi/actions +.. image:: https://github.com/nucleic/kiwi/workflows/Documentation%20building/badge.svg + :target: https://github.com/nucleic/kiwi/actions +.. image:: https://codecov.io/gh/nucleic/kiwi/branch/main/graph/badge.svg + :target: https://codecov.io/gh/nucleic/kiwi +.. image:: https://readthedocs.org/projects/kiwisolver/badge/?version=latest + :target: https://kiwisolver.readthedocs.io/en/latest/?badge=latest + :alt: Documentation Status + +Kiwi is an efficient C++ implementation of the Cassowary constraint solving +algorithm. Kiwi is an implementation of the algorithm based on the +`seminal Cassowary paper `_. +It is *not* a refactoring of the original C++ solver. Kiwi has been designed +from the ground up to be lightweight and fast. Kiwi ranges from 10x to 500x +faster than the original Cassowary solver with typical use cases gaining a 40x +improvement. Memory savings are consistently > 5x. + +In addition to the C++ solver, Kiwi ships with hand-rolled Python bindings for +Python 3.7+. diff --git a/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/WHEEL b/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..4b93d1b69bb768e53f6b70645745a037681de55e --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/kiwisolver-1.4.5.dist-info/WHEEL @@ -0,0 +1,6 @@ +Wheel-Version: 1.0 +Generator: bdist_wheel (0.41.2) +Root-Is-Purelib: false +Tag: cp310-cp310-manylinux_2_12_x86_64 +Tag: cp310-cp310-manylinux2010_x86_64 + diff --git a/videollama2/lib/python3.10/site-packages/pydantic-2.8.2.dist-info/METADATA b/videollama2/lib/python3.10/site-packages/pydantic-2.8.2.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..dc57ef4da7d84bdbbabda4932a014913c73166f7 --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/pydantic-2.8.2.dist-info/METADATA @@ -0,0 +1,1271 @@ +Metadata-Version: 2.3 +Name: pydantic +Version: 2.8.2 +Summary: Data validation using Python type hints +Project-URL: Homepage, https://github.com/pydantic/pydantic +Project-URL: Documentation, https://docs.pydantic.dev +Project-URL: Funding, https://github.com/sponsors/samuelcolvin +Project-URL: Source, https://github.com/pydantic/pydantic +Project-URL: Changelog, https://docs.pydantic.dev/latest/changelog/ +Author-email: Samuel Colvin , Eric Jolibois , Hasan Ramezani , Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>, Terrence Dorsey , David Montague , Serge Matveenko , Marcelo Trylesinski , Sydney Runkle , David Hewitt , Alex Hall +License-Expression: MIT +License-File: LICENSE +Classifier: Development Status :: 5 - Production/Stable +Classifier: Environment :: Console +Classifier: Environment :: MacOS X +Classifier: Framework :: Hypothesis +Classifier: Framework :: Pydantic +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: Information Technology +Classifier: Intended Audience :: System Administrators +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: POSIX :: Linux +Classifier: Operating System :: Unix +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Programming Language :: Python :: Implementation :: PyPy +Classifier: Topic :: Internet +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Requires-Python: >=3.8 +Requires-Dist: annotated-types>=0.4.0 +Requires-Dist: pydantic-core==2.20.1 +Requires-Dist: typing-extensions>=4.12.2; python_version >= '3.13' +Requires-Dist: typing-extensions>=4.6.1; python_version < '3.13' +Provides-Extra: email +Requires-Dist: email-validator>=2.0.0; extra == 'email' +Description-Content-Type: text/markdown + +# Pydantic +[![CI](https://img.shields.io/github/actions/workflow/status/pydantic/pydantic/ci.yml?branch=main&logo=github&label=CI)](https://github.com/pydantic/pydantic/actions?query=event%3Apush+branch%3Amain+workflow%3ACI) +[![Coverage](https://coverage-badge.samuelcolvin.workers.dev/pydantic/pydantic.svg)](https://coverage-badge.samuelcolvin.workers.dev/redirect/pydantic/pydantic) +[![pypi](https://img.shields.io/pypi/v/pydantic.svg)](https://pypi.python.org/pypi/pydantic) +[![CondaForge](https://img.shields.io/conda/v/conda-forge/pydantic.svg)](https://anaconda.org/conda-forge/pydantic) +[![downloads](https://static.pepy.tech/badge/pydantic/month)](https://pepy.tech/project/pydantic) +[![versions](https://img.shields.io/pypi/pyversions/pydantic.svg)](https://github.com/pydantic/pydantic) +[![license](https://img.shields.io/github/license/pydantic/pydantic.svg)](https://github.com/pydantic/pydantic/blob/main/LICENSE) +[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://docs.pydantic.dev/latest/contributing/#badges) + +Data validation using Python type hints. + +Fast and extensible, Pydantic plays nicely with your linters/IDE/brain. +Define how data should be in pure, canonical Python 3.8+; validate it with Pydantic. + +## Pydantic Company :rocket: + +We've started a company based on the principles that I believe have led to Pydantic's success. +Learn more from the [Company Announcement](https://blog.pydantic.dev/blog/2023/02/16/company-announcement--pydantic/). + +## Pydantic V1.10 vs. V2 + +Pydantic V2 is a ground-up rewrite that offers many new features, performance improvements, and some breaking changes compared to Pydantic V1. + +If you're using Pydantic V1 you may want to look at the +[pydantic V1.10 Documentation](https://docs.pydantic.dev/) or, +[`1.10.X-fixes` git branch](https://github.com/pydantic/pydantic/tree/1.10.X-fixes). Pydantic V2 also ships with the latest version of Pydantic V1 built in so that you can incrementally upgrade your code base and projects: `from pydantic import v1 as pydantic_v1`. + +## Help + +See [documentation](https://docs.pydantic.dev/) for more details. + +## Installation + +Install using `pip install -U pydantic` or `conda install pydantic -c conda-forge`. +For more installation options to make Pydantic even faster, +see the [Install](https://docs.pydantic.dev/install/) section in the documentation. + +## A Simple Example + +```py +from datetime import datetime +from typing import List, Optional +from pydantic import BaseModel + +class User(BaseModel): + id: int + name: str = 'John Doe' + signup_ts: Optional[datetime] = None + friends: List[int] = [] + +external_data = {'id': '123', 'signup_ts': '2017-06-01 12:22', 'friends': [1, '2', b'3']} +user = User(**external_data) +print(user) +#> User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3] +print(user.id) +#> 123 +``` + +## Contributing + +For guidance on setting up a development environment and how to make a +contribution to Pydantic, see +[Contributing to Pydantic](https://docs.pydantic.dev/contributing/). + +## Reporting a Security Vulnerability + +See our [security policy](https://github.com/pydantic/pydantic/security/policy). + +## Changelog + +## v2.8.2 (2024-07-03) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.8.2) + +### What's Changed + +#### Fixes + +* Fix issue with assertion caused by pluggable schema validator by [@dmontagu](https://github.com/dmontagu) in [#9838](https://github.com/pydantic/pydantic/pull/9838) + +## v2.8.1 (2024-07-03) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.8.1) + +### What's Changed + +#### Packaging +* Bump `ruff` to `v0.5.0` and `pyright` to `v1.1.369` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9801](https://github.com/pydantic/pydantic/pull/9801) +* Bump `pydantic-core` to `v2.20.1`, `pydantic-extra-types` to `v2.9.0` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9832](https://github.com/pydantic/pydantic/pull/9832) + +#### Fixes +* Fix breaking change in `to_snake` from v2.7 -> v2.8 by [@sydney-runkle](https://github.com/sydney-runkle) in [#9812](https://github.com/pydantic/pydantic/pull/9812) +* Fix list constraint json schema application by [@sydney-runkle](https://github.com/sydney-runkle) in [#9818](https://github.com/pydantic/pydantic/pull/9818) +* Support time duration more than 23 by [@nix010](https://github.com/nix010) in [pydantic/speedate#64](https://github.com/pydantic/speedate/pull/64) +* Fix millisecond fraction being handled with the wrong scale by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/speedate#65](https://github.com/pydantic/speedate/pull/65) +* Handle negative fractional durations correctly by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/speedate#71](https://github.com/pydantic/speedate/pull/71) + +## v2.8.0 (2024-07-01) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.8.0) + +The code released in v2.8.0 is functionally identical to that of v2.8.0b1. + +### What's Changed + +#### Packaging + +* Update citation version automatically with new releases by [@sydney-runkle](https://github.com/sydney-runkle) in [#9673](https://github.com/pydantic/pydantic/pull/9673) +* Bump pyright to `v1.1.367` and add type checking tests for pipeline API by [@adriangb](https://github.com/adriangb) in [#9674](https://github.com/pydantic/pydantic/pull/9674) +* Update `pydantic.v1` stub to `v1.10.17` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9707](https://github.com/pydantic/pydantic/pull/9707) +* General package updates to prep for `v2.8.0b1` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9741](https://github.com/pydantic/pydantic/pull/9741) +* Bump `pydantic-core` to `v2.20.0` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9745](https://github.com/pydantic/pydantic/pull/9745) +* Add support for Python 3.13 by [@sydney-runkle](https://github.com/sydney-runkle) in [#9743](https://github.com/pydantic/pydantic/pull/9743) +* Update `pdm` version used for `pdm.lock` to v2.16.1 by [@sydney-runkle](https://github.com/sydney-runkle) in [#9761](https://github.com/pydantic/pydantic/pull/9761) +* Update to `ruff` `v0.4.8` by [@Viicos](https://github.com/Viicos) in [#9585](https://github.com/pydantic/pydantic/pull/9585) + +#### New Features + +* Experimental: support `defer_build` for `TypeAdapter` by [@MarkusSintonen](https://github.com/MarkusSintonen) in [#8939](https://github.com/pydantic/pydantic/pull/8939) +* Implement `deprecated` field in json schema by [@NeevCohen](https://github.com/NeevCohen) in [#9298](https://github.com/pydantic/pydantic/pull/9298) +* Experimental: Add pipeline API by [@adriangb](https://github.com/adriangb) in [#9459](https://github.com/pydantic/pydantic/pull/9459) +* Add support for programmatic title generation by [@NeevCohen](https://github.com/NeevCohen) in [#9183](https://github.com/pydantic/pydantic/pull/9183) +* Implement `fail_fast` feature by [@uriyyo](https://github.com/uriyyo) in [#9708](https://github.com/pydantic/pydantic/pull/9708) +* Add `ser_json_inf_nan='strings'` mode to produce valid JSON by [@josh-newman](https://github.com/josh-newman) in [pydantic/pydantic-core#1307](https://github.com/pydantic/pydantic-core/pull/1307) + +#### Changes + +* Add warning when "alias" is set in ignored `Annotated` field by [@nix010](https://github.com/nix010) in [#9170](https://github.com/pydantic/pydantic/pull/9170) +* Support serialization of some serializable defaults in JSON schema by [@sydney-runkle](https://github.com/sydney-runkle) in [#9624](https://github.com/pydantic/pydantic/pull/9624) +* Relax type specification for `__validators__` values in `create_model` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9697](https://github.com/pydantic/pydantic/pull/9697) +* **Breaking Change:** Improve `smart` union matching logic by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1322](https://github.com/pydantic/pydantic-core/pull/1322) +You can read more about our `smart` union matching logic [here](https://docs.pydantic.dev/dev/concepts/unions/#smart-mode). In some cases, if the old behavior +is desired, you can switch to `left-to-right` mode and change the order of your `Union` members. + +#### Performance + +##### Internal Improvements + +* ⚡️ Speed up `_display_error_loc()` by 25% in `pydantic/v1/error_wrappers.py` by [@misrasaurabh1](https://github.com/misrasaurabh1) in [#9653](https://github.com/pydantic/pydantic/pull/9653) +* ⚡️ Speed up `_get_all_json_refs()` by 34% in `pydantic/json_schema.py` by [@misrasaurabh1](https://github.com/misrasaurabh1) in [#9650](https://github.com/pydantic/pydantic/pull/9650) +* ⚡️ Speed up `is_pydantic_dataclass()` by 41% in `pydantic/dataclasses.py` by [@misrasaurabh1](https://github.com/misrasaurabh1) in [#9652](https://github.com/pydantic/pydantic/pull/9652) +* ⚡️ Speed up `to_snake()` by 27% in `pydantic/alias_generators.py` by [@misrasaurabh1](https://github.com/misrasaurabh1) in [#9747](https://github.com/pydantic/pydantic/pull/9747) +* ⚡️ Speed up `unwrap_wrapped_function()` by 93% in `pydantic/_internal/_decorators.py` by [@misrasaurabh1](https://github.com/misrasaurabh1) in [#9727](https://github.com/pydantic/pydantic/pull/9727) + +#### Fixes + +* Replace `__spec__.parent` with `__package__` by [@hramezani](https://github.com/hramezani) in [#9331](https://github.com/pydantic/pydantic/pull/9331) +* Fix Outputted Model JSON Schema for `Sequence` type by [@anesmemisevic](https://github.com/anesmemisevic) in [#9303](https://github.com/pydantic/pydantic/pull/9303) +* Fix typing of `_frame_depth` by [@Viicos](https://github.com/Viicos) in [#9353](https://github.com/pydantic/pydantic/pull/9353) +* Make `ImportString` json schema compatible by [@amitschang](https://github.com/amitschang) in [#9344](https://github.com/pydantic/pydantic/pull/9344) +* Hide private attributes (`PrivateAttr`) from `__init__` signature in type checkers by [@idan22moral](https://github.com/idan22moral) in [#9293](https://github.com/pydantic/pydantic/pull/9293) +* Make detection of `TypeVar` defaults robust to the CPython `PEP-696` implementation by [@AlexWaygood](https://github.com/AlexWaygood) in [#9426](https://github.com/pydantic/pydantic/pull/9426) +* Fix usage of `PlainSerializer` with builtin types by [@Viicos](https://github.com/Viicos) in [#9450](https://github.com/pydantic/pydantic/pull/9450) +* Add more robust custom validation examples by [@ChrisPappalardo](https://github.com/ChrisPappalardo) in [#9468](https://github.com/pydantic/pydantic/pull/9468) +* Fix ignored `strict` specification for `StringConstraint(strict=False)` by [@vbmendes](https://github.com/vbmendes) in [#9476](https://github.com/pydantic/pydantic/pull/9476) +* Use `Self` where possible by [@Viicos](https://github.com/Viicos) in [#9479](https://github.com/pydantic/pydantic/pull/9479) +* Do not alter `RootModel.model_construct` signature in the `mypy` plugin by [@Viicos](https://github.com/Viicos) in [#9480](https://github.com/pydantic/pydantic/pull/9480) +* Fixed type hint of `validation_context` by [@OhioDschungel6](https://github.com/OhioDschungel6) in [#9508](https://github.com/pydantic/pydantic/pull/9508) +* Support context being passed to TypeAdapter's `dump_json`/`dump_python` by [@alexcouper](https://github.com/alexcouper) in [#9495](https://github.com/pydantic/pydantic/pull/9495) +* Updates type signature for `Field()` constructor by [@bjmc](https://github.com/bjmc) in [#9484](https://github.com/pydantic/pydantic/pull/9484) +* Improve builtin alias generators by [@sydney-runkle](https://github.com/sydney-runkle) in [#9561](https://github.com/pydantic/pydantic/pull/9561) +* Fix typing of `TypeAdapter` by [@Viicos](https://github.com/Viicos) in [#9570](https://github.com/pydantic/pydantic/pull/9570) +* Add fallback default value for private fields in `__setstate__` of BaseModel by [@anhpham1509](https://github.com/anhpham1509) in [#9584](https://github.com/pydantic/pydantic/pull/9584) +* Support `PEP 746` by [@adriangb](https://github.com/adriangb) in [#9587](https://github.com/pydantic/pydantic/pull/9587) +* Allow validator and serializer functions to have default values by [@Viicos](https://github.com/Viicos) in [#9478](https://github.com/pydantic/pydantic/pull/9478) +* Fix bug with mypy plugin's handling of covariant `TypeVar` fields by [@dmontagu](https://github.com/dmontagu) in [#9606](https://github.com/pydantic/pydantic/pull/9606) +* Fix multiple annotation / constraint application logic by [@sydney-runkle](https://github.com/sydney-runkle) in [#9623](https://github.com/pydantic/pydantic/pull/9623) +* Respect `regex` flags in validation and json schema by [@sydney-runkle](https://github.com/sydney-runkle) in [#9591](https://github.com/pydantic/pydantic/pull/9591) +* Fix type hint on `IpvAnyAddress` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9640](https://github.com/pydantic/pydantic/pull/9640) +* Allow a field specifier on `__pydantic_extra__` by [@dmontagu](https://github.com/dmontagu) in [#9659](https://github.com/pydantic/pydantic/pull/9659) +* Use normalized case for file path comparison by [@sydney-runkle](https://github.com/sydney-runkle) in [#9737](https://github.com/pydantic/pydantic/pull/9737) +* Modify constraint application logic to allow field constraints on `Optional[Decimal]` by [@lazyhope](https://github.com/lazyhope) in [#9754](https://github.com/pydantic/pydantic/pull/9754) +* `validate_call` type params fix by [@sydney-runkle](https://github.com/sydney-runkle) in [#9760](https://github.com/pydantic/pydantic/pull/9760) +* Check all warnings returned by pytest.warns() by [@s-t-e-v-e-n-k](https://github.com/s-t-e-v-e-n-k) in [#9702](https://github.com/pydantic/pydantic/pull/9702) +* Reuse `re.Pattern` object in regex patterns to allow for regex flags by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1318](https://github.com/pydantic/pydantic-core/pull/1318) + +### New Contributors + +* [@idan22moral](https://github.com/idan22moral) made their first contribution in [#9294](https://github.com/pydantic/pydantic/pull/9294) +* [@anesmemisevic](https://github.com/anesmemisevic) made their first contribution in [#9303](https://github.com/pydantic/pydantic/pull/9303) +* [@max-muoto](https://github.com/max-muoto) made their first contribution in [#9338](https://github.com/pydantic/pydantic/pull/9338) +* [@amitschang](https://github.com/amitschang) made their first contribution in [#9344](https://github.com/pydantic/pydantic/pull/9344) +* [@paulmartin91](https://github.com/paulmartin91) made their first contribution in [#9410](https://github.com/pydantic/pydantic/pull/9410) +* [@OhioDschungel6](https://github.com/OhioDschungel6) made their first contribution in [#9405](https://github.com/pydantic/pydantic/pull/9405) +* [@AlexWaygood](https://github.com/AlexWaygood) made their first contribution in [#9426](https://github.com/pydantic/pydantic/pull/9426) +* [@kinuax](https://github.com/kinuax) made their first contribution in [#9433](https://github.com/pydantic/pydantic/pull/9433) +* [@antoni-jamiolkowski](https://github.com/antoni-jamiolkowski) made their first contribution in [#9431](https://github.com/pydantic/pydantic/pull/9431) +* [@candleindark](https://github.com/candleindark) made their first contribution in [#9448](https://github.com/pydantic/pydantic/pull/9448) +* [@nix010](https://github.com/nix010) made their first contribution in [#9170](https://github.com/pydantic/pydantic/pull/9170) +* [@tomy0000000](https://github.com/tomy0000000) made their first contribution in [#9457](https://github.com/pydantic/pydantic/pull/9457) +* [@vbmendes](https://github.com/vbmendes) made their first contribution in [#9470](https://github.com/pydantic/pydantic/pull/9470) +* [@micheleAlberto](https://github.com/micheleAlberto) made their first contribution in [#9471](https://github.com/pydantic/pydantic/pull/9471) +* [@ChrisPappalardo](https://github.com/ChrisPappalardo) made their first contribution in [#9468](https://github.com/pydantic/pydantic/pull/9468) +* [@blueTurtz](https://github.com/blueTurtz) made their first contribution in [#9475](https://github.com/pydantic/pydantic/pull/9475) +* [@WinterBlue16](https://github.com/WinterBlue16) made their first contribution in [#9477](https://github.com/pydantic/pydantic/pull/9477) +* [@bittner](https://github.com/bittner) made their first contribution in [#9500](https://github.com/pydantic/pydantic/pull/9500) +* [@alexcouper](https://github.com/alexcouper) made their first contribution in [#9495](https://github.com/pydantic/pydantic/pull/9495) +* [@bjmc](https://github.com/bjmc) made their first contribution in [#9484](https://github.com/pydantic/pydantic/pull/9484) +* [@pjvv](https://github.com/pjvv) made their first contribution in [#9529](https://github.com/pydantic/pydantic/pull/9529) +* [@nedbat](https://github.com/nedbat) made their first contribution in [#9530](https://github.com/pydantic/pydantic/pull/9530) +* [@gunnellEvan](https://github.com/gunnellEvan) made their first contribution in [#9469](https://github.com/pydantic/pydantic/pull/9469) +* [@jaymbans](https://github.com/jaymbans) made their first contribution in [#9531](https://github.com/pydantic/pydantic/pull/9531) +* [@MarcBresson](https://github.com/MarcBresson) made their first contribution in [#9534](https://github.com/pydantic/pydantic/pull/9534) +* [@anhpham1509](https://github.com/anhpham1509) made their first contribution in [#9584](https://github.com/pydantic/pydantic/pull/9584) +* [@K-dash](https://github.com/K-dash) made their first contribution in [#9595](https://github.com/pydantic/pydantic/pull/9595) +* [@s-t-e-v-e-n-k](https://github.com/s-t-e-v-e-n-k) made their first contribution in [#9527](https://github.com/pydantic/pydantic/pull/9527) +* [@airwoodix](https://github.com/airwoodix) made their first contribution in [#9506](https://github.com/pydantic/pydantic/pull/9506) +* [@misrasaurabh1](https://github.com/misrasaurabh1) made their first contribution in [#9653](https://github.com/pydantic/pydantic/pull/9653) +* [@AlessandroMiola](https://github.com/AlessandroMiola) made their first contribution in [#9740](https://github.com/pydantic/pydantic/pull/9740) +* [@mylapallilavanyaa](https://github.com/mylapallilavanyaa) made their first contribution in [#9746](https://github.com/pydantic/pydantic/pull/9746) +* [@lazyhope](https://github.com/lazyhope) made their first contribution in [#9754](https://github.com/pydantic/pydantic/pull/9754) +* [@YassinNouh21](https://github.com/YassinNouh21) made their first contribution in [#9759](https://github.com/pydantic/pydantic/pull/9759) + +## v2.8.0b1 (2024-06-27) + +Pre-release, see [the GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.8.0b1) for details. + +## v2.7.4 (2024-06-12) + +[Github release](https://github.com/pydantic/pydantic/releases/tag/v2.7.4) + +### What's Changed + +#### Packaging + +* Bump `pydantic.v1` to `v1.10.16` reference by [@sydney-runkle](https://github.com/sydney-runkle) in [#9639](https://github.com/pydantic/pydantic/pull/9639) + +#### Fixes + +* Specify `recursive_guard` as kwarg in `FutureRef._evaluate` by [@vfazio](https://github.com/vfazio) in [#9612](https://github.com/pydantic/pydantic/pull/9612) + +## v2.7.3 (2024-06-03) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.3) + +### What's Changed + +#### Packaging + +* Bump `pydantic-core` to `v2.18.4` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9550](https://github.com/pydantic/pydantic/pull/9550) + +#### Fixes + +* Fix u style unicode strings in python [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/jiter#110](https://github.com/pydantic/jiter/pull/110) + +## v2.7.2 (2024-05-28) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.2) + +### What's Changed + +#### Packaging + +* Bump `pydantic-core` to `v2.18.3` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9515](https://github.com/pydantic/pydantic/pull/9515) + +#### Fixes + +* Replace `__spec__.parent` with `__package__` by [@hramezani](https://github.com/hramezani) in [#9331](https://github.com/pydantic/pydantic/pull/9331) +* Fix validation of `int`s with leading unary minus by [@RajatRajdeep](https://github.com/RajatRajdeep) in [pydantic/pydantic-core#1291](https://github.com/pydantic/pydantic-core/pull/1291) +* Fix `str` subclass validation for enums by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1273](https://github.com/pydantic/pydantic-core/pull/1273) +* Support `BigInt`s in `Literal`s and `Enum`s by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1297](https://github.com/pydantic/pydantic-core/pull/1297) +* Fix: uuid - allow `str` subclass as input by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1296](https://github.com/pydantic/pydantic-core/pull/1296) + +## v2.7.1 (2024-04-23) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.1) + +### What's Changed + +#### Packaging + +* Bump `pydantic-core` to `v2.18.2` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9307](https://github.com/pydantic/pydantic/pull/9307) + +#### New Features + +* Ftp and Websocket connection strings support by [@CherrySuryp](https://github.com/CherrySuryp) in [#9205](https://github.com/pydantic/pydantic/pull/9205) + +#### Changes + +* Use field description for RootModel schema description when there is `…` by [@LouisGobert](https://github.com/LouisGobert) in [#9214](https://github.com/pydantic/pydantic/pull/9214) + +#### Fixes + +* Fix `validation_alias` behavior with `model_construct` for `AliasChoices` and `AliasPath` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9223](https://github.com/pydantic/pydantic/pull/9223) +* Revert `typing.Literal` and import it outside the TYPE_CHECKING block by [@frost-nzcr4](https://github.com/frost-nzcr4) in [#9232](https://github.com/pydantic/pydantic/pull/9232) +* Fix `Secret` serialization schema, applicable for unions by [@sydney-runkle](https://github.com/sydney-runkle) in [#9240](https://github.com/pydantic/pydantic/pull/9240) +* Fix `strict` application to `function-after` with `use_enum_values` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9279](https://github.com/pydantic/pydantic/pull/9279) +* Address case where `model_construct` on a class which defines `model_post_init` fails with `AttributeError` by [@babygrimes](https://github.com/babygrimes) in [#9168](https://github.com/pydantic/pydantic/pull/9168) +* Fix `model_json_schema` with config types by [@NeevCohen](https://github.com/NeevCohen) in [#9287](https://github.com/pydantic/pydantic/pull/9287) +* Support multiple zeros as an `int` by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1269](https://github.com/pydantic/pydantic-core/pull/1269) +* Fix validation of `int`s with leading unary plus by [@cknv](https://github.com/cknv) in [pydantic/pydantic-core#1272](https://github.com/pydantic/pydantic-core/pull/1272) +* Fix interaction between `extra != 'ignore'` and `from_attributes=True` by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1276](https://github.com/pydantic/pydantic-core/pull/1276) +* Handle error from `Enum`'s `missing` function as `ValidationError` by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1274](https://github.com/pydantic/pydantic-core/pull/1754) +* Fix memory leak with `Iterable` validation by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1271](https://github.com/pydantic/pydantic-core/pull/1751) + +### New Contributors + +* [@zzstoatzz](https://github.com/zzstoatzz) made their first contribution in [#9219](https://github.com/pydantic/pydantic/pull/9219) +* [@frost-nzcr4](https://github.com/frost-nzcr4) made their first contribution in [#9232](https://github.com/pydantic/pydantic/pull/9232) +* [@CherrySuryp](https://github.com/CherrySuryp) made their first contribution in [#9205](https://github.com/pydantic/pydantic/pull/9205) +* [@vagenas](https://github.com/vagenas) made their first contribution in [#9268](https://github.com/pydantic/pydantic/pull/9268) +* [@ollz272](https://github.com/ollz272) made their first contribution in [#9262](https://github.com/pydantic/pydantic/pull/9262) +* [@babygrimes](https://github.com/babygrimes) made their first contribution in [#9168](https://github.com/pydantic/pydantic/pull/9168) +* [@swelborn](https://github.com/swelborn) made their first contribution in [#9296](https://github.com/pydantic/pydantic/pull/9296) +* [@kf-novi](https://github.com/kf-novi) made their first contribution in [#9236](https://github.com/pydantic/pydantic/pull/9236) +* [@lgeiger](https://github.com/lgeiger) made their first contribution in [#9288](https://github.com/pydantic/pydantic/pull/9288) + +## v2.7.0 (2024-04-11) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.0) + +The code released in v2.7.0 is practically identical to that of v2.7.0b1. + +### What's Changed + +#### Packaging + +* Reorganize `pyproject.toml` sections by [@Viicos](https://github.com/Viicos) in [#8899](https://github.com/pydantic/pydantic/pull/8899) +* Bump `pydantic-core` to `v2.18.1` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9211](https://github.com/pydantic/pydantic/pull/9211) +* Adopt `jiter` `v0.2.0` by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1250](https://github.com/pydantic/pydantic-core/pull/1250) + +#### New Features + +* Extract attribute docstrings from `FieldInfo.description` by [@Viicos](https://github.com/Viicos) in [#6563](https://github.com/pydantic/pydantic/pull/6563) +* Add a `with_config` decorator to comply with typing spec by [@Viicos](https://github.com/Viicos) in [#8611](https://github.com/pydantic/pydantic/pull/8611) +* Allow an optional separator splitting the value and unit of the result of `ByteSize.human_readable` by [@jks15satoshi](https://github.com/jks15satoshi) in [#8706](https://github.com/pydantic/pydantic/pull/8706) +* Add generic `Secret` base type by [@conradogarciaberrotaran](https://github.com/conradogarciaberrotaran) in [#8519](https://github.com/pydantic/pydantic/pull/8519) +* Make use of `Sphinx` inventories for cross references in docs by [@Viicos](https://github.com/Viicos) in [#8682](https://github.com/pydantic/pydantic/pull/8682) +* Add environment variable to disable plugins by [@geospackle](https://github.com/geospackle) in [#8767](https://github.com/pydantic/pydantic/pull/8767) +* Add support for `deprecated` fields by [@Viicos](https://github.com/Viicos) in [#8237](https://github.com/pydantic/pydantic/pull/8237) +* Allow `field_serializer('*')` by [@ornariece](https://github.com/ornariece) in [#9001](https://github.com/pydantic/pydantic/pull/9001) +* Handle a case when `model_config` is defined as a model property by [@alexeyt101](https://github.com/alexeyt101) in [#9004](https://github.com/pydantic/pydantic/pull/9004) +* Update `create_model()` to support `typing.Annotated` as input by [@wannieman98](https://github.com/wannieman98) in [#8947](https://github.com/pydantic/pydantic/pull/8947) +* Add `ClickhouseDsn` support by [@solidguy7](https://github.com/solidguy7) in [#9062](https://github.com/pydantic/pydantic/pull/9062) +* Add support for `re.Pattern[str]` to `pattern` field by [@jag-k](https://github.com/jag-k) in [#9053](https://github.com/pydantic/pydantic/pull/9053) +* Support for `serialize_as_any` runtime setting by [@sydney-runkle](https://github.com/sydney-runkle) in [#8830](https://github.com/pydantic/pydantic/pull/8830) +* Add support for `typing.Self` by [@Youssefares](https://github.com/Youssefares) in [#9023](https://github.com/pydantic/pydantic/pull/9023) +* Ability to pass `context` to serialization by [@ornariece](https://github.com/ornariece) in [#8965](https://github.com/pydantic/pydantic/pull/8965) +* Add feedback widget to docs with flarelytics integration by [@sydney-runkle](https://github.com/sydney-runkle) in [#9129](https://github.com/pydantic/pydantic/pull/9129) +* Support for parsing partial JSON strings in Python by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/jiter#66](https://github.com/pydantic/jiter/pull/66) + +**Finalized in v2.7.0, rather than v2.7.0b1:** +* Add support for field level number to str coercion option by [@NeevCohen](https://github.com/NeevCohen) in [#9137](https://github.com/pydantic/pydantic/pull/9137) +* Update `warnings` parameter for serialization utilities to allow raising a warning by [@Lance-Drane](https://github.com/Lance-Drane) in [#9166](https://github.com/pydantic/pydantic/pull/9166) + +#### Changes + +* Correct docs, logic for `model_construct` behavior with `extra` by [@sydney-runkle](https://github.com/sydney-runkle) in [#8807](https://github.com/pydantic/pydantic/pull/8807) +* Improve error message for improper `RootModel` subclasses by [@sydney-runkle](https://github.com/sydney-runkle) in [#8857](https://github.com/pydantic/pydantic/pull/8857) +* Use `PEP570` syntax by [@Viicos](https://github.com/Viicos) in [#8940](https://github.com/pydantic/pydantic/pull/8940) +* Add `enum` and `type` to the JSON schema for single item literals by [@dmontagu](https://github.com/dmontagu) in [#8944](https://github.com/pydantic/pydantic/pull/8944) +* Deprecate `update_json_schema` internal function by [@sydney-runkle](https://github.com/sydney-runkle) in [#9125](https://github.com/pydantic/pydantic/pull/9125) +* Serialize duration to hour minute second, instead of just seconds by [@kakilangit](https://github.com/kakilangit) in [pydantic/speedate#50](https://github.com/pydantic/speedate/pull/50) +* Trimming str before parsing to int and float by [@hungtsetse](https://github.com/hungtsetse) in [pydantic/pydantic-core#1203](https://github.com/pydantic/pydantic-core/pull/1203) + +#### Performance + +* `enum` validator improvements by [@samuelcolvin](https://github.com/samuelcolvin) in [#9045](https://github.com/pydantic/pydantic/pull/9045) +* Move `enum` validation and serialization to Rust by [@samuelcolvin](https://github.com/samuelcolvin) in [#9064](https://github.com/pydantic/pydantic/pull/9064) +* Improve schema generation for nested dataclasses by [@sydney-runkle](https://github.com/sydney-runkle) in [#9114](https://github.com/pydantic/pydantic/pull/9114) +* Fast path for ASCII python string creation in JSON by [@samuelcolvin](https://github.com/samuelcolvin) in in [pydantic/jiter#72](https://github.com/pydantic/jiter/pull/72) +* SIMD integer and string JSON parsing on `aarch64`(**Note:** SIMD on x86 will be implemented in a future release) by [@samuelcolvin](https://github.com/samuelcolvin) in in [pydantic/jiter#65](https://github.com/pydantic/jiter/pull/65) +* Support JSON `Cow` from `jiter` by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1231](https://github.com/pydantic/pydantic-core/pull/1231) +* MAJOR performance improvement: update to PyO3 0.21 final by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1248](https://github.com/pydantic/pydantic-core/pull/1248) +* cache Python strings by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1240](https://github.com/pydantic/pydantic-core/pull/1240) + +#### Fixes + +* Fix strict parsing for some `Sequence`s by [@sydney-runkle](https://github.com/sydney-runkle) in [#8614](https://github.com/pydantic/pydantic/pull/8614) +* Add a check on the existence of `__qualname__` by [@anci3ntr0ck](https://github.com/anci3ntr0ck) in [#8642](https://github.com/pydantic/pydantic/pull/8642) +* Handle `__pydantic_extra__` annotation being a string or inherited by [@alexmojaki](https://github.com/alexmojaki) in [#8659](https://github.com/pydantic/pydantic/pull/8659) +* Fix json validation for `NameEmail` by [@Holi0317](https://github.com/Holi0317) in [#8650](https://github.com/pydantic/pydantic/pull/8650) +* Fix type-safety of attribute access in `BaseModel` by [@bluenote10](https://github.com/bluenote10) in [#8651](https://github.com/pydantic/pydantic/pull/8651) +* Fix bug with `mypy` plugin and `no_strict_optional = True` by [@dmontagu](https://github.com/dmontagu) in [#8666](https://github.com/pydantic/pydantic/pull/8666) +* Fix `ByteSize` error `type` change by [@sydney-runkle](https://github.com/sydney-runkle) in [#8681](https://github.com/pydantic/pydantic/pull/8681) +* Fix inheriting annotations in dataclasses by [@sydney-runkle](https://github.com/sydney-runkle) in [#8679](https://github.com/pydantic/pydantic/pull/8679) +* Fix regression in core schema generation for indirect definition references by [@dmontagu](https://github.com/dmontagu) in [#8702](https://github.com/pydantic/pydantic/pull/8702) +* Fix unsupported types bug with plain validator by [@sydney-runkle](https://github.com/sydney-runkle) in [#8710](https://github.com/pydantic/pydantic/pull/8710) +* Reverting problematic fix from 2.6 release, fixing schema building bug by [@sydney-runkle](https://github.com/sydney-runkle) in [#8718](https://github.com/pydantic/pydantic/pull/8718) +* fixes `__pydantic_config__` ignored for TypeDict by [@13sin](https://github.com/13sin) in [#8734](https://github.com/pydantic/pydantic/pull/8734) +* Fix test failures with `pytest v8.0.0` due to `pytest.warns()` starting to work inside `pytest.raises()` by [@mgorny](https://github.com/mgorny) in [#8678](https://github.com/pydantic/pydantic/pull/8678) +* Use `is_valid_field` from 1.x for `mypy` plugin by [@DanielNoord](https://github.com/DanielNoord) in [#8738](https://github.com/pydantic/pydantic/pull/8738) +* Better-support `mypy` strict equality flag by [@dmontagu](https://github.com/dmontagu) in [#8799](https://github.com/pydantic/pydantic/pull/8799) +* model_json_schema export with Annotated types misses 'required' parameters by [@LouisGobert](https://github.com/LouisGobert) in [#8793](https://github.com/pydantic/pydantic/pull/8793) +* Fix default inclusion in `FieldInfo.__repr_args__` by [@sydney-runkle](https://github.com/sydney-runkle) in [#8801](https://github.com/pydantic/pydantic/pull/8801) +* Fix resolution of forward refs in dataclass base classes that are not present in the subclass module namespace by [@matsjoyce-refeyn](https://github.com/matsjoyce-refeyn) in [#8751](https://github.com/pydantic/pydantic/pull/8751) +* Fix `BaseModel` type annotations to be resolvable by `typing.get_type_hints` by [@devmonkey22](https://github.com/devmonkey22) in [#7680](https://github.com/pydantic/pydantic/pull/7680) +* Fix: allow empty string aliases with `AliasGenerator` by [@sydney-runkle](https://github.com/sydney-runkle) in [#8810](https://github.com/pydantic/pydantic/pull/8810) +* Fix test along with `date` -> `datetime` timezone assumption fix by [@sydney-runkle](https://github.com/sydney-runkle) in [#8823](https://github.com/pydantic/pydantic/pull/8823) +* Fix deprecation warning with usage of `ast.Str` by [@Viicos](https://github.com/Viicos) in [#8837](https://github.com/pydantic/pydantic/pull/8837) +* Add missing `deprecated` decorators by [@Viicos](https://github.com/Viicos) in [#8877](https://github.com/pydantic/pydantic/pull/8877) +* Fix serialization of `NameEmail` if name includes an email address by [@NeevCohen](https://github.com/NeevCohen) in [#8860](https://github.com/pydantic/pydantic/pull/8860) +* Add information about class in error message of schema generation by [@Czaki](https://github.com/Czaki) in [#8917](https://github.com/pydantic/pydantic/pull/8917) +* Make `TypeAdapter`'s typing compatible with special forms by [@adriangb](https://github.com/adriangb) in [#8923](https://github.com/pydantic/pydantic/pull/8923) +* Fix issue with config behavior being baked into the ref schema for `enum`s by [@dmontagu](https://github.com/dmontagu) in [#8920](https://github.com/pydantic/pydantic/pull/8920) +* More helpful error re wrong `model_json_schema` usage by [@sydney-runkle](https://github.com/sydney-runkle) in [#8928](https://github.com/pydantic/pydantic/pull/8928) +* Fix nested discriminated union schema gen, pt 2 by [@sydney-runkle](https://github.com/sydney-runkle) in [#8932](https://github.com/pydantic/pydantic/pull/8932) +* Fix schema build for nested dataclasses / TypedDicts with discriminators by [@sydney-runkle](https://github.com/sydney-runkle) in [#8950](https://github.com/pydantic/pydantic/pull/8950) +* Remove unnecessary logic for definitions schema gen with discriminated unions by [@sydney-runkle](https://github.com/sydney-runkle) in [#8951](https://github.com/pydantic/pydantic/pull/8951) +* Fix handling of optionals in `mypy` plugin by [@dmontagu](https://github.com/dmontagu) in [#9008](https://github.com/pydantic/pydantic/pull/9008) +* Fix `PlainSerializer` usage with std type constructor by [@sydney-runkle](https://github.com/sydney-runkle) in [#9031](https://github.com/pydantic/pydantic/pull/9031) +* Remove unnecessary warning for config in plugin by [@dmontagu](https://github.com/dmontagu) in [#9039](https://github.com/pydantic/pydantic/pull/9039) +* Fix default value serializing by [@NeevCohen](https://github.com/NeevCohen) in [#9066](https://github.com/pydantic/pydantic/pull/9066) +* Fix extra fields check in `Model.__getattr__()` by [@NeevCohen](https://github.com/NeevCohen) in [#9082](https://github.com/pydantic/pydantic/pull/9082) +* Fix `ClassVar` forward ref inherited from parent class by [@alexmojaki](https://github.com/alexmojaki) in [#9097](https://github.com/pydantic/pydantic/pull/9097) +* fix sequence like validator with strict `True` by [@andresliszt](https://github.com/andresliszt) in [#8977](https://github.com/pydantic/pydantic/pull/8977) +* Improve warning message when a field name shadows a field in a parent model by [@chan-vince](https://github.com/chan-vince) in [#9105](https://github.com/pydantic/pydantic/pull/9105) +* Do not warn about shadowed fields if they are not redefined in a child class by [@chan-vince](https://github.com/chan-vince) in [#9111](https://github.com/pydantic/pydantic/pull/9111) +* Fix discriminated union bug with unsubstituted type var by [@sydney-runkle](https://github.com/sydney-runkle) in [#9124](https://github.com/pydantic/pydantic/pull/9124) +* Support serialization of `deque` when passed to `Sequence[blah blah blah]` by [@sydney-runkle](https://github.com/sydney-runkle) in [#9128](https://github.com/pydantic/pydantic/pull/9128) +* Init private attributes from super-types in `model_post_init` by [@Viicos](https://github.com/Viicos) in [#9134](https://github.com/pydantic/pydantic/pull/9134) +* fix `model_construct` with `validation_alias` by [@ornariece](https://github.com/ornariece) in [#9144](https://github.com/pydantic/pydantic/pull/9144) +* Ensure json-schema generator handles `Literal` `null` types by [@bruno-f-cruz](https://github.com/bruno-f-cruz) in [#9135](https://github.com/pydantic/pydantic/pull/9135) +* **Fixed in v2.7.0**: Fix allow extra generic by [@dmontagu](https://github.com/dmontagu) in [#9193](https://github.com/pydantic/pydantic/pull/9193) + +### New Contributors + +* [@hungtsetse](https://github.com/hungtsetse) made their first contribution in [#8546](https://github.com/pydantic/pydantic/pull/8546) +* [@StrawHatDrag0n](https://github.com/StrawHatDrag0n) made their first contribution in [#8583](https://github.com/pydantic/pydantic/pull/8583) +* [@anci3ntr0ck](https://github.com/anci3ntr0ck) made their first contribution in [#8642](https://github.com/pydantic/pydantic/pull/8642) +* [@Holi0317](https://github.com/Holi0317) made their first contribution in [#8650](https://github.com/pydantic/pydantic/pull/8650) +* [@bluenote10](https://github.com/bluenote10) made their first contribution in [#8651](https://github.com/pydantic/pydantic/pull/8651) +* [@ADSteele916](https://github.com/ADSteele916) made their first contribution in [#8703](https://github.com/pydantic/pydantic/pull/8703) +* [@musicinmybrain](https://github.com/musicinmybrain) made their first contribution in [#8731](https://github.com/pydantic/pydantic/pull/8731) +* [@jks15satoshi](https://github.com/jks15satoshi) made their first contribution in [#8706](https://github.com/pydantic/pydantic/pull/8706) +* [@13sin](https://github.com/13sin) made their first contribution in [#8734](https://github.com/pydantic/pydantic/pull/8734) +* [@DanielNoord](https://github.com/DanielNoord) made their first contribution in [#8738](https://github.com/pydantic/pydantic/pull/8738) +* [@conradogarciaberrotaran](https://github.com/conradogarciaberrotaran) made their first contribution in [#8519](https://github.com/pydantic/pydantic/pull/8519) +* [@chris-griffin](https://github.com/chris-griffin) made their first contribution in [#8775](https://github.com/pydantic/pydantic/pull/8775) +* [@LouisGobert](https://github.com/LouisGobert) made their first contribution in [#8793](https://github.com/pydantic/pydantic/pull/8793) +* [@matsjoyce-refeyn](https://github.com/matsjoyce-refeyn) made their first contribution in [#8751](https://github.com/pydantic/pydantic/pull/8751) +* [@devmonkey22](https://github.com/devmonkey22) made their first contribution in [#7680](https://github.com/pydantic/pydantic/pull/7680) +* [@adamency](https://github.com/adamency) made their first contribution in [#8847](https://github.com/pydantic/pydantic/pull/8847) +* [@MamfTheKramf](https://github.com/MamfTheKramf) made their first contribution in [#8851](https://github.com/pydantic/pydantic/pull/8851) +* [@ornariece](https://github.com/ornariece) made their first contribution in [#9001](https://github.com/pydantic/pydantic/pull/9001) +* [@alexeyt101](https://github.com/alexeyt101) made their first contribution in [#9004](https://github.com/pydantic/pydantic/pull/9004) +* [@wannieman98](https://github.com/wannieman98) made their first contribution in [#8947](https://github.com/pydantic/pydantic/pull/8947) +* [@solidguy7](https://github.com/solidguy7) made their first contribution in [#9062](https://github.com/pydantic/pydantic/pull/9062) +* [@kloczek](https://github.com/kloczek) made their first contribution in [#9047](https://github.com/pydantic/pydantic/pull/9047) +* [@jag-k](https://github.com/jag-k) made their first contribution in [#9053](https://github.com/pydantic/pydantic/pull/9053) +* [@priya-gitTest](https://github.com/priya-gitTest) made their first contribution in [#9088](https://github.com/pydantic/pydantic/pull/9088) +* [@Youssefares](https://github.com/Youssefares) made their first contribution in [#9023](https://github.com/pydantic/pydantic/pull/9023) +* [@chan-vince](https://github.com/chan-vince) made their first contribution in [#9105](https://github.com/pydantic/pydantic/pull/9105) +* [@bruno-f-cruz](https://github.com/bruno-f-cruz) made their first contribution in [#9135](https://github.com/pydantic/pydantic/pull/9135) +* [@Lance-Drane](https://github.com/Lance-Drane) made their first contribution in [#9166](https://github.com/pydantic/pydantic/pull/9166) + +## v2.7.0b1 (2024-04-03) + +Pre-release, see [the GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.7.0b1) for details. + +## v2.6.4 (2024-03-12) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.4) + +### What's Changed + +#### Fixes + +* Fix usage of `AliasGenerator` with `computed_field` decorator by [@sydney-runkle](https://github.com/sydney-runkle) in [#8806](https://github.com/pydantic/pydantic/pull/8806) +* Fix nested discriminated union schema gen, pt 2 by [@sydney-runkle](https://github.com/sydney-runkle) in [#8932](https://github.com/pydantic/pydantic/pull/8932) +* Fix bug with no_strict_optional=True caused by API deferral by [@dmontagu](https://github.com/dmontagu) in [#8826](https://github.com/pydantic/pydantic/pull/8826) + + +## v2.6.3 (2024-02-27) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.3) + +### What's Changed + +#### Packaging + +* Update `pydantic-settings` version in the docs by [@hramezani](https://github.com/hramezani) in [#8906](https://github.com/pydantic/pydantic/pull/8906) + +#### Fixes + +* Fix discriminated union schema gen bug by [@sydney-runkle](https://github.com/sydney-runkle) in [#8904](https://github.com/pydantic/pydantic/pull/8904) + + +## v2.6.2 (2024-02-23) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.2) + +### What's Changed + +#### Packaging + +* Upgrade to `pydantic-core` 2.16.3 by [@sydney-runkle](https://github.com/sydney-runkle) in [#8879](https://github.com/pydantic/pydantic/pull/8879) + +#### Fixes + +* 'YYYY-MM-DD' date string coerced to datetime shouldn't infer timezone by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1193](https://github.com/pydantic/pydantic-core/pull/1193) + + +## v2.6.1 (2024-02-05) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.1) + +### What's Changed + +#### Packaging + +* Upgrade to `pydantic-core` 2.16.2 by [@sydney-runkle](https://github.com/sydney-runkle) in [#8717](https://github.com/pydantic/pydantic/pull/8717) + +#### Fixes + +* Fix bug with `mypy` plugin and `no_strict_optional = True` by [@dmontagu](https://github.com/dmontagu) in [#8666](https://github.com/pydantic/pydantic/pull/8666) +* Fix `ByteSize` error `type` change by [@sydney-runkle](https://github.com/sydney-runkle) in [#8681](https://github.com/pydantic/pydantic/pull/8681) +* Fix inheriting `Field` annotations in dataclasses by [@sydney-runkle](https://github.com/sydney-runkle) in [#8679](https://github.com/pydantic/pydantic/pull/8679) +* Fix regression in core schema generation for indirect definition references by [@dmontagu](https://github.com/dmontagu) in [#8702](https://github.com/pydantic/pydantic/pull/8702) +* Fix unsupported types bug with `PlainValidator` by [@sydney-runkle](https://github.com/sydney-runkle) in [#8710](https://github.com/pydantic/pydantic/pull/8710) +* Reverting problematic fix from 2.6 release, fixing schema building bug by [@sydney-runkle](https://github.com/sydney-runkle) in [#8718](https://github.com/pydantic/pydantic/pull/8718) +* Fix warning for tuple of wrong size in `Union` by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1174](https://github.com/pydantic/pydantic-core/pull/1174) +* Fix `computed_field` JSON serializer `exclude_none` behavior by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1187](https://github.com/pydantic/pydantic-core/pull/1187) + + +## v2.6.0 (2024-01-23) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.0) + +The code released in v2.6.0 is practically identical to that of v2.6.0b1. + +### What's Changed + +#### Packaging + +* Check for `email-validator` version >= 2.0 by [@commonism](https://github.com/commonism) in [#6033](https://github.com/pydantic/pydantic/pull/6033) +* Upgrade `ruff`` target version to Python 3.8 by [@Elkiwa](https://github.com/Elkiwa) in [#8341](https://github.com/pydantic/pydantic/pull/8341) +* Update to `pydantic-extra-types==2.4.1` by [@yezz123](https://github.com/yezz123) in [#8478](https://github.com/pydantic/pydantic/pull/8478) +* Update to `pyright==1.1.345` by [@Viicos](https://github.com/Viicos) in [#8453](https://github.com/pydantic/pydantic/pull/8453) +* Update pydantic-core from 2.14.6 to 2.16.1, significant changes from these updates are described below, full changelog [here](https://github.com/pydantic/pydantic-core/compare/v2.14.6...v2.16.1) + +#### New Features + +* Add `NatsDsn` by [@ekeew](https://github.com/ekeew) in [#6874](https://github.com/pydantic/pydantic/pull/6874) +* Add `ConfigDict.ser_json_inf_nan` by [@davidhewitt](https://github.com/davidhewitt) in [#8159](https://github.com/pydantic/pydantic/pull/8159) +* Add `types.OnErrorOmit` by [@adriangb](https://github.com/adriangb) in [#8222](https://github.com/pydantic/pydantic/pull/8222) +* Support `AliasGenerator` usage by [@sydney-runkle](https://github.com/sydney-runkle) in [#8282](https://github.com/pydantic/pydantic/pull/8282) +* Add Pydantic People Page to docs by [@sydney-runkle](https://github.com/sydney-runkle) in [#8345](https://github.com/pydantic/pydantic/pull/8345) +* Support `yyyy-MM-DD` datetime parsing by [@sydney-runkle](https://github.com/sydney-runkle) in [#8404](https://github.com/pydantic/pydantic/pull/8404) +* Added bits conversions to the `ByteSize` class [#8415](https://github.com/pydantic/pydantic/issues/8415) by [@luca-matei](https://github.com/luca-matei) in [#8507](https://github.com/pydantic/pydantic/pull/8507) +* Enable json schema creation with type `ByteSize` by [@geospackle](https://github.com/geospackle) in [#8537](https://github.com/pydantic/pydantic/pull/8537) +* Add `eval_type_backport` to handle union operator and builtin generic subscripting in older Pythons by [@alexmojaki](https://github.com/alexmojaki) in [#8209](https://github.com/pydantic/pydantic/pull/8209) +* Add support for `dataclass` fields `init` by [@dmontagu](https://github.com/dmontagu) in [#8552](https://github.com/pydantic/pydantic/pull/8552) +* Implement pickling for `ValidationError` by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1119](https://github.com/pydantic/pydantic-core/pull/1119) +* Add unified tuple validator that can handle "variadic" tuples via PEP-646 by [@dmontagu](https://github.com/dmontagu) in [pydantic/pydantic-core#865](https://github.com/pydantic/pydantic-core/pull/865) + +#### Changes + +* Drop Python3.7 support by [@hramezani](https://github.com/hramezani) in [#7188](https://github.com/pydantic/pydantic/pull/7188) +* Drop Python 3.7, and PyPy 3.7 and 3.8 by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1129](https://github.com/pydantic/pydantic-core/pull/1129) +* Use positional-only `self` in `BaseModel` constructor, so no field name can ever conflict with it by [@ariebovenberg](https://github.com/ariebovenberg) in [#8072](https://github.com/pydantic/pydantic/pull/8072) +* Make `@validate_call` return a function instead of a custom descriptor - fixes binding issue with inheritance and adds `self/cls` argument to validation errors by [@alexmojaki](https://github.com/alexmojaki) in [#8268](https://github.com/pydantic/pydantic/pull/8268) +* Exclude `BaseModel` docstring from JSON schema description by [@sydney-runkle](https://github.com/sydney-runkle) in [#8352](https://github.com/pydantic/pydantic/pull/8352) +* Introducing `classproperty` decorator for `model_computed_fields` by [@Jocelyn-Gas](https://github.com/Jocelyn-Gas) in [#8437](https://github.com/pydantic/pydantic/pull/8437) +* Explicitly raise an error if field names clashes with types by [@Viicos](https://github.com/Viicos) in [#8243](https://github.com/pydantic/pydantic/pull/8243) +* Use stricter serializer for unions of simple types by [@alexdrydew](https://github.com/alexdrydew) [pydantic/pydantic-core#1132](https://github.com/pydantic/pydantic-core/pull/1132) + +#### Performance + +* Add Codspeed profiling Actions workflow by [@lambertsbennett](https://github.com/lambertsbennett) in [#8054](https://github.com/pydantic/pydantic/pull/8054) +* Improve `int` extraction by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1155](https://github.com/pydantic/pydantic-core/pull/1155) +* Improve performance of recursion guard by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1156](https://github.com/pydantic/pydantic-core/pull/1156) +* `dataclass` serialization speedups by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1162](https://github.com/pydantic/pydantic-core/pull/1162) +* Avoid `HashMap` creation when looking up small JSON objects in `LazyIndexMaps` by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/jiter#55](https://github.com/pydantic/jiter/pull/55) +* use hashbrown to speedup python string caching by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/jiter#51](https://github.com/pydantic/jiter/pull/51) +* Replace `Peak` with more efficient `Peek` by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/jiter#48](https://github.com/pydantic/jiter/pull/48) + +#### Fixes + +* Move `getattr` warning in deprecated `BaseConfig` by [@tlambert03](https://github.com/tlambert03) in [#7183](https://github.com/pydantic/pydantic/pull/7183) +* Only hash `model_fields`, not whole `__dict__` by [@alexmojaki](https://github.com/alexmojaki) in [#7786](https://github.com/pydantic/pydantic/pull/7786) +* Fix mishandling of unions while freezing types in the `mypy` plugin by [@dmontagu](https://github.com/dmontagu) in [#7411](https://github.com/pydantic/pydantic/pull/7411) +* Fix `mypy` error on untyped `ClassVar` by [@vincent-hachin-wmx](https://github.com/vincent-hachin-wmx) in [#8138](https://github.com/pydantic/pydantic/pull/8138) +* Only compare pydantic fields in `BaseModel.__eq__` instead of whole `__dict__` by [@QuentinSoubeyranAqemia](https://github.com/QuentinSoubeyranAqemia) in [#7825](https://github.com/pydantic/pydantic/pull/7825) +* Update `strict` docstring in `model_validate` method. by [@LukeTonin](https://github.com/LukeTonin) in [#8223](https://github.com/pydantic/pydantic/pull/8223) +* Fix overload position of `computed_field` by [@Viicos](https://github.com/Viicos) in [#8227](https://github.com/pydantic/pydantic/pull/8227) +* Fix custom type type casting used in multiple attributes by [@ianhfc](https://github.com/ianhfc) in [#8066](https://github.com/pydantic/pydantic/pull/8066) +* Fix issue not allowing `validate_call` decorator to be dynamically assigned to a class method by [@jusexton](https://github.com/jusexton) in [#8249](https://github.com/pydantic/pydantic/pull/8249) +* Fix issue `unittest.mock` deprecation warnings by [@ibleedicare](https://github.com/ibleedicare) in [#8262](https://github.com/pydantic/pydantic/pull/8262) +* Added tests for the case `JsonValue` contains subclassed primitive values by [@jusexton](https://github.com/jusexton) in [#8286](https://github.com/pydantic/pydantic/pull/8286) +* Fix `mypy` error on free before validator (classmethod) by [@sydney-runkle](https://github.com/sydney-runkle) in [#8285](https://github.com/pydantic/pydantic/pull/8285) +* Fix `to_snake` conversion by [@jevins09](https://github.com/jevins09) in [#8316](https://github.com/pydantic/pydantic/pull/8316) +* Fix type annotation of `ModelMetaclass.__prepare__` by [@slanzmich](https://github.com/slanzmich) in [#8305](https://github.com/pydantic/pydantic/pull/8305) +* Disallow `config` specification when initializing a `TypeAdapter` when the annotated type has config already by [@sydney-runkle](https://github.com/sydney-runkle) in [#8365](https://github.com/pydantic/pydantic/pull/8365) +* Fix a naming issue with JSON schema for generics parametrized by recursive type aliases by [@dmontagu](https://github.com/dmontagu) in [#8389](https://github.com/pydantic/pydantic/pull/8389) +* Fix type annotation in pydantic people script by [@shenxiangzhuang](https://github.com/shenxiangzhuang) in [#8402](https://github.com/pydantic/pydantic/pull/8402) +* Add support for field `alias` in `dataclass` signature by [@NeevCohen](https://github.com/NeevCohen) in [#8387](https://github.com/pydantic/pydantic/pull/8387) +* Fix bug with schema generation with `Field(...)` in a forward ref by [@dmontagu](https://github.com/dmontagu) in [#8494](https://github.com/pydantic/pydantic/pull/8494) +* Fix ordering of keys in `__dict__` with `model_construct` call by [@sydney-runkle](https://github.com/sydney-runkle) in [#8500](https://github.com/pydantic/pydantic/pull/8500) +* Fix module `path_type` creation when globals does not contain `__name__` by [@hramezani](https://github.com/hramezani) in [#8470](https://github.com/pydantic/pydantic/pull/8470) +* Fix for namespace issue with dataclasses with `from __future__ import annotations` by [@sydney-runkle](https://github.com/sydney-runkle) in [#8513](https://github.com/pydantic/pydantic/pull/8513) +* Fix: make function validator types positional-only by [@pmmmwh](https://github.com/pmmmwh) in [#8479](https://github.com/pydantic/pydantic/pull/8479) +* Fix usage of `@deprecated` by [@Viicos](https://github.com/Viicos) in [#8294](https://github.com/pydantic/pydantic/pull/8294) +* Add more support for private attributes in `model_construct` call by [@sydney-runkle](https://github.com/sydney-runkle) in [#8525](https://github.com/pydantic/pydantic/pull/8525) +* Use a stack for the types namespace by [@dmontagu](https://github.com/dmontagu) in [#8378](https://github.com/pydantic/pydantic/pull/8378) +* Fix schema-building bug with `TypeAliasType` for types with refs by [@dmontagu](https://github.com/dmontagu) in [#8526](https://github.com/pydantic/pydantic/pull/8526) +* Support `pydantic.Field(repr=False)` in dataclasses by [@tigeryy2](https://github.com/tigeryy2) in [#8511](https://github.com/pydantic/pydantic/pull/8511) +* Override `dataclass_transform` behavior for `RootModel` by [@Viicos](https://github.com/Viicos) in [#8163](https://github.com/pydantic/pydantic/pull/8163) +* Refactor signature generation for simplicity by [@sydney-runkle](https://github.com/sydney-runkle) in [#8572](https://github.com/pydantic/pydantic/pull/8572) +* Fix ordering bug of PlainValidator annotation by [@Anvil](https://github.com/Anvil) in [#8567](https://github.com/pydantic/pydantic/pull/8567) +* Fix `exclude_none` for json serialization of `computed_field`s by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1098](https://github.com/pydantic/pydantic-core/pull/1098) +* Support yyyy-MM-DD string for datetimes by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1124](https://github.com/pydantic/pydantic-core/pull/1124) +* Tweak ordering of definitions in generated schemas by [@StrawHatDrag0n](https://github.com/StrawHatDrag0n) in [#8583](https://github.com/pydantic/pydantic/pull/8583) + + +### New Contributors + +#### `pydantic` +* [@ekeew](https://github.com/ekeew) made their first contribution in [#6874](https://github.com/pydantic/pydantic/pull/6874) +* [@lambertsbennett](https://github.com/lambertsbennett) made their first contribution in [#8054](https://github.com/pydantic/pydantic/pull/8054) +* [@vincent-hachin-wmx](https://github.com/vincent-hachin-wmx) made their first contribution in [#8138](https://github.com/pydantic/pydantic/pull/8138) +* [@QuentinSoubeyranAqemia](https://github.com/QuentinSoubeyranAqemia) made their first contribution in [#7825](https://github.com/pydantic/pydantic/pull/7825) +* [@ariebovenberg](https://github.com/ariebovenberg) made their first contribution in [#8072](https://github.com/pydantic/pydantic/pull/8072) +* [@LukeTonin](https://github.com/LukeTonin) made their first contribution in [#8223](https://github.com/pydantic/pydantic/pull/8223) +* [@denisart](https://github.com/denisart) made their first contribution in [#8231](https://github.com/pydantic/pydantic/pull/8231) +* [@ianhfc](https://github.com/ianhfc) made their first contribution in [#8066](https://github.com/pydantic/pydantic/pull/8066) +* [@eonu](https://github.com/eonu) made their first contribution in [#8255](https://github.com/pydantic/pydantic/pull/8255) +* [@amandahla](https://github.com/amandahla) made their first contribution in [#8263](https://github.com/pydantic/pydantic/pull/8263) +* [@ibleedicare](https://github.com/ibleedicare) made their first contribution in [#8262](https://github.com/pydantic/pydantic/pull/8262) +* [@jevins09](https://github.com/jevins09) made their first contribution in [#8316](https://github.com/pydantic/pydantic/pull/8316) +* [@cuu508](https://github.com/cuu508) made their first contribution in [#8322](https://github.com/pydantic/pydantic/pull/8322) +* [@slanzmich](https://github.com/slanzmich) made their first contribution in [#8305](https://github.com/pydantic/pydantic/pull/8305) +* [@jensenbox](https://github.com/jensenbox) made their first contribution in [#8331](https://github.com/pydantic/pydantic/pull/8331) +* [@szepeviktor](https://github.com/szepeviktor) made their first contribution in [#8356](https://github.com/pydantic/pydantic/pull/8356) +* [@Elkiwa](https://github.com/Elkiwa) made their first contribution in [#8341](https://github.com/pydantic/pydantic/pull/8341) +* [@parhamfh](https://github.com/parhamfh) made their first contribution in [#8395](https://github.com/pydantic/pydantic/pull/8395) +* [@shenxiangzhuang](https://github.com/shenxiangzhuang) made their first contribution in [#8402](https://github.com/pydantic/pydantic/pull/8402) +* [@NeevCohen](https://github.com/NeevCohen) made their first contribution in [#8387](https://github.com/pydantic/pydantic/pull/8387) +* [@zby](https://github.com/zby) made their first contribution in [#8497](https://github.com/pydantic/pydantic/pull/8497) +* [@patelnets](https://github.com/patelnets) made their first contribution in [#8491](https://github.com/pydantic/pydantic/pull/8491) +* [@edwardwli](https://github.com/edwardwli) made their first contribution in [#8503](https://github.com/pydantic/pydantic/pull/8503) +* [@luca-matei](https://github.com/luca-matei) made their first contribution in [#8507](https://github.com/pydantic/pydantic/pull/8507) +* [@Jocelyn-Gas](https://github.com/Jocelyn-Gas) made their first contribution in [#8437](https://github.com/pydantic/pydantic/pull/8437) +* [@bL34cHig0](https://github.com/bL34cHig0) made their first contribution in [#8501](https://github.com/pydantic/pydantic/pull/8501) +* [@tigeryy2](https://github.com/tigeryy2) made their first contribution in [#8511](https://github.com/pydantic/pydantic/pull/8511) +* [@geospackle](https://github.com/geospackle) made their first contribution in [#8537](https://github.com/pydantic/pydantic/pull/8537) +* [@Anvil](https://github.com/Anvil) made their first contribution in [#8567](https://github.com/pydantic/pydantic/pull/8567) +* [@hungtsetse](https://github.com/hungtsetse) made their first contribution in [#8546](https://github.com/pydantic/pydantic/pull/8546) +* [@StrawHatDrag0n](https://github.com/StrawHatDrag0n) made their first contribution in [#8583](https://github.com/pydantic/pydantic/pull/8583) + +#### `pydantic-core` +* [@mariuswinger](https://github.com/mariuswinger) made their first contribution in [pydantic/pydantic-core#1087](https://github.com/pydantic/pydantic-core/pull/1087) +* [@adamchainz](https://github.com/adamchainz) made their first contribution in [pydantic/pydantic-core#1090](https://github.com/pydantic/pydantic-core/pull/1090) +* [@akx](https://github.com/akx) made their first contribution in [pydantic/pydantic-core#1123](https://github.com/pydantic/pydantic-core/pull/1123) + +## v2.6.0b1 (2024-01-19) + +Pre-release, see [the GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.6.0b1) for details. + +## v2.5.3 (2023-12-22) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.5.3) + +### What's Changed + +#### Packaging + +* uprev `pydantic-core` to 2.14.6 + +#### Fixes + +* Fix memory leak with recursive definitions creating reference cycles by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1125](https://github.com/pydantic/pydantic-core/pull/1125) + +## v2.5.2 (2023-11-22) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.5.2) + +### What's Changed + +#### Packaging + +* uprev `pydantic-core` to 2.14.5 + +#### New Features + +* Add `ConfigDict.ser_json_inf_nan` by [@davidhewitt](https://github.com/davidhewitt) in [#8159](https://github.com/pydantic/pydantic/pull/8159) + +#### Fixes + +* Fix validation of `Literal` from JSON keys when used as `dict` key by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1075](https://github.com/pydantic/pydantic-core/pull/1075) +* Fix bug re `custom_init` on members of `Union` by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1076](https://github.com/pydantic/pydantic-core/pull/1076) +* Fix `JsonValue` `bool` serialization by [@sydney-runkle](https://github.com/sydney-runkle) in [#8190](https://github.com/pydantic/pydantic/pull/8159) +* Fix handling of unhashable inputs with `Literal` in `Union`s by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1089](https://github.com/pydantic/pydantic-core/pull/1089) + +## v2.5.1 (2023-11-15) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.5.1) + +### What's Changed + +#### Packaging + +* uprev pydantic-core to 2.14.3 by [@samuelcolvin](https://github.com/samuelcolvin) in [#8120](https://github.com/pydantic/pydantic/pull/8120) + +#### Fixes + +* Fix package description limit by [@dmontagu](https://github.com/dmontagu) in [#8097](https://github.com/pydantic/pydantic/pull/8097) +* Fix `ValidateCallWrapper` error when creating a model which has a [@validate_call](https://github.com/validate_call) wrapped field annotation by [@sydney-runkle](https://github.com/sydney-runkle) in [#8110](https://github.com/pydantic/pydantic/pull/8110) + +## v2.5.0 (2023-11-13) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.5.0) + +The code released in v2.5.0 is functionally identical to that of v2.5.0b1. + +### What's Changed + +#### Packaging + +* Update pydantic-core from 2.10.1 to 2.14.1, significant changes from these updates are described below, full changelog [here](https://github.com/pydantic/pydantic-core/compare/v2.10.1...v2.14.1) +* Update to `pyright==1.1.335` by [@Viicos](https://github.com/Viicos) in [#8075](https://github.com/pydantic/pydantic/pull/8075) + +#### New Features + +* Allow plugins to catch non `ValidationError` errors by [@adriangb](https://github.com/adriangb) in [#7806](https://github.com/pydantic/pydantic/pull/7806) +* Support `__doc__` argument in `create_model()` by [@chris-spann](https://github.com/chris-spann) in [#7863](https://github.com/pydantic/pydantic/pull/7863) +* Expose `regex_engine` flag - meaning you can use with the Rust or Python regex libraries in constraints by [@utkini](https://github.com/utkini) in [#7768](https://github.com/pydantic/pydantic/pull/7768) +* Save return type generated from type annotation in `ComputedFieldInfo` by [@alexmojaki](https://github.com/alexmojaki) in [#7889](https://github.com/pydantic/pydantic/pull/7889) +* Adopting `ruff` formatter by [@Luca-Blight](https://github.com/Luca-Blight) in [#7930](https://github.com/pydantic/pydantic/pull/7930) +* Added `validation_error_cause` to config by [@zakstucke](https://github.com/zakstucke) in [#7626](https://github.com/pydantic/pydantic/pull/7626) +* Make path of the item to validate available in plugin by [@hramezani](https://github.com/hramezani) in [#7861](https://github.com/pydantic/pydantic/pull/7861) +* Add `CallableDiscriminator` and `Tag` by [@dmontagu](https://github.com/dmontagu) in [#7983](https://github.com/pydantic/pydantic/pull/7983) + * `CallableDiscriminator` renamed to `Discriminator` by [@dmontagu](https://github.com/dmontagu) in [#8047](https://github.com/pydantic/pydantic/pull/8047) +* Make union case tags affect union error messages by [@dmontagu](https://github.com/dmontagu) in [#8001](https://github.com/pydantic/pydantic/pull/8001) +* Add `examples` and `json_schema_extra` to `@computed_field` by [@alexmojaki](https://github.com/alexmojaki) in [#8013](https://github.com/pydantic/pydantic/pull/8013) +* Add `JsonValue` type by [@dmontagu](https://github.com/dmontagu) in [#7998](https://github.com/pydantic/pydantic/pull/7998) +* Allow `str` as argument to `Discriminator` by [@dmontagu](https://github.com/dmontagu) in [#8047](https://github.com/pydantic/pydantic/pull/8047) +* Add `SchemaSerializer.__reduce__` method to enable pickle serialization by [@edoakes](https://github.com/edoakes) in [pydantic/pydantic-core#1006](https://github.com/pydantic/pydantic-core/pull/1006) + +#### Changes + +* **Significant Change:** replace `ultra_strict` with new smart union implementation, the way unions are validated has changed significantly to improve performance and correctness, we have worked hard to absolutely minimise the number of cases where behaviour has changed, see the PR for details - by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#867](https://github.com/pydantic/pydantic-core/pull/867) +* Add support for instance method reassignment when `extra='allow'` by [@sydney-runkle](https://github.com/sydney-runkle) in [#7683](https://github.com/pydantic/pydantic/pull/7683) +* Support JSON schema generation for `Enum` types with no cases by [@sydney-runkle](https://github.com/sydney-runkle) in [#7927](https://github.com/pydantic/pydantic/pull/7927) +* Warn if a class inherits from `Generic` before `BaseModel` by [@alexmojaki](https://github.com/alexmojaki) in [#7891](https://github.com/pydantic/pydantic/pull/7891) + +#### Performance + +* New custom JSON parser, `jiter` by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#974](https://github.com/pydantic/pydantic-core/pull/974) +* PGO build for MacOS M1 by [@samuelcolvin](https://github.com/samuelcolvin) in [pydantic/pydantic-core#1063](https://github.com/pydantic/pydantic-core/pull/1063) +* Use `__getattr__` for all package imports, improve import time by [@samuelcolvin](https://github.com/samuelcolvin) in [#7947](https://github.com/pydantic/pydantic/pull/7947) + +#### Fixes + +* Fix `mypy` issue with subclasses of `RootModel` by [@sydney-runkle](https://github.com/sydney-runkle) in [#7677](https://github.com/pydantic/pydantic/pull/7677) +* Properly rebuild the `FieldInfo` when a forward ref gets evaluated by [@dmontagu](https://github.com/dmontagu) in [#7698](https://github.com/pydantic/pydantic/pull/7698) +* Fix failure to load `SecretStr` from JSON (regression in v2.4) by [@sydney-runkle](https://github.com/sydney-runkle) in [#7729](https://github.com/pydantic/pydantic/pull/7729) +* Fix `defer_build` behavior with `TypeAdapter` by [@sydney-runkle](https://github.com/sydney-runkle) in [#7736](https://github.com/pydantic/pydantic/pull/7736) +* Improve compatibility with legacy `mypy` versions by [@dmontagu](https://github.com/dmontagu) in [#7742](https://github.com/pydantic/pydantic/pull/7742) +* Fix: update `TypeVar` handling when default is not set by [@pmmmwh](https://github.com/pmmmwh) in [#7719](https://github.com/pydantic/pydantic/pull/7719) +* Support specification of `strict` on `Enum` type fields by [@sydney-runkle](https://github.com/sydney-runkle) in [#7761](https://github.com/pydantic/pydantic/pull/7761) +* Wrap `weakref.ref` instead of subclassing to fix `cloudpickle` serialization by [@edoakes](https://github.com/edoakes) in [#7780](https://github.com/pydantic/pydantic/pull/7780) +* Keep values of private attributes set within `model_post_init` in subclasses by [@alexmojaki](https://github.com/alexmojaki) in [#7775](https://github.com/pydantic/pydantic/pull/7775) +* Add more specific type for non-callable `json_schema_extra` by [@alexmojaki](https://github.com/alexmojaki) in [#7803](https://github.com/pydantic/pydantic/pull/7803) +* Raise an error when deleting frozen (model) fields by [@alexmojaki](https://github.com/alexmojaki) in [#7800](https://github.com/pydantic/pydantic/pull/7800) +* Fix schema sorting bug with default values by [@sydney-runkle](https://github.com/sydney-runkle) in [#7817](https://github.com/pydantic/pydantic/pull/7817) +* Use generated alias for aliases that are not specified otherwise by [@alexmojaki](https://github.com/alexmojaki) in [#7802](https://github.com/pydantic/pydantic/pull/7802) +* Support `strict` specification for `UUID` types by [@sydney-runkle](https://github.com/sydney-runkle) in [#7865](https://github.com/pydantic/pydantic/pull/7865) +* JSON schema: fix extra parameter handling by [@me-and](https://github.com/me-and) in [#7810](https://github.com/pydantic/pydantic/pull/7810) +* Fix: support `pydantic.Field(kw_only=True)` with inherited dataclasses by [@PrettyWood](https://github.com/PrettyWood) in [#7827](https://github.com/pydantic/pydantic/pull/7827) +* Support `validate_call` decorator for methods in classes with `__slots__` by [@sydney-runkle](https://github.com/sydney-runkle) in [#7883](https://github.com/pydantic/pydantic/pull/7883) +* Fix pydantic dataclass problem with `dataclasses.field` default by [@hramezani](https://github.com/hramezani) in [#7898](https://github.com/pydantic/pydantic/pull/7898) +* Fix schema generation for generics with union type bounds by [@sydney-runkle](https://github.com/sydney-runkle) in [#7899](https://github.com/pydantic/pydantic/pull/7899) +* Fix version for `importlib_metadata` on python 3.7 by [@sydney-runkle](https://github.com/sydney-runkle) in [#7904](https://github.com/pydantic/pydantic/pull/7904) +* Support `|` operator (Union) in PydanticRecursiveRef by [@alexmojaki](https://github.com/alexmojaki) in [#7892](https://github.com/pydantic/pydantic/pull/7892) +* Fix `display_as_type` for `TypeAliasType` in python 3.12 by [@dmontagu](https://github.com/dmontagu) in [#7929](https://github.com/pydantic/pydantic/pull/7929) +* Add support for `NotRequired` generics in `TypedDict` by [@sydney-runkle](https://github.com/sydney-runkle) in [#7932](https://github.com/pydantic/pydantic/pull/7932) +* Make generic `TypeAliasType` specifications produce different schema definitions by [@alexdrydew](https://github.com/alexdrydew) in [#7893](https://github.com/pydantic/pydantic/pull/7893) +* Added fix for signature of inherited dataclass by [@howsunjow](https://github.com/howsunjow) in [#7925](https://github.com/pydantic/pydantic/pull/7925) +* Make the model name generation more robust in JSON schema by [@joakimnordling](https://github.com/joakimnordling) in [#7881](https://github.com/pydantic/pydantic/pull/7881) +* Fix plurals in validation error messages (in tests) by [@Iipin](https://github.com/Iipin) in [#7972](https://github.com/pydantic/pydantic/pull/7972) +* `PrivateAttr` is passed from `Annotated` default position by [@tabassco](https://github.com/tabassco) in [#8004](https://github.com/pydantic/pydantic/pull/8004) +* Don't decode bytes (which may not be UTF8) when displaying SecretBytes by [@alexmojaki](https://github.com/alexmojaki) in [#8012](https://github.com/pydantic/pydantic/pull/8012) +* Use `classmethod` instead of `classmethod[Any, Any, Any]` by [@Mr-Pepe](https://github.com/Mr-Pepe) in [#7979](https://github.com/pydantic/pydantic/pull/7979) +* Clearer error on invalid Plugin by [@samuelcolvin](https://github.com/samuelcolvin) in [#8023](https://github.com/pydantic/pydantic/pull/8023) +* Correct pydantic dataclasses import by [@samuelcolvin](https://github.com/samuelcolvin) in [#8027](https://github.com/pydantic/pydantic/pull/8027) +* Fix misbehavior for models referencing redefined type aliases by [@dmontagu](https://github.com/dmontagu) in [#8050](https://github.com/pydantic/pydantic/pull/8050) +* Fix `Optional` field with `validate_default` only performing one field validation by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1002](https://github.com/pydantic/pydantic-core/pull/1002) +* Fix `definition-ref` bug with `Dict` keys by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1014](https://github.com/pydantic/pydantic-core/pull/1014) +* Fix bug allowing validation of `bool` types with `coerce_numbers_to_str=True` by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1017](https://github.com/pydantic/pydantic-core/pull/1017) +* Don't accept `NaN` in float and decimal constraints by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1037](https://github.com/pydantic/pydantic-core/pull/1037) +* Add `lax_str` and `lax_int` support for enum values not inherited from str/int by [@michaelhly](https://github.com/michaelhly) in [pydantic/pydantic-core#1015](https://github.com/pydantic/pydantic-core/pull/1015) +* Support subclasses in lists in `Union` of `List` types by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1039](https://github.com/pydantic/pydantic-core/pull/1039) +* Allow validation against `max_digits` and `decimals` to pass if normalized or non-normalized input is valid by [@sydney-runkle](https://github.com/sydney-runkle) in [pydantic/pydantic-core#1049](https://github.com/pydantic/pydantic-core/pull/1049) +* Fix: proper pluralization in `ValidationError` messages by [@Iipin](https://github.com/Iipin) in [pydantic/pydantic-core#1050](https://github.com/pydantic/pydantic-core/pull/1050) +* Disallow the string `'-'` as `datetime` input by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/speedate#52](https://github.com/pydantic/speedate/pull/52) & [pydantic/pydantic-core#1060](https://github.com/pydantic/pydantic-core/pull/1060) +* Fix: NaN and Inf float serialization by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1062](https://github.com/pydantic/pydantic-core/pull/1062) +* Restore manylinux-compatible PGO builds by [@davidhewitt](https://github.com/davidhewitt) in [pydantic/pydantic-core#1068](https://github.com/pydantic/pydantic-core/pull/1068) + +### New Contributors + +#### `pydantic` +* [@schneebuzz](https://github.com/schneebuzz) made their first contribution in [#7699](https://github.com/pydantic/pydantic/pull/7699) +* [@edoakes](https://github.com/edoakes) made their first contribution in [#7780](https://github.com/pydantic/pydantic/pull/7780) +* [@alexmojaki](https://github.com/alexmojaki) made their first contribution in [#7775](https://github.com/pydantic/pydantic/pull/7775) +* [@NickG123](https://github.com/NickG123) made their first contribution in [#7751](https://github.com/pydantic/pydantic/pull/7751) +* [@gowthamgts](https://github.com/gowthamgts) made their first contribution in [#7830](https://github.com/pydantic/pydantic/pull/7830) +* [@jamesbraza](https://github.com/jamesbraza) made their first contribution in [#7848](https://github.com/pydantic/pydantic/pull/7848) +* [@laundmo](https://github.com/laundmo) made their first contribution in [#7850](https://github.com/pydantic/pydantic/pull/7850) +* [@rahmatnazali](https://github.com/rahmatnazali) made their first contribution in [#7870](https://github.com/pydantic/pydantic/pull/7870) +* [@waterfountain1996](https://github.com/waterfountain1996) made their first contribution in [#7878](https://github.com/pydantic/pydantic/pull/7878) +* [@chris-spann](https://github.com/chris-spann) made their first contribution in [#7863](https://github.com/pydantic/pydantic/pull/7863) +* [@me-and](https://github.com/me-and) made their first contribution in [#7810](https://github.com/pydantic/pydantic/pull/7810) +* [@utkini](https://github.com/utkini) made their first contribution in [#7768](https://github.com/pydantic/pydantic/pull/7768) +* [@bn-l](https://github.com/bn-l) made their first contribution in [#7744](https://github.com/pydantic/pydantic/pull/7744) +* [@alexdrydew](https://github.com/alexdrydew) made their first contribution in [#7893](https://github.com/pydantic/pydantic/pull/7893) +* [@Luca-Blight](https://github.com/Luca-Blight) made their first contribution in [#7930](https://github.com/pydantic/pydantic/pull/7930) +* [@howsunjow](https://github.com/howsunjow) made their first contribution in [#7925](https://github.com/pydantic/pydantic/pull/7925) +* [@joakimnordling](https://github.com/joakimnordling) made their first contribution in [#7881](https://github.com/pydantic/pydantic/pull/7881) +* [@icfly2](https://github.com/icfly2) made their first contribution in [#7976](https://github.com/pydantic/pydantic/pull/7976) +* [@Yummy-Yums](https://github.com/Yummy-Yums) made their first contribution in [#8003](https://github.com/pydantic/pydantic/pull/8003) +* [@Iipin](https://github.com/Iipin) made their first contribution in [#7972](https://github.com/pydantic/pydantic/pull/7972) +* [@tabassco](https://github.com/tabassco) made their first contribution in [#8004](https://github.com/pydantic/pydantic/pull/8004) +* [@Mr-Pepe](https://github.com/Mr-Pepe) made their first contribution in [#7979](https://github.com/pydantic/pydantic/pull/7979) +* [@0x00cl](https://github.com/0x00cl) made their first contribution in [#8010](https://github.com/pydantic/pydantic/pull/8010) +* [@barraponto](https://github.com/barraponto) made their first contribution in [#8032](https://github.com/pydantic/pydantic/pull/8032) + +#### `pydantic-core` +* [@sisp](https://github.com/sisp) made their first contribution in [pydantic/pydantic-core#995](https://github.com/pydantic/pydantic-core/pull/995) +* [@michaelhly](https://github.com/michaelhly) made their first contribution in [pydantic/pydantic-core#1015](https://github.com/pydantic/pydantic-core/pull/1015) + +## v2.5.0b1 (2023-11-09) + +Pre-release, see [the GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.5.0b1) for details. + +## v2.4.2 (2023-09-27) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.4.2) + +### What's Changed + +#### Fixes + +* Fix bug with JSON schema for sequence of discriminated union by [@dmontagu](https://github.com/dmontagu) in [#7647](https://github.com/pydantic/pydantic/pull/7647) +* Fix schema references in discriminated unions by [@adriangb](https://github.com/adriangb) in [#7646](https://github.com/pydantic/pydantic/pull/7646) +* Fix json schema generation for recursive models by [@adriangb](https://github.com/adriangb) in [#7653](https://github.com/pydantic/pydantic/pull/7653) +* Fix `models_json_schema` for generic models by [@adriangb](https://github.com/adriangb) in [#7654](https://github.com/pydantic/pydantic/pull/7654) +* Fix xfailed test for generic model signatures by [@adriangb](https://github.com/adriangb) in [#7658](https://github.com/pydantic/pydantic/pull/7658) + +### New Contributors + +* [@austinorr](https://github.com/austinorr) made their first contribution in [#7657](https://github.com/pydantic/pydantic/pull/7657) +* [@peterHoburg](https://github.com/peterHoburg) made their first contribution in [#7670](https://github.com/pydantic/pydantic/pull/7670) + +## v2.4.1 (2023-09-26) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.4.1) + +### What's Changed + +#### Packaging + +* Update pydantic-core to 2.10.1 by [@davidhewitt](https://github.com/davidhewitt) in [#7633](https://github.com/pydantic/pydantic/pull/7633) + +#### Fixes + +* Serialize unsubstituted type vars as `Any` by [@adriangb](https://github.com/adriangb) in [#7606](https://github.com/pydantic/pydantic/pull/7606) +* Remove schema building caches by [@adriangb](https://github.com/adriangb) in [#7624](https://github.com/pydantic/pydantic/pull/7624) +* Fix an issue where JSON schema extras weren't JSON encoded by [@dmontagu](https://github.com/dmontagu) in [#7625](https://github.com/pydantic/pydantic/pull/7625) + +## v2.4.0 (2023-09-22) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.4.0) + +### What's Changed + +#### Packaging + +* Update pydantic-core to 2.10.0 by [@samuelcolvin](https://github.com/samuelcolvin) in [#7542](https://github.com/pydantic/pydantic/pull/7542) + +#### New Features + +* Add `Base64Url` types by [@dmontagu](https://github.com/dmontagu) in [#7286](https://github.com/pydantic/pydantic/pull/7286) +* Implement optional `number` to `str` coercion by [@lig](https://github.com/lig) in [#7508](https://github.com/pydantic/pydantic/pull/7508) +* Allow access to `field_name` and `data` in all validators if there is data and a field name by [@samuelcolvin](https://github.com/samuelcolvin) in [#7542](https://github.com/pydantic/pydantic/pull/7542) +* Add `BaseModel.model_validate_strings` and `TypeAdapter.validate_strings` by [@hramezani](https://github.com/hramezani) in [#7552](https://github.com/pydantic/pydantic/pull/7552) +* Add Pydantic `plugins` experimental implementation by [@lig](https://github.com/lig) [@samuelcolvin](https://github.com/samuelcolvin) and [@Kludex](https://github.com/Kludex) in [#6820](https://github.com/pydantic/pydantic/pull/6820) + +#### Changes + +* Do not override `model_post_init` in subclass with private attrs by [@Viicos](https://github.com/Viicos) in [#7302](https://github.com/pydantic/pydantic/pull/7302) +* Make fields with defaults not required in the serialization schema by default by [@dmontagu](https://github.com/dmontagu) in [#7275](https://github.com/pydantic/pydantic/pull/7275) +* Mark `Extra` as deprecated by [@disrupted](https://github.com/disrupted) in [#7299](https://github.com/pydantic/pydantic/pull/7299) +* Make `EncodedStr` a dataclass by [@Kludex](https://github.com/Kludex) in [#7396](https://github.com/pydantic/pydantic/pull/7396) +* Move `annotated_handlers` to be public by [@samuelcolvin](https://github.com/samuelcolvin) in [#7569](https://github.com/pydantic/pydantic/pull/7569) + +#### Performance + +* Simplify flattening and inlining of `CoreSchema` by [@adriangb](https://github.com/adriangb) in [#7523](https://github.com/pydantic/pydantic/pull/7523) +* Remove unused copies in `CoreSchema` walking by [@adriangb](https://github.com/adriangb) in [#7528](https://github.com/pydantic/pydantic/pull/7528) +* Add caches for collecting definitions and invalid schemas from a CoreSchema by [@adriangb](https://github.com/adriangb) in [#7527](https://github.com/pydantic/pydantic/pull/7527) +* Eagerly resolve discriminated unions and cache cases where we can't by [@adriangb](https://github.com/adriangb) in [#7529](https://github.com/pydantic/pydantic/pull/7529) +* Replace `dict.get` and `dict.setdefault` with more verbose versions in `CoreSchema` building hot paths by [@adriangb](https://github.com/adriangb) in [#7536](https://github.com/pydantic/pydantic/pull/7536) +* Cache invalid `CoreSchema` discovery by [@adriangb](https://github.com/adriangb) in [#7535](https://github.com/pydantic/pydantic/pull/7535) +* Allow disabling `CoreSchema` validation for faster startup times by [@adriangb](https://github.com/adriangb) in [#7565](https://github.com/pydantic/pydantic/pull/7565) + +#### Fixes + +* Fix config detection for `TypedDict` from grandparent classes by [@dmontagu](https://github.com/dmontagu) in [#7272](https://github.com/pydantic/pydantic/pull/7272) +* Fix hash function generation for frozen models with unusual MRO by [@dmontagu](https://github.com/dmontagu) in [#7274](https://github.com/pydantic/pydantic/pull/7274) +* Make `strict` config overridable in field for Path by [@hramezani](https://github.com/hramezani) in [#7281](https://github.com/pydantic/pydantic/pull/7281) +* Use `ser_json_` on default in `GenerateJsonSchema` by [@Kludex](https://github.com/Kludex) in [#7269](https://github.com/pydantic/pydantic/pull/7269) +* Adding a check that alias is validated as an identifier for Python by [@andree0](https://github.com/andree0) in [#7319](https://github.com/pydantic/pydantic/pull/7319) +* Raise an error when computed field overrides field by [@sydney-runkle](https://github.com/sydney-runkle) in [#7346](https://github.com/pydantic/pydantic/pull/7346) +* Fix applying `SkipValidation` to referenced schemas by [@adriangb](https://github.com/adriangb) in [#7381](https://github.com/pydantic/pydantic/pull/7381) +* Enforce behavior of private attributes having double leading underscore by [@lig](https://github.com/lig) in [#7265](https://github.com/pydantic/pydantic/pull/7265) +* Standardize `__get_pydantic_core_schema__` signature by [@hramezani](https://github.com/hramezani) in [#7415](https://github.com/pydantic/pydantic/pull/7415) +* Fix generic dataclass fields mutation bug (when using `TypeAdapter`) by [@sydney-runkle](https://github.com/sydney-runkle) in [#7435](https://github.com/pydantic/pydantic/pull/7435) +* Fix `TypeError` on `model_validator` in `wrap` mode by [@pmmmwh](https://github.com/pmmmwh) in [#7496](https://github.com/pydantic/pydantic/pull/7496) +* Improve enum error message by [@hramezani](https://github.com/hramezani) in [#7506](https://github.com/pydantic/pydantic/pull/7506) +* Make `repr` work for instances that failed initialization when handling `ValidationError`s by [@dmontagu](https://github.com/dmontagu) in [#7439](https://github.com/pydantic/pydantic/pull/7439) +* Fixed a regular expression denial of service issue by limiting whitespaces by [@prodigysml](https://github.com/prodigysml) in [#7360](https://github.com/pydantic/pydantic/pull/7360) +* Fix handling of `UUID` values having `UUID.version=None` by [@lig](https://github.com/lig) in [#7566](https://github.com/pydantic/pydantic/pull/7566) +* Fix `__iter__` returning private `cached_property` info by [@sydney-runkle](https://github.com/sydney-runkle) in [#7570](https://github.com/pydantic/pydantic/pull/7570) +* Improvements to version info message by [@samuelcolvin](https://github.com/samuelcolvin) in [#7594](https://github.com/pydantic/pydantic/pull/7594) + +### New Contributors +* [@15498th](https://github.com/15498th) made their first contribution in [#7238](https://github.com/pydantic/pydantic/pull/7238) +* [@GabrielCappelli](https://github.com/GabrielCappelli) made their first contribution in [#7213](https://github.com/pydantic/pydantic/pull/7213) +* [@tobni](https://github.com/tobni) made their first contribution in [#7184](https://github.com/pydantic/pydantic/pull/7184) +* [@redruin1](https://github.com/redruin1) made their first contribution in [#7282](https://github.com/pydantic/pydantic/pull/7282) +* [@FacerAin](https://github.com/FacerAin) made their first contribution in [#7288](https://github.com/pydantic/pydantic/pull/7288) +* [@acdha](https://github.com/acdha) made their first contribution in [#7297](https://github.com/pydantic/pydantic/pull/7297) +* [@andree0](https://github.com/andree0) made their first contribution in [#7319](https://github.com/pydantic/pydantic/pull/7319) +* [@gordonhart](https://github.com/gordonhart) made their first contribution in [#7375](https://github.com/pydantic/pydantic/pull/7375) +* [@pmmmwh](https://github.com/pmmmwh) made their first contribution in [#7496](https://github.com/pydantic/pydantic/pull/7496) +* [@disrupted](https://github.com/disrupted) made their first contribution in [#7299](https://github.com/pydantic/pydantic/pull/7299) +* [@prodigysml](https://github.com/prodigysml) made their first contribution in [#7360](https://github.com/pydantic/pydantic/pull/7360) + +## v2.3.0 (2023-08-23) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.3.0) + +* 🔥 Remove orphaned changes file from repo by [@lig](https://github.com/lig) in [#7168](https://github.com/pydantic/pydantic/pull/7168) +* Add copy button on documentation by [@Kludex](https://github.com/Kludex) in [#7190](https://github.com/pydantic/pydantic/pull/7190) +* Fix docs on JSON type by [@Kludex](https://github.com/Kludex) in [#7189](https://github.com/pydantic/pydantic/pull/7189) +* Update mypy 1.5.0 to 1.5.1 in CI by [@hramezani](https://github.com/hramezani) in [#7191](https://github.com/pydantic/pydantic/pull/7191) +* fix download links badge by [@samuelcolvin](https://github.com/samuelcolvin) in [#7200](https://github.com/pydantic/pydantic/pull/7200) +* add 2.2.1 to changelog by [@samuelcolvin](https://github.com/samuelcolvin) in [#7212](https://github.com/pydantic/pydantic/pull/7212) +* Make ModelWrapValidator protocols generic by [@dmontagu](https://github.com/dmontagu) in [#7154](https://github.com/pydantic/pydantic/pull/7154) +* Correct `Field(..., exclude: bool)` docs by [@samuelcolvin](https://github.com/samuelcolvin) in [#7214](https://github.com/pydantic/pydantic/pull/7214) +* Make shadowing attributes a warning instead of an error by [@adriangb](https://github.com/adriangb) in [#7193](https://github.com/pydantic/pydantic/pull/7193) +* Document `Base64Str` and `Base64Bytes` by [@Kludex](https://github.com/Kludex) in [#7192](https://github.com/pydantic/pydantic/pull/7192) +* Fix `config.defer_build` for serialization first cases by [@samuelcolvin](https://github.com/samuelcolvin) in [#7024](https://github.com/pydantic/pydantic/pull/7024) +* clean Model docstrings in JSON Schema by [@samuelcolvin](https://github.com/samuelcolvin) in [#7210](https://github.com/pydantic/pydantic/pull/7210) +* fix [#7228](https://github.com/pydantic/pydantic/pull/7228) (typo): docs in `validators.md` to correct `validate_default` kwarg by [@lmmx](https://github.com/lmmx) in [#7229](https://github.com/pydantic/pydantic/pull/7229) +* ✅ Implement `tzinfo.fromutc` method for `TzInfo` in `pydantic-core` by [@lig](https://github.com/lig) in [#7019](https://github.com/pydantic/pydantic/pull/7019) +* Support `__get_validators__` by [@hramezani](https://github.com/hramezani) in [#7197](https://github.com/pydantic/pydantic/pull/7197) + +## v2.2.1 (2023-08-18) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.2.1) + +* Make `xfail`ing test for root model extra stop `xfail`ing by [@dmontagu](https://github.com/dmontagu) in [#6937](https://github.com/pydantic/pydantic/pull/6937) +* Optimize recursion detection by stopping on the second visit for the same object by [@mciucu](https://github.com/mciucu) in [#7160](https://github.com/pydantic/pydantic/pull/7160) +* fix link in docs by [@tlambert03](https://github.com/tlambert03) in [#7166](https://github.com/pydantic/pydantic/pull/7166) +* Replace MiMalloc w/ default allocator by [@adriangb](https://github.com/adriangb) in [pydantic/pydantic-core#900](https://github.com/pydantic/pydantic-core/pull/900) +* Bump pydantic-core to 2.6.1 and prepare 2.2.1 release by [@adriangb](https://github.com/adriangb) in [#7176](https://github.com/pydantic/pydantic/pull/7176) + +## v2.2.0 (2023-08-17) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.2.0) + +* Split "pipx install" setup command into two commands on the documentation site by [@nomadmtb](https://github.com/nomadmtb) in [#6869](https://github.com/pydantic/pydantic/pull/6869) +* Deprecate `Field.include` by [@hramezani](https://github.com/hramezani) in [#6852](https://github.com/pydantic/pydantic/pull/6852) +* Fix typo in default factory error msg by [@hramezani](https://github.com/hramezani) in [#6880](https://github.com/pydantic/pydantic/pull/6880) +* Simplify handling of typing.Annotated in GenerateSchema by [@dmontagu](https://github.com/dmontagu) in [#6887](https://github.com/pydantic/pydantic/pull/6887) +* Re-enable fastapi tests in CI by [@dmontagu](https://github.com/dmontagu) in [#6883](https://github.com/pydantic/pydantic/pull/6883) +* Make it harder to hit collisions with json schema defrefs by [@dmontagu](https://github.com/dmontagu) in [#6566](https://github.com/pydantic/pydantic/pull/6566) +* Cleaner error for invalid input to `Path` fields by [@samuelcolvin](https://github.com/samuelcolvin) in [#6903](https://github.com/pydantic/pydantic/pull/6903) +* :memo: support Coordinate Type by [@yezz123](https://github.com/yezz123) in [#6906](https://github.com/pydantic/pydantic/pull/6906) +* Fix `ForwardRef` wrapper for py 3.10.0 (shim until bpo-45166) by [@randomir](https://github.com/randomir) in [#6919](https://github.com/pydantic/pydantic/pull/6919) +* Fix misbehavior related to copying of RootModel by [@dmontagu](https://github.com/dmontagu) in [#6918](https://github.com/pydantic/pydantic/pull/6918) +* Fix issue with recursion error caused by ParamSpec by [@dmontagu](https://github.com/dmontagu) in [#6923](https://github.com/pydantic/pydantic/pull/6923) +* Add section about Constrained classes to the Migration Guide by [@Kludex](https://github.com/Kludex) in [#6924](https://github.com/pydantic/pydantic/pull/6924) +* Use `main` branch for badge links by [@Viicos](https://github.com/Viicos) in [#6925](https://github.com/pydantic/pydantic/pull/6925) +* Add test for v1/v2 Annotated discrepancy by [@carlbordum](https://github.com/carlbordum) in [#6926](https://github.com/pydantic/pydantic/pull/6926) +* Make the v1 mypy plugin work with both v1 and v2 by [@dmontagu](https://github.com/dmontagu) in [#6921](https://github.com/pydantic/pydantic/pull/6921) +* Fix issue where generic models couldn't be parametrized with BaseModel by [@dmontagu](https://github.com/dmontagu) in [#6933](https://github.com/pydantic/pydantic/pull/6933) +* Remove xfail for discriminated union with alias by [@dmontagu](https://github.com/dmontagu) in [#6938](https://github.com/pydantic/pydantic/pull/6938) +* add field_serializer to computed_field by [@andresliszt](https://github.com/andresliszt) in [#6965](https://github.com/pydantic/pydantic/pull/6965) +* Use union_schema with Type[Union[...]] by [@JeanArhancet](https://github.com/JeanArhancet) in [#6952](https://github.com/pydantic/pydantic/pull/6952) +* Fix inherited typeddict attributes / config by [@adriangb](https://github.com/adriangb) in [#6981](https://github.com/pydantic/pydantic/pull/6981) +* fix dataclass annotated before validator called twice by [@davidhewitt](https://github.com/davidhewitt) in [#6998](https://github.com/pydantic/pydantic/pull/6998) +* Update test-fastapi deselected tests by [@hramezani](https://github.com/hramezani) in [#7014](https://github.com/pydantic/pydantic/pull/7014) +* Fix validator doc format by [@hramezani](https://github.com/hramezani) in [#7015](https://github.com/pydantic/pydantic/pull/7015) +* Fix typo in docstring of model_json_schema by [@AdamVinch-Federated](https://github.com/AdamVinch-Federated) in [#7032](https://github.com/pydantic/pydantic/pull/7032) +* remove unused "type ignores" with pyright by [@samuelcolvin](https://github.com/samuelcolvin) in [#7026](https://github.com/pydantic/pydantic/pull/7026) +* Add benchmark representing FastAPI startup time by [@adriangb](https://github.com/adriangb) in [#7030](https://github.com/pydantic/pydantic/pull/7030) +* Fix json_encoders for Enum subclasses by [@adriangb](https://github.com/adriangb) in [#7029](https://github.com/pydantic/pydantic/pull/7029) +* Update docstring of `ser_json_bytes` regarding base64 encoding by [@Viicos](https://github.com/Viicos) in [#7052](https://github.com/pydantic/pydantic/pull/7052) +* Allow `@validate_call` to work on async methods by [@adriangb](https://github.com/adriangb) in [#7046](https://github.com/pydantic/pydantic/pull/7046) +* Fix: mypy error with `Settings` and `SettingsConfigDict` by [@JeanArhancet](https://github.com/JeanArhancet) in [#7002](https://github.com/pydantic/pydantic/pull/7002) +* Fix some typos (repeated words and it's/its) by [@eumiro](https://github.com/eumiro) in [#7063](https://github.com/pydantic/pydantic/pull/7063) +* Fix the typo in docstring by [@harunyasar](https://github.com/harunyasar) in [#7062](https://github.com/pydantic/pydantic/pull/7062) +* Docs: Fix broken URL in the pydantic-settings package recommendation by [@swetjen](https://github.com/swetjen) in [#6995](https://github.com/pydantic/pydantic/pull/6995) +* Handle constraints being applied to schemas that don't accept it by [@adriangb](https://github.com/adriangb) in [#6951](https://github.com/pydantic/pydantic/pull/6951) +* Replace almost_equal_floats with math.isclose by [@eumiro](https://github.com/eumiro) in [#7082](https://github.com/pydantic/pydantic/pull/7082) +* bump pydantic-core to 2.5.0 by [@davidhewitt](https://github.com/davidhewitt) in [#7077](https://github.com/pydantic/pydantic/pull/7077) +* Add `short_version` and use it in links by [@hramezani](https://github.com/hramezani) in [#7115](https://github.com/pydantic/pydantic/pull/7115) +* 📝 Add usage link to `RootModel` by [@Kludex](https://github.com/Kludex) in [#7113](https://github.com/pydantic/pydantic/pull/7113) +* Revert "Fix default port for mongosrv DSNs (#6827)" by [@Kludex](https://github.com/Kludex) in [#7116](https://github.com/pydantic/pydantic/pull/7116) +* Clarify validate_default and _Unset handling in usage docs and migration guide by [@benbenbang](https://github.com/benbenbang) in [#6950](https://github.com/pydantic/pydantic/pull/6950) +* Tweak documentation of `Field.exclude` by [@Viicos](https://github.com/Viicos) in [#7086](https://github.com/pydantic/pydantic/pull/7086) +* Do not require `validate_assignment` to use `Field.frozen` by [@Viicos](https://github.com/Viicos) in [#7103](https://github.com/pydantic/pydantic/pull/7103) +* tweaks to `_core_utils` by [@samuelcolvin](https://github.com/samuelcolvin) in [#7040](https://github.com/pydantic/pydantic/pull/7040) +* Make DefaultDict working with set by [@hramezani](https://github.com/hramezani) in [#7126](https://github.com/pydantic/pydantic/pull/7126) +* Don't always require typing.Generic as a base for partially parametrized models by [@dmontagu](https://github.com/dmontagu) in [#7119](https://github.com/pydantic/pydantic/pull/7119) +* Fix issue with JSON schema incorrectly using parent class core schema by [@dmontagu](https://github.com/dmontagu) in [#7020](https://github.com/pydantic/pydantic/pull/7020) +* Fix xfailed test related to TypedDict and alias_generator by [@dmontagu](https://github.com/dmontagu) in [#6940](https://github.com/pydantic/pydantic/pull/6940) +* Improve error message for NameEmail by [@dmontagu](https://github.com/dmontagu) in [#6939](https://github.com/pydantic/pydantic/pull/6939) +* Fix generic computed fields by [@dmontagu](https://github.com/dmontagu) in [#6988](https://github.com/pydantic/pydantic/pull/6988) +* Reflect namedtuple default values during validation by [@dmontagu](https://github.com/dmontagu) in [#7144](https://github.com/pydantic/pydantic/pull/7144) +* Update dependencies, fix pydantic-core usage, fix CI issues by [@dmontagu](https://github.com/dmontagu) in [#7150](https://github.com/pydantic/pydantic/pull/7150) +* Add mypy 1.5.0 by [@hramezani](https://github.com/hramezani) in [#7118](https://github.com/pydantic/pydantic/pull/7118) +* Handle non-json native enum values by [@adriangb](https://github.com/adriangb) in [#7056](https://github.com/pydantic/pydantic/pull/7056) +* document `round_trip` in Json type documentation by [@jc-louis](https://github.com/jc-louis) in [#7137](https://github.com/pydantic/pydantic/pull/7137) +* Relax signature checks to better support builtins and C extension functions as validators by [@adriangb](https://github.com/adriangb) in [#7101](https://github.com/pydantic/pydantic/pull/7101) +* add union_mode='left_to_right' by [@davidhewitt](https://github.com/davidhewitt) in [#7151](https://github.com/pydantic/pydantic/pull/7151) +* Include an error message hint for inherited ordering by [@yvalencia91](https://github.com/yvalencia91) in [#7124](https://github.com/pydantic/pydantic/pull/7124) +* Fix one docs link and resolve some warnings for two others by [@dmontagu](https://github.com/dmontagu) in [#7153](https://github.com/pydantic/pydantic/pull/7153) +* Include Field extra keys name in warning by [@hramezani](https://github.com/hramezani) in [#7136](https://github.com/pydantic/pydantic/pull/7136) + +## v2.1.1 (2023-07-25) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.1.1) + +* Skip FieldInfo merging when unnecessary by [@dmontagu](https://github.com/dmontagu) in [#6862](https://github.com/pydantic/pydantic/pull/6862) + +## v2.1.0 (2023-07-25) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.1.0) + +* Add `StringConstraints` for use as Annotated metadata by [@adriangb](https://github.com/adriangb) in [#6605](https://github.com/pydantic/pydantic/pull/6605) +* Try to fix intermittently failing CI by [@adriangb](https://github.com/adriangb) in [#6683](https://github.com/pydantic/pydantic/pull/6683) +* Remove redundant example of optional vs default. by [@ehiggs-deliverect](https://github.com/ehiggs-deliverect) in [#6676](https://github.com/pydantic/pydantic/pull/6676) +* Docs update by [@samuelcolvin](https://github.com/samuelcolvin) in [#6692](https://github.com/pydantic/pydantic/pull/6692) +* Remove the Validate always section in validator docs by [@adriangb](https://github.com/adriangb) in [#6679](https://github.com/pydantic/pydantic/pull/6679) +* Fix recursion error in json schema generation by [@adriangb](https://github.com/adriangb) in [#6720](https://github.com/pydantic/pydantic/pull/6720) +* Fix incorrect subclass check for secretstr by [@AlexVndnblcke](https://github.com/AlexVndnblcke) in [#6730](https://github.com/pydantic/pydantic/pull/6730) +* update pdm / pdm lockfile to 2.8.0 by [@davidhewitt](https://github.com/davidhewitt) in [#6714](https://github.com/pydantic/pydantic/pull/6714) +* unpin pdm on more CI jobs by [@davidhewitt](https://github.com/davidhewitt) in [#6755](https://github.com/pydantic/pydantic/pull/6755) +* improve source locations for auxiliary packages in docs by [@davidhewitt](https://github.com/davidhewitt) in [#6749](https://github.com/pydantic/pydantic/pull/6749) +* Assume builtins don't accept an info argument by [@adriangb](https://github.com/adriangb) in [#6754](https://github.com/pydantic/pydantic/pull/6754) +* Fix bug where calling `help(BaseModelSubclass)` raises errors by [@hramezani](https://github.com/hramezani) in [#6758](https://github.com/pydantic/pydantic/pull/6758) +* Fix mypy plugin handling of `@model_validator(mode="after")` by [@ljodal](https://github.com/ljodal) in [#6753](https://github.com/pydantic/pydantic/pull/6753) +* update pydantic-core to 2.3.1 by [@davidhewitt](https://github.com/davidhewitt) in [#6756](https://github.com/pydantic/pydantic/pull/6756) +* Mypy plugin for settings by [@hramezani](https://github.com/hramezani) in [#6760](https://github.com/pydantic/pydantic/pull/6760) +* Use `contentSchema` keyword for JSON schema by [@dmontagu](https://github.com/dmontagu) in [#6715](https://github.com/pydantic/pydantic/pull/6715) +* fast-path checking finite decimals by [@davidhewitt](https://github.com/davidhewitt) in [#6769](https://github.com/pydantic/pydantic/pull/6769) +* Docs update by [@samuelcolvin](https://github.com/samuelcolvin) in [#6771](https://github.com/pydantic/pydantic/pull/6771) +* Improve json schema doc by [@hramezani](https://github.com/hramezani) in [#6772](https://github.com/pydantic/pydantic/pull/6772) +* Update validator docs by [@adriangb](https://github.com/adriangb) in [#6695](https://github.com/pydantic/pydantic/pull/6695) +* Fix typehint for wrap validator by [@dmontagu](https://github.com/dmontagu) in [#6788](https://github.com/pydantic/pydantic/pull/6788) +* 🐛 Fix validation warning for unions of Literal and other type by [@lig](https://github.com/lig) in [#6628](https://github.com/pydantic/pydantic/pull/6628) +* Update documentation for generics support in V2 by [@tpdorsey](https://github.com/tpdorsey) in [#6685](https://github.com/pydantic/pydantic/pull/6685) +* add pydantic-core build info to `version_info()` by [@samuelcolvin](https://github.com/samuelcolvin) in [#6785](https://github.com/pydantic/pydantic/pull/6785) +* Fix pydantic dataclasses that use slots with default values by [@dmontagu](https://github.com/dmontagu) in [#6796](https://github.com/pydantic/pydantic/pull/6796) +* Fix inheritance of hash function for frozen models by [@dmontagu](https://github.com/dmontagu) in [#6789](https://github.com/pydantic/pydantic/pull/6789) +* ✨ Add `SkipJsonSchema` annotation by [@Kludex](https://github.com/Kludex) in [#6653](https://github.com/pydantic/pydantic/pull/6653) +* Error if an invalid field name is used with Field by [@dmontagu](https://github.com/dmontagu) in [#6797](https://github.com/pydantic/pydantic/pull/6797) +* Add `GenericModel` to `MOVED_IN_V2` by [@adriangb](https://github.com/adriangb) in [#6776](https://github.com/pydantic/pydantic/pull/6776) +* Remove unused code from `docs/usage/types/custom.md` by [@hramezani](https://github.com/hramezani) in [#6803](https://github.com/pydantic/pydantic/pull/6803) +* Fix `float` -> `Decimal` coercion precision loss by [@adriangb](https://github.com/adriangb) in [#6810](https://github.com/pydantic/pydantic/pull/6810) +* remove email validation from the north star benchmark by [@davidhewitt](https://github.com/davidhewitt) in [#6816](https://github.com/pydantic/pydantic/pull/6816) +* Fix link to mypy by [@progsmile](https://github.com/progsmile) in [#6824](https://github.com/pydantic/pydantic/pull/6824) +* Improve initialization hooks example by [@hramezani](https://github.com/hramezani) in [#6822](https://github.com/pydantic/pydantic/pull/6822) +* Fix default port for mongosrv DSNs by [@dmontagu](https://github.com/dmontagu) in [#6827](https://github.com/pydantic/pydantic/pull/6827) +* Improve API documentation, in particular more links between usage and API docs by [@samuelcolvin](https://github.com/samuelcolvin) in [#6780](https://github.com/pydantic/pydantic/pull/6780) +* update pydantic-core to 2.4.0 by [@davidhewitt](https://github.com/davidhewitt) in [#6831](https://github.com/pydantic/pydantic/pull/6831) +* Fix `annotated_types.MaxLen` validator for custom sequence types by [@ImogenBits](https://github.com/ImogenBits) in [#6809](https://github.com/pydantic/pydantic/pull/6809) +* Update V1 by [@hramezani](https://github.com/hramezani) in [#6833](https://github.com/pydantic/pydantic/pull/6833) +* Make it so callable JSON schema extra works by [@dmontagu](https://github.com/dmontagu) in [#6798](https://github.com/pydantic/pydantic/pull/6798) +* Fix serialization issue with `InstanceOf` by [@dmontagu](https://github.com/dmontagu) in [#6829](https://github.com/pydantic/pydantic/pull/6829) +* Add back support for `json_encoders` by [@adriangb](https://github.com/adriangb) in [#6811](https://github.com/pydantic/pydantic/pull/6811) +* Update field annotations when building the schema by [@dmontagu](https://github.com/dmontagu) in [#6838](https://github.com/pydantic/pydantic/pull/6838) +* Use `WeakValueDictionary` to fix generic memory leak by [@dmontagu](https://github.com/dmontagu) in [#6681](https://github.com/pydantic/pydantic/pull/6681) +* Add `config.defer_build` to optionally make model building lazy by [@samuelcolvin](https://github.com/samuelcolvin) in [#6823](https://github.com/pydantic/pydantic/pull/6823) +* delegate `UUID` serialization to pydantic-core by [@davidhewitt](https://github.com/davidhewitt) in [#6850](https://github.com/pydantic/pydantic/pull/6850) +* Update `json_encoders` docs by [@adriangb](https://github.com/adriangb) in [#6848](https://github.com/pydantic/pydantic/pull/6848) +* Fix error message for `staticmethod`/`classmethod` order with validate_call by [@dmontagu](https://github.com/dmontagu) in [#6686](https://github.com/pydantic/pydantic/pull/6686) +* Improve documentation for `Config` by [@samuelcolvin](https://github.com/samuelcolvin) in [#6847](https://github.com/pydantic/pydantic/pull/6847) +* Update serialization doc to mention `Field.exclude` takes priority over call-time `include/exclude` by [@hramezani](https://github.com/hramezani) in [#6851](https://github.com/pydantic/pydantic/pull/6851) +* Allow customizing core schema generation by making `GenerateSchema` public by [@adriangb](https://github.com/adriangb) in [#6737](https://github.com/pydantic/pydantic/pull/6737) + +## v2.0.3 (2023-07-05) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.0.3) + +* Mention PyObject (v1) moving to ImportString (v2) in migration doc by [@slafs](https://github.com/slafs) in [#6456](https://github.com/pydantic/pydantic/pull/6456) +* Fix release-tweet CI by [@Kludex](https://github.com/Kludex) in [#6461](https://github.com/pydantic/pydantic/pull/6461) +* Revise the section on required / optional / nullable fields. by [@ybressler](https://github.com/ybressler) in [#6468](https://github.com/pydantic/pydantic/pull/6468) +* Warn if a type hint is not in fact a type by [@adriangb](https://github.com/adriangb) in [#6479](https://github.com/pydantic/pydantic/pull/6479) +* Replace TransformSchema with GetPydanticSchema by [@dmontagu](https://github.com/dmontagu) in [#6484](https://github.com/pydantic/pydantic/pull/6484) +* Fix the un-hashability of various annotation types, for use in caching generic containers by [@dmontagu](https://github.com/dmontagu) in [#6480](https://github.com/pydantic/pydantic/pull/6480) +* PYD-164: Rework custom types docs by [@adriangb](https://github.com/adriangb) in [#6490](https://github.com/pydantic/pydantic/pull/6490) +* Fix ci by [@adriangb](https://github.com/adriangb) in [#6507](https://github.com/pydantic/pydantic/pull/6507) +* Fix forward ref in generic by [@adriangb](https://github.com/adriangb) in [#6511](https://github.com/pydantic/pydantic/pull/6511) +* Fix generation of serialization JSON schemas for core_schema.ChainSchema by [@dmontagu](https://github.com/dmontagu) in [#6515](https://github.com/pydantic/pydantic/pull/6515) +* Document the change in `Field.alias` behavior in Pydantic V2 by [@hramezani](https://github.com/hramezani) in [#6508](https://github.com/pydantic/pydantic/pull/6508) +* Give better error message attempting to compute the json schema of a model with undefined fields by [@dmontagu](https://github.com/dmontagu) in [#6519](https://github.com/pydantic/pydantic/pull/6519) +* Document `alias_priority` by [@tpdorsey](https://github.com/tpdorsey) in [#6520](https://github.com/pydantic/pydantic/pull/6520) +* Add redirect for types documentation by [@tpdorsey](https://github.com/tpdorsey) in [#6513](https://github.com/pydantic/pydantic/pull/6513) +* Allow updating docs without release by [@samuelcolvin](https://github.com/samuelcolvin) in [#6551](https://github.com/pydantic/pydantic/pull/6551) +* Ensure docs tests always run in the right folder by [@dmontagu](https://github.com/dmontagu) in [#6487](https://github.com/pydantic/pydantic/pull/6487) +* Defer evaluation of return type hints for serializer functions by [@dmontagu](https://github.com/dmontagu) in [#6516](https://github.com/pydantic/pydantic/pull/6516) +* Disable E501 from Ruff and rely on just Black by [@adriangb](https://github.com/adriangb) in [#6552](https://github.com/pydantic/pydantic/pull/6552) +* Update JSON Schema documentation for V2 by [@tpdorsey](https://github.com/tpdorsey) in [#6492](https://github.com/pydantic/pydantic/pull/6492) +* Add documentation of cyclic reference handling by [@dmontagu](https://github.com/dmontagu) in [#6493](https://github.com/pydantic/pydantic/pull/6493) +* Remove the need for change files by [@samuelcolvin](https://github.com/samuelcolvin) in [#6556](https://github.com/pydantic/pydantic/pull/6556) +* add "north star" benchmark by [@davidhewitt](https://github.com/davidhewitt) in [#6547](https://github.com/pydantic/pydantic/pull/6547) +* Update Dataclasses docs by [@tpdorsey](https://github.com/tpdorsey) in [#6470](https://github.com/pydantic/pydantic/pull/6470) +* ♻️ Use different error message on v1 redirects by [@Kludex](https://github.com/Kludex) in [#6595](https://github.com/pydantic/pydantic/pull/6595) +* ⬆ Upgrade `pydantic-core` to v2.2.0 by [@lig](https://github.com/lig) in [#6589](https://github.com/pydantic/pydantic/pull/6589) +* Fix serialization for IPvAny by [@dmontagu](https://github.com/dmontagu) in [#6572](https://github.com/pydantic/pydantic/pull/6572) +* Improve CI by using PDM instead of pip to install typing-extensions by [@adriangb](https://github.com/adriangb) in [#6602](https://github.com/pydantic/pydantic/pull/6602) +* Add `enum` error type docs by [@lig](https://github.com/lig) in [#6603](https://github.com/pydantic/pydantic/pull/6603) +* 🐛 Fix `max_length` for unicode strings by [@lig](https://github.com/lig) in [#6559](https://github.com/pydantic/pydantic/pull/6559) +* Add documentation for accessing features via `pydantic.v1` by [@tpdorsey](https://github.com/tpdorsey) in [#6604](https://github.com/pydantic/pydantic/pull/6604) +* Include extra when iterating over a model by [@adriangb](https://github.com/adriangb) in [#6562](https://github.com/pydantic/pydantic/pull/6562) +* Fix typing of model_validator by [@adriangb](https://github.com/adriangb) in [#6514](https://github.com/pydantic/pydantic/pull/6514) +* Touch up Decimal validator by [@adriangb](https://github.com/adriangb) in [#6327](https://github.com/pydantic/pydantic/pull/6327) +* Fix various docstrings using fixed pytest-examples by [@dmontagu](https://github.com/dmontagu) in [#6607](https://github.com/pydantic/pydantic/pull/6607) +* Handle function validators in a discriminated union by [@dmontagu](https://github.com/dmontagu) in [#6570](https://github.com/pydantic/pydantic/pull/6570) +* Review json_schema.md by [@tpdorsey](https://github.com/tpdorsey) in [#6608](https://github.com/pydantic/pydantic/pull/6608) +* Make validate_call work on basemodel methods by [@dmontagu](https://github.com/dmontagu) in [#6569](https://github.com/pydantic/pydantic/pull/6569) +* add test for big int json serde by [@davidhewitt](https://github.com/davidhewitt) in [#6614](https://github.com/pydantic/pydantic/pull/6614) +* Fix pydantic dataclass problem with dataclasses.field default_factory by [@hramezani](https://github.com/hramezani) in [#6616](https://github.com/pydantic/pydantic/pull/6616) +* Fixed mypy type inference for TypeAdapter by [@zakstucke](https://github.com/zakstucke) in [#6617](https://github.com/pydantic/pydantic/pull/6617) +* Make it work to use None as a generic parameter by [@dmontagu](https://github.com/dmontagu) in [#6609](https://github.com/pydantic/pydantic/pull/6609) +* Make it work to use `$ref` as an alias by [@dmontagu](https://github.com/dmontagu) in [#6568](https://github.com/pydantic/pydantic/pull/6568) +* add note to migration guide about changes to `AnyUrl` etc by [@davidhewitt](https://github.com/davidhewitt) in [#6618](https://github.com/pydantic/pydantic/pull/6618) +* 🐛 Support defining `json_schema_extra` on `RootModel` using `Field` by [@lig](https://github.com/lig) in [#6622](https://github.com/pydantic/pydantic/pull/6622) +* Update pre-commit to prevent commits to main branch on accident by [@dmontagu](https://github.com/dmontagu) in [#6636](https://github.com/pydantic/pydantic/pull/6636) +* Fix PDM CI for python 3.7 on MacOS/windows by [@dmontagu](https://github.com/dmontagu) in [#6627](https://github.com/pydantic/pydantic/pull/6627) +* Produce more accurate signatures for pydantic dataclasses by [@dmontagu](https://github.com/dmontagu) in [#6633](https://github.com/pydantic/pydantic/pull/6633) +* Updates to Url types for Pydantic V2 by [@tpdorsey](https://github.com/tpdorsey) in [#6638](https://github.com/pydantic/pydantic/pull/6638) +* Fix list markdown in `transform` docstring by [@StefanBRas](https://github.com/StefanBRas) in [#6649](https://github.com/pydantic/pydantic/pull/6649) +* simplify slots_dataclass construction to appease mypy by [@davidhewitt](https://github.com/davidhewitt) in [#6639](https://github.com/pydantic/pydantic/pull/6639) +* Update TypedDict schema generation docstring by [@adriangb](https://github.com/adriangb) in [#6651](https://github.com/pydantic/pydantic/pull/6651) +* Detect and lint-error for prints by [@dmontagu](https://github.com/dmontagu) in [#6655](https://github.com/pydantic/pydantic/pull/6655) +* Add xfailing test for pydantic-core PR 766 by [@dmontagu](https://github.com/dmontagu) in [#6641](https://github.com/pydantic/pydantic/pull/6641) +* Ignore unrecognized fields from dataclasses metadata by [@dmontagu](https://github.com/dmontagu) in [#6634](https://github.com/pydantic/pydantic/pull/6634) +* Make non-existent class getattr a mypy error by [@dmontagu](https://github.com/dmontagu) in [#6658](https://github.com/pydantic/pydantic/pull/6658) +* Update pydantic-core to 2.3.0 by [@hramezani](https://github.com/hramezani) in [#6648](https://github.com/pydantic/pydantic/pull/6648) +* Use OrderedDict from typing_extensions by [@dmontagu](https://github.com/dmontagu) in [#6664](https://github.com/pydantic/pydantic/pull/6664) +* Fix typehint for JSON schema extra callable by [@dmontagu](https://github.com/dmontagu) in [#6659](https://github.com/pydantic/pydantic/pull/6659) + +## v2.0.2 (2023-07-05) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.0.2) + +* Fix bug where round-trip pickling/unpickling a `RootModel` would change the value of `__dict__`, [#6457](https://github.com/pydantic/pydantic/pull/6457) by [@dmontagu](https://github.com/dmontagu) +* Allow single-item discriminated unions, [#6405](https://github.com/pydantic/pydantic/pull/6405) by [@dmontagu](https://github.com/dmontagu) +* Fix issue with union parsing of enums, [#6440](https://github.com/pydantic/pydantic/pull/6440) by [@dmontagu](https://github.com/dmontagu) +* Docs: Fixed `constr` documentation, renamed old `regex` to new `pattern`, [#6452](https://github.com/pydantic/pydantic/pull/6452) by [@miili](https://github.com/miili) +* Change `GenerateJsonSchema.generate_definitions` signature, [#6436](https://github.com/pydantic/pydantic/pull/6436) by [@dmontagu](https://github.com/dmontagu) + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0.2) + +## v2.0.1 (2023-07-04) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.0.1) + +First patch release of Pydantic V2 + +* Extra fields added via `setattr` (i.e. `m.some_extra_field = 'extra_value'`) + are added to `.model_extra` if `model_config` `extra='allowed'`. Fixed [#6333](https://github.com/pydantic/pydantic/pull/6333), [#6365](https://github.com/pydantic/pydantic/pull/6365) by [@aaraney](https://github.com/aaraney) +* Automatically unpack JSON schema '$ref' for custom types, [#6343](https://github.com/pydantic/pydantic/pull/6343) by [@adriangb](https://github.com/adriangb) +* Fix tagged unions multiple processing in submodels, [#6340](https://github.com/pydantic/pydantic/pull/6340) by [@suharnikov](https://github.com/suharnikov) + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0.1) + +## v2.0 (2023-06-30) + +[GitHub release](https://github.com/pydantic/pydantic/releases/tag/v2.0) + +Pydantic V2 is here! :tada: + +See [this post](https://docs.pydantic.dev/2.0/blog/pydantic-v2-final/) for more details. + +## v2.0b3 (2023-06-16) + +Third beta pre-release of Pydantic V2 + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0b3) + +## v2.0b2 (2023-06-03) + +Add `from_attributes` runtime flag to `TypeAdapter.validate_python` and `BaseModel.model_validate`. + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0b2) + +## v2.0b1 (2023-06-01) + +First beta pre-release of Pydantic V2 + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0b1) + +## v2.0a4 (2023-05-05) + +Fourth pre-release of Pydantic V2 + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0a4) + +## v2.0a3 (2023-04-20) + +Third pre-release of Pydantic V2 + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0a3) + +## v2.0a2 (2023-04-12) + +Second pre-release of Pydantic V2 + +See the full changelog [here](https://github.com/pydantic/pydantic/releases/tag/v2.0a2) + +## v2.0a1 (2023-04-03) + +First pre-release of Pydantic V2! + +See [this post](https://docs.pydantic.dev/blog/pydantic-v2-alpha/) for more details. + + +... see [here](https://docs.pydantic.dev/changelog/#v0322-2019-08-17) for earlier changes. diff --git a/videollama2/lib/python3.10/site-packages/pydantic-2.8.2.dist-info/RECORD b/videollama2/lib/python3.10/site-packages/pydantic-2.8.2.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..c1f5bb56231eb27844687a28d888503d378770b0 --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/pydantic-2.8.2.dist-info/RECORD @@ -0,0 +1,208 @@ +pydantic-2.8.2.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +pydantic-2.8.2.dist-info/METADATA,sha256=H8IPn6l33xNo3SR-xJDe1NhEYzxEsCIl2C2RkhQohu4,125181 +pydantic-2.8.2.dist-info/RECORD,, +pydantic-2.8.2.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pydantic-2.8.2.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87 +pydantic-2.8.2.dist-info/licenses/LICENSE,sha256=qeGG88oWte74QxjnpwFyE1GgDLe4rjpDlLZ7SeNSnvM,1129 +pydantic/__init__.py,sha256=UfcGIDJ0chxdnl0_o6dTyys-5isaoZwlKVMAwwBwPPo,13931 +pydantic/__pycache__/__init__.cpython-310.pyc,, +pydantic/__pycache__/_migration.cpython-310.pyc,, +pydantic/__pycache__/alias_generators.cpython-310.pyc,, +pydantic/__pycache__/aliases.cpython-310.pyc,, +pydantic/__pycache__/annotated_handlers.cpython-310.pyc,, +pydantic/__pycache__/class_validators.cpython-310.pyc,, +pydantic/__pycache__/color.cpython-310.pyc,, +pydantic/__pycache__/config.cpython-310.pyc,, +pydantic/__pycache__/dataclasses.cpython-310.pyc,, +pydantic/__pycache__/datetime_parse.cpython-310.pyc,, +pydantic/__pycache__/decorator.cpython-310.pyc,, +pydantic/__pycache__/env_settings.cpython-310.pyc,, +pydantic/__pycache__/error_wrappers.cpython-310.pyc,, +pydantic/__pycache__/errors.cpython-310.pyc,, +pydantic/__pycache__/fields.cpython-310.pyc,, +pydantic/__pycache__/functional_serializers.cpython-310.pyc,, +pydantic/__pycache__/functional_validators.cpython-310.pyc,, +pydantic/__pycache__/generics.cpython-310.pyc,, +pydantic/__pycache__/json.cpython-310.pyc,, +pydantic/__pycache__/json_schema.cpython-310.pyc,, +pydantic/__pycache__/main.cpython-310.pyc,, +pydantic/__pycache__/mypy.cpython-310.pyc,, +pydantic/__pycache__/networks.cpython-310.pyc,, +pydantic/__pycache__/parse.cpython-310.pyc,, +pydantic/__pycache__/root_model.cpython-310.pyc,, +pydantic/__pycache__/schema.cpython-310.pyc,, +pydantic/__pycache__/tools.cpython-310.pyc,, +pydantic/__pycache__/type_adapter.cpython-310.pyc,, +pydantic/__pycache__/types.cpython-310.pyc,, +pydantic/__pycache__/typing.cpython-310.pyc,, +pydantic/__pycache__/utils.cpython-310.pyc,, +pydantic/__pycache__/validate_call_decorator.cpython-310.pyc,, +pydantic/__pycache__/validators.cpython-310.pyc,, +pydantic/__pycache__/version.cpython-310.pyc,, +pydantic/__pycache__/warnings.cpython-310.pyc,, +pydantic/_internal/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pydantic/_internal/__pycache__/__init__.cpython-310.pyc,, +pydantic/_internal/__pycache__/_config.cpython-310.pyc,, +pydantic/_internal/__pycache__/_core_metadata.cpython-310.pyc,, +pydantic/_internal/__pycache__/_core_utils.cpython-310.pyc,, +pydantic/_internal/__pycache__/_dataclasses.cpython-310.pyc,, +pydantic/_internal/__pycache__/_decorators.cpython-310.pyc,, +pydantic/_internal/__pycache__/_decorators_v1.cpython-310.pyc,, +pydantic/_internal/__pycache__/_discriminated_union.cpython-310.pyc,, +pydantic/_internal/__pycache__/_docs_extraction.cpython-310.pyc,, +pydantic/_internal/__pycache__/_fields.cpython-310.pyc,, +pydantic/_internal/__pycache__/_forward_ref.cpython-310.pyc,, +pydantic/_internal/__pycache__/_generate_schema.cpython-310.pyc,, +pydantic/_internal/__pycache__/_generics.cpython-310.pyc,, +pydantic/_internal/__pycache__/_git.cpython-310.pyc,, +pydantic/_internal/__pycache__/_internal_dataclass.cpython-310.pyc,, +pydantic/_internal/__pycache__/_known_annotated_metadata.cpython-310.pyc,, +pydantic/_internal/__pycache__/_mock_val_ser.cpython-310.pyc,, +pydantic/_internal/__pycache__/_model_construction.cpython-310.pyc,, +pydantic/_internal/__pycache__/_repr.cpython-310.pyc,, +pydantic/_internal/__pycache__/_schema_generation_shared.cpython-310.pyc,, +pydantic/_internal/__pycache__/_signature.cpython-310.pyc,, +pydantic/_internal/__pycache__/_std_types_schema.cpython-310.pyc,, +pydantic/_internal/__pycache__/_typing_extra.cpython-310.pyc,, +pydantic/_internal/__pycache__/_utils.cpython-310.pyc,, +pydantic/_internal/__pycache__/_validate_call.cpython-310.pyc,, +pydantic/_internal/__pycache__/_validators.cpython-310.pyc,, +pydantic/_internal/_config.py,sha256=goVcoEMMsf2ltFE3WHTEiDvu6h5gPo01ZJ5h6PVQqrU,12605 +pydantic/_internal/_core_metadata.py,sha256=Da-e0-DXK__dJvog0e8CZLQ4r_k9RpldG6KQTGrYlHg,3521 +pydantic/_internal/_core_utils.py,sha256=6aD8J26n4_tP2R-Sermk66DGwHpFpksOrwHdI0O22jg,24268 +pydantic/_internal/_dataclasses.py,sha256=EvE43UHTVZZydVt8DjrkYLyciy5S46bXFgt8bsfWEWo,8733 +pydantic/_internal/_decorators.py,sha256=OnUIAbX_CTcHRXu4K5Qav8a5TC0YCXuwPq3bRiZQ04Y,31954 +pydantic/_internal/_decorators_v1.py,sha256=I7Px8gUMJod80_zBMlNkRVq0Mp2Z6mk1T1A4b_0a3Ps,6203 +pydantic/_internal/_discriminated_union.py,sha256=XDzlfKc7LAkJJErQWAZ4EuP_G_CQXJSVFKtwuHRJEmg,26435 +pydantic/_internal/_docs_extraction.py,sha256=bIWhw7nFKFt-qD-txtKRAb5VqGlAD0H9YzEEXE3PHj4,3791 +pydantic/_internal/_fields.py,sha256=_CCzAro7gGA3wsfUVDuRK9Tcrp-EMzH5ddyQ5JfgWQg,14934 +pydantic/_internal/_forward_ref.py,sha256=5n3Y7-3AKLn8_FS3Yc7KutLiPUhyXmAtkEZOaFnonwM,611 +pydantic/_internal/_generate_schema.py,sha256=JWt_d7_bQw_XaLzPAWV_Crvi_3N1N-usAt2lrUGj5BQ,105375 +pydantic/_internal/_generics.py,sha256=56zgcmvHOMQIXTn0r2aKfoFOvpBuFiWKfBu_dXnESig,22206 +pydantic/_internal/_git.py,sha256=lN6QlZm8RNSuNsUdHHC1F5a4VToe8vu5tlUxAfaJgGE,784 +pydantic/_internal/_internal_dataclass.py,sha256=_bedc1XbuuygRGiLZqkUkwwFpQaoR1hKLlR501nyySY,144 +pydantic/_internal/_known_annotated_metadata.py,sha256=qZDjQsw7bZiqzvzY_th2VLfG0KswT22twwYHp4QmE0s,14189 +pydantic/_internal/_mock_val_ser.py,sha256=g_RJhhodJOWnIrxwYRGNGA1v21eh5UrlfTP-7-ommMw,7315 +pydantic/_internal/_model_construction.py,sha256=nloFfqqBmPVomMYeefeEC_95tuTfq4jyDTW_iZfR-bo,31361 +pydantic/_internal/_repr.py,sha256=OxFN-gJMTefCv1yjsi5SRogstTMxRLhhTKCmR8jyJNU,4569 +pydantic/_internal/_schema_generation_shared.py,sha256=SB5kMqd9pzW9V4M4qjyI7R99MHzU1rfQVkNWP-KsiLM,4853 +pydantic/_internal/_signature.py,sha256=gJvpQ9vklQuYfYKI4d0zvHOGhCR44Oa_xltdMUMg59g,6293 +pydantic/_internal/_std_types_schema.py,sha256=3kvNnWRKmaB9RworxQoMaXRUHdMfSHV5bFz9AN6t6k8,28881 +pydantic/_internal/_typing_extra.py,sha256=9dD-4bReZ-FSBzjrvFKMY3aQXvEGcwOdcwClf5ypn84,19430 +pydantic/_internal/_utils.py,sha256=DM-CdDvaCd136ZFIJxvjgaNuaM6oYjYzif-nExcwL1k,12661 +pydantic/_internal/_validate_call.py,sha256=2kLSQjH1NB0d3PKv6JiujcqO8s7mKiyI5CvyOLcz6U0,3791 +pydantic/_internal/_validators.py,sha256=yi301I0sLQAfXWtq92jUwX2og1axVsXvDrR-psPu3Po,11118 +pydantic/_migration.py,sha256=j6TbRpJofjAX8lr-k2nVnQcBR9RD2B91I7Ulcw_ZzEo,11913 +pydantic/alias_generators.py,sha256=KM1n3u4JfLSBl1UuYg3hoYHzXJD-yvgrnq8u1ccwh_A,2124 +pydantic/aliases.py,sha256=X34YwPmkWSXTqaiVisRnxoPXcMbceeDZhMsMPxnOZyk,4819 +pydantic/annotated_handlers.py,sha256=yCeE8kQnLxZCWzT8f689hvwqqepEBW_byDUpVRJwnrM,4353 +pydantic/class_validators.py,sha256=i_V3j-PYdGLSLmj_IJZekTRjunO8SIVz8LMlquPyP7E,148 +pydantic/color.py,sha256=4GrtPvFCBKdM-1NpLVFOC7KkLejyZd1BiELfCKvT2yw,21494 +pydantic/config.py,sha256=9I5EyqzBKvFtlpoIxkrtMu2oxvYhENPaNBA532q2Ahc,35112 +pydantic/dataclasses.py,sha256=wEPHOsFGBjH2wsi2woff7SpwYm_2b_28-Yv-cYIvNOc,13909 +pydantic/datetime_parse.py,sha256=QC-WgMxMr_wQ_mNXUS7AVf-2hLEhvvsPY1PQyhSGOdk,150 +pydantic/decorator.py,sha256=YX-jUApu5AKaVWKPoaV-n-4l7UbS69GEt9Ra3hszmKI,145 +pydantic/deprecated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pydantic/deprecated/__pycache__/__init__.cpython-310.pyc,, +pydantic/deprecated/__pycache__/class_validators.cpython-310.pyc,, +pydantic/deprecated/__pycache__/config.cpython-310.pyc,, +pydantic/deprecated/__pycache__/copy_internals.cpython-310.pyc,, +pydantic/deprecated/__pycache__/decorator.cpython-310.pyc,, +pydantic/deprecated/__pycache__/json.cpython-310.pyc,, +pydantic/deprecated/__pycache__/parse.cpython-310.pyc,, +pydantic/deprecated/__pycache__/tools.cpython-310.pyc,, +pydantic/deprecated/class_validators.py,sha256=Wt68ZLT5cQe_BwOsxNzlS9YRSxY1LrQ0XC0e9ejuv70,10254 +pydantic/deprecated/config.py,sha256=eKhnG--ZQtJ4A7KA3xeF76E15-4pVau3B5T8D39ptFs,2663 +pydantic/deprecated/copy_internals.py,sha256=SoUj1MevXt3fnloqNg5wivSUHSDPnuSj_YydzkEMzu0,7595 +pydantic/deprecated/decorator.py,sha256=P2V1bCwk8wNJ3g_s2p2ASFefXPLKn8bsUVw-Y8Wwcvk,10776 +pydantic/deprecated/json.py,sha256=Cn4f5r4JR3ondHQN-jpBSQC57nvnSNIbqXl3tcBcEx0,4596 +pydantic/deprecated/parse.py,sha256=Gzd6b_g8zJXcuE7QRq5adhx_EMJahXfcpXCF0RgrqqI,2511 +pydantic/deprecated/tools.py,sha256=XUoIW9W4sgOUWQ6Xzf-Z_NukUC1l_yUwz2_n0fE3MEI,3336 +pydantic/env_settings.py,sha256=6IHeeWEqlUPRUv3V-AXiF_W91fg2Jw_M3O0l34J_eyA,148 +pydantic/error_wrappers.py,sha256=RK6mqATc9yMD-KBD9IJS9HpKCprWHd8wo84Bnm-3fR8,150 +pydantic/errors.py,sha256=ht5bwtXWzq2DrwIVI7pU0tk9IAUjQjcVgPBULEXXMCk,4835 +pydantic/experimental/__init__.py,sha256=j08eROfz-xW4k_X9W4m2AW26IVdyF3Eg1OzlIGA11vk,328 +pydantic/experimental/__pycache__/__init__.cpython-310.pyc,, +pydantic/experimental/__pycache__/pipeline.cpython-310.pyc,, +pydantic/experimental/pipeline.py,sha256=PjiTnmaN5XwLUk-Nlzfr2C2R-xrMz7Nz-XVC8kiFGyU,23979 +pydantic/fields.py,sha256=zez1lSdoSZm3fN7AK3htTtqyt3iO7FIBf5aRVddRUC8,51746 +pydantic/functional_serializers.py,sha256=3RjQu_pxWaeesbJr1rwMgAUlO6wdTC8j_8CBh729b7A,14616 +pydantic/functional_validators.py,sha256=OKrL-nym0Me5bHou_BJCs9h-m2Gb-b3Asy58rJG-lkM,24224 +pydantic/generics.py,sha256=0ZqZ9O9annIj_3mGBRqps4htey3b5lV1-d2tUxPMMnA,144 +pydantic/json.py,sha256=ZH8RkI7h4Bz-zp8OdTAxbJUoVvcoU-jhMdRZ0B-k0xc,140 +pydantic/json_schema.py,sha256=A2GXiNigkfJb1yeRTteEaAWlJGteRSBlgQyHDfAk9x8,106297 +pydantic/main.py,sha256=zQVy0XYPN4-ve3qCCyxr8_6dbdmTSZYWtKWezwQXg1A,70106 +pydantic/mypy.py,sha256=diTpkBZ9hONAGyEU0npoPnVqf7rOleKCIoBHb-qqitQ,56972 +pydantic/networks.py,sha256=XjKPcKTDVGiCNTI_9B8iQKsO8xa9lfzkgUmvE0JIky4,22713 +pydantic/parse.py,sha256=wkd82dgtvWtD895U_I6E1htqMlGhBSYEV39cuBSeo3A,141 +pydantic/plugin/__init__.py,sha256=5pgHgEKA5kZXsaKhJYj2RdWZJ22nK1QAYojlcy2MxAs,6116 +pydantic/plugin/__pycache__/__init__.cpython-310.pyc,, +pydantic/plugin/__pycache__/_loader.cpython-310.pyc,, +pydantic/plugin/__pycache__/_schema_validator.cpython-310.pyc,, +pydantic/plugin/_loader.py,sha256=rmLbIwThDmVR1JwFVi_XvrLH7b1A5teMED-O3pr6Gk4,2140 +pydantic/plugin/_schema_validator.py,sha256=VFaNQpVNSuI2ymRDkTwBGaMKeKmySk1TbW-3rQeozxk,5240 +pydantic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pydantic/root_model.py,sha256=54JLqe3_x5ZOEobsaMmNHBVPIpQy1tdW4tJnZGUI1pY,6194 +pydantic/schema.py,sha256=Vqqjvq_LnapVknebUd3Bp_J1p2gXZZnZRgL48bVEG7o,142 +pydantic/tools.py,sha256=iHQpd8SJ5DCTtPV5atAV06T89bjSaMFeZZ2LX9lasZY,141 +pydantic/type_adapter.py,sha256=-Jr6N3aPBbrOr_kSXuJEXHwoT6qsV6G8xZ9tWC74UgI,24974 +pydantic/types.py,sha256=wBUol6w4wcLtV0wLC0hre6ZdWseZSSZrRjf_R63Y_uY,95744 +pydantic/typing.py,sha256=P7feA35MwTcLsR1uL7db0S-oydBxobmXa55YDoBgajQ,138 +pydantic/utils.py,sha256=15nR2QpqTBFlQV4TNtTItMyTJx_fbyV-gPmIEY1Gooc,141 +pydantic/v1/__init__.py,sha256=SxQPklgBs4XHJwE6BZ9qoewYoGiNyYUnmHzEFCZbfnI,2946 +pydantic/v1/__pycache__/__init__.cpython-310.pyc,, +pydantic/v1/__pycache__/_hypothesis_plugin.cpython-310.pyc,, +pydantic/v1/__pycache__/annotated_types.cpython-310.pyc,, +pydantic/v1/__pycache__/class_validators.cpython-310.pyc,, +pydantic/v1/__pycache__/color.cpython-310.pyc,, +pydantic/v1/__pycache__/config.cpython-310.pyc,, +pydantic/v1/__pycache__/dataclasses.cpython-310.pyc,, +pydantic/v1/__pycache__/datetime_parse.cpython-310.pyc,, +pydantic/v1/__pycache__/decorator.cpython-310.pyc,, +pydantic/v1/__pycache__/env_settings.cpython-310.pyc,, +pydantic/v1/__pycache__/error_wrappers.cpython-310.pyc,, +pydantic/v1/__pycache__/errors.cpython-310.pyc,, +pydantic/v1/__pycache__/fields.cpython-310.pyc,, +pydantic/v1/__pycache__/generics.cpython-310.pyc,, +pydantic/v1/__pycache__/json.cpython-310.pyc,, +pydantic/v1/__pycache__/main.cpython-310.pyc,, +pydantic/v1/__pycache__/mypy.cpython-310.pyc,, +pydantic/v1/__pycache__/networks.cpython-310.pyc,, +pydantic/v1/__pycache__/parse.cpython-310.pyc,, +pydantic/v1/__pycache__/schema.cpython-310.pyc,, +pydantic/v1/__pycache__/tools.cpython-310.pyc,, +pydantic/v1/__pycache__/types.cpython-310.pyc,, +pydantic/v1/__pycache__/typing.cpython-310.pyc,, +pydantic/v1/__pycache__/utils.cpython-310.pyc,, +pydantic/v1/__pycache__/validators.cpython-310.pyc,, +pydantic/v1/__pycache__/version.cpython-310.pyc,, +pydantic/v1/_hypothesis_plugin.py,sha256=5ES5xWuw1FQAsymLezy8QgnVz0ZpVfU3jkmT74H27VQ,14847 +pydantic/v1/annotated_types.py,sha256=uk2NAAxqiNELKjiHhyhxKaIOh8F1lYW_LzrW3X7oZBc,3157 +pydantic/v1/class_validators.py,sha256=ULOaIUgYUDBsHL7EEVEarcM-UubKUggoN8hSbDonsFE,14672 +pydantic/v1/color.py,sha256=iZABLYp6OVoo2AFkP9Ipri_wSc6-Kklu8YuhSartd5g,16844 +pydantic/v1/config.py,sha256=a6P0Wer9x4cbwKW7Xv8poSUqM4WP-RLWwX6YMpYq9AA,6532 +pydantic/v1/dataclasses.py,sha256=784cqvInbwIPWr9usfpX3ch7z4t3J2tTK6N067_wk1o,18172 +pydantic/v1/datetime_parse.py,sha256=4Qy1kQpq3rNVZJeIHeSPDpuS2Bvhp1KPtzJG1xu-H00,7724 +pydantic/v1/decorator.py,sha256=zaaxxxoWPCm818D1bs0yhapRjXm32V8G0ZHWCdM1uXA,10339 +pydantic/v1/env_settings.py,sha256=A9VXwtRl02AY-jH0C0ouy5VNw3fi6F_pkzuHDjgAAOM,14105 +pydantic/v1/error_wrappers.py,sha256=6625Mfw9qkC2NwitB_JFAWe8B-Xv6zBU7rL9k28tfyo,5196 +pydantic/v1/errors.py,sha256=mIwPED5vGM5Q5v4C4Z1JPldTRH-omvEylH6ksMhOmPw,17726 +pydantic/v1/fields.py,sha256=VqWJCriUNiEyptXroDVJ501JpVA0en2VANcksqXL2b8,50649 +pydantic/v1/generics.py,sha256=VzC9YUV-EbPpQ3aAfk1cNFej79_IzznkQ7WrmTTZS9E,17871 +pydantic/v1/json.py,sha256=WQ5Hy_hIpfdR3YS8k6N2E6KMJzsdbBi_ldWOPJaV81M,3390 +pydantic/v1/main.py,sha256=A48ds4KJN4SgI34YLgPGqi6K3LhO7OwZ3QEy6GERiUc,44541 +pydantic/v1/mypy.py,sha256=kLQ7SHwisFxg0qb68clCLyoiwE6fl1TojeE6y-LY8I0,38774 +pydantic/v1/networks.py,sha256=HYNtKAfOmOnKJpsDg1g6SIkj9WPhU_-i8l5e2JKBpG4,22124 +pydantic/v1/parse.py,sha256=BJtdqiZRtav9VRFCmOxoY-KImQmjPy-A_NoojiFUZxY,1821 +pydantic/v1/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +pydantic/v1/schema.py,sha256=JLnq9550F6qx9imoZbc5mJvMMTqqU4ju-5rX5Qg23qQ,47760 +pydantic/v1/tools.py,sha256=1lDdXHk0jL5uP3u5RCYAvUAlGClgAO-45lkq9j7fyBA,2881 +pydantic/v1/types.py,sha256=Fltx5GoP_qaUmAktlGz7nFeJa13yNy3FY1-RcMzEVt8,35455 +pydantic/v1/typing.py,sha256=GjThObaqHMhLaECzYUrDk0X-RHjo7x6vsv4Z4qUYV8I,19387 +pydantic/v1/utils.py,sha256=fjlWL8SStFZj0w3sbfuOVfDITK1vdFfZ5pcgml9Kq7k,25919 +pydantic/v1/validators.py,sha256=Dxcx36zVQjBUfYdjQLs_E0qpYqTeNbrF8PQTcasYgrI,21996 +pydantic/v1/version.py,sha256=DFN4uMBemx_gHk_6i1SK0oMa3VMe9G_wLFyw6KInipg,1039 +pydantic/validate_call_decorator.py,sha256=jj1T9Yz9_sQMhBjBmUn9sv7YK9dyLXJm5podxxsbDfI,2127 +pydantic/validators.py,sha256=pwbIJXVb1CV2mAE4w_EGfNj7DwzsKaWw_tTL6cviTus,146 +pydantic/version.py,sha256=5udPEl9gYDPmqid2QS91qnZNBhLyo6-KHTl_tXkPMv0,2442 +pydantic/warnings.py,sha256=7f5TxYmLkZOCMPb2uGLlJCE6uAGd4XF0qea6n-hv-ys,2711 diff --git a/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/LICENCE b/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/LICENCE new file mode 100644 index 0000000000000000000000000000000000000000..a8922b182e80d9bcb955e8b8ae2bd9a017d72977 --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/LICENCE @@ -0,0 +1,49 @@ +`tqdm` is a product of collaborative work. +Unless otherwise stated, all authors (see commit logs) retain copyright +for their respective work, and release the work under the MIT licence +(text below). + +Exceptions or notable authors are listed below +in reverse chronological order: + +* files: * + MPL-2.0 2015-2024 (c) Casper da Costa-Luis + [casperdcl](https://github.com/casperdcl). +* files: tqdm/_tqdm.py + MIT 2016 (c) [PR #96] on behalf of Google Inc. +* files: tqdm/_tqdm.py README.rst .gitignore + MIT 2013 (c) Noam Yorav-Raphael, original author. + +[PR #96]: https://github.com/tqdm/tqdm/pull/96 + + +Mozilla Public Licence (MPL) v. 2.0 - Exhibit A +----------------------------------------------- + +This Source Code Form is subject to the terms of the +Mozilla Public License, v. 2.0. +If a copy of the MPL was not distributed with this project, +You can obtain one at https://mozilla.org/MPL/2.0/. + + +MIT License (MIT) +----------------- + +Copyright (c) 2013 noamraph + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/WHEEL b/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..1a9c53588bf958814188ba9a6e13d50b924fdccd --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (72.1.0) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/top_level.txt b/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..78620c472c9d799a14ccb02a0233f4669b3bcdcb --- /dev/null +++ b/videollama2/lib/python3.10/site-packages/tqdm-4.66.5.dist-info/top_level.txt @@ -0,0 +1 @@ +tqdm diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/_carray.cpython-310-x86_64-linux-gnu.so b/vllm/lib/python3.10/site-packages/cupy/_core/_carray.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..68b5bd3ae08479bf53e1fd1c861ff613eb5f95d9 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/_carray.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad93d93d7742b5c18266e3309126046d014e72c160a3031ea9900fbb461d196d +size 495304 diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/dlpack.cpython-310-x86_64-linux-gnu.so b/vllm/lib/python3.10/site-packages/cupy/_core/dlpack.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..7314834d6c3e9a0f0e9587633a549a07cc24dfa2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/dlpack.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:637fba1c55d6b2aa4a960101a38c883ed63d5410f6b699dc7557faf0c54b2a2b +size 719144 diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/fusion.cpython-310-x86_64-linux-gnu.so b/vllm/lib/python3.10/site-packages/cupy/_core/fusion.cpython-310-x86_64-linux-gnu.so new file mode 100644 index 0000000000000000000000000000000000000000..b2bb00d21ace7c034d6bda3f5e86b3ba3f0a6413 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/fusion.cpython-310-x86_64-linux-gnu.so @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88e1d46a888df1c52f22ee93b2270acc15502a926cf7150fc0be87ac41f52bed +size 3367256 diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/adjacent_find.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/adjacent_find.h new file mode 100644 index 0000000000000000000000000000000000000000..696d276dc98a5af9858dbffa87020e110b923a0d --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/adjacent_find.h @@ -0,0 +1,55 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_ADJACENT_FIND_H +#define _LIBCUDACXX___ALGORITHM_ADJACENT_FIND_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator +adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) +{ + if (__first != __last) + { + _ForwardIterator __i = __first; + while (++__i != __last) + { + if (__pred(*__first, *__i)) + { + return __first; + } + __first = __i; + } + } + return __last; +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator +adjacent_find(_ForwardIterator __first, _ForwardIterator __last) +{ + return _CUDA_VSTD::adjacent_find(__first, __last, __equal_to{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_ADJACENT_FIND_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/comp.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/comp.h new file mode 100644 index 0000000000000000000000000000000000000000..fcc9c1a49acc5ed5bb540f0bbcd35d4e211912d6 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/comp.h @@ -0,0 +1,58 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_COMP_H +#define _LIBCUDACXX___ALGORITHM_COMP_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#if defined(_LIBCUDACXX_HAS_STRING) +# include +#endif // _LIBCUDACXX_HAS_STRING + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +struct __equal_to +{ + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool + operator()(const _T1& __lhs, const _T2& __rhs) const noexcept(noexcept(__lhs == __rhs)) + { + return __lhs == __rhs; + } +}; + +#if defined(_LIBCUDACXX_HAS_STRING) +template +struct __is_trivial_equality_predicate<__equal_to, _Lhs, _Rhs> : true_type +{}; +#endif // _LIBCUDACXX_HAS_STRING + +struct __less +{ + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(const _Tp& __lhs, const _Up& __rhs) const + noexcept(noexcept(__lhs < __rhs)) + { + return __lhs < __rhs; + } +}; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_COMP_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/copy.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/copy.h new file mode 100644 index 0000000000000000000000000000000000000000..f4013d4ea73ca9ce3128dd684586327e14b37888 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/copy.h @@ -0,0 +1,146 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023-24 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_COPY_H +#define _LIBCUDACXX___ALGORITHM_COPY_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include // ::memmove +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_InputIterator, _OutputIterator> +__copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) +{ + for (; __first != __last; ++__first, (void) ++__result) + { + *__result = *__first; + } + return {__last, __result}; +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool __dispatch_memmove(_Up* __result, _Tp* __first, const size_t __n) +{ + // This is a pessimisation, but there's no way to do the code path detection correctly before GCC 9.0. + // __builtin_memmove is also illegal in constexpr there, so... just always assume we are constant evaluated, + // and let the optimizer *maybe* recover some of the perf. +#if _CCCL_COMPILER(GCC, <, 9) + return false; +#endif + + if (_CUDA_VSTD::is_constant_evaluated()) + { + return false; + } + else + { + // For now, we only ever use memmove on host + // clang-format off + NV_IF_ELSE_TARGET(NV_IS_HOST, ( + _CUDA_VSTD::memmove(__result, __first, __n * sizeof(_Up)); + return true; + ),( + return false; + )) + // clang-format on + } +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool +__constexpr_tail_overlap_fallback(_Tp* __first, _Up* __needle, _Tp* __last) +{ + while (__first != __last) + { + if (__first == __needle) + { + return true; + } + ++__first; + } + return false; +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool __constexpr_tail_overlap(_Tp* __first, _Up* __needle, _Tp* __last) +{ + _LIBCUDACXX_UNUSED_VAR(__last); +#if defined(_CCCL_BUILTIN_CONSTANT_P) + NV_IF_ELSE_TARGET(NV_IS_HOST, + (return _CCCL_BUILTIN_CONSTANT_P(__first < __needle) && __first < __needle;), + (return __constexpr_tail_overlap_fallback(__first, __needle, __last);)) +#else // ^^^ _CCCL_BUILTIN_CONSTANT_P ^^^ / vvv !_CCCL_BUILTIN_CONSTANT_P vvv + return __constexpr_tail_overlap_fallback(__first, __needle, __last); +#endif // !_CCCL_BUILTIN_CONSTANT_P +} + +template , _Up), int> = 0, + enable_if_t<_CCCL_TRAIT(is_trivially_copyable, _Up), int> = 0> +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_Tp*, _Up*> __copy(_Tp* __first, _Tp* __last, _Up* __result) +{ + const ptrdiff_t __n = __last - __first; + if (__n > 0) + { + if (__dispatch_memmove(__result, __first, __n)) + { + return {__last, __result + __n}; + } + if ((!_CUDA_VSTD::is_constant_evaluated() && __first < __result) + || __constexpr_tail_overlap(__first, __result, __last)) + { + for (ptrdiff_t __i = __n; __i > 0; --__i) + { + *(__result + __i - 1) = *(__first + __i - 1); + } + } + else + { + for (ptrdiff_t __i = 0; __i < __n; ++__i) + { + *(__result + __i) = *(__first + __i); + } + } + } + return {__last, __result + __n}; +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator +copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) +{ + return _CUDA_VSTD::__copy<_ClassicAlgPolicy>(__unwrap_iter(__first), __unwrap_iter(__last), __unwrap_iter(__result)) + .second; +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_COPY_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/copy_if.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/copy_if.h new file mode 100644 index 0000000000000000000000000000000000000000..56daf343191694509cd423551a91b995d4e9f513 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/copy_if.h @@ -0,0 +1,42 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_COPY_IF_H +#define _LIBCUDACXX___ALGORITHM_COPY_IF_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator +copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) +{ + for (; __first != __last; ++__first) + { + if (__pred(*__first)) + { + *__result = *__first; + ++__result; + } + } + return __result; +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_COPY_IF_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find.h new file mode 100644 index 0000000000000000000000000000000000000000..e5822dafda48f1aa63ab4edf62ea7fc8a0a58944 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find.h @@ -0,0 +1,58 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_FIND_H +#define _LIBCUDACXX___ALGORITHM_FIND_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +// generic implementation +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Iter +__find_impl(_Iter __first, _Sent __last, const _Tp& __value, _Proj& __proj) +{ + for (; __first != __last; ++__first) + { + if (_CUDA_VSTD::__invoke(__proj, *__first) == __value) + { + break; + } + } + return __first; +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _InputIterator +find(_InputIterator __first, _InputIterator __last, const _Tp& __value_) +{ + for (; __first != __last; ++__first) + { + if (*__first == __value_) + { + break; + } + } + return __first; +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_FIND_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find_end.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find_end.h new file mode 100644 index 0000000000000000000000000000000000000000..e0499e6efec86978227b5f8738bd437304389211 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find_end.h @@ -0,0 +1,218 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_FIND_END_H +#define _LIBCUDACXX___ALGORITHM_FIND_END_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 __find_end( + _ForwardIterator1 __first1, + _ForwardIterator1 __last1, + _ForwardIterator2 __first2, + _ForwardIterator2 __last2, + _BinaryPredicate __pred, + forward_iterator_tag, + forward_iterator_tag) +{ + // modeled after search algorithm + _ForwardIterator1 __r = __last1; // __last1 is the "default" answer + if (__first2 == __last2) + { + return __r; + } + while (true) + { + while (true) + { + if (__first1 == __last1) // if source exhausted return last correct answer + { + return __r; // (or __last1 if never found) + } + if (__pred(*__first1, *__first2)) + { + break; + } + ++__first1; + } + // *__first1 matches *__first2, now match elements after here + _ForwardIterator1 __m1 = __first1; + _ForwardIterator2 __m2 = __first2; + while (true) + { + if (++__m2 == __last2) + { // Pattern exhausted, record answer and search for another one + __r = __first1; + ++__first1; + break; + } + if (++__m1 == __last1) // Source exhausted, return last answer + { + return __r; + } + if (!__pred(*__m1, *__m2)) // mismatch, restart with a new __first + { + ++__first1; + break; + } // else there is a match, check next elements + } + } +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _BidirectionalIterator1 __find_end( + _BidirectionalIterator1 __first1, + _BidirectionalIterator1 __last1, + _BidirectionalIterator2 __first2, + _BidirectionalIterator2 __last2, + _BinaryPredicate __pred, + bidirectional_iterator_tag, + bidirectional_iterator_tag) +{ + // modeled after search algorithm (in reverse) + if (__first2 == __last2) + { + return __last1; // Everything matches an empty sequence + } + _BidirectionalIterator1 __l1 = __last1; + _BidirectionalIterator2 __l2 = __last2; + --__l2; + while (true) + { + // Find last element in sequence 1 that matches *(__last2-1), with a minimum of loop checks + while (true) + { + if (__first1 == __l1) // return __last1 if no element matches *__first2 + { + return __last1; + } + if (__pred(*--__l1, *__l2)) + { + break; + } + } + // *__l1 matches *__l2, now match elements before here + _BidirectionalIterator1 __m1 = __l1; + _BidirectionalIterator2 __m2 = __l2; + while (true) + { + if (__m2 == __first2) // If pattern exhausted, __m1 is the answer (works for 1 element pattern) + { + return __m1; + } + if (__m1 == __first1) // Otherwise if source exhausted, pattern not found + { + return __last1; + } + if (!__pred(*--__m1, *--__m2)) // if there is a mismatch, restart with a new __l1 + { + break; + } // else there is a match, check next elements + } + } +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _RandomAccessIterator1 __find_end( + _RandomAccessIterator1 __first1, + _RandomAccessIterator1 __last1, + _RandomAccessIterator2 __first2, + _RandomAccessIterator2 __last2, + _BinaryPredicate __pred, + random_access_iterator_tag, + random_access_iterator_tag) +{ + // Take advantage of knowing source and pattern lengths. Stop short when source is smaller than pattern + __iter_diff_t<_RandomAccessIterator2> __len2 = __last2 - __first2; + if (__len2 == 0) + { + return __last1; + } + __iter_diff_t<_RandomAccessIterator1> __len1 = __last1 - __first1; + if (__len1 < __len2) + { + return __last1; + } + const _RandomAccessIterator1 __s = __first1 + (__len2 - 1); // End of pattern match can't go before here + _RandomAccessIterator1 __l1 = __last1; + _RandomAccessIterator2 __l2 = __last2; + --__l2; + while (true) + { + while (true) + { + if (__s == __l1) + { + return __last1; + } + if (__pred(*--__l1, *__l2)) + { + break; + } + } + _RandomAccessIterator1 __m1 = __l1; + _RandomAccessIterator2 __m2 = __l2; + while (true) + { + if (__m2 == __first2) + { + return __m1; + } + // no need to check range on __m1 because __s guarantees we have enough source + if (!__pred(*--__m1, *--__m2)) + { + break; + } + } + } +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 find_end( + _ForwardIterator1 __first1, + _ForwardIterator1 __last1, + _ForwardIterator2 __first2, + _ForwardIterator2 __last2, + _BinaryPredicate __pred) +{ + return _CUDA_VSTD::__find_end>( + __first1, + __last1, + __first2, + __last2, + __pred, + typename iterator_traits<_ForwardIterator1>::iterator_category{}, + typename iterator_traits<_ForwardIterator2>::iterator_category{}); +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 +find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) +{ + return _CUDA_VSTD::find_end(__first1, __last1, __first2, __last2, __equal_to{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_FIND_END_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find_first_of.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find_first_of.h new file mode 100644 index 0000000000000000000000000000000000000000..622c43aad711cc7ae9bde8b3f44365a72c150379 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/find_first_of.h @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_FIND_FIRST_OF_H +#define _LIBCUDACXX___ALGORITHM_FIND_FIRST_OF_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 __find_first_of_ce( + _ForwardIterator1 __first1, + _ForwardIterator1 __last1, + _ForwardIterator2 __first2, + _ForwardIterator2 __last2, + _BinaryPredicate __pred) +{ + for (; __first1 != __last1; ++__first1) + { + for (_ForwardIterator2 __j = __first2; __j != __last2; ++__j) + { + if (__pred(*__first1, *__j)) + { + return __first1; + } + } + } + return __last1; +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 find_first_of( + _ForwardIterator1 __first1, + _ForwardIterator1 __last1, + _ForwardIterator2 __first2, + _ForwardIterator2 __last2, + _BinaryPredicate __pred) +{ + return _CUDA_VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred); +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 find_first_of( + _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) +{ + return _CUDA_VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_FIND_FIRST_OF_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/is_sorted.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/is_sorted.h new file mode 100644 index 0000000000000000000000000000000000000000..7a43424132fc788a7079f303ce246e5f722ac0e7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/is_sorted.h @@ -0,0 +1,46 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_IS_SORTED_H +#define _LIBCUDACXX___ALGORITHM_IS_SORTED_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool +is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) +{ + return _CUDA_VSTD::__is_sorted_until<__comp_ref_type<_Compare>>(__first, __last, __comp) == __last; +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool +is_sorted(_ForwardIterator __first, _ForwardIterator __last) +{ + return _CUDA_VSTD::is_sorted(__first, __last, __less{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_IS_SORTED_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/iter_swap.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/iter_swap.h new file mode 100644 index 0000000000000000000000000000000000000000..4e89efdb765499c8cc15dd643178c3a71b0b8b02 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/iter_swap.h @@ -0,0 +1,37 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_ITER_SWAP_H +#define _LIBCUDACXX___ALGORITHM_ITER_SWAP_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) noexcept( + noexcept(swap(*_CUDA_VSTD::declval<_ForwardIterator1>(), *_CUDA_VSTD::declval<_ForwardIterator2>()))) +{ + swap(*__a, *__b); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_ITER_SWAP_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/merge.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/merge.h new file mode 100644 index 0000000000000000000000000000000000000000..886fe0ec15245929a2369da775264f7e5fca25bc --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/merge.h @@ -0,0 +1,84 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_MERGE_H +#define _LIBCUDACXX___ALGORITHM_MERGE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator __merge( + _InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) +{ + for (; __first1 != __last1; ++__result) + { + if (__first2 == __last2) + { + return _CUDA_VSTD::copy(__first1, __last1, __result); + } + if (__comp(*__first2, *__first1)) + { + *__result = *__first2; + ++__first2; + } + else + { + *__result = *__first1; + ++__first1; + } + } + return _CUDA_VSTD::copy(__first2, __last2, __result); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator merge( + _InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) +{ + return _CUDA_VSTD::__merge<__comp_ref_type<_Compare>>(__first1, __last1, __first2, __last2, __result, __comp); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator merge( + _InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _OutputIterator __result) +{ + return _CUDA_VSTD::merge(__first1, __last1, __first2, __last2, __result, __less{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_MERGE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/min_element.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/min_element.h new file mode 100644 index 0000000000000000000000000000000000000000..fb5db9780d8ec57e410fbdcf367d70de6c990ca2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/min_element.h @@ -0,0 +1,86 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_MIN_ELEMENT_H +#define _LIBCUDACXX___ALGORITHM_MIN_ELEMENT_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include + +_CCCL_PUSH_MACROS + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Iter +__min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) +{ + if (__first == __last) + { + return __first; + } + + _Iter __i = __first; + while (++__i != __last) + { + if (_CUDA_VSTD::__invoke(__comp, _CUDA_VSTD::__invoke(__proj, *__i), _CUDA_VSTD::__invoke(__proj, *__first))) + { + __first = __i; + } + } + + return __first; +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) +{ + auto __proj = __identity(); + return _CUDA_VSTD::__min_element<_Comp>(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last), __comp, __proj); +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator +min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) +{ + static_assert(__is_cpp17_input_iterator<_ForwardIterator>::value, "std::min_element requires a ForwardIterator"); + static_assert(__is_callable<_Compare, decltype(*__first), decltype(*__first)>::value, + "The comparator has to be callable"); + + return _CUDA_VSTD::__min_element<__comp_ref_type<_Compare>>( + _CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last), __comp); +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator +min_element(_ForwardIterator __first, _ForwardIterator __last) +{ + return _CUDA_VSTD::min_element(__first, __last, __less{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +_CCCL_POP_MACROS + +#endif // _LIBCUDACXX___ALGORITHM_MIN_ELEMENT_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/minmax.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/minmax.h new file mode 100644 index 0000000000000000000000000000000000000000..d0f1cb3c3410b2bf099382875779e467b57ef101 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/minmax.h @@ -0,0 +1,68 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_MINMAX_H +#define _LIBCUDACXX___ALGORITHM_MINMAX_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair +minmax(const _Tp& __a, const _Tp& __b, _Compare __comp) +{ + return __comp(__b, __a) ? pair(__b, __a) : pair(__a, __b); +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair +minmax(const _Tp& __a, const _Tp& __b) +{ + return _CUDA_VSTD::minmax(__a, __b, __less{}); +} + +#ifndef _LIBCUDACXX_CXX03_LANG + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_Tp, _Tp> +minmax(initializer_list<_Tp> __t, _Compare __comp) +{ + static_assert(__is_callable<_Compare, _Tp, _Tp>::value, "The comparator has to be callable"); + __identity __proj{}; + auto __ret = _CUDA_VSTD::__minmax_element_impl(__t.begin(), __t.end(), __comp, __proj); + return pair<_Tp, _Tp>(*__ret.first, *__ret.second); +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t) +{ + return _CUDA_VSTD::minmax(__t, __less{}); +} + +#endif // _LIBCUDACXX_CXX03_LANG + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_MINMAX_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/none_of.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/none_of.h new file mode 100644 index 0000000000000000000000000000000000000000..ac1f8b663ec828fb3a3c3bc96a049839346b88ca --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/none_of.h @@ -0,0 +1,40 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_NONE_OF_H +#define _LIBCUDACXX___ALGORITHM_NONE_OF_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 bool +none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) +{ + for (; __first != __last; ++__first) + { + if (__pred(*__first)) + { + return false; + } + } + return true; +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_NONE_OF_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/partial_sort.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/partial_sort.h new file mode 100644 index 0000000000000000000000000000000000000000..2b72746b63b760a67bb2e544df05c26c16d514f3 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/partial_sort.h @@ -0,0 +1,95 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_H +#define _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _RandomAccessIterator +__partial_sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) +{ + if (__first == __middle) + { + return _IterOps<_AlgPolicy>::next(__middle, __last); + } + + _CUDA_VSTD::__make_heap<_AlgPolicy>(__first, __middle, __comp); + + typename iterator_traits<_RandomAccessIterator>::difference_type __len = __middle - __first; + _RandomAccessIterator __i = __middle; + for (; __i != __last; ++__i) + { + if (__comp(*__i, *__first)) + { + _IterOps<_AlgPolicy>::iter_swap(__i, __first); + _CUDA_VSTD::__sift_down<_AlgPolicy>(__first, __comp, __len, __first); + } + } + _CUDA_VSTD::__sort_heap<_AlgPolicy>(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__middle), __comp); + + return __i; +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _RandomAccessIterator +__partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare& __comp) +{ + if (__first == __middle) + { + return _IterOps<_AlgPolicy>::next(__middle, __last); + } + + return _CUDA_VSTD::__partial_sort_impl<_AlgPolicy>( + __first, __middle, __last, static_cast<__comp_ref_type<_Compare>>(__comp)); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void partial_sort( + _RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last, _Compare __comp) +{ + static_assert(_CCCL_TRAIT(is_copy_constructible, _RandomAccessIterator), "Iterators must be copy constructible."); + static_assert(_CCCL_TRAIT(is_copy_assignable, _RandomAccessIterator), "Iterators must be copy assignable."); + + (void) _CUDA_VSTD::__partial_sort<_ClassicAlgPolicy>( + _CUDA_VSTD::move(__first), _CUDA_VSTD::move(__middle), _CUDA_VSTD::move(__last), __comp); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void +partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last) +{ + _CUDA_VSTD::partial_sort(__first, __middle, __last, __less{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/partition_copy.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/partition_copy.h new file mode 100644 index 0000000000000000000000000000000000000000..48ad20b7fd98d44c48655932b5374073b085e17b --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/partition_copy.h @@ -0,0 +1,54 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_PARTITION_COPY_H +#define _LIBCUDACXX___ALGORITHM_PARTITION_COPY_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_OutputIterator1, _OutputIterator2> partition_copy( + _InputIterator __first, + _InputIterator __last, + _OutputIterator1 __out_true, + _OutputIterator2 __out_false, + _Predicate __pred) +{ + for (; __first != __last; ++__first) + { + if (__pred(*__first)) + { + *__out_true = *__first; + ++__out_true; + } + else + { + *__out_false = *__first; + ++__out_false; + } + } + return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_PARTITION_COPY_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/pop_heap.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/pop_heap.h new file mode 100644 index 0000000000000000000000000000000000000000..804e977639984001cc099d1a6e66314dfd77676a --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/pop_heap.h @@ -0,0 +1,89 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_POP_HEAP_H +#define _LIBCUDACXX___ALGORITHM_POP_HEAP_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void __pop_heap( + _RandomAccessIterator __first, + _RandomAccessIterator __last, + _Compare& __comp, + typename iterator_traits<_RandomAccessIterator>::difference_type __len) +{ + // Calling `pop_heap` on an empty range is undefined behavior, but in practice it will be a no-op. + _CCCL_ASSERT(__len > 0, "The heap given to pop_heap must be non-empty"); + + __comp_ref_type<_Compare> __comp_ref = __comp; + + using value_type = typename iterator_traits<_RandomAccessIterator>::value_type; + if (__len > 1) + { + value_type __top = _IterOps<_AlgPolicy>::__iter_move(__first); // create a hole at __first + _RandomAccessIterator __hole = _CUDA_VSTD::__floyd_sift_down<_AlgPolicy>(__first, __comp_ref, __len); + --__last; + + if (__hole == __last) + { + *__hole = _CUDA_VSTD::move(__top); + } + else + { + *__hole = _IterOps<_AlgPolicy>::__iter_move(__last); + ++__hole; + *__last = _CUDA_VSTD::move(__top); + _CUDA_VSTD::__sift_up<_AlgPolicy>(__first, __hole, __comp_ref, __hole - __first); + } + } +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void +pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) +{ + static_assert(_CUDA_VSTD::is_copy_constructible<_RandomAccessIterator>::value, + "Iterators must be copy constructible."); + static_assert(_CUDA_VSTD::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable."); + + typename iterator_traits<_RandomAccessIterator>::difference_type __len = __last - __first; + _CUDA_VSTD::__pop_heap<_ClassicAlgPolicy>(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last), __comp, __len); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 void +pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) +{ + _CUDA_VSTD::pop_heap(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last), __less{}); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_POP_HEAP_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/remove_copy_if.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/remove_copy_if.h new file mode 100644 index 0000000000000000000000000000000000000000..8ffeb3603f4e0f5d3ad5c2f57d8ddf444a7d1842 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/remove_copy_if.h @@ -0,0 +1,42 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_REMOVE_COPY_IF_H +#define _LIBCUDACXX___ALGORITHM_REMOVE_COPY_IF_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator +remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred) +{ + for (; __first != __last; ++__first) + { + if (!__pred(*__first)) + { + *__result = *__first; + ++__result; + } + } + return __result; +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_REMOVE_COPY_IF_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/replace_copy_if.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/replace_copy_if.h new file mode 100644 index 0000000000000000000000000000000000000000..74341ede24baca730215b01663ac6628d72ae6fa --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/replace_copy_if.h @@ -0,0 +1,45 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_REPLACE_COPY_IF_H +#define _LIBCUDACXX___ALGORITHM_REPLACE_COPY_IF_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator replace_copy_if( + _InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred, const _Tp& __new_value) +{ + for (; __first != __last; ++__first, (void) ++__result) + { + if (__pred(*__first)) + { + *__result = __new_value; + } + else + { + *__result = *__first; + } + } + return __result; +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_REPLACE_COPY_IF_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/rotate_copy.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/rotate_copy.h new file mode 100644 index 0000000000000000000000000000000000000000..2f536fc243ac4dfec100f32b96b5faa823512ea2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/rotate_copy.h @@ -0,0 +1,36 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_ROTATE_COPY_H +#define _LIBCUDACXX___ALGORITHM_ROTATE_COPY_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator +rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result) +{ + return _CUDA_VSTD::copy(__first, __middle, _CUDA_VSTD::copy(__middle, __last, __result)); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_ROTATE_COPY_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/search.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/search.h new file mode 100644 index 0000000000000000000000000000000000000000..078ac0597733a9d67f1404217f3f5d233dc76c9f --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/search.h @@ -0,0 +1,181 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_SEARCH_H +#define _LIBCUDACXX___ALGORITHM_SEARCH_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_ForwardIterator1, _ForwardIterator1> __search( + _ForwardIterator1 __first1, + _ForwardIterator1 __last1, + _ForwardIterator2 __first2, + _ForwardIterator2 __last2, + _BinaryPredicate __pred, + forward_iterator_tag, + forward_iterator_tag) +{ + if (__first2 == __last2) + { + return _CUDA_VSTD::make_pair(__first1, __first1); // Everything matches an empty sequence + } + while (true) + { + // Find first element in sequence 1 that matches *__first2, with a minimum of loop checks + while (true) + { + if (__first1 == __last1) // return __last1 if no element matches *__first2 + { + return _CUDA_VSTD::make_pair(__last1, __last1); + } + if (__pred(*__first1, *__first2)) + { + break; + } + ++__first1; + } + // *__first1 matches *__first2, now match elements after here + _ForwardIterator1 __m1 = __first1; + _ForwardIterator2 __m2 = __first2; + while (true) + { + if (++__m2 == __last2) // If pattern exhausted, __first1 is the answer (works for 1 element pattern) + { + return _CUDA_VSTD::make_pair(__first1, __m1); + } + if (++__m1 == __last1) // Otherwise if source exhausted, pattern not found + { + return _CUDA_VSTD::make_pair(__last1, __last1); + } + if (!__pred(*__m1, *__m2)) // if there is a mismatch, restart with a new __first1 + { + ++__first1; + break; + } // else there is a match, check next elements + } + } +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_RandomAccessIterator1, _RandomAccessIterator1> +__search(_RandomAccessIterator1 __first1, + _RandomAccessIterator1 __last1, + _RandomAccessIterator2 __first2, + _RandomAccessIterator2 __last2, + _BinaryPredicate __pred, + random_access_iterator_tag, + random_access_iterator_tag) +{ + typedef typename iterator_traits<_RandomAccessIterator1>::difference_type _Diff1; + typedef typename iterator_traits<_RandomAccessIterator2>::difference_type _Diff2; + // Take advantage of knowing source and pattern lengths. Stop short when source is smaller than pattern + const _Diff2 __len2 = __last2 - __first2; + if (__len2 == 0) + { + return _CUDA_VSTD::make_pair(__first1, __first1); + } + const _Diff1 __len1 = __last1 - __first1; + if (__len1 < __len2) + { + return _CUDA_VSTD::make_pair(__last1, __last1); + } + const _RandomAccessIterator1 __s = __last1 - (__len2 - 1); // Start of pattern match can't go beyond here + + while (true) + { + while (true) + { + if (__first1 == __s) + { + return _CUDA_VSTD::make_pair(__last1, __last1); + } + if (__pred(*__first1, *__first2)) + { + break; + } + ++__first1; + } + + _RandomAccessIterator1 __m1 = __first1; + _RandomAccessIterator2 __m2 = __first2; + while (true) + { + if (++__m2 == __last2) + { + return _CUDA_VSTD::make_pair(__first1, __first1 + __len2); + } + ++__m1; // no need to check range on __m1 because __s guarantees we have enough source + if (!__pred(*__m1, *__m2)) + { + ++__first1; + break; + } + } + } +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 search( + _ForwardIterator1 __first1, + _ForwardIterator1 __last1, + _ForwardIterator2 __first2, + _ForwardIterator2 __last2, + _BinaryPredicate __pred) +{ + return _CUDA_VSTD::__search>( + __first1, + __last1, + __first2, + __last2, + __pred, + typename iterator_traits<_ForwardIterator1>::iterator_category(), + typename iterator_traits<_ForwardIterator2>::iterator_category()) + .first; +} + +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator1 +search(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) +{ + return _CUDA_VSTD::search(__first1, __last1, __first2, __last2, __equal_to{}); +} + +#if _CCCL_STD_VER > 2014 +template +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator +search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher& __s) +{ + return __s(__f, __l).first; +} +#endif + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_SEARCH_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/set_difference.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/set_difference.h new file mode 100644 index 0000000000000000000000000000000000000000..86c4acd40e9b965ca397088e322b6bc6a4307f17 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/set_difference.h @@ -0,0 +1,91 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_SET_DIFFERENCE_H +#define _LIBCUDACXX___ALGORITHM_SET_DIFFERENCE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair, remove_cvref_t<_OutIter>> +__set_difference( + _InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result, _Comp&& __comp) +{ + while (__first1 != __last1 && __first2 != __last2) + { + if (__comp(*__first1, *__first2)) + { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + { + ++__first2; + } + else + { + ++__first1; + ++__first2; + } + } + return _CUDA_VSTD::__copy<_AlgPolicy>( + _CUDA_VSTD::move(__first1), _CUDA_VSTD::move(__last1), _CUDA_VSTD::move(__result)); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator set_difference( + _InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _OutputIterator __result, + _Compare __comp) +{ + return _CUDA_VSTD::__set_difference<_ClassicAlgPolicy, __comp_ref_type<_Compare>>( + __first1, __last1, __first2, __last2, __result, __comp) + .second; +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _OutputIterator set_difference( + _InputIterator1 __first1, + _InputIterator1 __last1, + _InputIterator2 __first2, + _InputIterator2 __last2, + _OutputIterator __result) +{ + return _CUDA_VSTD::__set_difference<_ClassicAlgPolicy>(__first1, __last1, __first2, __last2, __result, __less{}) + .second; +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_SET_DIFFERENCE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/shift_left.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/shift_left.h new file mode 100644 index 0000000000000000000000000000000000000000..ed07159b1a291fed6516caf6b3ce4219608a39e5 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/shift_left.h @@ -0,0 +1,78 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_SHIFT_LEFT_H +#define _LIBCUDACXX___ALGORITHM_SHIFT_LEFT_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator __shift_left( + _ForwardIterator __first, + _ForwardIterator __last, + typename iterator_traits<_ForwardIterator>::difference_type __n, + random_access_iterator_tag) +{ + _ForwardIterator __m = __first; + if (__n >= __last - __first) + { + return __first; + } + __m += __n; + return _CUDA_VSTD::move(__m, __last, __first); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator __shift_left( + _ForwardIterator __first, + _ForwardIterator __last, + typename iterator_traits<_ForwardIterator>::difference_type __n, + forward_iterator_tag) +{ + _ForwardIterator __m = __first; + for (; __n > 0; --__n) + { + if (__m == __last) + { + return __first; + } + ++__m; + } + return _CUDA_VSTD::move(__m, __last, __first); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _ForwardIterator shift_left( + _ForwardIterator __first, _ForwardIterator __last, typename iterator_traits<_ForwardIterator>::difference_type __n) +{ + if (__n == 0) + { + return __last; + } + + using _IterCategory = typename iterator_traits<_ForwardIterator>::iterator_category; + return __shift_left(__first, __last, __n, _IterCategory()); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_SHIFT_LEFT_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/unwrap_range.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/unwrap_range.h new file mode 100644 index 0000000000000000000000000000000000000000..dfe61f4f1ec74773273650db12e0ba2491c49d76 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__algorithm/unwrap_range.h @@ -0,0 +1,113 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___ALGORITHM_UNWRAP_RANGE_H +#define _LIBCUDACXX___ALGORITHM_UNWRAP_RANGE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +// __unwrap_range and __rewrap_range are used to unwrap ranges which may have different iterator and sentinel types. +// __unwrap_iter and __rewrap_iter don't work for this, because they assume that the iterator and sentinel have +// the same type. __unwrap_range tries to get two iterators and then forward to __unwrap_iter. + +#if _CCCL_STD_VER >= 2020 +template +struct __unwrap_range_impl +{ + _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __sent) + requires random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter> + { + auto __last = ranges::next(__first, __sent); + return pair{_CUDA_VSTD::__unwrap_iter(_CUDA_VSTD::move(__first)), + _CUDA_VSTD::__unwrap_iter(_CUDA_VSTD::move(__last))}; + } + + _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __last) + { + return pair{_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last)}; + } + + _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto + __rewrap(_Iter __orig_iter, decltype(_CUDA_VSTD::__unwrap_iter(_CUDA_VSTD::move(__orig_iter))) __iter) + requires random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter> + { + return _CUDA_VSTD::__rewrap_iter(_CUDA_VSTD::move(__orig_iter), _CUDA_VSTD::move(__iter)); + } + + _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __rewrap(const _Iter&, _Iter __iter) + requires(!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>) ) + { + return __iter; + } +}; + +template +struct __unwrap_range_impl<_Iter, _Iter> +{ + _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Iter __last) + { + return pair{_CUDA_VSTD::__unwrap_iter(_CUDA_VSTD::move(__first)), + _CUDA_VSTD::__unwrap_iter(_CUDA_VSTD::move(__last))}; + } + + _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto + __rewrap(_Iter __orig_iter, decltype(_CUDA_VSTD::__unwrap_iter(__orig_iter)) __iter) + { + return _CUDA_VSTD::__rewrap_iter(_CUDA_VSTD::move(__orig_iter), _CUDA_VSTD::move(__iter)); + } +}; + +template +_LIBCUDACXX_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last) +{ + return __unwrap_range_impl<_Iter, _Sent>::__unwrap(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last)); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) +{ + return __unwrap_range_impl<_Iter, _Sent>::__rewrap(_CUDA_VSTD::move(__orig_iter), _CUDA_VSTD::move(__iter)); +} +#else // ^^^ C++20 ^^^ / vvv C++17 vvv +template ()))> +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 pair<_Unwrapped, _Unwrapped> __unwrap_range(_Iter __first, _Iter __last) +{ + return _CUDA_VSTD::make_pair( + _CUDA_VSTD::__unwrap_iter(_CUDA_VSTD::move(__first)), _CUDA_VSTD::__unwrap_iter(_CUDA_VSTD::move(__last))); +} + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) +{ + return _CUDA_VSTD::__rewrap_iter(_CUDA_VSTD::move(__orig_iter), _CUDA_VSTD::move(__iter)); +} +#endif // _CCCL_STD_VER <= 2017 + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___ALGORITHM_UNWRAP_RANGE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstddef/byte.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstddef/byte.h new file mode 100644 index 0000000000000000000000000000000000000000..8f2f9ec45efc34a6acdc42bcbcb16678f6f3cde6 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstddef/byte.h @@ -0,0 +1,109 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___CSTDDEF_BYTE_H +#define _LIBCUDACXX___CSTDDEF_BYTE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD_NOVERSION + +enum class byte : unsigned char +{ +}; + +_LIBCUDACXX_HIDE_FROM_ABI constexpr byte operator|(byte __lhs, byte __rhs) noexcept +{ + return static_cast( + static_cast(static_cast(__lhs) | static_cast(__rhs))); +} + +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 byte& operator|=(byte& __lhs, byte __rhs) noexcept +{ + return __lhs = __lhs | __rhs; +} + +_LIBCUDACXX_HIDE_FROM_ABI constexpr byte operator&(byte __lhs, byte __rhs) noexcept +{ + return static_cast( + static_cast(static_cast(__lhs) & static_cast(__rhs))); +} + +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 byte& operator&=(byte& __lhs, byte __rhs) noexcept +{ + return __lhs = __lhs & __rhs; +} + +_LIBCUDACXX_HIDE_FROM_ABI constexpr byte operator^(byte __lhs, byte __rhs) noexcept +{ + return static_cast( + static_cast(static_cast(__lhs) ^ static_cast(__rhs))); +} + +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 byte& operator^=(byte& __lhs, byte __rhs) noexcept +{ + return __lhs = __lhs ^ __rhs; +} + +_LIBCUDACXX_HIDE_FROM_ABI constexpr byte operator~(byte __b) noexcept +{ + return static_cast(static_cast(~static_cast(__b))); +} + +_CCCL_TEMPLATE(class _Integer) +_CCCL_REQUIRES(_CCCL_TRAIT(is_integral, _Integer)) +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 byte& operator<<=(byte& __lhs, _Integer __shift) noexcept +{ + return __lhs = __lhs << __shift; +} + +_CCCL_TEMPLATE(class _Integer) +_CCCL_REQUIRES(_CCCL_TRAIT(is_integral, _Integer)) +_LIBCUDACXX_HIDE_FROM_ABI constexpr byte operator<<(byte __lhs, _Integer __shift) noexcept +{ + return static_cast(static_cast(static_cast(__lhs) << __shift)); +} + +_CCCL_TEMPLATE(class _Integer) +_CCCL_REQUIRES(_CCCL_TRAIT(is_integral, _Integer)) +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 byte& operator>>=(byte& __lhs, _Integer __shift) noexcept +{ + return __lhs = __lhs >> __shift; +} + +_CCCL_TEMPLATE(class _Integer) +_CCCL_REQUIRES(_CCCL_TRAIT(is_integral, _Integer)) +_LIBCUDACXX_HIDE_FROM_ABI constexpr byte operator>>(byte __lhs, _Integer __shift) noexcept +{ + return static_cast(static_cast(static_cast(__lhs) >> __shift)); +} + +_CCCL_TEMPLATE(class _Integer) +_CCCL_REQUIRES(_CCCL_TRAIT(is_integral, _Integer)) +_LIBCUDACXX_HIDE_FROM_ABI constexpr _Integer to_integer(byte __b) noexcept +{ + return static_cast<_Integer>(__b); +} + +_LIBCUDACXX_END_NAMESPACE_STD_NOVERSION + +#endif // _LIBCUDACXX___CSTDDEF_BYTE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstddef/types.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstddef/types.h new file mode 100644 index 0000000000000000000000000000000000000000..215b60fbc55a38b4969e1ccba89cad0a9c10c525 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstddef/types.h @@ -0,0 +1,49 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___CSTDDEF_TYPES_H +#define _LIBCUDACXX___CSTDDEF_TYPES_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#if !_CCCL_COMPILER(NVRTC) +# include +#else +# if !defined(offsetof) +# define offsetof(type, member) (::size_t)((char*) &(((type*) 0)->member) - (char*) 0) +# endif // !offsetof +#endif // !_CCCL_COMPILER(NVRTC) + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +#if defined(__CLANG_MAX_ALIGN_T_DEFINED) || defined(_GCC_MAX_ALIGN_T) || defined(__DEFINED_max_align_t) \ + || defined(__NetBS) +// Re-use the compiler's max_align_t where possible. +using ::max_align_t; +#else +using max_align_t = long double; +#endif + +using nullptr_t = decltype(nullptr); +using ::ptrdiff_t; +using ::size_t; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___CSTDDEF_TYPES_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstdlib/abs.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstdlib/abs.h new file mode 100644 index 0000000000000000000000000000000000000000..f00ffee67620b5be6deaac6f9fde5c72e5b5ff4d --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstdlib/abs.h @@ -0,0 +1,53 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___CSTDLIB_ABS_H +#define _LIBCUDACXX___CSTDLIB_ABS_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr int abs(int __val) noexcept +{ + return (__val < 0) ? -__val : __val; +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr long labs(long __val) noexcept +{ + return (__val < 0l) ? -__val : __val; +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr long abs(long __val) noexcept +{ + return _CUDA_VSTD::labs(__val); +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr long long llabs(long long __val) noexcept +{ + return (__val < 0ll) ? -__val : __val; +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr long long abs(long long __val) noexcept +{ + return _CUDA_VSTD::llabs(__val); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___CSTDLIB_ABS_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstdlib/div.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstdlib/div.h new file mode 100644 index 0000000000000000000000000000000000000000..736bdee0dee7085466fca3778cbed220456ea462 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__cstdlib/div.h @@ -0,0 +1,92 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___CSTDLIB_DIV_H +#define _LIBCUDACXX___CSTDLIB_DIV_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#if !_CCCL_COMPILER(NVRTC) +# include +#endif // !_CCCL_COMPILER(NVRTC) + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +// If available, use the host's div_t, ldiv_t, and lldiv_t types because the struct members order is +// implementation-defined. +#if !_CCCL_COMPILER(NVRTC) +using ::div_t; +using ::ldiv_t; +using ::lldiv_t; +#else // ^^^ !_CCCL_COMPILER(NVRTC) / _CCCL_COMPILER(NVRTC) vvv +struct _CCCL_TYPE_VISIBILITY_DEFAULT div_t +{ + int quot; + int rem; +}; + +struct _CCCL_TYPE_VISIBILITY_DEFAULT ldiv_t +{ + long quot; + long rem; +}; + +struct _CCCL_TYPE_VISIBILITY_DEFAULT lldiv_t +{ + long long quot; + long long rem; +}; +#endif // !_CCCL_COMPILER(NVRTC) + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 div_t div(int __x, int __y) noexcept +{ + div_t __result{}; + __result.quot = __x / __y; + __result.rem = __x % __y; + return __result; +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 ldiv_t ldiv(long __x, long __y) noexcept +{ + ldiv_t __result{}; + __result.quot = __x / __y; + __result.rem = __x % __y; + return __result; +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 ldiv_t div(long __x, long __y) noexcept +{ + return _CUDA_VSTD::ldiv(__x, __y); +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 lldiv_t lldiv(long long __x, long long __y) noexcept +{ + lldiv_t __result{}; + __result.quot = __x / __y; + __result.rem = __x % __y; + return __result; +} + +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 lldiv_t div(long long __x, long long __y) noexcept +{ + return _CUDA_VSTD::lldiv(__x, __y); +} + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___CSTDLIB_DIV_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/array.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/array.h new file mode 100644 index 0000000000000000000000000000000000000000..c0cda0e912cabaf01f38f69ed2a68aa2a3fed0c8 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/array.h @@ -0,0 +1,32 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_ARRAY_H +#define _LIBCUDACXX___FWD_ARRAY_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +struct _CCCL_TYPE_VISIBILITY_DEFAULT array; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_ARRAY_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/complex.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/complex.h new file mode 100644 index 0000000000000000000000000000000000000000..ba5617380dd05e5f4f1aaa94dc75c848c23a0100 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/complex.h @@ -0,0 +1,30 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023-24 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_COMPLEX_H +#define _LIBCUDACXX___FWD_COMPLEX_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +class _CCCL_TYPE_VISIBILITY_DEFAULT complex; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_COMPLEX_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/get.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/get.h new file mode 100644 index 0000000000000000000000000000000000000000..70607edc813e89c3d6b6940f57ce313b15377bc3 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/get.h @@ -0,0 +1,127 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023-24 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_GET_H +#define _LIBCUDACXX___FWD_GET_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __tuple_element_t<_Ip, tuple<_Tp...>>& get(tuple<_Tp...>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 const __tuple_element_t<_Ip, tuple<_Tp...>>& +get(const tuple<_Tp...>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __tuple_element_t<_Ip, tuple<_Tp...>>&& get(tuple<_Tp...>&&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 const __tuple_element_t<_Ip, tuple<_Tp...>>&& +get(const tuple<_Tp...>&&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __tuple_element_t<_Ip, pair<_T1, _T2>>& get(pair<_T1, _T2>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 const __tuple_element_t<_Ip, pair<_T1, _T2>>& +get(const pair<_T1, _T2>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 __tuple_element_t<_Ip, pair<_T1, _T2>>&& get(pair<_T1, _T2>&&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 const __tuple_element_t<_Ip, pair<_T1, _T2>>&& +get(const pair<_T1, _T2>&&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Tp& get(array<_Tp, _Size>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 const _Tp& get(const array<_Tp, _Size>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 _Tp&& get(array<_Tp, _Size>&&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX14 const _Tp&& get(const array<_Tp, _Size>&&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp& get(complex<_Tp>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp&& get(complex<_Tp>&&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI constexpr const _Tp& get(const complex<_Tp>&) noexcept; + +template +_LIBCUDACXX_HIDE_FROM_ABI constexpr const _Tp&& get(const complex<_Tp>&&) noexcept; + +_LIBCUDACXX_END_NAMESPACE_STD + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +# if _CCCL_STD_VER >= 2020 +template + requires((_Index == 0) && copyable<_Iter>) || (_Index == 1) +# else // ^^^ C++20 ^^^ / vvv C++17 vvv +template ) || (_Index == 1), int> = 0> +# endif // _CCCL_STD_VER <= 2017 +_LIBCUDACXX_HIDE_FROM_ABI constexpr auto get(const subrange<_Iter, _Sent, _Kind>& __subrange); + +# if _CCCL_STD_VER >= 2020 +template + requires(_Index < 2) +# else // ^^^ C++20 ^^^ / vvv C++17 vvv +template < + size_t _Index, + class _Iter, + class _Sent, + subrange_kind _Kind, + enable_if_t<_Index<2, int> = 0> +# endif // _CCCL_STD_VER <= 2017 +_LIBCUDACXX_HIDE_FROM_ABI constexpr auto get(subrange<_Iter, _Sent, _Kind>&& __subrange); + +_LIBCUDACXX_END_NAMESPACE_RANGES + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +using _CUDA_VRANGES::get; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +#endif // _LIBCUDACXX___FWD_GET_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/hash.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/hash.h new file mode 100644 index 0000000000000000000000000000000000000000..a05c4f3396b660f02b2c5438437ca67bad3c6c37 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/hash.h @@ -0,0 +1,30 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_HASH_H +#define _LIBCUDACXX___FWD_HASH_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +struct _CCCL_TYPE_VISIBILITY_DEFAULT hash; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_HASH_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/memory_resource.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/memory_resource.h new file mode 100644 index 0000000000000000000000000000000000000000..061fb7d88f91e40631ebecc3f772ea816749edf5 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/memory_resource.h @@ -0,0 +1,33 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_MEMORY_RESOURCE_H +#define _LIBCUDACXX___FWD_MEMORY_RESOURCE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +namespace pmr +{ +template +class _CCCL_TYPE_VISIBILITY_DEFAULT polymorphic_allocator; +} // namespace pmr + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_MEMORY_RESOURCE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/pair.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/pair.h new file mode 100644 index 0000000000000000000000000000000000000000..f13d6b4be654baf9f9b91a7cc15a76a2e4164b23 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/pair.h @@ -0,0 +1,30 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_PAIR_H +#define _LIBCUDACXX___FWD_PAIR_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +struct _CCCL_TYPE_VISIBILITY_DEFAULT pair; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_PAIR_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/span.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/span.h new file mode 100644 index 0000000000000000000000000000000000000000..83a280692d873d0856afadfc69274be2b5e3aaab --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/span.h @@ -0,0 +1,38 @@ +// -*- C++ -*- +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_SPAN_H +#define _LIBCUDACXX___FWD_SPAN_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +#if _CCCL_STD_VER > 2011 + +_CCCL_INLINE_VAR constexpr size_t dynamic_extent = static_cast(-1); +template +class span; + +#endif + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_SPAN_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/string.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/string.h new file mode 100644 index 0000000000000000000000000000000000000000..bf48cf55cd288265fc24f0c0abbfda9ca69120a9 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/string.h @@ -0,0 +1,117 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_STRING_H +#define _LIBCUDACXX___FWD_STRING_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +struct _CCCL_TYPE_VISIBILITY_DEFAULT char_traits; +template <> +struct char_traits; + +#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T +template <> +struct char_traits; +#endif + +template <> +struct char_traits; +template <> +struct char_traits; + +#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS +template <> +struct char_traits; +#endif + +template +class _CCCL_TYPE_VISIBILITY_DEFAULT allocator; + +template , class _Allocator = allocator<_CharT>> +class _CCCL_TYPE_VISIBILITY_DEFAULT basic_string; + +using string = basic_string; + +#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS +using wstring = basic_string; +#endif + +#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T +using u8string = basic_string; +#endif + +using u16string = basic_string; +using u32string = basic_string; + +#if _CCCL_STD_VER >= 2017 + +namespace pmr +{ +template > +using basic_string = std::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>; + +using string = basic_string; + +# ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS +using wstring = basic_string; +# endif + +# ifndef _LIBCUDACXX_HAS_NO_CHAR8_T +using u8string = basic_string; +# endif + +using u16string = basic_string; +using u32string = basic_string; + +} // namespace pmr + +#endif // _CCCL_STD_VER >= 2017 + +// clang-format off +template +class _LIBCUDACXX_PREFERRED_NAME(string) +#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS + _LIBCUDACXX_PREFERRED_NAME(wstring) +#endif +#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T + _LIBCUDACXX_PREFERRED_NAME(u8string) +#endif + _LIBCUDACXX_PREFERRED_NAME(u16string) + _LIBCUDACXX_PREFERRED_NAME(u32string) +#if _CCCL_STD_VER >= 2017 + _LIBCUDACXX_PREFERRED_NAME(pmr::string) +# ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS + _LIBCUDACXX_PREFERRED_NAME(pmr::wstring) +# endif +# ifndef _LIBCUDACXX_HAS_NO_CHAR8_T + _LIBCUDACXX_PREFERRED_NAME(pmr::u8string) +# endif + _LIBCUDACXX_PREFERRED_NAME(pmr::u16string) + _LIBCUDACXX_PREFERRED_NAME(pmr::u32string) +#endif + basic_string; +// clang-format on + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_STRING_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/string_view.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/string_view.h new file mode 100644 index 0000000000000000000000000000000000000000..32fd502f81863b6c82acc0f9f8f62b549f343058 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/string_view.h @@ -0,0 +1,56 @@ +// -*- C++ -*- +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_STRING_VIEW_H +#define _LIBCUDACXX___FWD_STRING_VIEW_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template > +class _CCCL_TYPE_VISIBILITY_DEFAULT basic_string_view; + +typedef basic_string_view string_view; +#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T +typedef basic_string_view u8string_view; +#endif +typedef basic_string_view u16string_view; +typedef basic_string_view u32string_view; +#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS +typedef basic_string_view wstring_view; +#endif + +// clang-format off +template +class _LIBCUDACXX_PREFERRED_NAME(string_view) +#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS + _LIBCUDACXX_PREFERRED_NAME(wstring_view) +#endif +#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T + _LIBCUDACXX_PREFERRED_NAME(u8string_view) +#endif + _LIBCUDACXX_PREFERRED_NAME(u16string_view) + _LIBCUDACXX_PREFERRED_NAME(u32string_view) + basic_string_view; +// clang-format on +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_STRING_VIEW_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/subrange.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/subrange.h new file mode 100644 index 0000000000000000000000000000000000000000..d89df6f0ab2b45318b84ee17b8145ceea5984316 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/subrange.h @@ -0,0 +1,57 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_SUBRANGE_H +#define _LIBCUDACXX___FWD_SUBRANGE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +enum class _CCCL_TYPE_VISIBILITY_DEFAULT subrange_kind : bool +{ + unsized, + sized +}; + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES_ABI +# if _CCCL_STD_VER >= 2020 +template _Sent = _Iter, + subrange_kind _Kind = sized_sentinel_for<_Sent, _Iter> ? subrange_kind::sized : subrange_kind::unsized> + requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>) +class _CCCL_TYPE_VISIBILITY_DEFAULT subrange; +# else // ^^^ C++20 ^^^ / vvv C++17 vvv +template ? subrange_kind::sized : subrange_kind::unsized, + enable_if_t, int> = 0, + enable_if_t, int> = 0, + enable_if_t<(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>), int> = 0> +class _CCCL_TYPE_VISIBILITY_DEFAULT subrange; +# endif // _CCCL_STD_VER <= 2017 + +_LIBCUDACXX_END_NAMESPACE_RANGES_ABI +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +#endif // _LIBCUDACXX___FWD_SUBRANGE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/tuple.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/tuple.h new file mode 100644 index 0000000000000000000000000000000000000000..cc30ddcbb6f19dc42a0f1da905d2b37572644f6a --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__fwd/tuple.h @@ -0,0 +1,30 @@ +//===---------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===---------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___FWD_TUPLE_H +#define _LIBCUDACXX___FWD_TUPLE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +class _CCCL_TYPE_VISIBILITY_DEFAULT tuple; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___FWD_TUPLE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__limits/msvc_win32.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__limits/msvc_win32.h new file mode 100644 index 0000000000000000000000000000000000000000..d00c76895bce0775b92fe16b814b64a08eaa1cab --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__limits/msvc_win32.h @@ -0,0 +1,66 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___LIMITS_MSVC_WIN32_H +#define _LIBCUDACXX___LIMITS_MSVC_WIN32_H + +#if defined(__MINGW32__) +# error "This header complements the Microsoft C Runtime library, and should not be included otherwise." +#endif +#if defined(__clang__) +# error "This header should only be included when using Microsofts C1XX frontend" +#endif + +#include // limit constants +#include // CHAR_BIT + +#define __CHAR_BIT__ CHAR_BIT + +#define __FLT_MANT_DIG__ FLT_MANT_DIG +#define __FLT_DIG__ FLT_DIG +#define __FLT_RADIX__ FLT_RADIX +#define __FLT_MIN_EXP__ FLT_MIN_EXP +#define __FLT_MIN_10_EXP__ FLT_MIN_10_EXP +#define __FLT_MAX_EXP__ FLT_MAX_EXP +#define __FLT_MAX_10_EXP__ FLT_MAX_10_EXP +#define __FLT_MIN__ FLT_MIN +#define __FLT_MAX__ FLT_MAX +#define __FLT_EPSILON__ FLT_EPSILON +// predefined by MinGW GCC +#define __FLT_DENORM_MIN__ 1.40129846432481707092e-45F + +#define __DBL_MANT_DIG__ DBL_MANT_DIG +#define __DBL_DIG__ DBL_DIG +#define __DBL_RADIX__ DBL_RADIX +#define __DBL_MIN_EXP__ DBL_MIN_EXP +#define __DBL_MIN_10_EXP__ DBL_MIN_10_EXP +#define __DBL_MAX_EXP__ DBL_MAX_EXP +#define __DBL_MAX_10_EXP__ DBL_MAX_10_EXP +#define __DBL_MIN__ DBL_MIN +#define __DBL_MAX__ DBL_MAX +#define __DBL_EPSILON__ DBL_EPSILON +// predefined by MinGW GCC +#define __DBL_DENORM_MIN__ double(4.94065645841246544177e-324L) + +#define __LDBL_MANT_DIG__ LDBL_MANT_DIG +#define __LDBL_DIG__ LDBL_DIG +#define __LDBL_RADIX__ LDBL_RADIX +#define __LDBL_MIN_EXP__ LDBL_MIN_EXP +#define __LDBL_MIN_10_EXP__ LDBL_MIN_10_EXP +#define __LDBL_MAX_EXP__ LDBL_MAX_EXP +#define __LDBL_MAX_10_EXP__ LDBL_MAX_10_EXP +#define __LDBL_MIN__ LDBL_MIN +#define __LDBL_MAX__ LDBL_MAX +#define __LDBL_EPSILON__ LDBL_EPSILON +// predefined by MinGW GCC +#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L + +#endif // _LIBCUDACXX___LIMITS_MSVC_WIN32_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/layout_right.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/layout_right.h new file mode 100644 index 0000000000000000000000000000000000000000..96c4bc60b1e1f979399932ee8b4f2b2f7584404d --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/layout_right.h @@ -0,0 +1,279 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2019) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Christian R. Trott (crtrott@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef _LIBCUDACXX___MDSPAN_LAYOUT_RIGHT_HPP +#define _LIBCUDACXX___MDSPAN_LAYOUT_RIGHT_HPP + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +#if _CCCL_STD_VER > 2011 + +//============================================================================== +template +class layout_right::mapping +{ +public: + using extents_type = _Extents; + using index_type = typename extents_type::index_type; + using size_type = typename extents_type::size_type; + using rank_type = typename extents_type::rank_type; + using layout_type = layout_right; + +private: + static_assert(__detail::__is_extents_v, + "layout_right::mapping must be instantiated with a specialization of _CUDA_VSTD::extents."); + + template + friend class mapping; + + // i0+(i1 + E(1)*(i2 + E(2)*i3)) + template + struct __rank_count + {}; + + template + _CCCL_HOST_DEVICE constexpr index_type + __compute_offset(index_type __offset, __rank_count<_r, _Rank>, const _Ip& __i, _Indices... __idx) const + { + return __compute_offset(__offset * __extents.template __extent<_r>() + __i, __rank_count<_r + 1, _Rank>(), __idx...); + } + + template + _CCCL_HOST_DEVICE constexpr index_type + __compute_offset(__rank_count<0, extents_type::rank()>, const _Ip& __i, _Indices... __idx) const + { + return __compute_offset(__i, __rank_count<1, extents_type::rank()>(), __idx...); + } + + _CCCL_HOST_DEVICE constexpr index_type + __compute_offset(size_t __offset, __rank_count) const + { + return static_cast(__offset); + } + + _CCCL_HOST_DEVICE constexpr index_type __compute_offset(__rank_count<0, 0>) const + { + return 0; + } + +public: + //-------------------------------------------------------------------------------- + + _CCCL_HIDE_FROM_ABI constexpr mapping() noexcept = default; + _CCCL_HIDE_FROM_ABI constexpr mapping(mapping const&) noexcept = default; + + _CCCL_HOST_DEVICE constexpr mapping(extents_type const& __exts) noexcept + : __extents(__exts) + {} + + _CCCL_TEMPLATE(class _OtherExtents) + _CCCL_REQUIRES(_CCCL_TRAIT(_CUDA_VSTD::is_constructible, extents_type, _OtherExtents)) + __MDSPAN_CONDITIONAL_EXPLICIT((!_CUDA_VSTD::is_convertible<_OtherExtents, extents_type>::value)) // needs two () due + // to comma + _LIBCUDACXX_HIDE_FROM_ABI constexpr mapping( + mapping<_OtherExtents> const& __other) noexcept // NOLINT(google-explicit-constructor) + : __extents(__other.extents()) + { + /* + * TODO: check precondition + * __other.required_span_size() is a representable value of type index_type + */ + } + + _CCCL_TEMPLATE(class _OtherExtents) + _CCCL_REQUIRES(_CCCL_TRAIT(_CUDA_VSTD::is_constructible, extents_type, _OtherExtents) + _CCCL_AND(extents_type::rank() <= 1)) + __MDSPAN_CONDITIONAL_EXPLICIT((!_CUDA_VSTD::is_convertible<_OtherExtents, extents_type>::value)) // needs two () due + // to comma + _LIBCUDACXX_HIDE_FROM_ABI constexpr mapping( + layout_left::mapping<_OtherExtents> const& __other) noexcept // NOLINT(google-explicit-constructor) + : __extents(__other.extents()) + { + /* + * TODO: check precondition + * __other.required_span_size() is a representable value of type index_type + */ + } + + _CCCL_TEMPLATE(class _OtherExtents) + _CCCL_REQUIRES(_CCCL_TRAIT(_CUDA_VSTD::is_constructible, extents_type, _OtherExtents)) + __MDSPAN_CONDITIONAL_EXPLICIT((extents_type::rank() > 0)) + _LIBCUDACXX_HIDE_FROM_ABI constexpr mapping( + layout_stride::mapping<_OtherExtents> const& __other) // NOLINT(google-explicit-constructor) + : __extents(__other.extents()) + { + /* + * TODO: check precondition + * __other.required_span_size() is a representable value of type index_type + */ + NV_IF_TARGET(NV_IS_HOST, (size_t __stride = 1; for (rank_type __r = __extents.rank(); __r > 0; __r--) { + _LIBCUDACXX_THROW_RUNTIME_ERROR(__stride == static_cast(__other.stride(__r - 1)), + "Assigning layout_stride to layout_right with invalid strides."); + __stride *= __extents.extent(__r - 1); + })) + } + + _CCCL_HIDE_FROM_ABI __MDSPAN_CONSTEXPR_14_DEFAULTED mapping& operator=(mapping const&) noexcept = default; + + _LIBCUDACXX_HIDE_FROM_ABI constexpr const extents_type& extents() const noexcept + { + return __extents; + } + + _LIBCUDACXX_HIDE_FROM_ABI constexpr index_type required_span_size() const noexcept + { + index_type __value = 1; + for (rank_type __r = 0; __r != extents_type::rank(); ++__r) + { + __value *= __extents.extent(__r); + } + return __value; + } + + //-------------------------------------------------------------------------------- + + _CCCL_TEMPLATE(class... _Indices) + _CCCL_REQUIRES((sizeof...(_Indices) == extents_type::rank()) + _CCCL_AND __fold_and_v<_CCCL_TRAIT(_CUDA_VSTD::is_convertible, _Indices, index_type)...> // + _CCCL_AND __fold_and_v<_CCCL_TRAIT(_CUDA_VSTD::is_nothrow_constructible, index_type, _Indices)...>) + _CCCL_HOST_DEVICE constexpr index_type operator()(_Indices... __idxs) const noexcept + { + return __compute_offset(__rank_count<0, extents_type::rank()>(), static_cast(__idxs)...); + } + + _LIBCUDACXX_HIDE_FROM_ABI static constexpr bool is_always_unique() noexcept + { + return true; + } + _LIBCUDACXX_HIDE_FROM_ABI static constexpr bool is_always_exhaustive() noexcept + { + return true; + } + _LIBCUDACXX_HIDE_FROM_ABI static constexpr bool is_always_strided() noexcept + { + return true; + } + _LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_unique() const noexcept + { + return true; + } + _LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_exhaustive() const noexcept + { + return true; + } + _LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_strided() const noexcept + { + return true; + } + + _CCCL_TEMPLATE(class _Ext = _Extents) + _CCCL_REQUIRES((_Ext::rank() > 0)) + _LIBCUDACXX_HIDE_FROM_ABI constexpr index_type stride(rank_type __i) const noexcept + { + index_type __value = 1; + for (rank_type __r = extents_type::rank() - 1; __r > __i; __r--) + { + __value *= __extents.extent(__r); + } + return __value; + } + + template + _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool + operator==(mapping const& __lhs, mapping<_OtherExtents> const& __rhs) noexcept + { + return __lhs.extents() == __rhs.extents(); + } + + // In C++ 20 the not equal exists if equal is found +# if !(__MDSPAN_HAS_CXX_20) + template + _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool + operator!=(mapping const& __lhs, mapping<_OtherExtents> const& __rhs) noexcept + { + return __lhs.extents() != __rhs.extents(); + } +# endif + + // Not really public, but currently needed to implement fully constexpr usable submdspan: + template + _CCCL_HOST_DEVICE constexpr index_type + __get_stride(_CUDA_VSTD::extents<_SizeType, _Ep...>, _CUDA_VSTD::integer_sequence) const + { + return __MDSPAN_FOLD_TIMES_RIGHT((_Idx > _Np ? __extents.template __extent<_Idx>() : 1), 1); + } + template + _CCCL_HOST_DEVICE constexpr index_type __stride() const noexcept + { + return __get_stride<_Np>(__extents, _CUDA_VSTD::make_index_sequence()); + } + +private: + _CCCL_NO_UNIQUE_ADDRESS extents_type __extents{}; +}; + +#endif // _CCCL_STD_VER > 2011 + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___MDSPAN_LAYOUT_RIGHT_HPP diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/macros.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/macros.h new file mode 100644 index 0000000000000000000000000000000000000000..b9b56adae377232d8d9865183affd442f933abf2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/macros.h @@ -0,0 +1,646 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2019) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Christian R. Trott (crtrott@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef _LIBCUDACXX___MDSPAN_MACROS_HPP +#define _LIBCUDACXX___MDSPAN_MACROS_HPP + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include + +#if _CCCL_STD_VER > 2011 + +# ifndef __MDSPAN_FORCE_INLINE_FUNCTION +# ifdef __MDSPAN_COMPILER_MSVC // Microsoft compilers +# define __MDSPAN_FORCE_INLINE_FUNCTION __forceinline _CCCL_HOST_DEVICE +# else +# define __MDSPAN_FORCE_INLINE_FUNCTION __attribute__((always_inline)) _CCCL_HOST_DEVICE +# endif +# endif + +//============================================================================== +// {{{1 + +# define __MDSPAN_PP_COUNT(...) \ + __MDSPAN_PP_INTERNAL_EXPAND_ARGS_PRIVATE(__MDSPAN_PP_INTERNAL_ARGS_AUGMENTER(__VA_ARGS__)) + +# define __MDSPAN_PP_INTERNAL_ARGS_AUGMENTER(...) unused, __VA_ARGS__ +# define __MDSPAN_PP_INTERNAL_EXPAND(x) x +# define __MDSPAN_PP_INTERNAL_EXPAND_ARGS_PRIVATE(...) \ + __MDSPAN_PP_INTERNAL_EXPAND(__MDSPAN_PP_INTERNAL_COUNT_PRIVATE( \ + __VA_ARGS__, \ + 69, \ + 68, \ + 67, \ + 66, \ + 65, \ + 64, \ + 63, \ + 62, \ + 61, \ + 60, \ + 59, \ + 58, \ + 57, \ + 56, \ + 55, \ + 54, \ + 53, \ + 52, \ + 51, \ + 50, \ + 49, \ + 48, \ + 47, \ + 46, \ + 45, \ + 44, \ + 43, \ + 42, \ + 41, \ + 40, \ + 39, \ + 38, \ + 37, \ + 36, \ + 35, \ + 34, \ + 33, \ + 32, \ + 31, \ + 30, \ + 29, \ + 28, \ + 27, \ + 26, \ + 25, \ + 24, \ + 23, \ + 22, \ + 21, \ + 20, \ + 19, \ + 18, \ + 17, \ + 16, \ + 15, \ + 14, \ + 13, \ + 12, \ + 11, \ + 10, \ + 9, \ + 8, \ + 7, \ + 6, \ + 5, \ + 4, \ + 3, \ + 2, \ + 1, \ + 0)) +# define __MDSPAN_PP_INTERNAL_COUNT_PRIVATE( \ + _1_, \ + _2_, \ + _3_, \ + _4_, \ + _5_, \ + _6_, \ + _7_, \ + _8_, \ + _9_, \ + _10, \ + _11, \ + _12, \ + _13, \ + _14, \ + _15, \ + _16, \ + _17, \ + _18, \ + _19, \ + _20, \ + _21, \ + _22, \ + _23, \ + _24, \ + _25, \ + _26, \ + _27, \ + _28, \ + _29, \ + _30, \ + _31, \ + _32, \ + _33, \ + _34, \ + _35, \ + _36, \ + _37, \ + _38, \ + _39, \ + _40, \ + _41, \ + _42, \ + _43, \ + _44, \ + _45, \ + _46, \ + _47, \ + _48, \ + _49, \ + _50, \ + _51, \ + _52, \ + _53, \ + _54, \ + _55, \ + _56, \ + _57, \ + _58, \ + _59, \ + _60, \ + _61, \ + _62, \ + _63, \ + _64, \ + _65, \ + _66, \ + _67, \ + _68, \ + _69, \ + _70, \ + count, \ + ...) \ + count /**/ + +# define __MDSPAN_PP_STRINGIFY_IMPL(x) #x +# define __MDSPAN_PP_STRINGIFY(x) __MDSPAN_PP_STRINGIFY_IMPL(x) + +# define __MDSPAN_PP_CAT_IMPL(x, y) x##y +# define __MDSPAN_PP_CAT(x, y) __MDSPAN_PP_CAT_IMPL(x, y) + +# define __MDSPAN_PP_EVAL(X, ...) X(__VA_ARGS__) + +# define __MDSPAN_PP_REMOVE_PARENS_IMPL(...) __VA_ARGS__ +# define __MDSPAN_PP_REMOVE_PARENS(...) __MDSPAN_PP_REMOVE_PARENS_IMPL __VA_ARGS__ + +// end Preprocessor helpers }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + +# if __MDSPAN_USE_RETURN_TYPE_DEDUCTION +# define __MDSPAN_DEDUCE_RETURN_TYPE_SINGLE_LINE(SIGNATURE, BODY) \ + auto __MDSPAN_PP_REMOVE_PARENS(SIGNATURE) \ + { \ + return __MDSPAN_PP_REMOVE_PARENS(BODY); \ + } +# define __MDSPAN_DEDUCE_DECLTYPE_AUTO_RETURN_TYPE_SINGLE_LINE(SIGNATURE, BODY) \ + decltype(auto) __MDSPAN_PP_REMOVE_PARENS(SIGNATURE) \ + { \ + return __MDSPAN_PP_REMOVE_PARENS(BODY); \ + } +# else +# define __MDSPAN_DEDUCE_RETURN_TYPE_SINGLE_LINE(SIGNATURE, BODY) \ + auto __MDSPAN_PP_REMOVE_PARENS( \ + SIGNATURE) -> _CUDA_VSTD::remove_cv_t<_CUDA_VSTD::remove_reference_t> \ + { \ + return __MDSPAN_PP_REMOVE_PARENS(BODY); \ + } +# define __MDSPAN_DEDUCE_DECLTYPE_AUTO_RETURN_TYPE_SINGLE_LINE(SIGNATURE, BODY) \ + auto __MDSPAN_PP_REMOVE_PARENS(SIGNATURE) -> decltype(BODY) \ + { \ + return __MDSPAN_PP_REMOVE_PARENS(BODY); \ + } + +# endif + +// end Return type deduction }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + +# ifdef __MDSPAN_USE_FOLD_EXPRESSIONS +# define __MDSPAN_FOLD_AND(...) ((__VA_ARGS__) && ...) +# define __MDSPAN_FOLD_OR(...) ((__VA_ARGS__) || ...) +# define __MDSPAN_FOLD_ASSIGN_LEFT(__INIT, ...) (__INIT = ... = (__VA_ARGS__)) +# define __MDSPAN_FOLD_TIMES_RIGHT(__PACK, ...) (__PACK * ... * (__VA_ARGS__)) +# define __MDSPAN_FOLD_PLUS_RIGHT(__PACK, ...) (__PACK + ... + (__VA_ARGS__)) +# else + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +namespace __fold_compatibility_impl +{ + +// We could probably be more clever here, but at the (small) risk of losing some compiler understanding. For the +// few operations we need, it's not worth generalizing over the operation + +# if __MDSPAN_USE_RETURN_TYPE_DEDUCTION + +__MDSPAN_FORCE_INLINE_FUNCTION +constexpr decltype(auto) __fold_right_and_impl() +{ + return true; +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr decltype(auto) __fold_right_and_impl(_Arg&& __arg, _Args&&... __args) +{ + return ((_Arg&&) __arg) && __fold_compatibility_impl::__fold_right_and_impl((_Args&&) __args...); +} + +__MDSPAN_FORCE_INLINE_FUNCTION +constexpr decltype(auto) __fold_right_or_impl() +{ + return false; +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_right_or_impl(_Arg&& __arg, _Args&&... __args) +{ + return ((_Arg&&) __arg) || __fold_compatibility_impl::__fold_right_or_impl((_Args&&) __args...); +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_left_assign_impl(_Arg1&& __arg1) +{ + return (_Arg1&&) __arg1; +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_left_assign_impl(_Arg1&& __arg1, _Arg2&& __arg2, _Args&&... __args) +{ + return __fold_compatibility_impl::__fold_left_assign_impl( + (((_Arg1&&) __arg1) = ((_Arg2&&) __arg2)), (_Args&&) __args...); +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_right_assign_impl(_Arg1&& __arg1) +{ + return (_Arg1&&) __arg1; +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_right_assign_impl(_Arg1&& __arg1, _Arg2&& __arg2, _Args&&... __args) +{ + return ((_Arg1&&) __arg1) = + __fold_compatibility_impl::__fold_right_assign_impl((_Arg2&&) __arg2, (_Args&&) __args...); +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_right_plus_impl(_Arg1&& __arg1) +{ + return (_Arg1&&) __arg1; +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_right_plus_impl(_Arg1&& __arg1, _Arg2&& __arg2, _Args&&... __args) +{ + return ((_Arg1&&) __arg1) + __fold_compatibility_impl::__fold_right_plus_impl((_Arg2&&) __arg2, (_Args&&) __args...); +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_right_times_impl(_Arg1&& __arg1) +{ + return (_Arg1&&) __arg1; +} + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr auto __fold_right_times_impl(_Arg1&& __arg1, _Arg2&& __arg2, _Args&&... __args) +{ + return ((_Arg1&&) __arg1) * __fold_compatibility_impl::__fold_right_times_impl((_Arg2&&) __arg2, (_Args&&) __args...); +} + +# else + +//------------------------------------------------------------------------------ +// {{{2 + +template +struct __fold_right_and_impl_; +template <> +struct __fold_right_and_impl_<> +{ + using __rv = bool; + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl() noexcept + { + return true; + } +}; +template +struct __fold_right_and_impl_<_Arg, _Args...> +{ + using __next_t = __fold_right_and_impl_<_Args...>; + using __rv = decltype(_CUDA_VSTD::declval<_Arg>() && _CUDA_VSTD::declval()); + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg&& __arg, _Args&&... __args) noexcept + { + return ((_Arg&&) __arg) && __next_t::__impl((_Args&&) __args...); + } +}; + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr typename __fold_right_and_impl_<_Args...>::__rv +__fold_right_and_impl(_Args&&... __args) +{ + return __fold_right_and_impl_<_Args...>::__impl((_Args&&) __args...); +} + +// end right and }}}2 +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// {{{2 + +template +struct __fold_right_or_impl_; +template <> +struct __fold_right_or_impl_<> +{ + using __rv = bool; + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl() noexcept + { + return false; + } +}; +template +struct __fold_right_or_impl_<_Arg, _Args...> +{ + using __next_t = __fold_right_or_impl_<_Args...>; + using __rv = decltype(_CUDA_VSTD::declval<_Arg>() || _CUDA_VSTD::declval()); + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg&& __arg, _Args&&... __args) noexcept + { + return ((_Arg&&) __arg) || __next_t::__impl((_Args&&) __args...); + } +}; + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr typename __fold_right_or_impl_<_Args...>::__rv +__fold_right_or_impl(_Args&&... __args) +{ + return __fold_right_or_impl_<_Args...>::__impl((_Args&&) __args...); +} + +// end right or }}}2 +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// {{{2 + +template +struct __fold_right_plus_impl_; +template +struct __fold_right_plus_impl_<_Arg> +{ + using __rv = _Arg&&; + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg&& __arg) noexcept + { + return (_Arg&&) __arg; + } +}; +template +struct __fold_right_plus_impl_<_Arg1, _Arg2, _Args...> +{ + using __next_t = __fold_right_plus_impl_<_Arg2, _Args...>; + using __rv = decltype(_CUDA_VSTD::declval<_Arg1>() + _CUDA_VSTD::declval()); + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg1&& __arg, _Arg2&& __arg2, _Args&&... __args) noexcept + { + return ((_Arg1&&) __arg) + __next_t::__impl((_Arg2&&) __arg2, (_Args&&) __args...); + } +}; + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr typename __fold_right_plus_impl_<_Args...>::__rv +__fold_right_plus_impl(_Args&&... __args) +{ + return __fold_right_plus_impl_<_Args...>::__impl((_Args&&) __args...); +} + +// end right plus }}}2 +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// {{{2 + +template +struct __fold_right_times_impl_; +template +struct __fold_right_times_impl_<_Arg> +{ + using __rv = _Arg&&; + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg&& __arg) noexcept + { + return (_Arg&&) __arg; + } +}; +template +struct __fold_right_times_impl_<_Arg1, _Arg2, _Args...> +{ + using __next_t = __fold_right_times_impl_<_Arg2, _Args...>; + using __rv = decltype(_CUDA_VSTD::declval<_Arg1>() * _CUDA_VSTD::declval()); + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg1&& __arg, _Arg2&& __arg2, _Args&&... __args) noexcept + { + return ((_Arg1&&) __arg) * __next_t::__impl((_Arg2&&) __arg2, (_Args&&) __args...); + } +}; + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr typename __fold_right_times_impl_<_Args...>::__rv +__fold_right_times_impl(_Args&&... __args) +{ + return __fold_right_times_impl_<_Args...>::__impl((_Args&&) __args...); +} + +// end right times }}}2 +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// {{{2 + +template +struct __fold_right_assign_impl_; +template +struct __fold_right_assign_impl_<_Arg> +{ + using __rv = _Arg&&; + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg&& __arg) noexcept + { + return (_Arg&&) __arg; + } +}; +template +struct __fold_right_assign_impl_<_Arg1, _Arg2, _Args...> +{ + using __next_t = __fold_right_assign_impl_<_Arg2, _Args...>; + using __rv = decltype(_CUDA_VSTD::declval<_Arg1>() = _CUDA_VSTD::declval()); + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg1&& __arg, _Arg2&& __arg2, _Args&&... __args) noexcept + { + return ((_Arg1&&) __arg) = __next_t::__impl((_Arg2&&) __arg2, (_Args&&) __args...); + } +}; + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr typename __fold_right_assign_impl_<_Args...>::__rv +__fold_right_assign_impl(_Args&&... __args) +{ + return __fold_right_assign_impl_<_Args...>::__impl((_Args&&) __args...); +} + +// end right assign }}}2 +//------------------------------------------------------------------------------ + +//------------------------------------------------------------------------------ +// {{{2 + +template +struct __fold_left_assign_impl_; +template +struct __fold_left_assign_impl_<_Arg> +{ + using __rv = _Arg&&; + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg&& __arg) noexcept + { + return (_Arg&&) __arg; + } +}; +template +struct __fold_left_assign_impl_<_Arg1, _Arg2, _Args...> +{ + using __assign_result_t = decltype(_CUDA_VSTD::declval<_Arg1>() = _CUDA_VSTD::declval<_Arg2>()); + using __next_t = __fold_left_assign_impl_<__assign_result_t, _Args...>; + using __rv = typename __next_t::__rv; + __MDSPAN_FORCE_INLINE_FUNCTION + static constexpr __rv __impl(_Arg1&& __arg, _Arg2&& __arg2, _Args&&... __args) noexcept + { + return __next_t::__impl(((_Arg1&&) __arg) = (_Arg2&&) __arg2, (_Args&&) __args...); + } +}; + +template +__MDSPAN_FORCE_INLINE_FUNCTION constexpr typename __fold_left_assign_impl_<_Args...>::__rv +__fold_left_assign_impl(_Args&&... __args) +{ + return __fold_left_assign_impl_<_Args...>::__impl((_Args&&) __args...); +} + +// end left assign }}}2 +//------------------------------------------------------------------------------ + +# endif + +template +struct __bools; + +} // namespace __fold_compatibility_impl + +_LIBCUDACXX_END_NAMESPACE_STD + +# define __MDSPAN_FOLD_AND(...) _CUDA_VSTD::__fold_compatibility_impl::__fold_right_and_impl((__VA_ARGS__)...) +# define __MDSPAN_FOLD_OR(...) _CUDA_VSTD::__fold_compatibility_impl::__fold_right_or_impl((__VA_ARGS__)...) +# define __MDSPAN_FOLD_ASSIGN_LEFT(__INIT, ...) \ + _CUDA_VSTD::__fold_compatibility_impl::__fold_left_assign_impl(__INIT, (__VA_ARGS__)...) +# define __MDSPAN_FOLD_TIMES_RIGHT(__PACK, ...) \ + _CUDA_VSTD::__fold_compatibility_impl::__fold_right_times_impl((__PACK)..., __VA_ARGS__) +# define __MDSPAN_FOLD_PLUS_RIGHT(__PACK, ...) \ + _CUDA_VSTD::__fold_compatibility_impl::__fold_right_plus_impl((__PACK)..., __VA_ARGS__) + +# endif + +// end Variable template compatibility }}}1 +//============================================================================== + +//============================================================================== +// {{{1 + +# if __MDSPAN_USE_CONSTEXPR_14 +// Workaround for a bug (I think?) in EDG frontends +# ifdef __EDG__ +# define __MDSPAN_CONSTEXPR_14_DEFAULTED +# else +# define __MDSPAN_CONSTEXPR_14_DEFAULTED constexpr +# endif +# else +# define __MDSPAN_CONSTEXPR_14_DEFAULTED +# endif + +// end Pre-C++14 constexpr }}}1 +//============================================================================== + +#endif // _CCCL_STD_VER > 2011 + +#ifndef _CCCL_NO_EXCEPTIONS +# define _LIBCUDACXX_THROW_RUNTIME_ERROR(_COND, _MESSAGE) \ + if (!(_COND)) \ + __throw_runtime_error(_MESSAGE) +#else // ^^^ !_CCCL_NO_EXCEPTIONS ^^^ / vvv _CCCL_NO_EXCEPTIONS vvv +# define _LIBCUDACXX_THROW_RUNTIME_ERROR(_COND, _MESSAGE) _CCCL_ASSERT(_COND, _MESSAGE) +#endif // _CCCL_NO_EXCEPTIONS + +#endif // _LIBCUDACXX___MDSPAN_MACROS_HPP diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/maybe_static_value.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/maybe_static_value.h new file mode 100644 index 0000000000000000000000000000000000000000..fd978c6c3f8e66832aff6a368b9f444167e95571 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/maybe_static_value.h @@ -0,0 +1,165 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2019) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Christian R. Trott (crtrott@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef _LIBCUDACXX___MDSPAN_MAYBE_STATIC_VALUE_HPP +#define _LIBCUDACXX___MDSPAN_MAYBE_STATIC_VALUE_HPP + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#ifdef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS +# include +#endif // _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS + +// This is only needed for the non-standard-layout version of partially +// static array. +// Needs to be after the includes above to work with the single header generator +#if !__MDSPAN_PRESERVE_STANDARD_LAYOUT + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +# if _CCCL_STD_VER > 2011 + +//============================================================================== + +namespace __detail +{ + +// static case +template +struct __maybe_static_value +{ + static constexpr _static_t __static_value = __v; + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _dynamic_t __value() const noexcept + { + return static_cast<_dynamic_t>(__v); + } + template + __MDSPAN_FORCE_INLINE_FUNCTION constexpr void __set_value(_Up&& /*__rhs*/) noexcept + { + // Should we assert that the value matches the static value here? + } + + //-------------------------------------------------------------------------- + + _CCCL_HIDE_FROM_ABI constexpr __maybe_static_value() noexcept = default; + _CCCL_HIDE_FROM_ABI constexpr __maybe_static_value(__maybe_static_value const&) noexcept = default; + _CCCL_HIDE_FROM_ABI constexpr __maybe_static_value(__maybe_static_value&&) noexcept = default; + _CCCL_HIDE_FROM_ABI __MDSPAN_CONSTEXPR_14_DEFAULTED __maybe_static_value& + operator=(__maybe_static_value const&) noexcept = default; + _CCCL_HIDE_FROM_ABI __MDSPAN_CONSTEXPR_14_DEFAULTED __maybe_static_value& + operator=(__maybe_static_value&&) noexcept = default; + _CCCL_HIDE_FROM_ABI ~__maybe_static_value() noexcept = default; + + _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit __maybe_static_value(_dynamic_t const&) noexcept + { + // Should we assert that the value matches the static value here? + } + + //-------------------------------------------------------------------------- +}; + +// dynamic case +template +struct __maybe_static_value<_dynamic_t, _static_t, __is_dynamic_sentinal, __is_dynamic_sentinal, __array_entry_index> +# ifdef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS + : __no_unique_address_emulation<_Tp> +# endif +{ + static constexpr _static_t __static_value = __is_dynamic_sentinal; +# ifndef _CCCL_HAS_NO_ATTRIBUTE_NO_UNIQUE_ADDRESS + _CCCL_NO_UNIQUE_ADDRESS _dynamic_t __v = {}; + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _dynamic_t __value() const noexcept + { + return __v; + } + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _dynamic_t& __ref() noexcept + { + return __v; + } + template + __MDSPAN_FORCE_INLINE_FUNCTION constexpr void __set_value(_Up&& __rhs) noexcept + { + __v = (_Up&&) rhs; + } +# else + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _dynamic_t __value() const noexcept + { + return this->__no_unique_address_emulation<_dynamic_t>::__ref(); + } + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _dynamic_t& __ref() noexcept + { + return this->__no_unique_address_emulation<_dynamic_t>::__ref(); + } + template + __MDSPAN_FORCE_INLINE_FUNCTION constexpr void __set_value(_Up&& __rhs) noexcept + { + this->__no_unique_address_emulation<_dynamic_t>::__ref() = (_Up&&) __rhs; + } +# endif +}; + +} // namespace __detail + +//============================================================================== + +# endif // _CCCL_STD_VER > 2011 + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // !__MDSPAN_PRESERVE_STANDARD_LAYOUT + +#endif // _LIBCUDACXX___MDSPAN_MAYBE_STATIC_VALUE_HPP diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/no_unique_address.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/no_unique_address.h new file mode 100644 index 0000000000000000000000000000000000000000..8d0d315b123111e1fab2baaad6017a5033fe9e94 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__mdspan/no_unique_address.h @@ -0,0 +1,149 @@ +/* +//@HEADER +// ************************************************************************ +// +// Kokkos v. 2.0 +// Copyright (2019) Sandia Corporation +// +// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, +// the U.S. Government retains certain rights in this software. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// 3. Neither the name of the Corporation nor the names of the +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY +// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Questions? Contact Christian R. Trott (crtrott@sandia.gov) +// +// ************************************************************************ +//@HEADER +*/ + +#ifndef _LIBCUDACXX__LIBCUDACXX_NO_UNIQUE_ADDRESS_HPP +#define _LIBCUDACXX__LIBCUDACXX_NO_UNIQUE_ADDRESS_HPP + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +#if _CCCL_STD_VER > 2011 + +namespace __detail +{ + +//============================================================================== + +template +struct __no_unique_address_emulation +{ + using __stored_type = _Tp; + _Tp __v; + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _Tp const& __ref() const noexcept + { + return __v; + } + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _Tp& __ref() noexcept + { + return __v; + } +}; + +// Empty case +// This doesn't work if _Tp is final, of course, but we're not using anything +// like that currently. That kind of thing could be added pretty easily though +template +struct __no_unique_address_emulation<_Tp, + _Disambiguator, + _CUDA_VSTD::enable_if_t<_CCCL_TRAIT(_CUDA_VSTD::is_empty, _Tp) && + // If the type isn't trivially destructible, its destructor + // won't be called at the right time, so don't use this + // specialization + _CCCL_TRAIT(_CUDA_VSTD::is_trivially_destructible, _Tp)>> + : +# ifdef __MDSPAN_COMPILER_MSVC + // MSVC doesn't allow you to access public static member functions of a type + // when you *happen* to privately inherit from that type. + protected +# else + // But we still want this to be private if possible so that we don't accidentally + // access members of _Tp directly rather than calling __ref() first, which wouldn't + // work if _Tp happens to be stateful and thus we're using the unspecialized definition + // of __no_unique_address_emulation above. + private +# endif + _Tp +{ + using __stored_type = _Tp; + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _Tp const& __ref() const noexcept + { + return *static_cast<_Tp const*>(this); + } + __MDSPAN_FORCE_INLINE_FUNCTION constexpr _Tp& __ref() noexcept + { + return *static_cast<_Tp*>(this); + } + + _CCCL_HIDE_FROM_ABI constexpr __no_unique_address_emulation() noexcept = default; + _CCCL_HIDE_FROM_ABI constexpr __no_unique_address_emulation(__no_unique_address_emulation const&) noexcept = default; + _CCCL_HIDE_FROM_ABI constexpr __no_unique_address_emulation(__no_unique_address_emulation&&) noexcept = default; + _CCCL_HIDE_FROM_ABI __MDSPAN_CONSTEXPR_14_DEFAULTED __no_unique_address_emulation& + operator=(__no_unique_address_emulation const&) noexcept = default; + _CCCL_HIDE_FROM_ABI __MDSPAN_CONSTEXPR_14_DEFAULTED __no_unique_address_emulation& + operator=(__no_unique_address_emulation&&) noexcept = default; + _CCCL_HIDE_FROM_ABI ~__no_unique_address_emulation() noexcept = default; + + // Explicitly make this not a reference so that the copy or move + // constructor still gets called. + _LIBCUDACXX_HIDE_FROM_ABI explicit constexpr __no_unique_address_emulation(_Tp const& __v) noexcept + : _Tp(__v) + {} + _LIBCUDACXX_HIDE_FROM_ABI explicit constexpr __no_unique_address_emulation(_Tp&& __v) noexcept + : _Tp(_CUDA_VSTD::move(__v)) + {} +}; + +//============================================================================== + +} // end namespace __detail + +#endif // _CCCL_STD_VER > 2011 + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX__LIBCUDACXX_NO_UNIQUE_ADDRESS_HPP diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/access.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/access.h new file mode 100644 index 0000000000000000000000000000000000000000..c6ba238ea4113cbc2842e593d1223598c20ec883 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/access.h @@ -0,0 +1,302 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_ACCESS_H +#define _LIBCUDACXX___RANGES_ACCESS_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2014 + +template +_CCCL_CONCEPT __can_borrow = is_lvalue_reference_v<_Tp> || enable_borrowed_range>; + +// [range.access.begin] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__begin) +template +void begin(_Tp&) = delete; +template +void begin(const _Tp&) = delete; + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __member_begin = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { + { _LIBCUDACXX_AUTO_CAST(__t.begin()) } -> input_or_output_iterator; +}; + +template +concept __unqualified_begin = + !__member_begin<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { + { _LIBCUDACXX_AUTO_CAST(begin(__t)) } -> input_or_output_iterator; + }; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT( + __member_begin_, + requires(_Tp&& __t)(requires(__can_borrow<_Tp>), + requires(__workaround_52970<_Tp>), + requires(input_or_output_iterator))); + +template +_CCCL_CONCEPT __member_begin = _CCCL_FRAGMENT(__member_begin_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __unqualified_begin_, + requires(_Tp&& __t)(requires(!__member_begin<_Tp>), + requires(__can_borrow<_Tp>), + requires(__class_or_enum>), + requires(input_or_output_iterator))); + +template +_CCCL_CONCEPT __unqualified_begin = _CCCL_FRAGMENT(__unqualified_begin_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +struct __fn +{ + // This has been made valid as a defect report for C++17 onwards, however gcc below 11.0 does not implement it +# if (!_CCCL_COMPILER(GCC) || _CCCL_COMPILER(GCC, >=, 11)) + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES((sizeof(_Tp) >= 0)) // Disallow incomplete element types. + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[]) const noexcept + { + return __t + 0; + } +# endif // (!_CCCL_COMPILER(GCC) || _CCCL_COMPILER(GCC, >=, 11)) + + _CCCL_TEMPLATE(class _Tp, size_t _Np) + _CCCL_REQUIRES((sizeof(_Tp) >= 0)) // Disallow incomplete element types. + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept + { + return __t + 0; + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__member_begin<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.begin()))) + { + return _LIBCUDACXX_AUTO_CAST(__t.begin()); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__unqualified_begin<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(begin(__t)))) + { + return _LIBCUDACXX_AUTO_CAST(begin(__t)); + } + + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES((!__member_begin<_Tp>) _CCCL_AND(!__unqualified_begin<_Tp>)) + void operator()(_Tp&&) const = delete; + +# if _CCCL_COMPILER(MSVC, <, 19, 23) + template + void operator()(_Tp (&&)[]) const = delete; + + template + void operator()(_Tp (&&)[_Np]) const = delete; +# endif // _CCCL_COMPILER(MSVC, <, 19, 23) +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto begin = __begin::__fn{}; +} // namespace __cpo + +// [range.range] + +template +using iterator_t = decltype(_CUDA_VRANGES::begin(_CUDA_VSTD::declval<_Tp&>())); + +// [range.access.end] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__end) +template +void end(_Tp&) = delete; +template +void end(const _Tp&) = delete; + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __member_end = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { + typename iterator_t<_Tp>; + { _LIBCUDACXX_AUTO_CAST(__t.end()) } -> sentinel_for>; +}; + +template +concept __unqualified_end = + !__member_end<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { + typename iterator_t<_Tp>; + { _LIBCUDACXX_AUTO_CAST(end(__t)) } -> sentinel_for>; + }; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT( + __member_end_, + requires(_Tp&& __t)(requires(__can_borrow<_Tp>), + requires(__workaround_52970<_Tp>), + typename(iterator_t<_Tp>), + requires(sentinel_for>))); + +template +_CCCL_CONCEPT __member_end = _CCCL_FRAGMENT(__member_end_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __unqualified_end_, + requires(_Tp&& __t)(requires(!__member_end<_Tp>), + requires(__can_borrow<_Tp>), + requires(__class_or_enum>), + typename(iterator_t<_Tp>), + requires(sentinel_for>))); + +template +_CCCL_CONCEPT __unqualified_end = _CCCL_FRAGMENT(__unqualified_end_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +struct __fn +{ + _CCCL_TEMPLATE(class _Tp, size_t _Np) + _CCCL_REQUIRES((sizeof(_Tp) >= 0)) // Disallow incomplete element types. + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept + { + return __t + _Np; + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__member_end<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.end()))) + { + return _LIBCUDACXX_AUTO_CAST(__t.end()); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__unqualified_end<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(end(__t)))) + { + return _LIBCUDACXX_AUTO_CAST(end(__t)); + } + + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES((!__member_end<_Tp>) _CCCL_AND(!__unqualified_end<_Tp>)) + void operator()(_Tp&&) const = delete; + +# if _CCCL_COMPILER(MSVC, <, 19, 23) + template + void operator()(_Tp (&&)[]) const = delete; + + template + void operator()(_Tp (&&)[_Np]) const = delete; +# endif // _CCCL_COMPILER(MSVC, <, 19, 23) +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto end = __end::__fn{}; +} // namespace __cpo + +// [range.access.cbegin] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__cbegin) +struct __fn +{ + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_lvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::begin(static_cast&>(__t)))) + -> decltype(_CUDA_VRANGES::begin(static_cast&>(__t))) + { + return _CUDA_VRANGES::begin(static_cast&>(__t)); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_rvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::begin(static_cast(__t)))) + -> decltype(_CUDA_VRANGES::begin(static_cast(__t))) + { + return _CUDA_VRANGES::begin(static_cast(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto cbegin = __cbegin::__fn{}; +} // namespace __cpo + +// [range.access.cend] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__cend) +struct __fn +{ + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_lvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::end(static_cast&>(__t)))) + -> decltype(_CUDA_VRANGES::end(static_cast&>(__t))) + { + return _CUDA_VRANGES::end(static_cast&>(__t)); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_rvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(noexcept( + _CUDA_VRANGES::end(static_cast(__t)))) -> decltype(_CUDA_VRANGES::end(static_cast(__t))) + { + return _CUDA_VRANGES::end(static_cast(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto cend = __cend::__fn{}; +} // namespace __cpo +#endif // _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_ACCESS_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/concepts.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/concepts.h new file mode 100644 index 0000000000000000000000000000000000000000..dc4257e08187e7842e56d7cd9ba461c1e4fc2ca2 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/concepts.h @@ -0,0 +1,313 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_CONCEPTS_H +#define _LIBCUDACXX___RANGES_CONCEPTS_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2014 + +# if !defined(_CCCL_NO_CONCEPTS) + +// [range.range] + +template +concept range = requires(_Tp& __t) { + _CUDA_VRANGES::begin(__t); // sometimes equality-preserving + _CUDA_VRANGES::end(__t); +}; + +template +concept input_range = range<_Tp> && input_iterator>; + +template +concept borrowed_range = + range<_Range> && (is_lvalue_reference_v<_Range> || enable_borrowed_range>); + +// `iterator_t` defined in <__ranges/access.h> + +template +using sentinel_t = decltype(_CUDA_VRANGES::end(_CUDA_VSTD::declval<_Rp&>())); + +template +using range_difference_t = iter_difference_t>; + +template +using range_value_t = iter_value_t>; + +template +using range_reference_t = iter_reference_t>; + +template +using range_rvalue_reference_t = iter_rvalue_reference_t>; + +template +using range_common_reference_t = iter_common_reference_t>; + +// [range.sized] +template +concept sized_range = range<_Tp> && requires(_Tp& __t) { _CUDA_VRANGES::size(__t); }; + +template +using range_size_t = decltype(_CUDA_VRANGES::size(_CUDA_VSTD::declval<_Rp&>())); + +// `disable_sized_range` defined in `<__ranges/size.h>` + +// [range.view], views + +// `enable_view` defined in <__ranges/enable_view.h> +// `view_base` defined in <__ranges/enable_view.h> + +template +concept view = range<_Tp> && movable<_Tp> && enable_view<_Tp>; + +template +concept __simple_view = view<_Range> && range && same_as, iterator_t> + && same_as, sentinel_t>; + +// [range.refinements], other range refinements +template +concept output_range = range<_Rp> && output_iterator, _Tp>; + +template +concept forward_range = input_range<_Tp> && forward_iterator>; + +template +concept bidirectional_range = forward_range<_Tp> && bidirectional_iterator>; + +template +concept random_access_range = bidirectional_range<_Tp> && random_access_iterator>; + +template +concept contiguous_range = random_access_range<_Tp> && contiguous_iterator> && requires(_Tp& __t) { + { _CUDA_VRANGES::data(__t) } -> same_as>>; +}; + +template +concept common_range = range<_Tp> && same_as, sentinel_t<_Tp>>; + +template +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list = false; + +template +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list> = true; + +template +concept viewable_range = + range<_Tp> + && ((view> && constructible_from, _Tp>) + || (!view> + && (is_lvalue_reference_v<_Tp> + || (movable> && !__is_std_initializer_list>) ))); + +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +// [range.range] + +// clang-format off +template +_CCCL_CONCEPT range = + _CCCL_REQUIRES_EXPR((_Tp), _Tp& __t) + ( + void(_CUDA_VRANGES::begin(__t)), + void(_CUDA_VRANGES::end(__t)) + ); + +template +_CCCL_CONCEPT input_range = + _CCCL_REQUIRES_EXPR((_Tp)) + ( + requires(range<_Tp>), + requires(input_iterator>) + ); +// clang-format on + +template +_CCCL_CONCEPT_FRAGMENT( + __borrowed_range_, + requires()(requires(range<_Range>), + requires((is_lvalue_reference_v<_Range> || enable_borrowed_range>) ))); + +template +_CCCL_CONCEPT borrowed_range = _CCCL_FRAGMENT(__borrowed_range_, _Range); + +// `iterator_t` defined in <__ranges/access.h> + +template +using sentinel_t = enable_if_t, decltype(_CUDA_VRANGES::end(_CUDA_VSTD::declval<_Rp&>()))>; + +template +using range_difference_t = enable_if_t, iter_difference_t>>; + +template +using range_value_t = enable_if_t, iter_value_t>>; + +template +using range_reference_t = enable_if_t, iter_reference_t>>; + +template +using range_rvalue_reference_t = enable_if_t, iter_rvalue_reference_t>>; + +template +using range_common_reference_t = enable_if_t, iter_common_reference_t>>; + +// [range.sized] +template +_CCCL_CONCEPT_FRAGMENT(__sized_range_, + requires(_Tp& __t)(requires(range<_Tp>), typename(decltype(_CUDA_VRANGES::size(__t))))); + +template +_CCCL_CONCEPT sized_range = _CCCL_FRAGMENT(__sized_range_, _Tp); + +template +using range_size_t = enable_if_t, decltype(_CUDA_VRANGES::size(_CUDA_VSTD::declval<_Rp&>()))>; + +// `disable_sized_range` defined in `<__ranges/size.h>` + +// [range.view], views + +// `enable_view` defined in <__ranges/enable_view.h> +// `view_base` defined in <__ranges/enable_view.h> + +template +_CCCL_CONCEPT_FRAGMENT(__view_, requires()(requires(range<_Tp>), requires(movable<_Tp>), requires(enable_view<_Tp>))); + +template +_CCCL_CONCEPT view = _CCCL_FRAGMENT(__view_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __simple_view_, + requires()(requires(view<_Range>), + requires(range), + requires(same_as, iterator_t>), + requires(same_as, sentinel_t>))); + +template +_CCCL_CONCEPT __simple_view = _CCCL_FRAGMENT(__simple_view_, _Range); + +// [range.refinements], other range refinements +template +_CCCL_CONCEPT_FRAGMENT(__output_range_, + requires()(requires(range<_Rp>), requires(output_iterator, _Tp>))); + +template +_CCCL_CONCEPT output_range = _CCCL_FRAGMENT(__output_range_, _Rp, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT(__forward_range_, + requires()(requires(input_range<_Tp>), requires(forward_iterator>))); + +template +_CCCL_CONCEPT forward_range = _CCCL_FRAGMENT(__forward_range_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT(__bidirectional_range_, + requires()(requires(forward_range<_Tp>), requires(bidirectional_iterator>))); + +template +_CCCL_CONCEPT bidirectional_range = _CCCL_FRAGMENT(__bidirectional_range_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __random_access_range_, + requires()(requires(bidirectional_range<_Tp>), requires(random_access_iterator>))); + +template +_CCCL_CONCEPT random_access_range = _CCCL_FRAGMENT(__random_access_range_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __contiguous_range_, + requires(_Tp& __t)(requires(random_access_range<_Tp>), + requires(contiguous_iterator>), + requires(same_as>>))); + +template +_CCCL_CONCEPT contiguous_range = _CCCL_FRAGMENT(__contiguous_range_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT(__common_range_, + requires()(requires(range<_Tp>), requires(same_as, sentinel_t<_Tp>>))); + +template +_CCCL_CONCEPT common_range = _CCCL_FRAGMENT(__common_range_, _Tp); + +template +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list = false; + +template +_CCCL_INLINE_VAR constexpr bool __is_std_initializer_list> = true; + +template +_CCCL_CONCEPT_FRAGMENT( + __viewable_range_, + requires()( + requires(range<_Tp>), + requires(((view> && constructible_from, _Tp>) + || (!view> + && (is_lvalue_reference_v<_Tp> + || (movable> && !__is_std_initializer_list>) )))))); + +template +_CCCL_CONCEPT viewable_range = _CCCL_FRAGMENT(__viewable_range_, _Tp); + +# endif // _CCCL_NO_CONCEPTS + +//[container.intro.reqmts] +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __container_compatible_range = input_range<_Range> && convertible_to, _Tp>; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT( + __container_compatible_range_, + requires()(requires(input_range<_Range>), requires(convertible_to, _Tp>))); + +template +_CCCL_CONCEPT __container_compatible_range = _CCCL_FRAGMENT(__container_compatible_range_, _Range, _Tp); +# endif // _CCCL_NO_CONCEPTS + +#endif // _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_CONCEPTS_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/dangling.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/dangling.h new file mode 100644 index 0000000000000000000000000000000000000000..7e99382cb3a64d2a9ea17afa08a31f60da487333 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/dangling.h @@ -0,0 +1,54 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___RANGES_DANGLING_H +#define _LIBCUDACXX___RANGES_DANGLING_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2014 + +struct dangling +{ + _CCCL_HIDE_FROM_ABI dangling() = default; + template + _LIBCUDACXX_HIDE_FROM_ABI constexpr dangling(_Args&&...) noexcept + {} +}; + +# if _CCCL_STD_VER >= 2020 +template +using borrowed_iterator_t = _If, iterator_t<_Rp>, dangling>; +# else // ^^^ C++20 ^^^ / vvv C++17 vvv +template +using borrowed_iterator_t = enable_if_t, _If, iterator_t<_Rp>, dangling>>; +# endif // _CCCL_STD_VER <= 2017 + +// borrowed_subrange_t defined in <__ranges/subrange.h> + +#endif // _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_DANGLING_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/data.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/data.h new file mode 100644 index 0000000000000000000000000000000000000000..a9c5db6f0857e5dcd6a821df9303850d1f44fbc0 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/data.h @@ -0,0 +1,135 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_DATA_H +#define _LIBCUDACXX___RANGES_DATA_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2014 + +// [range.prim.data] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__data) + +template +_CCCL_CONCEPT __ptr_to_object = is_pointer_v<_Tp> && is_object_v>; + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __member_data = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { + { _LIBCUDACXX_AUTO_CAST(__t.data()) } -> __ptr_to_object; +}; + +template +concept __ranges_begin_invocable = !__member_data<_Tp> && __can_borrow<_Tp> && requires(_Tp&& __t) { + { _CUDA_VRANGES::begin(__t) } -> contiguous_iterator; +}; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT(__member_data_, + requires(_Tp&& __t)(requires(__can_borrow<_Tp>), + requires(__workaround_52970<_Tp>), + requires(__ptr_to_object))); + +template +_CCCL_CONCEPT __member_data = _CCCL_FRAGMENT(__member_data_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT(__ranges_begin_invocable_, + requires(_Tp&& __t)(requires(!__member_data<_Tp>), + requires(__can_borrow<_Tp>), + requires(contiguous_iterator))); + +template +_CCCL_CONCEPT __ranges_begin_invocable = _CCCL_FRAGMENT(__ranges_begin_invocable_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +struct __fn +{ + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__member_data<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(noexcept(__t.data())) + { + return __t.data(); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__ranges_begin_invocable<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VSTD::to_address(_CUDA_VRANGES::begin(__t)))) + { + return _CUDA_VSTD::to_address(_CUDA_VRANGES::begin(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto data = __data::__fn{}; +} // namespace __cpo + +// [range.prim.cdata] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__cdata) +struct __fn +{ + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_lvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::data(static_cast&>(__t)))) + -> decltype(_CUDA_VRANGES::data(static_cast&>(__t))) + { + return _CUDA_VRANGES::data(static_cast&>(__t)); + } + + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_rvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(noexcept( + _CUDA_VRANGES::data(static_cast(__t)))) -> decltype(_CUDA_VRANGES::data(static_cast(__t))) + { + return _CUDA_VRANGES::data(static_cast(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto cdata = __cdata::__fn{}; +} // namespace __cpo + +#endif // _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_DATA_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/empty.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/empty.h new file mode 100644 index 0000000000000000000000000000000000000000..1494c18882fb9f1a3968b46497fa4b1655737410 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/empty.h @@ -0,0 +1,111 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_EMPTY_H +#define _LIBCUDACXX___RANGES_EMPTY_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +// [range.prim.empty] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__empty) + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __member_empty = __workaround_52970<_Tp> && requires(_Tp&& __t) { bool(__t.empty()); }; + +template +concept __can_invoke_size = !__member_empty<_Tp> && requires(_Tp&& __t) { _CUDA_VRANGES::size(__t); }; + +template +concept __can_compare_begin_end = !__member_empty<_Tp> && !__can_invoke_size<_Tp> && requires(_Tp&& __t) { + bool(_CUDA_VRANGES::begin(__t) == _CUDA_VRANGES::end(__t)); + { _CUDA_VRANGES::begin(__t) } -> forward_iterator; +}; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT(__member_empty_, requires(_Tp&& __t)(requires(__workaround_52970<_Tp>), (bool(__t.empty())))); + +template +_CCCL_CONCEPT __member_empty = _CCCL_FRAGMENT(__member_empty_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT(__can_invoke_size_, + requires(_Tp&& __t)(requires(!__member_empty<_Tp>), ((void) _CUDA_VRANGES::size(__t)))); + +template +_CCCL_CONCEPT __can_invoke_size = _CCCL_FRAGMENT(__can_invoke_size_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __can_compare_begin_end_, + requires(_Tp&& __t)(requires(!__member_empty<_Tp>), + requires(!__can_invoke_size<_Tp>), + (bool(_CUDA_VRANGES::begin(__t) == _CUDA_VRANGES::end(__t))), + requires(forward_iterator))); + +template +_CCCL_CONCEPT __can_compare_begin_end = _CCCL_FRAGMENT(__can_compare_begin_end_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +struct __fn +{ + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__member_empty<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const + noexcept(noexcept(bool(__t.empty()))) + { + return bool(__t.empty()); + } + + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__can_invoke_size<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::size(__t))) + { + return _CUDA_VRANGES::size(__t) == 0; + } + + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__can_compare_begin_end<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const + noexcept(noexcept(bool(_CUDA_VRANGES::begin(__t) == _CUDA_VRANGES::end(__t)))) + { + return _CUDA_VRANGES::begin(__t) == _CUDA_VRANGES::end(__t); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto empty = __empty::__fn{}; +} // namespace __cpo + +#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_EMPTY_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/enable_borrowed_range.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/enable_borrowed_range.h new file mode 100644 index 0000000000000000000000000000000000000000..79d6c23b8daf124fbce160d184600d5d8b62b0b6 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/enable_borrowed_range.h @@ -0,0 +1,41 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___RANGES_ENABLE_BORROWED_RANGE_H +#define _LIBCUDACXX___RANGES_ENABLE_BORROWED_RANGE_H + +// These customization variables are used in and . The +// separate header is used to avoid including the entire header in +// and . + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#if _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +// [range.range], ranges + +template +_CCCL_INLINE_VAR constexpr bool enable_borrowed_range = false; + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _CCCL_STD_VER > 2014 + +#endif // _LIBCUDACXX___RANGES_ENABLE_BORROWED_RANGE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/enable_view.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/enable_view.h new file mode 100644 index 0000000000000000000000000000000000000000..315319387d27f4469bbecb280fc7605b6036386e --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/enable_view.h @@ -0,0 +1,81 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___RANGES_ENABLE_VIEW_H +#define _LIBCUDACXX___RANGES_ENABLE_VIEW_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2014 + +struct view_base +{}; + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES_ABI + +# if _CCCL_STD_VER >= 2020 + +template + requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>> +class view_interface; + +# else // ^^^ _CCCL_STD_VER >= 2020 ^^^ / vvv _CCCL_STD_VER <= 2017 vvv + +template && same_as<_Derived, remove_cv_t<_Derived>>, int> = 0> +class view_interface; + +# endif // _CCCL_STD_VER <= 2017 + +_LIBCUDACXX_END_NAMESPACE_RANGES_ABI + +_CCCL_TEMPLATE(class _Op, class _Yp) +_CCCL_REQUIRES(is_convertible_v<_Op*, view_interface<_Yp>*>) +_LIBCUDACXX_HIDE_FROM_ABI void __is_derived_from_view_interface(const _Op*, const view_interface<_Yp>*); + +# if !defined(_CCCL_NO_CONCEPTS) + +template +_CCCL_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base> || requires { + _CUDA_VRANGES::__is_derived_from_view_interface((_Tp*) nullptr, (_Tp*) nullptr); +}; + +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv + +template +_CCCL_INLINE_VAR constexpr bool enable_view = derived_from<_Tp, view_base>; + +template +_CCCL_INLINE_VAR constexpr bool + enable_view<_Tp, void_t> = + true; +# endif // _CCCL_NO_CONCEPTS + +#endif // _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_ENABLE_VIEW_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/from_range.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/from_range.h new file mode 100644 index 0000000000000000000000000000000000000000..f42053aeacfecab986ffcd1b4f10d090ce23dc61 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/from_range.h @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// Part of libcu++, the C++ Standard Library for your entire system, +// under the Apache License v2.0 with LLVM Exceptions. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___RANGES_FROM_RANGE_H +#define _LIBCUDACXX___RANGES_FROM_RANGE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +struct from_range_t +{}; + +_CCCL_GLOBAL_CONSTANT from_range_t from_range{}; + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _LIBCUDACXX___RANGES_FROM_RANGE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/rbegin.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/rbegin.h new file mode 100644 index 0000000000000000000000000000000000000000..13cf76b9da9e7f8ac1605f7502b6db7a2085c45d --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/rbegin.h @@ -0,0 +1,175 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_RBEGIN_H +#define _LIBCUDACXX___RANGES_RBEGIN_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +// [ranges.access.rbegin] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__rbegin) +template +void rbegin(_Tp&) = delete; +template +void rbegin(const _Tp&) = delete; + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __member_rbegin = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { + { _LIBCUDACXX_AUTO_CAST(__t.rbegin()) } -> input_or_output_iterator; +}; + +template +concept __unqualified_rbegin = + !__member_rbegin<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { + { _LIBCUDACXX_AUTO_CAST(rbegin(__t)) } -> input_or_output_iterator; + }; + +template +concept __can_reverse = + __can_borrow<_Tp> && !__member_rbegin<_Tp> && !__unqualified_rbegin<_Tp> && requires(_Tp&& __t) { + { _CUDA_VRANGES::begin(__t) } -> same_as; + { _CUDA_VRANGES::begin(__t) } -> bidirectional_iterator; + }; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT( + __member_rbegin_, + requires(_Tp&& __t)(requires(__can_borrow<_Tp>), + requires(__workaround_52970<_Tp>), + requires(input_or_output_iterator))); + +template +_CCCL_CONCEPT __member_rbegin = _CCCL_FRAGMENT(__member_rbegin_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __unqualified_rbegin_, + requires(_Tp&& __t)(requires(!__member_rbegin<_Tp>), + requires(__can_borrow<_Tp>), + requires(__class_or_enum>), + requires(input_or_output_iterator))); + +template +_CCCL_CONCEPT __unqualified_rbegin = _CCCL_FRAGMENT(__unqualified_rbegin_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __can_reverse_, + requires(_Tp&& __t)(requires(__can_borrow<_Tp>), + requires(!__member_rbegin<_Tp>), + requires(!__unqualified_rbegin<_Tp>), + requires(same_as), + requires(bidirectional_iterator))); + +template +_CCCL_CONCEPT __can_reverse = _CCCL_FRAGMENT(__can_reverse_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +struct __fn +{ + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__member_rbegin<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.rbegin()))) + { + return _LIBCUDACXX_AUTO_CAST(__t.rbegin()); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__unqualified_rbegin<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(rbegin(__t)))) + { + return _LIBCUDACXX_AUTO_CAST(rbegin(__t)); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__can_reverse<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::end(__t))) + { + return _CUDA_VSTD::make_reverse_iterator(_CUDA_VRANGES::end(__t)); + } + + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES((!__member_rbegin<_Tp> && !__unqualified_rbegin<_Tp> && !__can_reverse<_Tp>) ) + void operator()(_Tp&&) const = delete; +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto rbegin = __rbegin::__fn{}; +} // namespace __cpo + +// [range.access.crbegin] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__crbegin) +struct __fn +{ + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_lvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::rbegin(static_cast&>(__t)))) + -> decltype(_CUDA_VRANGES::rbegin(static_cast&>(__t))) + { + return _CUDA_VRANGES::rbegin(static_cast&>(__t)); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_rvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::rbegin(static_cast(__t)))) + -> decltype(_CUDA_VRANGES::rbegin(static_cast(__t))) + { + return _CUDA_VRANGES::rbegin(static_cast(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto crbegin = __crbegin::__fn{}; +} // namespace __cpo + +#endif // _CCCL_STD_VER >= 2017 && && !_CCCL_COMPILER(MSVC2017) + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_RBEGIN_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/rend.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/rend.h new file mode 100644 index 0000000000000000000000000000000000000000..3f21c323eba60043d69d8f12b5523b7730b2122a --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/rend.h @@ -0,0 +1,181 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2023 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_REND_H +#define _LIBCUDACXX___RANGES_REND_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +// [range.access.rend] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__rend) +template +void rend(_Tp&) = delete; +template +void rend(const _Tp&) = delete; + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __member_rend = __can_borrow<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { + _CUDA_VRANGES::rbegin(__t); + { _LIBCUDACXX_AUTO_CAST(__t.rend()) } -> sentinel_for; +}; + +template +concept __unqualified_rend = + !__member_rend<_Tp> && __can_borrow<_Tp> && __class_or_enum> && requires(_Tp&& __t) { + _CUDA_VRANGES::rbegin(__t); + { _LIBCUDACXX_AUTO_CAST(rend(__t)) } -> sentinel_for; + }; + +template +concept __can_reverse = __can_borrow<_Tp> && !__member_rend<_Tp> && !__unqualified_rend<_Tp> && requires(_Tp&& __t) { + { _CUDA_VRANGES::begin(__t) } -> same_as; + { _CUDA_VRANGES::begin(__t) } -> bidirectional_iterator; +}; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT( + __member_rend_, + requires(_Tp&& __t)( + requires(__can_borrow<_Tp>), + requires(__workaround_52970<_Tp>), + typename(decltype(_CUDA_VRANGES::rbegin(__t))), + requires(sentinel_for))); + +template +_CCCL_CONCEPT __member_rend = _CCCL_FRAGMENT(__member_rend_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __unqualified_rend_, + requires(_Tp&& __t)( + requires(!__member_rend<_Tp>), + requires(__can_borrow<_Tp>), + requires(__class_or_enum>), + typename(decltype(_CUDA_VRANGES::rbegin(__t))), + requires(sentinel_for))); + +template +_CCCL_CONCEPT __unqualified_rend = _CCCL_FRAGMENT(__unqualified_rend_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __can_reverse_, + requires(_Tp&& __t)(requires(!__member_rend<_Tp>), + requires(!__unqualified_rend<_Tp>), + requires(__can_borrow<_Tp>), + requires(same_as), + requires(bidirectional_iterator))); + +template +_CCCL_CONCEPT __can_reverse = _CCCL_FRAGMENT(__can_reverse_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +class __fn +{ +public: + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__member_rend<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.rend()))) + { + return _LIBCUDACXX_AUTO_CAST(__t.rend()); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__unqualified_rend<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(rend(__t)))) + { + return _LIBCUDACXX_AUTO_CAST(rend(__t)); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__can_reverse<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::begin(__t))) + { + return _CUDA_VSTD::make_reverse_iterator(_CUDA_VRANGES::begin(__t)); + } + + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES((!__member_rend<_Tp> && !__unqualified_rend<_Tp> && !__can_reverse<_Tp>) ) + void operator()(_Tp&&) const = delete; +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto rend = __rend::__fn{}; +} // namespace __cpo + +// [range.access.crend] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__crend) +struct __fn +{ + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_lvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::rend(static_cast&>(__t)))) + -> decltype(_CUDA_VRANGES::rend(static_cast&>(__t))) + { + return _CUDA_VRANGES::rend(static_cast&>(__t)); + } + + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(is_rvalue_reference_v<_Tp&&>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const noexcept(noexcept( + _CUDA_VRANGES::rend(static_cast(__t)))) -> decltype(_CUDA_VRANGES::rend(static_cast(__t))) + { + return _CUDA_VRANGES::rend(static_cast(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto crend = __crend::__fn{}; +} // namespace __cpo + +#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_REND_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/size.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/size.h new file mode 100644 index 0000000000000000000000000000000000000000..92d41a62052c73cbedfab4cd256054c37d018494 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/size.h @@ -0,0 +1,200 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_SIZE_H +#define _LIBCUDACXX___RANGES_SIZE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2014 + +template +_CCCL_INLINE_VAR constexpr bool disable_sized_range = false; + +// [range.prim.size] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__size) +template +void size(_Tp&) = delete; +template +void size(const _Tp&) = delete; + +template +_CCCL_CONCEPT __size_enabled = !disable_sized_range>; + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __member_size = __size_enabled<_Tp> && __workaround_52970<_Tp> && requires(_Tp&& __t) { + { _LIBCUDACXX_AUTO_CAST(__t.size()) } -> __integer_like; +}; + +template +concept __unqualified_size = + __size_enabled<_Tp> && !__member_size<_Tp> && __class_or_enum> && requires(_Tp&& __t) { + { _LIBCUDACXX_AUTO_CAST(size(__t)) } -> __integer_like; + }; + +template +concept __difference = + !__member_size<_Tp> && !__unqualified_size<_Tp> && __class_or_enum> && requires(_Tp&& __t) { + { _CUDA_VRANGES::begin(__t) } -> forward_iterator; + { _CUDA_VRANGES::end(__t) } -> sized_sentinel_for()))>; + }; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT(__member_size_, + requires(_Tp&& __t)(requires(__size_enabled<_Tp>), + requires(__workaround_52970<_Tp>), + requires(__integer_like))); + +template +_CCCL_CONCEPT __member_size = _CCCL_FRAGMENT(__member_size_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __unqualified_size_, + requires(_Tp&& __t)(requires(__size_enabled<_Tp>), + requires(!__member_size<_Tp>), + requires(__class_or_enum>), + requires(__integer_like))); + +template +_CCCL_CONCEPT __unqualified_size = _CCCL_FRAGMENT(__unqualified_size_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __difference_, + requires(_Tp&& __t)(requires(!__member_size<_Tp>), + requires(!__unqualified_size<_Tp>), + requires(__class_or_enum>), + requires(forward_iterator), + requires(sized_sentinel_for()))>))); + +template +_CCCL_CONCEPT __difference = _CCCL_FRAGMENT(__difference_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +struct __fn +{ + // `[range.prim.size]`: the array case (for rvalues). + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&&)[_Sz]) const noexcept + { + return _Sz; + } + + // `[range.prim.size]`: the array case (for lvalues). + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&)[_Sz]) const noexcept + { + return _Sz; + } + + // `[range.prim.size]`: `auto(t.size())` is a valid expression. + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__member_size<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.size()))) + { + return _LIBCUDACXX_AUTO_CAST(__t.size()); + } + + // `[range.prim.size]`: `auto(size(t))` is a valid expression. + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__unqualified_size<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(size(__t)))) + { + return _LIBCUDACXX_AUTO_CAST(size(__t)); + } + + // [range.prim.size]: the `to-unsigned-like` case. + _CCCL_EXEC_CHECK_DISABLE + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__difference<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VSTD::__to_unsigned_like(_CUDA_VRANGES::end(__t) - _CUDA_VRANGES::begin(__t)))) + -> decltype(_CUDA_VSTD::__to_unsigned_like(_CUDA_VRANGES::end(__t) - _CUDA_VRANGES::begin(__t))) + { + return _CUDA_VSTD::__to_unsigned_like(_CUDA_VRANGES::end(__t) - _CUDA_VRANGES::begin(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto size = __size::__fn{}; +} // namespace __cpo + +// [range.prim.ssize] + +_LIBCUDACXX_BEGIN_NAMESPACE_CPO(__ssize) +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __can_ssize = requires(_Tp&& __t) { _CUDA_VRANGES::size(__t); }; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT(__can_ssize_, + requires(_Tp&& __t)(requires(!is_unbounded_array_v<_Tp>), ((void) _CUDA_VRANGES::size(__t)))); + +template +_CCCL_CONCEPT __can_ssize = _CCCL_FRAGMENT(__can_ssize_, _Tp); +# endif // _CCCL_STD_VER <= 2017 + +struct __fn +{ + _CCCL_TEMPLATE(class _Tp) + _CCCL_REQUIRES(__can_ssize<_Tp>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const + noexcept(noexcept(_CUDA_VRANGES::size(__t))) + { + using _Signed = make_signed_t; + using _Result = conditional_t<(sizeof(ptrdiff_t) > sizeof(_Signed)), ptrdiff_t, _Signed>; + return static_cast<_Result>(_CUDA_VRANGES::size(__t)); + } +}; +_LIBCUDACXX_END_NAMESPACE_CPO + +inline namespace __cpo +{ +_CCCL_GLOBAL_CONSTANT auto ssize = __ssize::__fn{}; +} // namespace __cpo + +#endif // _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_SIZE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/subrange.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/subrange.h new file mode 100644 index 0000000000000000000000000000000000000000..484ce8c1f467c93fe07073dabd26fd4d9603e7ab --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/subrange.h @@ -0,0 +1,519 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_SUBRANGE_H +#define _LIBCUDACXX___RANGES_SUBRANGE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +// MSVC complains about [[msvc::no_unique_address]] prior to C++20 as a vendor extension +_CCCL_DIAG_PUSH +_CCCL_DIAG_SUPPRESS_MSVC(4848) + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES_ABI + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __uses_nonqualification_pointer_conversion = + is_pointer_v<_From> && is_pointer_v<_To> + && !convertible_to (*)[], remove_pointer_t<_To> (*)[]>; + +template +concept __convertible_to_non_slicing = + convertible_to<_From, _To> && !__uses_nonqualification_pointer_conversion, decay_t<_To>>; + +template +concept __pair_like = !is_reference_v<_Tp> && requires(_Tp __t) { + typename tuple_size<_Tp>::type; // Ensures `tuple_size` is complete. + requires derived_from, integral_constant>; + typename tuple_element_t<0, remove_const_t<_Tp>>; + typename tuple_element_t<1, remove_const_t<_Tp>>; + { _CUDA_VSTD::get<0>(__t) } -> convertible_to&>; + { _CUDA_VSTD::get<1>(__t) } -> convertible_to&>; +}; + +template +concept __pair_like_convertible_from = + !range<_Pair> && __pair_like<_Pair> && constructible_from<_Pair, _Iter, _Sent> + && __convertible_to_non_slicing<_Iter, tuple_element_t<0, _Pair>> && convertible_to<_Sent, tuple_element_t<1, _Pair>>; + +// We have issues with MSVC and _StoreSize being unable to be properly determined in SFINAE, so we need to pull that out +template +concept __subrange_from_iter_sent = !_StoreSize && __convertible_to_non_slicing<_It, _Iter>; + +template +concept __subrange_from_iter_sent_size = _Kind == subrange_kind::sized && __convertible_to_non_slicing<_It, _Iter>; + +template +concept __subrange_from_range = + _StoreSize && __different_from<_Range, subrange<_Iter, _Sent, _Kind>> && borrowed_range<_Range> + && __convertible_to_non_slicing, _Iter> && convertible_to, _Sent>; + +template +concept __subrange_from_range_size = + _Kind == subrange_kind::sized && borrowed_range<_Range> && __convertible_to_non_slicing, _Iter> + && convertible_to, _Sent>; + +template +concept __subrange_to_pair = __different_from<_Pair, subrange<_Iter, _Sent, _Kind>> + && __pair_like_convertible_from<_Pair, const _Iter&, const _Sent&>; + +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv + +template +_CCCL_CONCEPT_FRAGMENT( + __uses_nonqualification_pointer_conversion_, + requires()(requires(is_pointer_v<_From>), + requires(is_pointer_v<_To>), + requires(!convertible_to (*)[], remove_pointer_t<_To> (*)[]>))); + +template +_CCCL_CONCEPT __uses_nonqualification_pointer_conversion = + _CCCL_FRAGMENT(__uses_nonqualification_pointer_conversion_, _From, _To); + +template +_CCCL_CONCEPT_FRAGMENT(__convertible_to_non_slicing_, + requires()(requires(convertible_to<_From, _To>), + requires(!__uses_nonqualification_pointer_conversion, decay_t<_To>>))); + +template +_CCCL_CONCEPT __convertible_to_non_slicing = _CCCL_FRAGMENT(__convertible_to_non_slicing_, _From, _To); + +// We relax the requirement on tuple_size due to a gcc issue +template +_CCCL_CONCEPT_FRAGMENT( + __pair_like_, + requires(_Tp __t)( + requires(!is_reference_v<_Tp>), + typename(typename tuple_size<_Tp>::type), + requires(tuple_size<_Tp>::value == 2), + typename(tuple_element_t<0, remove_const_t<_Tp>>), + typename(tuple_element_t<1, remove_const_t<_Tp>>), + requires(convertible_to(__t)), const tuple_element_t<0, _Tp>&>), + requires(convertible_to(__t)), const tuple_element_t<1, _Tp>&>))); + +template +_CCCL_CONCEPT __pair_like = _CCCL_FRAGMENT(__pair_like_, _Tp); + +template +_CCCL_CONCEPT_FRAGMENT( + __pair_like_convertible_from_, + requires()(requires(!range<_Pair>), + requires(__pair_like<_Pair>), + requires(constructible_from<_Pair, _Iter, _Sent>), + requires(__convertible_to_non_slicing<_Iter, tuple_element_t<0, _Pair>>), + requires(convertible_to<_Sent, tuple_element_t<1, _Pair>>))); + +template +_CCCL_CONCEPT __pair_like_convertible_from = _CCCL_FRAGMENT(__pair_like_convertible_from_, _Pair, _Iter, _Sent); + +// We have issues with MSVC and _StoreSize being unable to be properly determined in SFINAE, so we need to pull that out +template +_CCCL_CONCEPT_FRAGMENT(__subrange_from_iter_sent_, + requires()(requires(!_StoreSize::value), requires(__convertible_to_non_slicing<_It, _Iter>))); + +template +_CCCL_CONCEPT __subrange_from_iter_sent = + _CCCL_FRAGMENT(__subrange_from_iter_sent_, _Iter, _It, integral_constant); + +template +_CCCL_CONCEPT_FRAGMENT( + __subrange_from_iter_sent_size_, + requires()(requires(_Kind::value == subrange_kind::sized), requires(__convertible_to_non_slicing<_It, _Iter>))); + +template +_CCCL_CONCEPT __subrange_from_iter_sent_size = + _CCCL_FRAGMENT(__subrange_from_iter_sent_size_, _Iter, integral_constant, _It); + +template +_CCCL_CONCEPT_FRAGMENT( + __subrange_from_range_, + requires()(requires(_StoreSize::value), + requires(__different_from<_Range, subrange<_Iter, _Sent, _Kind::value>>), + requires(borrowed_range<_Range>), + requires(__convertible_to_non_slicing, _Iter>), + requires(convertible_to, _Sent>))); + +template +_CCCL_CONCEPT __subrange_from_range = _CCCL_FRAGMENT( + __subrange_from_range_, + _Iter, + _Sent, + integral_constant, + _Range, + integral_constant); + +template +_CCCL_CONCEPT_FRAGMENT( + __subrange_from_range_size_, + requires()(requires((_Kind::value == subrange_kind::sized)), + requires(borrowed_range<_Range>), + requires(__convertible_to_non_slicing, _Iter>), + requires(convertible_to, _Sent>))); + +template +_CCCL_CONCEPT __subrange_from_range_size = + _CCCL_FRAGMENT(__subrange_from_range_size_, _Iter, _Sent, integral_constant, _Range); + +template +_CCCL_CONCEPT_FRAGMENT(__subrange_to_pair_, + requires()(requires(__different_from<_Pair, subrange<_Iter, _Sent, _Kind::value>>), + requires(__pair_like_convertible_from<_Pair, const _Iter&, const _Sent&>))); + +template +_CCCL_CONCEPT __subrange_to_pair = + _CCCL_FRAGMENT(__subrange_to_pair_, _Iter, _Sent, integral_constant, _Pair); +# endif // _CCCL_NO_CONCEPTS + +# if !defined(_CCCL_NO_CONCEPTS) +template _Sent, subrange_kind _Kind> + requires(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>) +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template , int>, + enable_if_t, int>, + enable_if_t<(_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>), int>> +# endif // _CCCL_NO_CONCEPTS +class _CCCL_TYPE_VISIBILITY_DEFAULT subrange : public view_interface> +{ +public: + // Note: this is an internal implementation detail that is public only for internal usage. + static constexpr bool _StoreSize = (_Kind == subrange_kind::sized && !sized_sentinel_for<_Sent, _Iter>); + +private: + struct _Empty + { + template + _LIBCUDACXX_HIDE_FROM_ABI constexpr _Empty(_Tp) noexcept + {} + }; + using _Size = conditional_t<_StoreSize, make_unsigned_t>, _Empty>; + _CCCL_NO_UNIQUE_ADDRESS _Iter __begin_ = _Iter(); + _CCCL_NO_UNIQUE_ADDRESS _Sent __end_ = _Sent(); + _CCCL_NO_UNIQUE_ADDRESS _Size __size_ = 0; + +public: +# if !defined(_CCCL_NO_CONCEPTS) + subrange() + requires default_initializable<_Iter> + = default; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv + template , int> = 0> + _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange() noexcept(is_nothrow_default_constructible_v<_It>) + : view_interface>(){}; +# endif // _CCCL_NO_CONCEPTS + + _CCCL_TEMPLATE(class _It) + _CCCL_REQUIRES(__subrange_from_iter_sent<_Iter, _It, _StoreSize>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange(_It __iter, _Sent __sent) + : view_interface>() + , __begin_(_CUDA_VSTD::move(__iter)) + , __end_(_CUDA_VSTD::move(__sent)) + {} + + _CCCL_TEMPLATE(class _It) + _CCCL_REQUIRES(__subrange_from_iter_sent_size<_Iter, _Kind, _It>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange(_It __iter, _Sent __sent, make_unsigned_t> __n) + : view_interface>() + , __begin_(_CUDA_VSTD::move(__iter)) + , __end_(_CUDA_VSTD::move(__sent)) + , __size_(__n) + { + if constexpr (sized_sentinel_for<_Sent, _Iter>) + { + _CCCL_ASSERT((__end_ - __begin_) == static_cast>(__n), + "_CUDA_VSTD::_CUDA_VRANGES::subrange was passed an invalid size hint"); + } + } + + _CCCL_TEMPLATE(class _Range) + _CCCL_REQUIRES(__subrange_from_range<_Iter, _Sent, _Kind, _Range, !_StoreSize>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange(_Range&& __range) + : subrange(_CUDA_VRANGES::begin(__range), _CUDA_VRANGES::end(__range)) + {} + + _CCCL_TEMPLATE(class _Range) + _CCCL_REQUIRES(__subrange_from_range<_Iter, _Sent, _Kind, _Range, _StoreSize>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange(_Range&& __range) + : subrange(__range, _CUDA_VRANGES::size(__range)) + {} + + _CCCL_TEMPLATE(class _Range) + _CCCL_REQUIRES(__subrange_from_range_size<_Iter, _Sent, _Kind, _Range>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange(_Range&& __range, make_unsigned_t> __n) + : subrange(_CUDA_VRANGES::begin(__range), _CUDA_VRANGES::end(__range), __n) + {} + +# if (!_CCCL_COMPILER(GCC) || _CCCL_COMPILER(GCC, >=, 9)) + _CCCL_TEMPLATE(class _Pair) + _CCCL_REQUIRES(__pair_like<_Pair> _CCCL_AND __subrange_to_pair<_Iter, _Sent, _Kind, _Pair>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr operator _Pair() const + { + return _Pair(__begin_, __end_); + } +# endif // (!_CCCL_COMPILER(GCC) || _CCCL_COMPILER(GCC, >=, 9)) + + _CCCL_TEMPLATE(class _It = _Iter) + _CCCL_REQUIRES(copyable<_It>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _It begin() const + { + return __begin_; + } + + _CCCL_TEMPLATE(class _It = _Iter) + _CCCL_REQUIRES((!copyable<_It>) ) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _It begin() + { + return _CUDA_VSTD::move(__begin_); + } + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr _Sent end() const + { + return __end_; + } + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty() const + { + return __begin_ == __end_; + } + + _CCCL_TEMPLATE(subrange_kind _Kind_ = _Kind) + _CCCL_REQUIRES((_Kind_ == subrange_kind::sized)) + _LIBCUDACXX_HIDE_FROM_ABI constexpr make_unsigned_t> size() const + { + if constexpr (_StoreSize) + { + return __size_; + } + else + { + return _CUDA_VSTD::__to_unsigned_like(__end_ - __begin_); + } +# if _CCCL_CUDACC_BELOW(11, 3) + _CCCL_UNREACHABLE(); +# endif // _CCCL_CUDACC_BELOW(11, 3) + } + + _CCCL_TEMPLATE(class _It = _Iter) + _CCCL_REQUIRES(forward_iterator<_It>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange next(iter_difference_t<_Iter> __n = 1) const& + { + auto __tmp = *this; + __tmp.advance(__n); + return __tmp; + } + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange next(iter_difference_t<_Iter> __n = 1) && + { + advance(__n); + return _CUDA_VSTD::move(*this); + } + + _CCCL_TEMPLATE(class _It = _Iter) + _CCCL_REQUIRES(bidirectional_iterator<_It>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange prev(iter_difference_t<_Iter> __n = 1) const + { + auto __tmp = *this; + __tmp.advance(-__n); + return __tmp; + } + + _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange& advance(iter_difference_t<_Iter> __n) + { + if constexpr (bidirectional_iterator<_Iter>) + { + if (__n < 0) + { + _CUDA_VRANGES::advance(__begin_, __n); + if constexpr (_StoreSize) + { + __size_ += _CUDA_VSTD::__to_unsigned_like(-__n); + } + return *this; + } + } + + const auto __d = __n - _CUDA_VRANGES::advance(__begin_, __n, __end_); + if constexpr (_StoreSize) + { + __size_ -= _CUDA_VSTD::__to_unsigned_like(__d); + } + (void) __d; + return *this; + } +}; + +_CCCL_TEMPLATE(class _Iter, class _Sent) +_CCCL_REQUIRES(input_or_output_iterator<_Iter> _CCCL_AND sentinel_for<_Sent, _Iter>) +_CCCL_HOST_DEVICE subrange(_Iter, _Sent) -> subrange<_Iter, _Sent>; + +_CCCL_TEMPLATE(class _Iter, class _Sent) +_CCCL_REQUIRES(input_or_output_iterator<_Iter> _CCCL_AND sentinel_for<_Sent, _Iter>) +_CCCL_HOST_DEVICE +subrange(_Iter, _Sent, make_unsigned_t>) -> subrange<_Iter, _Sent, subrange_kind::sized>; + +_CCCL_TEMPLATE(class _Range) +_CCCL_REQUIRES(borrowed_range<_Range>) +_CCCL_HOST_DEVICE subrange(_Range&&) + -> subrange, + sentinel_t<_Range>, + (sized_range<_Range> || sized_sentinel_for, iterator_t<_Range>>) + ? subrange_kind::sized + : subrange_kind::unsized>; + +_CCCL_TEMPLATE(class _Range) +_CCCL_REQUIRES(borrowed_range<_Range>) +_CCCL_HOST_DEVICE subrange(_Range&&, make_unsigned_t>) + -> subrange, sentinel_t<_Range>, subrange_kind::sized>; + +_LIBCUDACXX_END_NAMESPACE_RANGES_ABI + +// Not _CCCL_TEMPLATE because we need to forward declare them +# if _CCCL_STD_VER >= 2020 +template + requires((_Index == 0) && copyable<_Iter>) || (_Index == 1) +# else // ^^^ C++20 ^^^ / vvv C++17 vvv +template ) || (_Index == 1), int>> +# endif // _CCCL_STD_VER <= 2017 +_LIBCUDACXX_HIDE_FROM_ABI constexpr auto get(const subrange<_Iter, _Sent, _Kind>& __subrange) +{ + if constexpr (_Index == 0) + { + return __subrange.begin(); + } + else + { + return __subrange.end(); + } + _CCCL_UNREACHABLE(); +} + +# if _CCCL_STD_VER >= 2020 +template + requires(_Index < 2) +# else // ^^^ C++20 ^^^ / vvv C++17 vvv +template < + size_t _Index, + class _Iter, + class _Sent, + subrange_kind _Kind, + enable_if_t<_Index<2, int>> +# endif // _CCCL_STD_VER <= 2017 +_LIBCUDACXX_HIDE_FROM_ABI constexpr auto get(subrange<_Iter, _Sent, _Kind>&& __subrange) +{ + if constexpr (_Index == 0) + { + return __subrange.begin(); + } + else + { + return __subrange.end(); + } + _CCCL_UNREACHABLE(); +} + +template +_CCCL_INLINE_VAR constexpr bool enable_borrowed_range> = true; + +template +using borrowed_subrange_t = enable_if_t, _If, subrange>, dangling>>; + +_LIBCUDACXX_END_NAMESPACE_RANGES + +// [range.subrange.general] + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +using _CUDA_VRANGES::get; + +// [ranges.syn] + +template +struct tuple_size<_CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> : integral_constant +{}; + +template +struct tuple_element<0, _CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> +{ + using type = _Ip; +}; + +template +struct tuple_element<1, _CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> +{ + using type = _Sp; +}; + +template +struct tuple_element<0, const _CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> +{ + using type = _Ip; +}; + +template +struct tuple_element<1, const _CUDA_VRANGES::subrange<_Ip, _Sp, _Kp>> +{ + using type = _Sp; +}; + +_LIBCUDACXX_END_NAMESPACE_STD + +_CCCL_DIAG_POP + +#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +#endif // _LIBCUDACXX___RANGES_SUBRANGE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/unwrap_end.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/unwrap_end.h new file mode 100644 index 0000000000000000000000000000000000000000..9e0b6636ff0ad6ed1a7b3614052495f0a45225ec --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/unwrap_end.h @@ -0,0 +1,53 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___RANGES_UNWRAP_SENTINEL_H +#define _LIBCUDACXX___RANGES_UNWRAP_SENTINEL_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +_CCCL_TEMPLATE(class _Range) +_CCCL_REQUIRES(forward_range<_Range>) +_CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator_t<_Range> __unwrap_end(_Range& __range) +{ + if constexpr (common_range<_Range>) + { + return _CUDA_VRANGES::end(__range); + } + else + { + auto __ret = _CUDA_VRANGES::begin(__range); + _CUDA_VRANGES::advance(__ret, _CUDA_VRANGES::end(__range)); + return __ret; + } + _CCCL_UNREACHABLE(); +} + +#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_UNWRAP_SENTINEL_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/view_interface.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/view_interface.h new file mode 100644 index 0000000000000000000000000000000000000000..a5055867542f457a29a84912668022a00d3f2eb7 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/view_interface.h @@ -0,0 +1,185 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// +#ifndef _LIBCUDACXX___RANGES_VIEW_INTERFACE_H +#define _LIBCUDACXX___RANGES_VIEW_INTERFACE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES + +#if _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +# if !defined(_CCCL_NO_CONCEPTS) +template +concept __can_empty = requires(_Tp& __t) { _CUDA_VRANGES::empty(__t); }; +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template +_CCCL_CONCEPT_FRAGMENT(__can_empty_, requires(_Tp& __t)(typename(decltype(_CUDA_VRANGES::empty(__t))))); + +template +_CCCL_CONCEPT __can_empty = _CCCL_FRAGMENT(__can_empty_, _Tp); +# endif // _CCCL_NO_CONCEPTS + +_LIBCUDACXX_BEGIN_NAMESPACE_RANGES_ABI + +# if !defined(_CCCL_NO_CONCEPTS) +template + requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>> +# else // ^^^ !_CCCL_NO_CONCEPTS ^^^ / vvv _CCCL_NO_CONCEPTS vvv +template && same_as<_Derived, remove_cv_t<_Derived>>, int>> +# endif // _CCCL_NO_CONCEPTS +class view_interface +{ + _LIBCUDACXX_HIDE_FROM_ABI constexpr _Derived& __derived() noexcept + { + static_assert(sizeof(_Derived) && derived_from<_Derived, view_interface> && view<_Derived>, ""); + return static_cast<_Derived&>(*this); + } + + _LIBCUDACXX_HIDE_FROM_ABI constexpr _Derived const& __derived() const noexcept + { + static_assert(sizeof(_Derived) && derived_from<_Derived, view_interface> && view<_Derived>, ""); + return static_cast<_Derived const&>(*this); + } + +public: + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(forward_range<_D2>) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty() + { + return _CUDA_VRANGES::begin(__derived()) == _CUDA_VRANGES::end(__derived()); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(forward_range) + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty() const + { + return _CUDA_VRANGES::begin(__derived()) == _CUDA_VRANGES::end(__derived()); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(__can_empty<_D2>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit operator bool() + { + return !_CUDA_VRANGES::empty(__derived()); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(__can_empty) + _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit operator bool() const + { + return !_CUDA_VRANGES::empty(__derived()); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(contiguous_iterator>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr auto data() + { + return _CUDA_VSTD::to_address(_CUDA_VRANGES::begin(__derived())); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(range _CCCL_AND contiguous_iterator>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr auto data() const + { + return _CUDA_VSTD::to_address(_CUDA_VRANGES::begin(__derived())); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(forward_range<_D2> _CCCL_AND sized_sentinel_for, iterator_t<_D2>>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr auto size() + { + return _CUDA_VSTD::__to_unsigned_like(_CUDA_VRANGES::end(__derived()) - _CUDA_VRANGES::begin(__derived())); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(forward_range _CCCL_AND sized_sentinel_for, iterator_t>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr auto size() const + { + return _CUDA_VSTD::__to_unsigned_like(_CUDA_VRANGES::end(__derived()) - _CUDA_VRANGES::begin(__derived())); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(forward_range<_D2>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr decltype(auto) front() + { + _CCCL_ASSERT(!empty(), "Precondition `!empty()` not satisfied. `.front()` called on an empty view."); + return *_CUDA_VRANGES::begin(__derived()); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(forward_range) + _LIBCUDACXX_HIDE_FROM_ABI constexpr decltype(auto) front() const + { + _CCCL_ASSERT(!empty(), "Precondition `!empty()` not satisfied. `.front()` called on an empty view."); + return *_CUDA_VRANGES::begin(__derived()); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(bidirectional_range<_D2> _CCCL_AND common_range<_D2>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr decltype(auto) back() + { + _CCCL_ASSERT(!empty(), "Precondition `!empty()` not satisfied. `.back()` called on an empty view."); + return *_CUDA_VRANGES::prev(_CUDA_VRANGES::end(__derived())); + } + + _CCCL_TEMPLATE(class _D2 = _Derived) + _CCCL_REQUIRES(bidirectional_range _CCCL_AND common_range) + _LIBCUDACXX_HIDE_FROM_ABI constexpr decltype(auto) back() const + { + _CCCL_ASSERT(!empty(), "Precondition `!empty()` not satisfied. `.back()` called on an empty view."); + return *_CUDA_VRANGES::prev(_CUDA_VRANGES::end(__derived())); + } + + _CCCL_TEMPLATE(class _RARange = _Derived) + _CCCL_REQUIRES(random_access_range<_RARange>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr decltype(auto) operator[](range_difference_t<_RARange> __index) + { + return _CUDA_VRANGES::begin(__derived())[__index]; + } + + _CCCL_TEMPLATE(class _RARange = const _Derived) + _CCCL_REQUIRES(random_access_range<_RARange>) + _LIBCUDACXX_HIDE_FROM_ABI constexpr decltype(auto) operator[](range_difference_t<_RARange> __index) const + { + return _CUDA_VRANGES::begin(__derived())[__index]; + } +}; + +_LIBCUDACXX_END_NAMESPACE_RANGES_ABI + +#endif // _CCCL_STD_VER >= 2017 && !_CCCL_COMPILER(MSVC2017) + +_LIBCUDACXX_END_NAMESPACE_RANGES + +#endif // _LIBCUDACXX___RANGES_VIEW_INTERFACE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/views.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/views.h new file mode 100644 index 0000000000000000000000000000000000000000..7dae143e8b2b4bbc0904de8814e8c6570399d501 --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__ranges/views.h @@ -0,0 +1,38 @@ +// -*- C++ -*- +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___RANGES_VIEWS +#define _LIBCUDACXX___RANGES_VIEWS + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#if _CCCL_STD_VER >= 2014 + +_LIBCUDACXX_BEGIN_NAMESPACE_VIEWS + +_LIBCUDACXX_END_NAMESPACE_VIEWS + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +namespace views = ranges::views; // NOLINT: misc-unused-alias-decls + +_LIBCUDACXX_END_NAMESPACE_STD + +#endif // _CCCL_STD_VER >= 2014 + +#endif // _LIBCUDACXX___RANGES_VIEWS diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__semaphore/atomic_semaphore.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__semaphore/atomic_semaphore.h new file mode 100644 index 0000000000000000000000000000000000000000..fb6d302e771cd19061bfd01eb4674d4ec7d12e9a --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__semaphore/atomic_semaphore.h @@ -0,0 +1,234 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___SEMAPHORE_ATOMIC_SEMAPHORE_H +#define _LIBCUDACXX___SEMAPHORE_ATOMIC_SEMAPHORE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include +#include + +_CCCL_PUSH_MACROS + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +class __atomic_semaphore +{ + __atomic_impl __count; + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool __fetch_sub_if_slow(ptrdiff_t __old) + { + while (__old != 0) + { + if (__count.compare_exchange_weak(__old, __old - 1, memory_order_acquire, memory_order_relaxed)) + { + return true; + } + } + return false; + } + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool __fetch_sub_if() + { + ptrdiff_t __old = __count.load(memory_order_acquire); + if (__old == 0) + { + return false; + } + if (__count.compare_exchange_weak(__old, __old - 1, memory_order_acquire, memory_order_relaxed)) + { + return true; + } + return __fetch_sub_if_slow(__old); // fail only if not __available + } + + _LIBCUDACXX_HIDE_FROM_ABI void __wait_slow() + { + while (1) + { + ptrdiff_t const __old = __count.load(memory_order_acquire); + if (__old != 0) + { + break; + } + __count.wait(__old, memory_order_relaxed); + } + } + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool __acquire_slow_timed(chrono::nanoseconds const& __rel_time) + { + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( + [this]() { + ptrdiff_t const __old = __count.load(memory_order_acquire); + return __old != 0 && __fetch_sub_if_slow(__old); + }, + __rel_time); + } + +public: + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI static constexpr ptrdiff_t max() noexcept + { + return numeric_limits::max(); + } + + _LIBCUDACXX_HIDE_FROM_ABI constexpr __atomic_semaphore(ptrdiff_t __count) noexcept + : __count(__count) + {} + + _CCCL_HIDE_FROM_ABI ~__atomic_semaphore() = default; + + __atomic_semaphore(__atomic_semaphore const&) = delete; + __atomic_semaphore& operator=(__atomic_semaphore const&) = delete; + + _LIBCUDACXX_HIDE_FROM_ABI void release(ptrdiff_t __update = 1) + { + __count.fetch_add(__update, memory_order_release); + if (__update > 1) + { + __count.notify_all(); + } + else + { + __count.notify_one(); + } + } + + _LIBCUDACXX_HIDE_FROM_ABI void acquire() + { + while (!try_acquire()) + { + __wait_slow(); + } + } + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool try_acquire() noexcept + { + return __fetch_sub_if(); + } + + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool try_acquire_until(chrono::time_point const& __abs_time) + { + if (try_acquire()) + { + return true; + } + else + { + return __acquire_slow_timed(__abs_time - Clock::now()); + } + } + + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool try_acquire_for(chrono::duration const& __rel_time) + { + if (try_acquire()) + { + return true; + } + else + { + return __acquire_slow_timed(__rel_time); + } + } +}; + +template +class __atomic_semaphore<_Sco, 1> +{ + __atomic_impl __available; + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool __acquire_slow_timed(chrono::nanoseconds const& __rel_time) + { + return _CUDA_VSTD::__cccl_thread_poll_with_backoff( + [this]() { + return try_acquire(); + }, + __rel_time); + } + +public: + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI static constexpr ptrdiff_t max() noexcept + { + return 1; + } + + _LIBCUDACXX_HIDE_FROM_ABI constexpr __atomic_semaphore(ptrdiff_t __available) + : __available(__available) + {} + + _CCCL_HIDE_FROM_ABI ~__atomic_semaphore() = default; + + __atomic_semaphore(__atomic_semaphore const&) = delete; + __atomic_semaphore& operator=(__atomic_semaphore const&) = delete; + + _LIBCUDACXX_HIDE_FROM_ABI void release(ptrdiff_t __update = 1) + { + _CCCL_ASSERT(__update == 1, ""); + __available.store(1, memory_order_release); + __available.notify_one(); + (void) __update; + } + + _LIBCUDACXX_HIDE_FROM_ABI void acquire() + { + while (!try_acquire()) + { + __available.wait(0, memory_order_relaxed); + } + } + + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool try_acquire() noexcept + { + return 1 == __available.exchange(0, memory_order_acquire); + } + + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool try_acquire_until(chrono::time_point const& __abs_time) + { + if (try_acquire()) + { + return true; + } + else + { + return __acquire_slow_timed(__abs_time - Clock::now()); + } + } + + template + _CCCL_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI bool try_acquire_for(chrono::duration const& __rel_time) + { + if (try_acquire()) + { + return true; + } + else + { + return __acquire_slow_timed(__rel_time); + } + } +}; + +_LIBCUDACXX_END_NAMESPACE_STD + +_CCCL_POP_MACROS + +#endif // _LIBCUDACXX___SEMAPHORE_ATOMIC_SEMAPHORE_H diff --git a/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__semaphore/counting_semaphore.h b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__semaphore/counting_semaphore.h new file mode 100644 index 0000000000000000000000000000000000000000..918a835063fcfdc0576a41a979a96264ee306cef --- /dev/null +++ b/vllm/lib/python3.10/site-packages/cupy/_core/include/cupy/_cccl/libcudacxx/cuda/std/__semaphore/counting_semaphore.h @@ -0,0 +1,51 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// SPDX-FileCopyrightText: Copyright (c) 2024 NVIDIA CORPORATION & AFFILIATES. +// +//===----------------------------------------------------------------------===// + +#ifndef _LIBCUDACXX___SEMAPHORE_COUNTING_SEMAPHORE_H +#define _LIBCUDACXX___SEMAPHORE_COUNTING_SEMAPHORE_H + +#include + +#if defined(_CCCL_IMPLICIT_SYSTEM_HEADER_GCC) +# pragma GCC system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_CLANG) +# pragma clang system_header +#elif defined(_CCCL_IMPLICIT_SYSTEM_HEADER_MSVC) +# pragma system_header +#endif // no system header + +#include +#include + +_CCCL_PUSH_MACROS + +_LIBCUDACXX_BEGIN_NAMESPACE_STD + +template +class counting_semaphore : public __atomic_semaphore +{ + static_assert(__least_max_value <= __atomic_semaphore::max(), ""); + +public: + _LIBCUDACXX_HIDE_FROM_ABI constexpr counting_semaphore(ptrdiff_t __count = 0) + : __atomic_semaphore(__count) + {} + _CCCL_HIDE_FROM_ABI ~counting_semaphore() = default; + + counting_semaphore(const counting_semaphore&) = delete; + counting_semaphore& operator=(const counting_semaphore&) = delete; +}; + +using binary_semaphore = counting_semaphore<1>; + +_LIBCUDACXX_END_NAMESPACE_STD + +_CCCL_POP_MACROS + +#endif // _LIBCUDACXX___SEMAPHORE_COUNTING_SEMAPHORE_H