forked from NVIDIA/cuda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
141 lines (122 loc) · 3.81 KB
/
Copy pathpyproject.toml
File metadata and controls
141 lines (122 loc) · 3.81 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
[project]
name = "cuda-pathfinder"
description = "Pathfinder for CUDA components"
authors = [{ name = "NVIDIA Corporation", email = "cuda-python-conduct@nvidia.com" }]
license = "Apache-2.0"
requires-python = ">=3.9"
dynamic = ["version", "readme"]
dependencies = []
[dependency-groups]
test = [
"pytest>=6.2.4",
]
# Internal organization of test dependencies.
cu12 = [
"cuda-toolkit[nvcc,cublas,nvrtc,cudart,cufft,curand,cusolver,cusparse,npp,nvfatbin,nvjitlink,nvjpeg,cccl]==12.*",
"cuda-toolkit[cufile]==12.*; sys_platform != 'win32'",
"cutensor-cu12",
"nvidia-cublasmp-cu12; sys_platform != 'win32'",
"nvidia-cudss-cu12",
"nvidia-cufftmp-cu12; sys_platform != 'win32'",
"nvidia-libmathdx-cu12",
"nvidia-nccl-cu12; sys_platform != 'win32'",
"nvidia-nvshmem-cu12; sys_platform != 'win32'",
]
cu13 = [
"cuda-toolkit[nvcc,cublas,nvrtc,cudart,cufft,curand,cusolver,cusparse,npp,nvfatbin,nvjitlink,nvjpeg,cccl,nvvm]==13.*",
"cuda-toolkit[cufile]==13.*; sys_platform != 'win32'",
"cutensor-cu13",
"nvidia-cublasmp-cu13; sys_platform != 'win32'",
"nvidia-cudss-cu13",
"nvidia-nccl-cu13; sys_platform != 'win32'",
"nvidia-nvshmem-cu13; sys_platform != 'win32'",
]
host = [
"nvpl-fft; platform_system == 'Linux' and platform_machine == 'aarch64'",
]
# User-facing dependencies, e.g. pip install --group test-cu13
test-cu12 = [
{ include-group = "test" },
{ include-group = "cu12" },
{ include-group = "host" },
]
test-cu13 = [
{ include-group = "test" },
{ include-group = "cu13" },
{ include-group = "host" },
]
[project.urls]
Repository = "https://github.com/NVIDIA/cuda-python"
Documentation = "https://nvidia.github.io/cuda-python/"
[tool.setuptools]
packages = { find = { include = ["cuda*"] } }
[tool.setuptools.dynamic]
version = { attr = "cuda.pathfinder._version.__version__" }
readme = { file = ["DESCRIPTION.rst"], content-type = "text/x-rst" }
[build-system]
requires = ["setuptools>=64", "wheel"]
build-backend = "setuptools.build_meta"
[tool.ruff]
line-length = 120
preview = true
[tool.ruff.format]
docstring-code-format = true
[tool.ruff.lint]
select = [
"E", # pycodestyle Error
"F", # Pyflakes
"W", # pycodestyle Warning
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
"ARG", # flake8-unused-arguments
"Q", # flake8-quotes
"N", # pep8-naming
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"T20", # flake8-print
"RUF", # Ruff-specific rules
"PT", # flake8-pytest-style
"DTZ", # flake8-datetimez
"S",
]
extend-select = ["B9"]
ignore = [
"S101", # asserts
"S311", # allow use of the random.* even though many are not cryptographically secure
"S404", # allow importing the subprocess module
]
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["S101"]
[tool.mypy]
# Basic settings
python_version = "3.9"
explicit_package_bases = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
# Start strict, but allow some flexibility
check_untyped_defs = true
disallow_any_generics = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
# Allow some common patterns to keep it simple
allow_redefinition = true
implicit_reexport = true
# Ignore missing imports for now (you can tighten this later)
ignore_missing_imports = true
# Only check your package
[[tool.mypy.overrides]]
module = "cuda.pathfinder.*"
disallow_untyped_defs = true
# Be more lenient with test files
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
ignore_errors = true