Skip to content

Commit dcff8e6

Browse files
rwgkkkraus14
andauthored
Add content seals and validation for generated CUDA Bindings files (#2310)
* Relicense CUDA Bindings and CUDA Python Signed-off-by: Keith Kraus <keith.j.kraus@gmail.com> * Address relicensing review feedback Signed-off-by: Keith Kraus <keith.j.kraus@gmail.com> * Address copyright and lockfile review feedback Signed-off-by: Keith Kraus <keith.j.kraus@gmail.com> * run_cybind_cython_gen 13.3.0 ../cuda-python * run_cybind_native 13.3.0 ../cuda-python * run_cybind_native 13.3.0 ../cuda-python * run_cybind_cython_gen 13.3.0 ../cuda-python * run_cybind_native 13.3.0 ../cuda-python * Check cybind-generated file seals in pre-commit * Revert "run_cybind_native 13.3.0 ../cuda-python" This reverts commit 0338189. * Revert "run_cybind_cython_gen 13.3.0 ../cuda-python" This reverts commit b8f6a85. * run_cybind_cython_gen 13.3.0 ../cuda-python * run_cybind_native 13.3.0 ../cuda-python * Revert "run_cybind_native 13.3.0 ../cuda-python" This reverts commit 94e42e8. * Revert "run_cybind_cython_gen 13.3.0 ../cuda-python" This reverts commit cc82446. * run_cybind_cython_gen 13.3.0 ../cuda-python * run_cybind_native 13.3.0 ../cuda-python * Use resolved nvcc path for RDC library fixtures * Generalize generated-file seal validation * Address generated-file seal review feedback * Exclude seal checker from generated-file grep * run_cybind_cython_gen 13.3.0 ../cuda-python && run_cybind_native 13.3.0 ../cuda-python Before running cybind: rm $(git grep -l -F CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE) --------- Signed-off-by: Keith Kraus <keith.j.kraus@gmail.com> Co-authored-by: Keith Kraus <keith.j.kraus@gmail.com>
1 parent b1c474c commit dcff8e6

71 files changed

Lines changed: 230 additions & 2 deletions

Some content is hidden

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

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ repos:
4343
exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)|(^cuda_core/cuda/core/_vendored/)'
4444
args: ["--fix"]
4545

46+
- id: check-generated-file-seals
47+
name: Check generated-file seals
48+
entry: python ./toolshed/check_generated_file_seals.py
49+
language: python
50+
files: ^cuda_bindings/
51+
types: [text]
52+
4653
- id: no-markdown-in-docs-source
4754
name: Prevent markdown files in docs/source directories
4855
entry: bash -c

cuda_bindings/cuda/bindings/_bindings/cyruntime.pxd.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# This code was automatically generated with version 13.3.0. Do not modify it directly.
5+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a99a543be62e221f4b4b43249719b689c33ea030adef3dfa012b31efac555ece
56
include "../cyruntime_types.pxi"
67

78
include "../_lib/cyruntime/cyruntime.pxd"

cuda_bindings/cuda/bindings/_bindings/cyruntime.pyx.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# This code was automatically generated with version 13.3.0. Do not modify it directly.
5+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ccadd478eafb421b735d8fc0c44e1c03e873885646a81381f1d995bd573b5120
56
include "../cyruntime_functions.pxi"
67

78
import os

cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pxd.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# This code was automatically generated with version 13.3.0. Do not modify it directly.
5+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=005e8f266f43a90c73b382df384f4143abf0e82b26d8ad69cb8aa58fbafa13ef
56
cdef extern from "":
67
"""
78
#define CUDA_API_PER_THREAD_DEFAULT_STREAM

cuda_bindings/cuda/bindings/_bindings/cyruntime_ptds.pyx.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
# This code was automatically generated with version 13.3.0. Do not modify it directly.
5+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1e1b93a907c72767d54e7b740e3e3a1b7b629b111af47d22c94b587b769bab9c
56
cdef extern from "":
67
"""
78
#define CUDA_API_PER_THREAD_DEFAULT_STREAM

cuda_bindings/cuda/bindings/_internal/_fast_enum.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly.
55

66

7+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5791f341ee9bb6573f42300fbed50cc52fc5e808c1d6bb9156e6aabb9db29b17
78
"""
89
This is a replacement for the stdlib enum.IntEnum.
910

cuda_bindings/cuda/bindings/_internal/cudla.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly.
55

6+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=07f18bf6993a0d962a4e844aa9ea9a335534c669992d112dd12003b77015e5ba
67
from ..cycudla cimport *
78

89

cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly.
55

6+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=2b56e5f08b7806fe10648817d36d96ce420cb5a8329615fb283f71119128d090
67
from libc.stdint cimport intptr_t, uintptr_t
78

89
import threading

cuda_bindings/cuda/bindings/_internal/cufile.pxd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55
# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly.
66

7+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b70fdd33eb00b70224c097fb28dd1031d82e8a2930356a4428c93e3bd1b52a86
78
from ..cycufile cimport *
89

910

cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#
55
# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly.
66

7+
# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b43946a1b7b010b7d9ee95ed67723e3dfc54b46a6dc68829e936ffad6ba852dc
78
from libc.stdint cimport intptr_t, uintptr_t
89
import threading
910

0 commit comments

Comments
 (0)