summaryrefslogtreecommitdiff
path: root/mesonbuild/modules/cuda.py
AgeCommit message (Collapse)Author
2024-02-12cuda module: fully type annotateEli Schwartz
Special notes: - _nvcc_arch_flags is always called with exact arguments, no need for default values - min_driver_version has its args annotation loosened because it has to fit the constraints of the module interface?
2024-02-12cuda module: use typed_pos_args for most methodsEli Schwartz
The min_driver_version function has an extensive, informative custom error message, so leave that in place. The other two functions didn't have much information there, and it's fairly evident that the cuda compiler itself is the best thing to have here. Moreover, there was some fairly gnarly code to validate the allowed values, which we can greatly simplify by uplifting the typechecking parts to the dedicated decorators that are both really good at it, and have nicely formatted error messages complete with reference to the problematic functions.
2024-02-12cuda module: inline single-shot function to get compiler versionEli Schwartz
It is pretty trivial and more confusing when standalone, especially the use of a sentinel "unknown" string as a standin for "this isn't one of the allowed object types". Much easier to directly raise an error in the fallthrough/else.
2024-02-12cuda module: fix type signature for oneshot functionEli Schwartz
It is only ever invoked once. It has a statically known signature based on how it's used, so there's no good reason to allow it to accept any defaults -- and defaulting to None messes with type safety. Saturate is always given, so don't claim it is only sometimes.
2024-02-12cuda module: use typed_kwargsEli Schwartz
This officially only ever accepted string or array of strings.
2023-12-22modules: get rid of the .*machine variablesDylan Baker
They're hardly used, and can be gotten directly from the Environment instead
2023-12-13Use SPDX-License-Identifier consistentlyDylan Baker
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
2023-03-19CUDA: make "Ampere" equivalent to SM8.0+SM8.6David Seifert
2023-02-01simplify instantiation of builtin type using builtins instead of functionsEli Schwartz
2022-12-11CUDA: Update compute-capability limits logic for CUDA 12.Olexa Bilaniuk
In particular, CUDA 12 removes support for Kepler (3.x) entirely. Unusually, however, it does not introduce any new architectures, or even compute capabilities.
2022-12-11CUDA: Add listing for newly-released CUDA 12 in minimum driver version table.Olexa Bilaniuk
2022-11-29CUDA: Update minimum driver version table to include CUDA 11.8Olexa Bilaniuk
Agrees with Release Notes, Section 1.1, Table 3. https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/index.html
2022-11-29CUDA: Bugfix to architectural limit checks.Olexa Bilaniuk
The upper bound on the CUDA Compute Capability is not always known. Avoid checking cuda_hi_limit_gpu_architecture if it remains undefined.
2022-11-29CUDA: Add Orin, Lovelace and Hopper architecture names for CUDA 11.8Olexa Bilaniuk
Co-authored-by: David Seifert <soap@gentoo.org>
2022-09-19compilers: directly import from subpackagesEli Schwartz
It turns out we don't generally need to proxy every compiler ever through the top-level package. The number of times we directly poke at one is negligible and direct imports are pretty clean.
2022-08-26Fix purely white space issues reported by flake8Alf Henrik Sauge
2022-08-17interpreter: move handling of module stability to interpreterDylan Baker
Thanks to `ModuleInfo`, all modules are just named `foo.py` instead of `unstable_foo.py`, which simplifies the import method a bit. This also allows for accurate FeatureNew/FeatureDeprecated use, as we know when the module was added and if/when it was stabilized.