Skip to content

Commit 32f6c76

Browse files
committed
Merge branch 'main' into path_finder_dev
2 parents 7a0c068 + 161306b commit 32f6c76

File tree

27 files changed

+1108
-67
lines changed

27 files changed

+1108
-67
lines changed

.bandit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[bandit]
2+
skips = B101,B311

.github/actions/fetch_ctk/action.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,22 @@ inputs:
99
cuda-version:
1010
required: true
1111
type: string
12+
cuda-components:
13+
description: "A list of the CTK components to install as a comma-separated list. e.g. 'cuda_nvcc,cuda_nvrtc,cuda_cudart'"
14+
required: false
15+
type: string
16+
default: "cuda_nvcc,cuda_cudart,cuda_nvrtc,cuda_profiler_api,cuda_cccl,cuda_sanitizer_api,libnvjitlink"
1217

1318
runs:
1419
using: composite
1520
steps:
1621
- name: Set up CTK cache variable
1722
shell: bash --noprofile --norc -xeuo pipefail {0}
1823
run: |
19-
echo "CTK_CACHE_KEY=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}" >> $GITHUB_ENV
20-
echo "CTK_CACHE_FILENAME=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}.tar.gz" >> $GITHUB_ENV
24+
HASH=$(echo -n "${{ inputs.cuda-components }}" | sha256sum | awk '{print $1}')
25+
echo "CTK_CACHE_KEY=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}-$HASH" >> $GITHUB_ENV
26+
echo "CTK_CACHE_FILENAME=mini-ctk-${{ inputs.cuda-version }}-${{ inputs.host-platform }}-$HASH.tar.gz" >> $GITHUB_ENV
27+
echo "CTK_CACHE_COMPONENTS=${{ inputs.cuda-components }}" >> $GITHUB_ENV
2128
2229
- name: Install dependencies
2330
uses: ./.github/actions/install_unix_deps
@@ -78,18 +85,16 @@ runs:
7885
rm $CTK_COMPONENT_COMPONENT_FILENAME
7986
}
8087
81-
# Get headers and shared libraries in place
82-
# Note: the existing artifact would need to be manually deleted (ex: through web UI)
83-
# if this list is changed, as the artifact actions do not offer any option for us to
84-
# invalidate the artifact.
85-
populate_cuda_path cuda_nvcc
86-
populate_cuda_path cuda_cudart
87-
populate_cuda_path cuda_nvrtc
88-
populate_cuda_path cuda_profiler_api
89-
populate_cuda_path cuda_cccl
90-
if [[ "$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})" -ge 12 ]]; then
91-
populate_cuda_path libnvjitlink
88+
# Conditionally strip out libnvjitlink for CUDA versions < 12
89+
if [[ "$(cut -d '.' -f 1 <<< ${{ inputs.cuda-version }})" -lt 12 ]]; then
90+
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//libnvjitlink/}"
9291
fi
92+
# Cleanup stray commas after removing components
93+
CTK_CACHE_COMPONENTS="${CTK_CACHE_COMPONENTS//,,/,}"
94+
# Get headers and shared libraries in place
95+
for item in $(echo $CTK_CACHE_COMPONENTS | tr ',' ' '); do
96+
populate_cuda_path "$item"
97+
done
9398
ls -l $CUDA_PATH
9499
95100
# Prepare the cache

.github/workflows/bandit.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: "Static Analysis: Bandit Scan"
2+
3+
on:
4+
push:
5+
branches:
6+
- "pull-request/[0-9]+"
7+
- "main"
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
analyze:
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
steps:
18+
- name: Perform Bandit Analysis
19+
uses: PyCQA/bandit-action@8a1b30610f61f3f792fe7556e888c9d7dffa52de # v1.0.0

.github/workflows/codeql.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Static Analysis: CodeQL Scan"
2+
3+
on:
4+
push:
5+
branches:
6+
- "pull-request/[0-9]+"
7+
- "main"
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
analyze:
14+
name: Analyze (${{ matrix.language }})
15+
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
include:
23+
- language: python
24+
build-mode: none
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v3
31+
with:
32+
languages: ${{ matrix.language }}
33+
build-mode: ${{ matrix.build-mode }}
34+
queries: security-extended
35+
36+
- name: Perform CodeQL Analysis
37+
uses: github/codeql-action/analyze@v3
38+
with:
39+
category: "/language:${{matrix.language}}"

.pre-commit-config.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,23 @@ ci:
66
autoupdate_branch: ''
77
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
88
autoupdate_schedule: quarterly
9-
skip: []
9+
skip: [bandit]
1010
submodules: false
1111

1212
repos:
1313
- repo: https://github.com/astral-sh/ruff-pre-commit
14-
rev: v0.11.4
14+
rev: 971923581912ef60a6b70dbf0c3e9a39563c9d47 #v0.11.4
1515
hooks:
1616
- id: ruff
1717
args: [--fix, --show-fixes]
1818
- id: ruff-format
19+
- repo: https://github.com/PyCQA/bandit
20+
rev: 8ff25e07e487f143571cc305e56dd0253c60bc7b #v1.8.3
21+
hooks:
22+
- id: bandit
23+
args:
24+
- --ini
25+
- .bandit
1926

2027
default_language_version:
2128
python: python3

cuda_bindings/cuda/__init__.pxd

Whitespace-only changes.

cuda_bindings/cuda/__init__.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)