Skip to content

Commit f8fe3cd

Browse files
committed
nvmath-python-0.2.0
1 parent 7c48584 commit f8fe3cd

File tree

344 files changed

+35217
-10914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+35217
-10914
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ Pipfile*
2424

2525
#Test outputs
2626
*.pickle
27+
.hypothesis/*

.markdownlint.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
MD013:
2+
line_length: 120
3+
code_blocks: true
4+
tables: false
5+
MD033:
6+
allowed_elements:
7+
- img
8+
- h1

.pre-commit-config.yaml

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Copyright (c) 2024, NVIDIA CORPORATION.
2+
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.6.0
6+
hooks:
7+
- id: check-added-large-files
8+
- id: check-ast
9+
- id: check-json
10+
- id: check-merge-conflict
11+
- id: check-symlinks
12+
- id: check-toml
13+
- id: check-yaml
14+
#FIXME
15+
#- id: debug-statements
16+
- id: end-of-file-fixer
17+
- id: requirements-txt-fixer
18+
- id: trailing-whitespace
19+
- id: mixed-line-ending
20+
args: ['--fix=lf']
21+
22+
- repo: https://github.com/abravalheri/validate-pyproject
23+
rev: v0.19
24+
hooks:
25+
- id: validate-pyproject
26+
additional_dependencies: ["validate-pyproject-schema-store[all]"]
27+
28+
- repo: https://github.com/astral-sh/ruff-pre-commit
29+
rev: v0.6.4
30+
hooks:
31+
- id: ruff
32+
args: [--fix]
33+
- id: ruff-format
34+
35+
# FIXME
36+
# Mypy: static type checking
37+
- repo: https://github.com/pre-commit/mirrors-mypy
38+
rev: "v1.13.0"
39+
hooks:
40+
- id: mypy
41+
args: ["--config-file", "pyproject.toml"]
42+
files: ^nvmath(.*)\.py$
43+
additional_dependencies:
44+
- cuda-python
45+
- cupy-cuda12x
46+
- mpi4py-mpich
47+
- numba
48+
- numpy
49+
- pytest
50+
- scipy
51+
- torch
52+
- types-cffi
53+
- types-pywin32
54+
55+
# FIXME: Prettier pre-commit plugin is no longer supported
56+
# Autoformat: YAML, JSON, Markdown, etc.
57+
# - repo: https://github.com/pre-commit/mirrors-prettier
58+
# rev: v4.0.0-alpha.8
59+
# hooks:
60+
# - id: prettier
61+
62+
# Spellcheck
63+
- repo: https://github.com/codespell-project/codespell
64+
rev: "v2.3.0"
65+
hooks:
66+
- id: codespell
67+
additional_dependencies:
68+
- tomli
69+
70+
# FIXME: Types is very agressive and would require setting lots of ignore patterns
71+
# Typos
72+
# - repo: https://github.com/crate-ci/typos
73+
# rev: v1.24.5
74+
# hooks:
75+
# - id: typos
76+
77+
# Security: secrets
78+
- repo: https://github.com/gitleaks/gitleaks
79+
rev: v8.18.4
80+
hooks:
81+
- id: gitleaks
82+
83+
# FIXME
84+
# Security: secrets
85+
- repo: https://github.com/thoughtworks/talisman
86+
rev: "v1.32.0"
87+
hooks:
88+
- id: talisman-commit
89+
entry: cmd --githook pre-commit
90+
91+
# FIXME
92+
# Bash linter
93+
# - repo: https://github.com/openstack/bashate
94+
# rev: 2.1.1
95+
# hooks:
96+
# - id: bashate
97+
# args: ["--ignore=E006,E010,E020"]
98+
99+
# FIXME
100+
# Shell script linter
101+
# - repo: https://github.com/shellcheck-py/shellcheck-py
102+
# rev: "v0.10.0.1"
103+
# hooks:
104+
# - id: shellcheck
105+
106+
# Lint: Markdown
107+
- repo: https://github.com/igorshubovych/markdownlint-cli
108+
rev: v0.41.0
109+
hooks:
110+
- id: markdownlint
111+
args: ["--fix"]
112+
113+
default_language_version:
114+
python: python3

.talismanrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
scopeconfig:
2+
- scope: python
3+
4+
allowed_patterns:
5+
- key
6+
- plan
7+
- passed
8+
- pass
9+
- passing
10+
- Pass
11+
12+
fileignoreconfig:
13+
- filename: internal/gtc2024/start.sh
14+
checksum: da4ab3ead154a948599cd89aa8a378b05e2e7d9cb9f2bf631ce5bb1eca1a8411
15+
- filename: examples/fft/example02_stateful_torch_cpu_execution.py
16+
checksum: 03689ecaa669cab79478715c70bd13305020283b445b52cdc9d68a341b431b91
17+
- filename: SECURITY.md
18+
checksum: 01022d56aafb7c98d5af05a3e9e87ce4d267781def6f1844470fd4cd59d6b26b
19+
- filename: nvmath/device/random.py
20+
checksum: c534d9a475521cfcbfa6b048904f8495ff70e2a9ccdf3f2710e050cf75fafa35
21+
- filename: .ci/pipenv/manylinux_2_28_x86_64-py311-docs-Pipfile.lock
22+
checksum: 50417e87baee9d7aa17765525d21c48ea99f9d3c0b2a2b25d401102b5c5bb32a

CODE_OF_CONDUCT.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ In the interest of fostering an open and welcoming environment, we as
1010
contributors and maintainers pledge to make participation in our project and
1111
our community a harassment-free experience for everyone, regardless of age, body
1212
size, disability, ethnicity, sex characteristics, gender identity and expression,
13-
level of experience, education, socio-economic status, nationality, personal
13+
level of experience, education, socioeconomic status, nationality, personal
1414
appearance, race, religion, or sexual identity and orientation.
1515

1616
## Our Standards
@@ -59,7 +59,7 @@ a project may be further defined and clarified by project maintainers.
5959
## Enforcement
6060

6161
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62-
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
62+
reported by contacting the project team at <[email protected]>. All
6363
complaints will be reviewed and investigated and will result in a response that
6464
is deemed necessary and appropriate to the circumstances. The project team is
6565
obligated to maintain confidentiality with regard to the reporter of an incident.
@@ -72,9 +72,9 @@ members of the project's leadership.
7272
## Attribution
7373

7474
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
75-
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
75+
available at <https://www.contributor-covenant.org/version/1/4/code-of-conduct.html>
7676

7777
[homepage]: https://www.contributor-covenant.org
7878

7979
For answers to common questions about this code of conduct, see
80-
https://www.contributor-covenant.org/faq
80+
<https://www.contributor-covenant.org/faq>

CONTRIBUTING.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# Contributing
22

3-
Thank you for your interest in contributing to `nvmath-python`! Based on the type of contribution, it will fall into three categories:
3+
Thank you for your interest in contributing to `nvmath-python`! Based on the type of contribution, it will fall into
4+
three categories:
45

56
1. You want to report a bug, feature request, or documentation issue
6-
- File an [issue](https://github.com/NVIDIA/nvmath-python/issues)
7-
describing what you encountered or what you want to see changed.
8-
- The NVIDIA team will evaluate the issues and triage them, scheduling
9-
them for a release. If you believe the issue needs priority attention
10-
comment on the issue to notify the team.
7+
- File an [issue](https://github.com/NVIDIA/nvmath-python/issues) describing what you encountered or what you want
8+
to see changed.
9+
- The NVIDIA team will evaluate the issues and triage them, scheduling them for a release. If you believe the issue
10+
needs priority attention comment on the issue to notify the team.
1111
2. You want to implement a feature or bug-fix
12-
- At this time we do not accept code contributions. However, we do plan to
13-
change and accept contributions in the near future, although the timeline
14-
is TBD. Please let us know if you're interested in contributing (and in what
12+
- At this time we do not accept code contributions. However, we do plan to change and accept contributions in the
13+
near future, although the timeline is TBD. Please let us know if you're interested in contributing (and in what
1514
aspect) so that we can plan accordingly.
1615
3. You want to share your nice work built upon `nvmath-python`:
17-
- We would love to hear more about your work! Please share with us on [NVIDIA/nvmath-python GitHub Discussions](https://github.com/NVIDIA/nvmath-python/discussions)!
18-
We also take any `nvmath-python`-related questions on this forum.
16+
- We would love to hear more about your work! Please share with us on [NVIDIA/nvmath-python GitHub
17+
Discussions](https://github.com/NVIDIA/nvmath-python/discussions)! We also take any `nvmath-python`-related
18+
questions on this forum.

DESCRIPTION.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
*************************************************************
2+
nvmath-python: NVIDIA Math Libraries for the Python Ecosystem
3+
*************************************************************
4+
5+
`nvmath-python <https://developer.nvidia.com/nvmath-python>`_ brings the power and performance of NVIDIA math libraries to the Python ecosystem
6+
with intuitive, pythonic APIs. The ultimate goal is to provide users full access to all of the available library features in a variety of execution spaces.
7+
8+
* `Documentation <https://docs.nvidia.com/cuda/nvmath-python/index.html>`_
9+
* `Examples <https://github.com/NVIDIA/nvmath-python/tree/main/examples>`_
10+
11+
Installation
12+
============
13+
14+
.. code-block:: bash
15+
16+
pip install nvmath-python[cu12]
17+
18+
Please refer to the `installation instructions <https://docs.nvidia.com/cuda/nvmath-python/latest/getting-started.html>`_ for different ways of installing nvmath-python, including building from source.

0 commit comments

Comments
 (0)