diff --git a/.github/RELEASE-core.md b/.github/RELEASE-core.md index a4509cc4872..a93b3ed8d61 100644 --- a/.github/RELEASE-core.md +++ b/.github/RELEASE-core.md @@ -89,21 +89,6 @@ changes, so they are only permitted at a major-version boundary per the --- -## Refresh frozen fallback explanation tables - -When this release adds support for a new CUDA Toolkit version, check -whether the CTK release added any new `CUresult` or `cudaError_t` codes. -If so, update the frozen fallback tables so error messages stay -informative for consumers on older `cuda-bindings` versions: - -- `cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py` -- `cuda_core/cuda/core/_utils/runtime_cuda_error_explanations_frozen.py` - -The corresponding tests in `test_utils_enum_explanations_helpers.py` -will fail if an entry is missing. - ---- - ## Finalize the doc update, including release notes Review every PR included in the release. For each one, check whether new diff --git a/.github/actions/fetch_ctk/action.yml b/.github/actions/fetch_ctk/action.yml index b4a49789779..994e35924fc 100644 --- a/.github/actions/fetch_ctk/action.yml +++ b/.github/actions/fetch_ctk/action.yml @@ -79,7 +79,7 @@ runs: function extract() { tar -xvf $1 -C $CACHE_TMP_DIR --strip-components=1 } - elif [[ "${{ inputs.host-platform }}" == "win-64" ]]; then + elif [[ "${{ inputs.host-platform }}" == win* ]]; then function extract() { _TEMP_DIR_=$(mktemp -d) unzip $1 -d $_TEMP_DIR_ @@ -120,8 +120,12 @@ runs: # Note: try to escape | and > ... tar -czvf ${CTK_CACHE_FILENAME} ${CACHE_TMP_DIR} - # "Move" files from temp dir to CUDA_PATH - CUDA_PATH="./cuda_toolkit" + # Populate the final CUDA_PATH directly (never stage through ./cuda_toolkit + # unconditionally — a second call with a different cuda-path would leave + # symlinks from a prerelease CTK at ./cuda_toolkit/include etc., causing + # "cp: cannot overwrite non-directory" failures on the next restore). + CUDA_PATH="${{ inputs.cuda-path }}" + rm -rf $CUDA_PATH mkdir -p $CUDA_PATH # Unfortunately we cannot use "rsync -av $CACHE_TMP_DIR/ $CUDA_PATH" because # not all runners have rsync pre-installed (or even installable, such as @@ -144,22 +148,14 @@ runs: run: | ls -l CACHE_TMP_DIR="./cache_tmp_dir" - CUDA_PATH="./cuda_toolkit" + CUDA_PATH="${{ inputs.cuda-path }}" + rm -rf $CUDA_PATH mkdir -p $CUDA_PATH tar -xzvf $CTK_CACHE_FILENAME # Can't use rsync here, see above cp -r $CACHE_TMP_DIR/* $CUDA_PATH rm -rf $CACHE_TMP_DIR $CTK_CACHE_FILENAME ls -l $CUDA_PATH - if [ ! -d "$CUDA_PATH/include" ]; then - exit 1 - fi - - - name: Move CTK to the specified location - if: ${{ inputs.cuda-path != './cuda_toolkit' }} - shell: bash --noprofile --norc -xeuo pipefail {0} - run: | - mv ./cuda_toolkit ${{ inputs.cuda-path }} - name: Set output environment variables shell: bash --noprofile --norc -xeuo pipefail {0} diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 14cebd633d0..52d2370f44c 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -19,6 +19,11 @@ on: required: false type: string default: "" + single-cuda-major: + description: "Build wheels for only the current CUDA major; skip the prior-major build and wheel merge" + required: false + type: boolean + default: false defaults: run: @@ -51,10 +56,16 @@ jobs: - "3.14t" - "3.15" - "3.15t" + exclude: + # CPython 3.10 has no official Windows ARM64 build (neither + # nuget-cpython nor actions/setup-python's manifest carries one), + # so it cannot be built or tested on win-arm64. + - python-version: ${{ (inputs.host-platform == 'win-arm64' && '3.10') || '' }} name: py${{ matrix.python-version }} runs-on: ${{ (inputs.host-platform == 'linux-64' && 'linux-amd64-cpu8') || (inputs.host-platform == 'linux-aarch64' && 'linux-arm64-cpu8') || - (inputs.host-platform == 'win-64' && 'windows-2022') }} + (inputs.host-platform == 'win-64' && 'windows-2022') || + (inputs.host-platform == 'win-arm64' && 'windows-11-arm') }} steps: - name: Checkout ${{ github.event.repository.name }} uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -87,7 +98,7 @@ jobs: uses: nv-gha-runners/setup-proxy-cache@main continue-on-error: true # Skip cache on GitHub-hosted Windows runners. - if: ${{ inputs.host-platform != 'win-64' }} + if: ${{ !startsWith(inputs.host-platform, 'win') }} with: enable-apt: true @@ -98,10 +109,13 @@ jobs: # WAR: setup-python is not relocatable, and cibuildwheel hard-wires to 3.12... # see https://github.com/actions/setup-python/issues/871 python-version: "3.12" + architecture: ${{ ((inputs.host-platform == 'linux-aarch64' || inputs.host-platform == 'win-arm64') && 'arm64') || 'x64' }} - name: Set up MSVC if: ${{ startsWith(inputs.host-platform, 'win') && (env.BUILD_BINDINGS == 'true' || env.BUILD_CORE == 'true' || env.TEST_BINDINGS == 'true' || env.TEST_CORE == 'true') }} uses: step-security/msvc-dev-cmd@22c98154b708dbd743e6f27a933cf6ceba3305c4 # v1.13.1 + with: + arch: ${{ (inputs.host-platform == 'win-arm64' && 'arm64') || 'x64' }} - name: Set up yq # GitHub made an unprofessional decision to not provide it in their Windows VMs, @@ -109,11 +123,12 @@ jobs: if: ${{ startsWith(inputs.host-platform, 'win') && env.BUILD_CORE == 'true' }} env: YQ_VERSION: v4.52.5 - YQ_SHA256: 47594981f3848a4b4447494adeca9555f908f7cf0a89c4da3fd0243a4631da1c + YQ_ARCH: ${{ (inputs.host-platform == 'win-arm64' && 'arm64') || 'amd64' }} + YQ_SHA256: ${{ (inputs.host-platform == 'win-arm64' && '236867affa7f18701d4c763cf16b6df962cf4f7e89a8570a5954cf94a38f41c7') || '47594981f3848a4b4447494adeca9555f908f7cf0a89c4da3fd0243a4631da1c' }} YQ_DIR: yq shell: pwsh -command ". '{0}'" run: | - $yqUrl = "https://github.com/mikefarah/yq/releases/download/${env:YQ_VERSION}/yq_windows_amd64.exe" + $yqUrl = "https://github.com/mikefarah/yq/releases/download/${env:YQ_VERSION}/yq_windows_${env:YQ_ARCH}.exe" mkdir -Force -ErrorAction SilentlyContinue "${env:YQ_DIR}" | Out-Null Invoke-WebRequest -UseBasicParsing -OutFile "${env:YQ_DIR}/yq.exe" -Uri "$yqUrl" $hash = (Get-FileHash -Algorithm SHA256 "${env:YQ_DIR}/yq.exe").Hash.ToLower() @@ -253,7 +268,7 @@ jobs: echo "ok!" - name: Report sccache stats (cuda.bindings) - if: ${{ env.BUILD_BINDINGS == 'true' && inputs.host-platform != 'win-64' }} + if: ${{ env.BUILD_BINDINGS == 'true' && !startsWith(inputs.host-platform, 'win') }} uses: ./.github/actions/sccache-summary with: json-file: sccache_bindings.json @@ -362,7 +377,7 @@ jobs: echo "ok!" - name: Report sccache stats (cuda.core) - if: ${{ env.BUILD_CORE == 'true' && inputs.host-platform != 'win-64' }} + if: ${{ env.BUILD_CORE == 'true' && !startsWith(inputs.host-platform, 'win') }} uses: ./.github/actions/sccache-summary with: json-file: sccache_core.json @@ -524,7 +539,7 @@ jobs: # Note: This overwrites CUDA_PATH etc - name: Set up mini CTK - if: ${{ env.BUILD_CORE == 'true' || env.TEST_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && (env.BUILD_CORE == 'true' || env.TEST_CORE == 'true') }} uses: ./.github/actions/fetch_ctk continue-on-error: false with: @@ -533,13 +548,13 @@ jobs: cuda-path: "./cuda_toolkit_prev" - name: Build cuda.core test binaries - if: ${{ env.TEST_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }} run: | nvcc --version python "${{ env.CUDA_CORE_TEST_BINARIES_DIR }}/build_test_binaries.py" - name: Upload cuda.core test binaries - if: ${{ env.TEST_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && env.TEST_CORE == 'true' }} uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: ${{ env.CUDA_CORE_ARTIFACT_NAME }}-test-binaries @@ -550,7 +565,7 @@ jobs: if-no-files-found: error - name: Download cuda.bindings build artifacts from the prior branch - if: ${{ env.BUILD_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -586,7 +601,7 @@ jobs: rmdir "${OLD_ARTIFACT_DIR}" - name: Constrain previous cuda.core to the downloaded cuda.bindings wheel - if: ${{ env.BUILD_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }} run: | pathfinder_wheels=(cuda_pathfinder/cuda_pathfinder-*.whl) bindings_wheels=(cuda_bindings/dist-prev/cuda_bindings-"${BUILD_PREV_CUDA_MAJOR}".*.whl) @@ -608,7 +623,7 @@ jobs: } | tee wheel-constraints/cuda-core-prev.txt - name: Build cuda.core wheel - if: ${{ env.BUILD_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }} uses: pypa/cibuildwheel@1828c10ab37f080699c7b81cea34097c684a7074 # v4.2.0 with: package-dir: ./cuda_core/ @@ -656,7 +671,7 @@ jobs: echo "ok!" - name: Report sccache stats (cuda.core prev) - if: ${{ env.BUILD_CORE == 'true' && inputs.host-platform != 'win-64' }} + if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' && !startsWith(inputs.host-platform, 'win') }} uses: ./.github/actions/sccache-summary with: json-file: sccache_core_prev.json @@ -664,7 +679,7 @@ jobs: build-step: "Build cuda.core wheel" - name: List the cuda.core artifacts directory and rename - if: ${{ env.BUILD_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }} run: | if [[ "${{ inputs.host-platform }}" == win* ]]; then export CHOWN=chown @@ -688,7 +703,7 @@ jobs: ls -lahR ${{ env.CUDA_CORE_ARTIFACTS_DIR }} - name: Merge cuda.core wheels - if: ${{ env.BUILD_CORE == 'true' }} + if: ${{ !inputs.single-cuda-major && env.BUILD_CORE == 'true' }} run: | pip install wheel python ci/tools/merge_cuda_core_wheels.py \ @@ -696,6 +711,15 @@ jobs: "${{ env.CUDA_CORE_ARTIFACTS_DIR }}"/cu"${BUILD_PREV_CUDA_MAJOR}"/cuda_core*.whl \ --output-dir "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" + - name: Finalize single-major cuda.core wheel + if: ${{ inputs.single-cuda-major && env.BUILD_CORE == 'true' }} + run: | + for wheel in "${{ env.CUDA_CORE_ARTIFACTS_DIR }}"/cu"${BUILD_CUDA_MAJOR}"/*.cu"${BUILD_CUDA_MAJOR}".whl; do + base_name=$(basename "${wheel}" ".cu${BUILD_CUDA_MAJOR}.whl") + mv "${wheel}" "${{ env.CUDA_CORE_ARTIFACTS_DIR }}/${base_name}.whl" + done + ls -lahR "${{ env.CUDA_CORE_ARTIFACTS_DIR }}" + - name: Check cuda.core wheel if: ${{ env.BUILD_CORE == 'true' }} run: | diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 736db5748a4..ca993c55298 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,6 +33,8 @@ jobs: outputs: CUDA_BUILD_VER: ${{ steps.get-vars.outputs.cuda_build_ver }} CUDA_PREV_BUILD_VER: ${{ steps.get-vars.outputs.cuda_prev_build_ver }} + WINDOWS_ARM64_SUPPORTED: ${{ steps.get-vars.outputs.windows_arm64_supported }} + WINDOWS_ARM64_SINGLE_CUDA_MAJOR: ${{ steps.get-vars.outputs.windows_arm64_single_cuda_major }} steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -47,6 +49,33 @@ jobs: cuda_prev_build_ver=$(yq '.cuda.prev_build.version' ci/versions.yml) echo "cuda_prev_build_ver=$cuda_prev_build_ver" >> $GITHUB_OUTPUT + # Windows ARM64 is available starting with CUDA 13.4. + if [[ "$cuda_build_ver" =~ ^([0-9]+)\.([0-9]+)(\.|$) ]]; then + cuda_build_major="${BASH_REMATCH[1]}" + cuda_build_minor="${BASH_REMATCH[2]}" + else + echo "Invalid CUDA build version: $cuda_build_ver" >&2 + exit 1 + fi + if (( cuda_build_major > 13 || (cuda_build_major == 13 && cuda_build_minor >= 4) )); then + windows_arm64_supported=true + else + windows_arm64_supported=false + fi + echo "windows_arm64_supported=$windows_arm64_supported" >> $GITHUB_OUTPUT + + # No CUDA 13 windows-arm64 toolkit exists for a major other than the + # current one (windows-arm64 support started mid-way through the 13.x + # series), so cuda.core can only be built against a single CUDA major + # while the build major is still 13. Once the build major advances to + # 14, a CUDA 13 windows-arm64 toolkit will exist as the prior major. + if [[ "$cuda_build_major" == "13" ]]; then + windows_arm64_single_cuda_major=true + else + windows_arm64_single_cuda_major=false + fi + echo "windows_arm64_single_cuda_major=$windows_arm64_single_cuda_major" >> $GITHUB_OUTPUT + should-skip: if: ${{ github.repository_owner == 'nvidia' }} runs-on: ubuntu-latest @@ -414,6 +443,31 @@ jobs: prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }} workplan: ${{ needs.detect-changes.outputs.workplan }} + # Windows ARM64 is available starting with CUDA 13.4. Build only the current + # CUDA major because no prior-major toolkit or wheel artifacts exist. + build-windows-arm64: + needs: + - ci-vars + - should-skip + - detect-changes + name: Build win-arm64, CUDA ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }} + if: ${{ github.repository_owner == 'nvidia' && + !fromJSON(needs.should-skip.outputs.skip) && + !fromJSON(needs.should-skip.outputs.doc-only) && + needs.ci-vars.outputs.WINDOWS_ARM64_SUPPORTED == 'true' && + fromJSON(needs.detect-changes.outputs.workplan).jobs.platforms.windows }} + permissions: + actions: read + contents: read + secrets: inherit + uses: ./.github/workflows/build-wheel.yml + with: + host-platform: win-arm64 + cuda-version: ${{ needs.ci-vars.outputs.CUDA_BUILD_VER }} + prev-cuda-version: ${{ needs.ci-vars.outputs.CUDA_PREV_BUILD_VER }} + workplan: ${{ needs.detect-changes.outputs.workplan }} + single-cuda-major: ${{ needs.ci-vars.outputs.WINDOWS_ARM64_SINGLE_CUDA_MAJOR == 'true' }} + # NOTE: test-sdist jobs are split by platform (mirroring build-* and test-wheel-*) # so platform-specific sources (e.g. cuda_bindings/*_windows.pyx selected by # build_hooks.py) are exercised on their target OS. Keep these job definitions @@ -613,6 +667,7 @@ jobs: - build-linux-64 - build-linux-aarch64 - build-windows + - build-windows-arm64 - test-sdist-linux - test-sdist-windows - test-linux-64 @@ -644,6 +699,7 @@ jobs: doc_only="${{ needs.should-skip.outputs.doc-only }}" linux_selected="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).jobs.platforms.linux || false }}" windows_selected="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).jobs.platforms.windows || false }}" + windows_arm64_supported="${{ needs.ci-vars.outputs.WINDOWS_ARM64_SUPPORTED }}" build_selected="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).jobs.sdist_tests || false }}" run_core_api_check="${{ needs.detect-changes.outputs.workplan && fromJSON(needs.detect-changes.outputs.workplan).jobs.core_api_checks || false }}" is_pr="${{ startsWith(github.ref_name, 'pull-request/') }}" @@ -679,6 +735,12 @@ jobs: check_result "build-linux-aarch64" "$linux_expected" check_result "build-windows" "$windows_expected" + windows_arm64_expected="skipped" + if [[ "$windows_arm64_supported" == "true" ]]; then + windows_arm64_expected="$windows_expected" + fi + check_result "build-windows-arm64" "$windows_arm64_expected" + # Sdist tests follow build selection; wheel tests follow the platform plan. expected="skipped" if [[ "$doc_only" != "true" && "$build_selected" == "true" ]]; then diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3159fe2860a..451bb72fe8e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -103,6 +103,7 @@ repos: - --max-retries=3 - --no-progress files: '\.(md|rst)$' + exclude: ^qa/ # Standard hooks - repo: https://github.com/pre-commit/pre-commit-hooks diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7474ac4d840..d6810495dee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,7 +48,7 @@ correct.** Each package matches its own tag prefix: | Package | Tag pattern | | --- | --- | -| `cuda-bindings`, `cuda-python` | `v*` (e.g. `v13.3.1`) | +| `cuda-bindings`, `cuda-python` | `v*` (e.g. `v13.4.1`) | | `cuda-core` | `cuda-core-v*` (e.g. `cuda-core-v1.1.0`) | | `cuda-pathfinder` | `cuda-pathfinder-v*` (e.g. `cuda-pathfinder-v1.6.0`) | @@ -109,7 +109,7 @@ version-check failure: `cuda-bindings` to that same bogus version. 2. **Stale tags** (a fork that has not fetched upstream in a while): you get a plausible-looking but wrong version, e.g. `13.0.4.dev650+g0d22cb44` when the - real latest tag is `v13.3.1`. Nothing warns you. Note there is no leading + real latest tag is `v13.4.1`. Nothing warns you. Note there is no leading `v` — the tag prefix is stripped by `tag_regex`. 3. **No git metadata** (source zip): the build fails with `LookupError: setuptools-scm was unable to detect version`. diff --git a/ci/test-matrix.yml b/ci/test-matrix.yml index 66f3196ab68..7d6733084f6 100644 --- a/ci/test-matrix.yml +++ b/ci/test-matrix.yml @@ -43,50 +43,52 @@ linux: # linux-64 - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'v100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM: '1' } } + - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + # disabled: compute-sanitizer install broken on CUDA 12.9.1 local CTK (TODO: re-enable once fixed) + # - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM: '1' } } - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'v100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: '610.43.02' } + - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: '610.43.02' } - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 't4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: '610.43.02' } + - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: '610.43.02' } - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 't4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.15', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.15t', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.15', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.15t', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } # linux-aarch64 - { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + # disabled: compute-sanitizer install broken on CUDA 12.9.1 local CTK (TODO: re-enable once fixed) + # - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } - { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest' } # special runners - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'h100', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'h100', GPU_COUNT: '1', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 't4', GPU_COUNT: '2', DRIVER: 'latest' } - - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'h100', GPU_COUNT: '2', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'h100', GPU_COUNT: '1', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 't4', GPU_COUNT: '2', DRIVER: 'latest' } + - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'h100', GPU_COUNT: '2', DRIVER: 'latest' } - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 't4', GPU_COUNT: '1', DRIVER: 'latest', FLAVOR: 'wsl' } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'rtx4090', GPU_COUNT: '1', DRIVER: 'latest', FLAVOR: 'wsl' } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'rtx4090', GPU_COUNT: '1', DRIVER: 'latest', FLAVOR: 'wsl' } nightly: # nightly-pytorch - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.6.3', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-pytorch', TORCH_VER: '2.12.1', TORCH_CUDA: 'cu126' } } @@ -99,45 +101,45 @@ linux: - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-pytorch', TORCH_VER: '2.9.1', TORCH_CUDA: 'cu130' } } # nightly-numba-cuda - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-numba-cuda' } } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: '580.65.06', ENV: { MODE: 'nightly-numba-cuda' } } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: '580.65.06', ENV: { MODE: 'nightly-numba-cuda' } } - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-numba-cuda' } } - - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-numba-cuda' } } + - { ARCH: 'arm64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-numba-cuda' } } # nightly-numba-cuda-mlir (MLIR backend, linux-64 only) - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-numba-cuda-mlir' } } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-numba-cuda-mlir' } } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-numba-cuda-mlir' } } # nightly-cuda-core (released cuda-core from PyPI against main pathfinder/bindings) - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-cuda-core' } } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-cuda-core' } } # nightly-standard (arm64 nightly-only runners — per runner team request) - - { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'gh200', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } - - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'gb300', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } - - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '2', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } - - { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '2', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } + - { ARCH: 'arm64', PY_VER: '3.13', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'gh200', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } + - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'gb300', GPU_COUNT: '1', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } + - { ARCH: 'arm64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '2', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } + - { ARCH: 'arm64', PY_VER: '3.14t', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '2', DRIVER: 'latest', ENV: { MODE: 'nightly-standard' } } windows: pull-request: # win-64 - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtx2080', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'WDDM' } - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } + - { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'v100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'rtx4090', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'WDDM' } - - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'rtx4090', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'WDDM' } + - { ARCH: 'amd64', PY_VER: '3.11', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'rtx4090', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'WDDM' } - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } - - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM', ENV: { CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM: '1' } } + - { ARCH: 'amd64', PY_VER: '3.13', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM', ENV: { CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM: '1' } } - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'v100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.0.2', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } - - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } + - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '12.9.1', LOCAL_CTK: '1', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } - - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } - - { ARCH: 'amd64', PY_VER: '3.15', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } + - { ARCH: 'amd64', PY_VER: '3.14t', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } + - { ARCH: 'amd64', PY_VER: '3.15', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } # special runners - - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '1', GPU: 't4', GPU_COUNT: '2', DRIVER: 'latest', DRIVER_MODE: 'TCC' } - - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'h100', GPU_COUNT: '2', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } + - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '1', GPU: 't4', GPU_COUNT: '2', DRIVER: 'latest', DRIVER_MODE: 'TCC' } + - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'h100', GPU_COUNT: '2', DRIVER: 'latest', DRIVER_MODE: 'MCDM' } nightly: # nightly-pytorch - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.6.3', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC', ENV: { MODE: 'nightly-pytorch', TORCH_VER: '2.12.1', TORCH_CUDA: 'cu126' } } @@ -146,9 +148,9 @@ windows: - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.0.2', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC', ENV: { MODE: 'nightly-pytorch', TORCH_VER: '2.9.1', TORCH_CUDA: 'cu130' } } # nightly-numba-cuda - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'TCC', ENV: { MODE: 'nightly-numba-cuda' } } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: '596.36', DRIVER_MODE: 'TCC', ENV: { MODE: 'nightly-numba-cuda' } } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'l4', GPU_COUNT: '1', DRIVER: '596.36', DRIVER_MODE: 'TCC', ENV: { MODE: 'nightly-numba-cuda' } } # nightly-numba-cuda-mlir (MLIR backend, win-64) - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '12.9.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM', ENV: { MODE: 'nightly-numba-cuda-mlir' } } - - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM', ENV: { MODE: 'nightly-numba-cuda-mlir' } } + - { ARCH: 'amd64', PY_VER: '3.12', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'rtxpro6000', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM', ENV: { MODE: 'nightly-numba-cuda-mlir' } } # nightly-cuda-core (released cuda-core from PyPI against main pathfinder/bindings) - - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.3.0', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM', ENV: { MODE: 'nightly-cuda-core' } } + - { ARCH: 'amd64', PY_VER: '3.14', CUDA_VER: '13.4.1', LOCAL_CTK: '0', GPU: 'a100', GPU_COUNT: '1', DRIVER: 'latest', DRIVER_MODE: 'MCDM', ENV: { MODE: 'nightly-cuda-core' } } diff --git a/ci/tools/env-vars b/ci/tools/env-vars index 8ffbfa13472..118c7026ae3 100755 --- a/ci/tools/env-vars +++ b/ci/tools/env-vars @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # SPDX-License-Identifier: Apache-2.0 @@ -42,6 +42,12 @@ if [[ "${1}" == "build" ]]; then # platform is handled by the default value of platform (`auto`) in cibuildwheel # here we only need to specify the python version we want echo "CIBW_BUILD=cp${PYTHON_VERSION_FORMATTED}-*" >> $GITHUB_ENV + if [[ "${HOST_PLATFORM}" == "win-arm64" ]]; then + # cibuildwheel's `auto` architecture detection resolves to AMD64 on the + # windows-11-arm hosted runner (the Actions runner process itself reports + # AMD64 via emulation), so the target arch must be forced explicitly. + echo "CIBW_ARCHS=ARM64" >> $GITHUB_ENV + fi BUILD_CUDA_MAJOR="$(cut -d '.' -f 1 <<< ${CUDA_VER})" echo "BUILD_CUDA_MAJOR=${BUILD_CUDA_MAJOR}" >> $GITHUB_ENV echo "BUILD_PREV_CUDA_MAJOR=$((${BUILD_CUDA_MAJOR} - 1))" >> $GITHUB_ENV diff --git a/ci/tools/fetch_ctk_redistrib.py b/ci/tools/fetch_ctk_redistrib.py index 5007765516e..412dbc68a7c 100644 --- a/ci/tools/fetch_ctk_redistrib.py +++ b/ci/tools/fetch_ctk_redistrib.py @@ -21,6 +21,7 @@ "linux-64": "linux-x86_64", "linux-aarch64": "linux-sbsa", "win-64": "windows-x86_64", + "win-arm64": "windows-arm64", } # CTK 13.3.0 renamed the redistrib key from cuda_cccl to cccl. diff --git a/ci/versions.yml b/ci/versions.yml index 0f0ab251e50..e6574847dd2 100644 --- a/ci/versions.yml +++ b/ci/versions.yml @@ -1,10 +1,10 @@ -# SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 backport_branch: "12.9.x" # keep in sync with target-branch in .github/dependabot.yml cuda: build: - version: "13.3.0" + version: "13.4.1" prev_build: version: "12.9.1" diff --git a/cuda_bindings/cuda/bindings/_internal/cudla.pxd b/cuda_bindings/cuda/bindings/_internal/cudla.pxd index 9184e98e616..52b1b777056 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cudla.pxd @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b969fc17c839cb9d6be1cd572ad170dab636509082a09665a9397b95502c01d2 +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6866708da9b12dc99b597cd56196b66a1f2645198821b572326bb0858b5906d3 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx index c63c110a2c2..b9cbb73a32e 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_linux.pyx @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=82e74b806368f149cc9ff54763fc00a4e51e01f0379ce9a8ea920880e557c091 +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6d02d71c7a7ef7627a3dccc1514b8e1ea48ac7d738954a2259df71cfeaaca839 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx b/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx index 422ad13923a..8e361068068 100644 --- a/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cudla_windows.pyx @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=012752809333d9361543cfd1cd51ed32c0837bbcaecbc8dd530ba4a15be1d230 +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=338d2b3b3dc670ce440660d6161d69bb61b7c2f0c03759fa8df5c91d45255d7d # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/cufile.pxd b/cuda_bindings/cuda/bindings/_internal/cufile.pxd index 41786b1f25b..9754670ed67 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile.pxd +++ b/cuda_bindings/cuda/bindings/_internal/cufile.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1788ebb3c332e99a6dc0dcd98c5af472bf42c1c960ba70cb65f294a81712491d +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ce1a8b4cfbbc98d5a6e7975adbfa4e5be9f62da604eb3841691dc555b4b72e76 # <<<< PREAMBLE CONTENT >>>> @@ -63,3 +63,5 @@ cdef CUfileError_t _cuFileGetStatsL3(CUfileStatsLevel3_t* stats) except?CUFILE_LOADING_ERROR nogil cdef CUfileError_t _cuFileSetParameterPosixPoolSlabArray(const size_t* size_values, const size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil cdef CUfileError_t _cuFileGetParameterPosixPoolSlabArray(size_t* size_values, size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t _cuFileReadv(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil +cdef ssize_t _cuFileWritev(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil diff --git a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx index 4bd16e9ec4a..03864ddd836 100644 --- a/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/cufile_linux.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5b6e0791dac3bac268169b02ebc748d7375de7189fe7114151716d47791519ad +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=20df7b33c9628ffefdce815bf9ffa31e635a9410ef0156145ced38a6e092d7f1 # <<<< PREAMBLE CONTENT >>>> @@ -110,6 +110,8 @@ cdef void* __cuFileGetStatsL3 = NULL cdef void* __cuFileGetBARSizeInKB = NULL cdef void* __cuFileSetParameterPosixPoolSlabArray = NULL cdef void* __cuFileGetParameterPosixPoolSlabArray = NULL +cdef void* __cuFileReadv = NULL +cdef void* __cuFileWritev = NULL cdef int _init_cufile() except -1 nogil: global _cyb___py_cufile_init @@ -418,6 +420,20 @@ cdef int _init_cufile() except -1 nogil: handle = load_library() __cuFileGetParameterPosixPoolSlabArray = _cyb_dlsym(handle, 'cuFileGetParameterPosixPoolSlabArray') + global __cuFileReadv + __cuFileReadv = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'cuFileReadv') + if __cuFileReadv == NULL: + if handle == NULL: + handle = load_library() + __cuFileReadv = _cyb_dlsym(handle, 'cuFileReadv') + + global __cuFileWritev + __cuFileWritev = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'cuFileWritev') + if __cuFileWritev == NULL: + if handle == NULL: + handle = load_library() + __cuFileWritev = _cyb_dlsym(handle, 'cuFileWritev') + _cyb_atomic_int_store(&_cyb___py_cufile_init, 1) return 0 @@ -563,6 +579,12 @@ cpdef dict _inspect_function_pointers(): global __cuFileGetParameterPosixPoolSlabArray data["__cuFileGetParameterPosixPoolSlabArray"] = __cuFileGetParameterPosixPoolSlabArray + + global __cuFileReadv + data["__cuFileReadv"] = __cuFileReadv + + global __cuFileWritev + data["__cuFileWritev"] = __cuFileWritev _cyb_func_ptrs = data return data @@ -1014,3 +1036,23 @@ cdef CUfileError_t _cuFileGetParameterPosixPoolSlabArray(size_t* size_values, si raise FunctionNotFoundError("function cuFileGetParameterPosixPoolSlabArray is not found") return (__cuFileGetParameterPosixPoolSlabArray)( size_values, count_values, len) + + +cdef ssize_t _cuFileReadv(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil: + global __cuFileReadv + _check_or_init_cufile() + if __cuFileReadv == NULL: + with gil: + raise FunctionNotFoundError("function cuFileReadv is not found") + return (__cuFileReadv)( + fh, iov, iovcnt, file_offset, flags) + + +cdef ssize_t _cuFileWritev(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil: + global __cuFileWritev + _check_or_init_cufile() + if __cuFileWritev == NULL: + with gil: + raise FunctionNotFoundError("function cuFileWritev is not found") + return (__cuFileWritev)( + fh, iov, iovcnt, file_offset, flags) diff --git a/cuda_bindings/cuda/bindings/_internal/driver.pxd b/cuda_bindings/cuda/bindings/_internal/driver.pxd index d0d183d034c..d44e4b612bb 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver.pxd +++ b/cuda_bindings/cuda/bindings/_internal/driver.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a82b3f5dcb30b13294f6896a4d9d9f2f8d7be6b29c8f0a0c61677b1c622d4480 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b45f017467bf91c9ba21a48072bd362bdf84509c674379435823618c2aebc954 from ..cydriver cimport * @@ -529,3 +529,10 @@ cdef CUresult _cuLogicalEndpointImport(CUlogicalEndpointId leId, const void* han cdef CUresult _cuLogicalEndpointGetLimits(cuuint64_t* bindAlignment, cuuint64_t* maxSize, const CUlogicalEndpointProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuLogicalEndpointQuery(CUlogicalEndpointId leId, cuuint32_t count, int* queryStatus) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult _cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMode mode, CUgraph hGraph, CUgraphRecaptureCallback callbackFunc, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetFabricClusterUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetCliqueCount(size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuDeviceGetCliqueInfo(CUcliqueInfo* cliqueInfo, size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuMemGetLocationInfo(CUdeviceptr ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, CUmemLocation* location_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphAddNode_v3(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuGraphNodeSetParams_v2(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult _cuCheckpointOperationComplete(CUcheckpointOperationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil diff --git a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx index 9ee9bdde69c..6fc1ca20c77 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_linux.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=99bd738661e0a23f73037e6564c4d07a428e6d27f61987da98e4b29444e4b56b +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f23c5b6833163c19813f5a513216d2a4192b545a5ae8a47ffe7c95ebbc9bdbaf # <<<< PREAMBLE CONTENT >>>> @@ -584,6 +584,13 @@ cdef void* __cuLogicalEndpointImport = NULL cdef void* __cuLogicalEndpointGetLimits = NULL cdef void* __cuLogicalEndpointQuery = NULL cdef void* __cuStreamBeginRecaptureToGraph = NULL +cdef void* __cuDeviceGetFabricClusterUuid = NULL +cdef void* __cuDeviceGetCliqueCount = NULL +cdef void* __cuDeviceGetCliqueInfo = NULL +cdef void* __cuMemGetLocationInfo = NULL +cdef void* __cuGraphAddNode_v3 = NULL +cdef void* __cuGraphNodeSetParams_v2 = NULL +cdef void* __cuCheckpointOperationComplete = NULL cdef int _init_driver() except -1 nogil: global _cyb___py_driver_init @@ -2155,6 +2162,27 @@ cdef int _init_driver() except -1 nogil: global __cuStreamBeginRecaptureToGraph cuGetProcAddress_v2('cuStreamBeginRecaptureToGraph', &__cuStreamBeginRecaptureToGraph, 13030, ptds_mode, NULL) + global __cuDeviceGetFabricClusterUuid + cuGetProcAddress_v2('cuDeviceGetFabricClusterUuid', &__cuDeviceGetFabricClusterUuid, 13041, ptds_mode, NULL) + + global __cuDeviceGetCliqueCount + cuGetProcAddress_v2('cuDeviceGetCliqueCount', &__cuDeviceGetCliqueCount, 13041, ptds_mode, NULL) + + global __cuDeviceGetCliqueInfo + cuGetProcAddress_v2('cuDeviceGetCliqueInfo', &__cuDeviceGetCliqueInfo, 13041, ptds_mode, NULL) + + global __cuMemGetLocationInfo + cuGetProcAddress_v2('cuMemGetLocationInfo', &__cuMemGetLocationInfo, 13041, ptds_mode, NULL) + + global __cuGraphAddNode_v3 + cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode_v3, 13041, ptds_mode, NULL) + + global __cuGraphNodeSetParams_v2 + cuGetProcAddress_v2('cuGraphNodeSetParams', &__cuGraphNodeSetParams_v2, 13041, ptds_mode, NULL) + + global __cuCheckpointOperationComplete + cuGetProcAddress_v2('cuCheckpointOperationComplete', &__cuCheckpointOperationComplete, 13041, ptds_mode, NULL) + _cyb_atomic_int_store(&_cyb___py_driver_init, 1) return 0 @@ -3722,6 +3750,27 @@ cpdef dict _inspect_function_pointers(): global __cuStreamBeginRecaptureToGraph data["__cuStreamBeginRecaptureToGraph"] = __cuStreamBeginRecaptureToGraph + + global __cuDeviceGetFabricClusterUuid + data["__cuDeviceGetFabricClusterUuid"] = __cuDeviceGetFabricClusterUuid + + global __cuDeviceGetCliqueCount + data["__cuDeviceGetCliqueCount"] = __cuDeviceGetCliqueCount + + global __cuDeviceGetCliqueInfo + data["__cuDeviceGetCliqueInfo"] = __cuDeviceGetCliqueInfo + + global __cuMemGetLocationInfo + data["__cuMemGetLocationInfo"] = __cuMemGetLocationInfo + + global __cuGraphAddNode_v3 + data["__cuGraphAddNode_v3"] = __cuGraphAddNode_v3 + + global __cuGraphNodeSetParams_v2 + data["__cuGraphNodeSetParams_v2"] = __cuGraphNodeSetParams_v2 + + global __cuCheckpointOperationComplete + data["__cuCheckpointOperationComplete"] = __cuCheckpointOperationComplete _cyb_func_ptrs = data return data @@ -8912,3 +8961,73 @@ cdef CUresult _cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMo raise FunctionNotFoundError("function cuStreamBeginRecaptureToGraph is not found") return (__cuStreamBeginRecaptureToGraph)( hStream, mode, hGraph, callbackFunc, userData) + + +cdef CUresult _cuDeviceGetFabricClusterUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetFabricClusterUuid + _check_or_init_driver() + if __cuDeviceGetFabricClusterUuid == NULL: + with gil: + raise FunctionNotFoundError("function cuDeviceGetFabricClusterUuid is not found") + return (__cuDeviceGetFabricClusterUuid)( + uuid, dev) + + +cdef CUresult _cuDeviceGetCliqueCount(size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetCliqueCount + _check_or_init_driver() + if __cuDeviceGetCliqueCount == NULL: + with gil: + raise FunctionNotFoundError("function cuDeviceGetCliqueCount is not found") + return (__cuDeviceGetCliqueCount)( + count, dev) + + +cdef CUresult _cuDeviceGetCliqueInfo(CUcliqueInfo* cliqueInfo, size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetCliqueInfo + _check_or_init_driver() + if __cuDeviceGetCliqueInfo == NULL: + with gil: + raise FunctionNotFoundError("function cuDeviceGetCliqueInfo is not found") + return (__cuDeviceGetCliqueInfo)( + cliqueInfo, count, dev) + + +cdef CUresult _cuMemGetLocationInfo(CUdeviceptr ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, CUmemLocation* location_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetLocationInfo + _check_or_init_driver() + if __cuMemGetLocationInfo == NULL: + with gil: + raise FunctionNotFoundError("function cuMemGetLocationInfo is not found") + return (__cuMemGetLocationInfo)( + ptr, size, summaryGranularity, samplingGranularity, location_out) + + +cdef CUresult _cuGraphAddNode_v3(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddNode_v3 + _check_or_init_driver() + if __cuGraphAddNode_v3 == NULL: + with gil: + raise FunctionNotFoundError("function cuGraphAddNode_v3 is not found") + return (__cuGraphAddNode_v3)( + phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + + +cdef CUresult _cuGraphNodeSetParams_v2(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeSetParams_v2 + _check_or_init_driver() + if __cuGraphNodeSetParams_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuGraphNodeSetParams_v2 is not found") + return (__cuGraphNodeSetParams_v2)( + hNode, nodeParams) + + +cdef CUresult _cuCheckpointOperationComplete(CUcheckpointOperationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointOperationComplete + _check_or_init_driver() + if __cuCheckpointOperationComplete == NULL: + with gil: + raise FunctionNotFoundError("function cuCheckpointOperationComplete is not found") + return (__cuCheckpointOperationComplete)( + handle) diff --git a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx index bb491f1a089..729808ed432 100644 --- a/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/driver_windows.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d8163a30339f512cdd46e9a0282346b4764b33905eb0315112089ee326b308bd +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f49a90c93b3876714d90f8948fabc654d408ba6c8bc3a122503b1d1ef663f434 # <<<< PREAMBLE CONTENT >>>> @@ -585,6 +585,13 @@ cdef void* __cuLogicalEndpointImport = NULL cdef void* __cuLogicalEndpointGetLimits = NULL cdef void* __cuLogicalEndpointQuery = NULL cdef void* __cuStreamBeginRecaptureToGraph = NULL +cdef void* __cuDeviceGetFabricClusterUuid = NULL +cdef void* __cuDeviceGetCliqueCount = NULL +cdef void* __cuDeviceGetCliqueInfo = NULL +cdef void* __cuMemGetLocationInfo = NULL +cdef void* __cuGraphAddNode_v3 = NULL +cdef void* __cuGraphNodeSetParams_v2 = NULL +cdef void* __cuCheckpointOperationComplete = NULL cdef int _init_driver() except -1 nogil: global _cyb___py_driver_init @@ -2158,6 +2165,27 @@ cdef int _init_driver() except -1 nogil: global __cuStreamBeginRecaptureToGraph cuGetProcAddress_v2('cuStreamBeginRecaptureToGraph', &__cuStreamBeginRecaptureToGraph, 13030, ptds_mode, NULL) + global __cuDeviceGetFabricClusterUuid + cuGetProcAddress_v2('cuDeviceGetFabricClusterUuid', &__cuDeviceGetFabricClusterUuid, 13041, ptds_mode, NULL) + + global __cuDeviceGetCliqueCount + cuGetProcAddress_v2('cuDeviceGetCliqueCount', &__cuDeviceGetCliqueCount, 13041, ptds_mode, NULL) + + global __cuDeviceGetCliqueInfo + cuGetProcAddress_v2('cuDeviceGetCliqueInfo', &__cuDeviceGetCliqueInfo, 13041, ptds_mode, NULL) + + global __cuMemGetLocationInfo + cuGetProcAddress_v2('cuMemGetLocationInfo', &__cuMemGetLocationInfo, 13041, ptds_mode, NULL) + + global __cuGraphAddNode_v3 + cuGetProcAddress_v2('cuGraphAddNode', &__cuGraphAddNode_v3, 13041, ptds_mode, NULL) + + global __cuGraphNodeSetParams_v2 + cuGetProcAddress_v2('cuGraphNodeSetParams', &__cuGraphNodeSetParams_v2, 13041, ptds_mode, NULL) + + global __cuCheckpointOperationComplete + cuGetProcAddress_v2('cuCheckpointOperationComplete', &__cuCheckpointOperationComplete, 13041, ptds_mode, NULL) + _cyb_atomic_int_store(&_cyb___py_driver_init, 1) return 0 @@ -3725,6 +3753,27 @@ cpdef dict _inspect_function_pointers(): global __cuStreamBeginRecaptureToGraph data["__cuStreamBeginRecaptureToGraph"] = __cuStreamBeginRecaptureToGraph + + global __cuDeviceGetFabricClusterUuid + data["__cuDeviceGetFabricClusterUuid"] = __cuDeviceGetFabricClusterUuid + + global __cuDeviceGetCliqueCount + data["__cuDeviceGetCliqueCount"] = __cuDeviceGetCliqueCount + + global __cuDeviceGetCliqueInfo + data["__cuDeviceGetCliqueInfo"] = __cuDeviceGetCliqueInfo + + global __cuMemGetLocationInfo + data["__cuMemGetLocationInfo"] = __cuMemGetLocationInfo + + global __cuGraphAddNode_v3 + data["__cuGraphAddNode_v3"] = __cuGraphAddNode_v3 + + global __cuGraphNodeSetParams_v2 + data["__cuGraphNodeSetParams_v2"] = __cuGraphNodeSetParams_v2 + + global __cuCheckpointOperationComplete + data["__cuCheckpointOperationComplete"] = __cuCheckpointOperationComplete _cyb_func_ptrs = data return data @@ -8915,3 +8964,73 @@ cdef CUresult _cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMo raise FunctionNotFoundError("function cuStreamBeginRecaptureToGraph is not found") return (__cuStreamBeginRecaptureToGraph)( hStream, mode, hGraph, callbackFunc, userData) + + +cdef CUresult _cuDeviceGetFabricClusterUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetFabricClusterUuid + _check_or_init_driver() + if __cuDeviceGetFabricClusterUuid == NULL: + with gil: + raise FunctionNotFoundError("function cuDeviceGetFabricClusterUuid is not found") + return (__cuDeviceGetFabricClusterUuid)( + uuid, dev) + + +cdef CUresult _cuDeviceGetCliqueCount(size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetCliqueCount + _check_or_init_driver() + if __cuDeviceGetCliqueCount == NULL: + with gil: + raise FunctionNotFoundError("function cuDeviceGetCliqueCount is not found") + return (__cuDeviceGetCliqueCount)( + count, dev) + + +cdef CUresult _cuDeviceGetCliqueInfo(CUcliqueInfo* cliqueInfo, size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuDeviceGetCliqueInfo + _check_or_init_driver() + if __cuDeviceGetCliqueInfo == NULL: + with gil: + raise FunctionNotFoundError("function cuDeviceGetCliqueInfo is not found") + return (__cuDeviceGetCliqueInfo)( + cliqueInfo, count, dev) + + +cdef CUresult _cuMemGetLocationInfo(CUdeviceptr ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, CUmemLocation* location_out) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuMemGetLocationInfo + _check_or_init_driver() + if __cuMemGetLocationInfo == NULL: + with gil: + raise FunctionNotFoundError("function cuMemGetLocationInfo is not found") + return (__cuMemGetLocationInfo)( + ptr, size, summaryGranularity, samplingGranularity, location_out) + + +cdef CUresult _cuGraphAddNode_v3(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphAddNode_v3 + _check_or_init_driver() + if __cuGraphAddNode_v3 == NULL: + with gil: + raise FunctionNotFoundError("function cuGraphAddNode_v3 is not found") + return (__cuGraphAddNode_v3)( + phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + + +cdef CUresult _cuGraphNodeSetParams_v2(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuGraphNodeSetParams_v2 + _check_or_init_driver() + if __cuGraphNodeSetParams_v2 == NULL: + with gil: + raise FunctionNotFoundError("function cuGraphNodeSetParams_v2 is not found") + return (__cuGraphNodeSetParams_v2)( + hNode, nodeParams) + + +cdef CUresult _cuCheckpointOperationComplete(CUcheckpointOperationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + global __cuCheckpointOperationComplete + _check_or_init_driver() + if __cuCheckpointOperationComplete == NULL: + with gil: + raise FunctionNotFoundError("function cuCheckpointOperationComplete is not found") + return (__cuCheckpointOperationComplete)( + handle) diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd index b712a3087b8..4eadeab01c8 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b52d99b7f07615d6c5ecb869a5c632e6e9cb4d0cb4f6cb1e43977d29ecd9995c +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4fc8b05be8a1a25737a1940a53339f6af3b7a1d4e513558109aaac48b3222681 from ..cynvfatbin cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx index d4c54124e52..937878b5a15 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_linux.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7d6e928f56af8543c123889e5337a34f9270cbd554c699a8e013f720362988c1 +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6b42b70b945f3898a53f87261fcdb5a688cb9ab93476427781e1838a3ffffaf9 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx index 272cc3b0fbf..03453560c4e 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvfatbin_windows.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5af6a32f057cc5814e89a97c876285101fa636ac38928e7d11b7ada35db98a91 +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4f4711d1bf4600663e9a7958c75666ad7c7785248afdef1c701d58c78ce81bfe # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd index 4a391792fd0..bb1419ae946 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8bcbd5ba3e12e16d974e141ec43ddce440ac7c84e5aaa746607daa43557f54fb +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f54caf5830f0b76772ca6e06487bc94eef354c725f6e6f3c908b993860ba6787 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx index 1469d9ea9e9..4c21693caf7 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_linux.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3088e90760487963484f2cb5230ddc1177d3a1b6d89213f9f368e8eec4a57eb8 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a286ec6ed7fcdd0d82d6624d68c700cc3678e1e26f3ba1243df518cdeea5a992 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx index f6eb942a5dd..9ce2fc111be 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvjitlink_windows.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=50c5a9ae5e2cdd364766f02b98517d019e582ea862643113d20416393e76dfe6 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=eef6c33c425f24828307c7fc62c45dcdd8b98e5dd47be467709f64eadfd432b2 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvml.pxd b/cuda_bindings/cuda/bindings/_internal/nvml.pxd index 272a77d24db..11504e0f41d 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvml.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c2cc3cd086b5aeea5fad7ca17600d0102691a3cb354b916f5c086c383d77df19 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=25a9a64fc7aed96ba4ab9be2bd7b2c8c2b464e7d8fb7dab7b2dd85b32da0efe3 from ..cynvml cimport * @@ -367,3 +367,18 @@ cdef nvmlReturn_t _nvmlSystemGetCPER_v1(nvmlGetCPER_v1_t* cper) except?_NVMLRETU cdef nvmlReturn_t _nvmlDeviceGetBBXTimeData_v1(nvmlDevice_t device, nvmlBBXTimeData_v1_t* timeData) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceGetAccountingStats_v2(nvmlDevice_t device, nvmlAccountingStats_v2_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t _nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemappedRowsInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, nvmlGpuFabricInfo_v4_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t* setBwModeAsync) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, const nvmlGpuOperationalEventConfig_v1_t* config) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventSetWait_v3_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, nvmlEventSetGetContextCount_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, nvmlEventSetGetContextInfo_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetContextData_v1(nvmlEventSet_t set, nvmlEventSetGetContextData_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t _nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t* pBankRemapperStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx index 3ac1218e8c3..ab251a57fe1 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_linux.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0f1c15a761a6c0fbd8dd543ce35fa436cc64eadee9d7018f9eca3869d2ead415 +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=77c516adfddaab32e14f7d0bf80b78c33d928198af0be5ea18ec7b880c9c09c9 # <<<< PREAMBLE CONTENT >>>> @@ -419,6 +419,21 @@ cdef void* __nvmlSystemGetCPER_v1 = NULL cdef void* __nvmlDeviceGetBBXTimeData_v1 = NULL cdef void* __nvmlDeviceGetAccountingStats_v2 = NULL cdef void* __nvmlDeviceGetRemappedRows_v2 = NULL +cdef void* __nvmlDeviceSetAdaptiveTgpMode_v1 = NULL +cdef void* __nvmlDeviceGetAdaptiveTgpModeInfo_v1 = NULL +cdef void* __nvmlDeviceSetMemoryLimits_v1 = NULL +cdef void* __nvmlDeviceGetMemoryLimits_v1 = NULL +cdef void* __nvmlDeviceGetGpuFabricInfo_v4 = NULL +cdef void* __nvmlDevicePerfMetricsGetSamples_v1 = NULL +cdef void* __nvmlDeviceSetNvlinkBwModeAsync_v1 = NULL +cdef void* __nvmlDeviceGetNvLinkTelemetrySamples_v1 = NULL +cdef void* __nvmlEventSetRegisterGpuOperationalEvents_v1 = NULL +cdef void* __nvmlEventSetWait_v3 = NULL +cdef void* __nvmlEventSetGetContextCount_v1 = NULL +cdef void* __nvmlEventSetGetContextInfo_v1 = NULL +cdef void* __nvmlEventSetGetContextData_v1 = NULL +cdef void* __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 = NULL +cdef void* __nvmlDeviceGetBankRemapperStatus_v1 = NULL cdef int _init_nvml() except -1 nogil: global _cyb___py_nvml_init @@ -2911,6 +2926,111 @@ cdef int _init_nvml() except -1 nogil: handle = load_library() __nvmlDeviceGetRemappedRows_v2 = _cyb_dlsym(handle, 'nvmlDeviceGetRemappedRows_v2') + global __nvmlDeviceSetAdaptiveTgpMode_v1 + __nvmlDeviceSetAdaptiveTgpMode_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceSetAdaptiveTgpMode_v1') + if __nvmlDeviceSetAdaptiveTgpMode_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceSetAdaptiveTgpMode_v1 = _cyb_dlsym(handle, 'nvmlDeviceSetAdaptiveTgpMode_v1') + + global __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + __nvmlDeviceGetAdaptiveTgpModeInfo_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceGetAdaptiveTgpModeInfo_v1') + if __nvmlDeviceGetAdaptiveTgpModeInfo_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetAdaptiveTgpModeInfo_v1 = _cyb_dlsym(handle, 'nvmlDeviceGetAdaptiveTgpModeInfo_v1') + + global __nvmlDeviceSetMemoryLimits_v1 + __nvmlDeviceSetMemoryLimits_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceSetMemoryLimits_v1') + if __nvmlDeviceSetMemoryLimits_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceSetMemoryLimits_v1 = _cyb_dlsym(handle, 'nvmlDeviceSetMemoryLimits_v1') + + global __nvmlDeviceGetMemoryLimits_v1 + __nvmlDeviceGetMemoryLimits_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceGetMemoryLimits_v1') + if __nvmlDeviceGetMemoryLimits_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetMemoryLimits_v1 = _cyb_dlsym(handle, 'nvmlDeviceGetMemoryLimits_v1') + + global __nvmlDeviceGetGpuFabricInfo_v4 + __nvmlDeviceGetGpuFabricInfo_v4 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceGetGpuFabricInfo_v4') + if __nvmlDeviceGetGpuFabricInfo_v4 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetGpuFabricInfo_v4 = _cyb_dlsym(handle, 'nvmlDeviceGetGpuFabricInfo_v4') + + global __nvmlDevicePerfMetricsGetSamples_v1 + __nvmlDevicePerfMetricsGetSamples_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDevicePerfMetricsGetSamples_v1') + if __nvmlDevicePerfMetricsGetSamples_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDevicePerfMetricsGetSamples_v1 = _cyb_dlsym(handle, 'nvmlDevicePerfMetricsGetSamples_v1') + + global __nvmlDeviceSetNvlinkBwModeAsync_v1 + __nvmlDeviceSetNvlinkBwModeAsync_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceSetNvlinkBwModeAsync_v1') + if __nvmlDeviceSetNvlinkBwModeAsync_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceSetNvlinkBwModeAsync_v1 = _cyb_dlsym(handle, 'nvmlDeviceSetNvlinkBwModeAsync_v1') + + global __nvmlDeviceGetNvLinkTelemetrySamples_v1 + __nvmlDeviceGetNvLinkTelemetrySamples_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceGetNvLinkTelemetrySamples_v1') + if __nvmlDeviceGetNvLinkTelemetrySamples_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetNvLinkTelemetrySamples_v1 = _cyb_dlsym(handle, 'nvmlDeviceGetNvLinkTelemetrySamples_v1') + + global __nvmlEventSetRegisterGpuOperationalEvents_v1 + __nvmlEventSetRegisterGpuOperationalEvents_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlEventSetRegisterGpuOperationalEvents_v1') + if __nvmlEventSetRegisterGpuOperationalEvents_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlEventSetRegisterGpuOperationalEvents_v1 = _cyb_dlsym(handle, 'nvmlEventSetRegisterGpuOperationalEvents_v1') + + global __nvmlEventSetWait_v3 + __nvmlEventSetWait_v3 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlEventSetWait_v3') + if __nvmlEventSetWait_v3 == NULL: + if handle == NULL: + handle = load_library() + __nvmlEventSetWait_v3 = _cyb_dlsym(handle, 'nvmlEventSetWait_v3') + + global __nvmlEventSetGetContextCount_v1 + __nvmlEventSetGetContextCount_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlEventSetGetContextCount_v1') + if __nvmlEventSetGetContextCount_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlEventSetGetContextCount_v1 = _cyb_dlsym(handle, 'nvmlEventSetGetContextCount_v1') + + global __nvmlEventSetGetContextInfo_v1 + __nvmlEventSetGetContextInfo_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlEventSetGetContextInfo_v1') + if __nvmlEventSetGetContextInfo_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlEventSetGetContextInfo_v1 = _cyb_dlsym(handle, 'nvmlEventSetGetContextInfo_v1') + + global __nvmlEventSetGetContextData_v1 + __nvmlEventSetGetContextData_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlEventSetGetContextData_v1') + if __nvmlEventSetGetContextData_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlEventSetGetContextData_v1 = _cyb_dlsym(handle, 'nvmlEventSetGetContextData_v1') + + global __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1') + if __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 = _cyb_dlsym(handle, 'nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1') + + global __nvmlDeviceGetBankRemapperStatus_v1 + __nvmlDeviceGetBankRemapperStatus_v1 = _cyb_dlsym(_cyb_RTLD_DEFAULT, 'nvmlDeviceGetBankRemapperStatus_v1') + if __nvmlDeviceGetBankRemapperStatus_v1 == NULL: + if handle == NULL: + handle = load_library() + __nvmlDeviceGetBankRemapperStatus_v1 = _cyb_dlsym(handle, 'nvmlDeviceGetBankRemapperStatus_v1') + _cyb_atomic_int_store(&_cyb___py_nvml_init, 1) return 0 @@ -3992,6 +4112,51 @@ cpdef dict _inspect_function_pointers(): global __nvmlDeviceGetRemappedRows_v2 data["__nvmlDeviceGetRemappedRows_v2"] = __nvmlDeviceGetRemappedRows_v2 + + global __nvmlDeviceSetAdaptiveTgpMode_v1 + data["__nvmlDeviceSetAdaptiveTgpMode_v1"] = __nvmlDeviceSetAdaptiveTgpMode_v1 + + global __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + data["__nvmlDeviceGetAdaptiveTgpModeInfo_v1"] = __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + + global __nvmlDeviceSetMemoryLimits_v1 + data["__nvmlDeviceSetMemoryLimits_v1"] = __nvmlDeviceSetMemoryLimits_v1 + + global __nvmlDeviceGetMemoryLimits_v1 + data["__nvmlDeviceGetMemoryLimits_v1"] = __nvmlDeviceGetMemoryLimits_v1 + + global __nvmlDeviceGetGpuFabricInfo_v4 + data["__nvmlDeviceGetGpuFabricInfo_v4"] = __nvmlDeviceGetGpuFabricInfo_v4 + + global __nvmlDevicePerfMetricsGetSamples_v1 + data["__nvmlDevicePerfMetricsGetSamples_v1"] = __nvmlDevicePerfMetricsGetSamples_v1 + + global __nvmlDeviceSetNvlinkBwModeAsync_v1 + data["__nvmlDeviceSetNvlinkBwModeAsync_v1"] = __nvmlDeviceSetNvlinkBwModeAsync_v1 + + global __nvmlDeviceGetNvLinkTelemetrySamples_v1 + data["__nvmlDeviceGetNvLinkTelemetrySamples_v1"] = __nvmlDeviceGetNvLinkTelemetrySamples_v1 + + global __nvmlEventSetRegisterGpuOperationalEvents_v1 + data["__nvmlEventSetRegisterGpuOperationalEvents_v1"] = __nvmlEventSetRegisterGpuOperationalEvents_v1 + + global __nvmlEventSetWait_v3 + data["__nvmlEventSetWait_v3"] = __nvmlEventSetWait_v3 + + global __nvmlEventSetGetContextCount_v1 + data["__nvmlEventSetGetContextCount_v1"] = __nvmlEventSetGetContextCount_v1 + + global __nvmlEventSetGetContextInfo_v1 + data["__nvmlEventSetGetContextInfo_v1"] = __nvmlEventSetGetContextInfo_v1 + + global __nvmlEventSetGetContextData_v1 + data["__nvmlEventSetGetContextData_v1"] = __nvmlEventSetGetContextData_v1 + + global __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + data["__nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1"] = __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + + global __nvmlDeviceGetBankRemapperStatus_v1 + data["__nvmlDeviceGetBankRemapperStatus_v1"] = __nvmlDeviceGetBankRemapperStatus_v1 _cyb_func_ptrs = data return data @@ -7562,3 +7727,153 @@ cdef nvmlReturn_t _nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemappe raise FunctionNotFoundError("function nvmlDeviceGetRemappedRows_v2 is not found") return (__nvmlDeviceGetRemappedRows_v2)( device, info) + + +cdef nvmlReturn_t _nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetAdaptiveTgpMode_v1 + _check_or_init_nvml() + if __nvmlDeviceSetAdaptiveTgpMode_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetAdaptiveTgpMode_v1 is not found") + return (__nvmlDeviceSetAdaptiveTgpMode_v1)( + device, mode) + + +cdef nvmlReturn_t _nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + _check_or_init_nvml() + if __nvmlDeviceGetAdaptiveTgpModeInfo_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetAdaptiveTgpModeInfo_v1 is not found") + return (__nvmlDeviceGetAdaptiveTgpModeInfo_v1)( + device, info) + + +cdef nvmlReturn_t _nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetMemoryLimits_v1 + _check_or_init_nvml() + if __nvmlDeviceSetMemoryLimits_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetMemoryLimits_v1 is not found") + return (__nvmlDeviceSetMemoryLimits_v1)( + device, limits) + + +cdef nvmlReturn_t _nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetMemoryLimits_v1 + _check_or_init_nvml() + if __nvmlDeviceGetMemoryLimits_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetMemoryLimits_v1 is not found") + return (__nvmlDeviceGetMemoryLimits_v1)( + device, limits) + + +cdef nvmlReturn_t _nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, nvmlGpuFabricInfo_v4_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetGpuFabricInfo_v4 + _check_or_init_nvml() + if __nvmlDeviceGetGpuFabricInfo_v4 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetGpuFabricInfo_v4 is not found") + return (__nvmlDeviceGetGpuFabricInfo_v4)( + device, gpuFabricInfo) + + +cdef nvmlReturn_t _nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDevicePerfMetricsGetSamples_v1 + _check_or_init_nvml() + if __nvmlDevicePerfMetricsGetSamples_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDevicePerfMetricsGetSamples_v1 is not found") + return (__nvmlDevicePerfMetricsGetSamples_v1)( + device, samples) + + +cdef nvmlReturn_t _nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t* setBwModeAsync) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetNvlinkBwModeAsync_v1 + _check_or_init_nvml() + if __nvmlDeviceSetNvlinkBwModeAsync_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetNvlinkBwModeAsync_v1 is not found") + return (__nvmlDeviceSetNvlinkBwModeAsync_v1)( + device, setBwModeAsync) + + +cdef nvmlReturn_t _nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetNvLinkTelemetrySamples_v1 + _check_or_init_nvml() + if __nvmlDeviceGetNvLinkTelemetrySamples_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetNvLinkTelemetrySamples_v1 is not found") + return (__nvmlDeviceGetNvLinkTelemetrySamples_v1)( + device, samples) + + +cdef nvmlReturn_t _nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, const nvmlGpuOperationalEventConfig_v1_t* config) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetRegisterGpuOperationalEvents_v1 + _check_or_init_nvml() + if __nvmlEventSetRegisterGpuOperationalEvents_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetRegisterGpuOperationalEvents_v1 is not found") + return (__nvmlEventSetRegisterGpuOperationalEvents_v1)( + eventSet, config) + + +cdef nvmlReturn_t _nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventSetWait_v3_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetWait_v3 + _check_or_init_nvml() + if __nvmlEventSetWait_v3 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetWait_v3 is not found") + return (__nvmlEventSetWait_v3)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, nvmlEventSetGetContextCount_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetContextCount_v1 + _check_or_init_nvml() + if __nvmlEventSetGetContextCount_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetContextCount_v1 is not found") + return (__nvmlEventSetGetContextCount_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, nvmlEventSetGetContextInfo_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetContextInfo_v1 + _check_or_init_nvml() + if __nvmlEventSetGetContextInfo_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetContextInfo_v1 is not found") + return (__nvmlEventSetGetContextInfo_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetContextData_v1(nvmlEventSet_t set, nvmlEventSetGetContextData_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetContextData_v1 + _check_or_init_nvml() + if __nvmlEventSetGetContextData_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetContextData_v1 is not found") + return (__nvmlEventSetGetContextData_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + _check_or_init_nvml() + if __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 is not found") + return (__nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t* pBankRemapperStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetBankRemapperStatus_v1 + _check_or_init_nvml() + if __nvmlDeviceGetBankRemapperStatus_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetBankRemapperStatus_v1 is not found") + return (__nvmlDeviceGetBankRemapperStatus_v1)( + device, pBankRemapperStatus) diff --git a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx index 14462225e14..e5a7cf53a78 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvml_windows.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=dfef5d61e23406c9104db88966dea7813becf53ad5e89fca63b78d618097e15a +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5e4dabf79550bbf99149a55b67542f1b6bf20a48f3dbfd922848c16115418f5e # <<<< PREAMBLE CONTENT >>>> @@ -419,6 +419,21 @@ cdef void* __nvmlSystemGetCPER_v1 = NULL cdef void* __nvmlDeviceGetBBXTimeData_v1 = NULL cdef void* __nvmlDeviceGetAccountingStats_v2 = NULL cdef void* __nvmlDeviceGetRemappedRows_v2 = NULL +cdef void* __nvmlDeviceSetAdaptiveTgpMode_v1 = NULL +cdef void* __nvmlDeviceGetAdaptiveTgpModeInfo_v1 = NULL +cdef void* __nvmlDeviceSetMemoryLimits_v1 = NULL +cdef void* __nvmlDeviceGetMemoryLimits_v1 = NULL +cdef void* __nvmlDeviceGetGpuFabricInfo_v4 = NULL +cdef void* __nvmlDevicePerfMetricsGetSamples_v1 = NULL +cdef void* __nvmlDeviceSetNvlinkBwModeAsync_v1 = NULL +cdef void* __nvmlDeviceGetNvLinkTelemetrySamples_v1 = NULL +cdef void* __nvmlEventSetRegisterGpuOperationalEvents_v1 = NULL +cdef void* __nvmlEventSetWait_v3 = NULL +cdef void* __nvmlEventSetGetContextCount_v1 = NULL +cdef void* __nvmlEventSetGetContextInfo_v1 = NULL +cdef void* __nvmlEventSetGetContextData_v1 = NULL +cdef void* __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 = NULL +cdef void* __nvmlDeviceGetBankRemapperStatus_v1 = NULL cdef int _init_nvml() except -1 nogil: global _cyb___py_nvml_init @@ -1494,6 +1509,51 @@ cdef int _init_nvml() except -1 nogil: global __nvmlDeviceGetRemappedRows_v2 __nvmlDeviceGetRemappedRows_v2 = _cyb_GetProcAddress(handle, 'nvmlDeviceGetRemappedRows_v2') + global __nvmlDeviceSetAdaptiveTgpMode_v1 + __nvmlDeviceSetAdaptiveTgpMode_v1 = _cyb_GetProcAddress(handle, 'nvmlDeviceSetAdaptiveTgpMode_v1') + + global __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + __nvmlDeviceGetAdaptiveTgpModeInfo_v1 = _cyb_GetProcAddress(handle, 'nvmlDeviceGetAdaptiveTgpModeInfo_v1') + + global __nvmlDeviceSetMemoryLimits_v1 + __nvmlDeviceSetMemoryLimits_v1 = _cyb_GetProcAddress(handle, 'nvmlDeviceSetMemoryLimits_v1') + + global __nvmlDeviceGetMemoryLimits_v1 + __nvmlDeviceGetMemoryLimits_v1 = _cyb_GetProcAddress(handle, 'nvmlDeviceGetMemoryLimits_v1') + + global __nvmlDeviceGetGpuFabricInfo_v4 + __nvmlDeviceGetGpuFabricInfo_v4 = _cyb_GetProcAddress(handle, 'nvmlDeviceGetGpuFabricInfo_v4') + + global __nvmlDevicePerfMetricsGetSamples_v1 + __nvmlDevicePerfMetricsGetSamples_v1 = _cyb_GetProcAddress(handle, 'nvmlDevicePerfMetricsGetSamples_v1') + + global __nvmlDeviceSetNvlinkBwModeAsync_v1 + __nvmlDeviceSetNvlinkBwModeAsync_v1 = _cyb_GetProcAddress(handle, 'nvmlDeviceSetNvlinkBwModeAsync_v1') + + global __nvmlDeviceGetNvLinkTelemetrySamples_v1 + __nvmlDeviceGetNvLinkTelemetrySamples_v1 = _cyb_GetProcAddress(handle, 'nvmlDeviceGetNvLinkTelemetrySamples_v1') + + global __nvmlEventSetRegisterGpuOperationalEvents_v1 + __nvmlEventSetRegisterGpuOperationalEvents_v1 = _cyb_GetProcAddress(handle, 'nvmlEventSetRegisterGpuOperationalEvents_v1') + + global __nvmlEventSetWait_v3 + __nvmlEventSetWait_v3 = _cyb_GetProcAddress(handle, 'nvmlEventSetWait_v3') + + global __nvmlEventSetGetContextCount_v1 + __nvmlEventSetGetContextCount_v1 = _cyb_GetProcAddress(handle, 'nvmlEventSetGetContextCount_v1') + + global __nvmlEventSetGetContextInfo_v1 + __nvmlEventSetGetContextInfo_v1 = _cyb_GetProcAddress(handle, 'nvmlEventSetGetContextInfo_v1') + + global __nvmlEventSetGetContextData_v1 + __nvmlEventSetGetContextData_v1 = _cyb_GetProcAddress(handle, 'nvmlEventSetGetContextData_v1') + + global __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 = _cyb_GetProcAddress(handle, 'nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1') + + global __nvmlDeviceGetBankRemapperStatus_v1 + __nvmlDeviceGetBankRemapperStatus_v1 = _cyb_GetProcAddress(handle, 'nvmlDeviceGetBankRemapperStatus_v1') + _cyb_atomic_int_store(&_cyb___py_nvml_init, 1) return 0 @@ -2575,6 +2635,51 @@ cpdef dict _inspect_function_pointers(): global __nvmlDeviceGetRemappedRows_v2 data["__nvmlDeviceGetRemappedRows_v2"] = __nvmlDeviceGetRemappedRows_v2 + + global __nvmlDeviceSetAdaptiveTgpMode_v1 + data["__nvmlDeviceSetAdaptiveTgpMode_v1"] = __nvmlDeviceSetAdaptiveTgpMode_v1 + + global __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + data["__nvmlDeviceGetAdaptiveTgpModeInfo_v1"] = __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + + global __nvmlDeviceSetMemoryLimits_v1 + data["__nvmlDeviceSetMemoryLimits_v1"] = __nvmlDeviceSetMemoryLimits_v1 + + global __nvmlDeviceGetMemoryLimits_v1 + data["__nvmlDeviceGetMemoryLimits_v1"] = __nvmlDeviceGetMemoryLimits_v1 + + global __nvmlDeviceGetGpuFabricInfo_v4 + data["__nvmlDeviceGetGpuFabricInfo_v4"] = __nvmlDeviceGetGpuFabricInfo_v4 + + global __nvmlDevicePerfMetricsGetSamples_v1 + data["__nvmlDevicePerfMetricsGetSamples_v1"] = __nvmlDevicePerfMetricsGetSamples_v1 + + global __nvmlDeviceSetNvlinkBwModeAsync_v1 + data["__nvmlDeviceSetNvlinkBwModeAsync_v1"] = __nvmlDeviceSetNvlinkBwModeAsync_v1 + + global __nvmlDeviceGetNvLinkTelemetrySamples_v1 + data["__nvmlDeviceGetNvLinkTelemetrySamples_v1"] = __nvmlDeviceGetNvLinkTelemetrySamples_v1 + + global __nvmlEventSetRegisterGpuOperationalEvents_v1 + data["__nvmlEventSetRegisterGpuOperationalEvents_v1"] = __nvmlEventSetRegisterGpuOperationalEvents_v1 + + global __nvmlEventSetWait_v3 + data["__nvmlEventSetWait_v3"] = __nvmlEventSetWait_v3 + + global __nvmlEventSetGetContextCount_v1 + data["__nvmlEventSetGetContextCount_v1"] = __nvmlEventSetGetContextCount_v1 + + global __nvmlEventSetGetContextInfo_v1 + data["__nvmlEventSetGetContextInfo_v1"] = __nvmlEventSetGetContextInfo_v1 + + global __nvmlEventSetGetContextData_v1 + data["__nvmlEventSetGetContextData_v1"] = __nvmlEventSetGetContextData_v1 + + global __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + data["__nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1"] = __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + + global __nvmlDeviceGetBankRemapperStatus_v1 + data["__nvmlDeviceGetBankRemapperStatus_v1"] = __nvmlDeviceGetBankRemapperStatus_v1 _cyb_func_ptrs = data return data @@ -6144,3 +6249,153 @@ cdef nvmlReturn_t _nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemappe raise FunctionNotFoundError("function nvmlDeviceGetRemappedRows_v2 is not found") return (__nvmlDeviceGetRemappedRows_v2)( device, info) + + +cdef nvmlReturn_t _nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetAdaptiveTgpMode_v1 + _check_or_init_nvml() + if __nvmlDeviceSetAdaptiveTgpMode_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetAdaptiveTgpMode_v1 is not found") + return (__nvmlDeviceSetAdaptiveTgpMode_v1)( + device, mode) + + +cdef nvmlReturn_t _nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetAdaptiveTgpModeInfo_v1 + _check_or_init_nvml() + if __nvmlDeviceGetAdaptiveTgpModeInfo_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetAdaptiveTgpModeInfo_v1 is not found") + return (__nvmlDeviceGetAdaptiveTgpModeInfo_v1)( + device, info) + + +cdef nvmlReturn_t _nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetMemoryLimits_v1 + _check_or_init_nvml() + if __nvmlDeviceSetMemoryLimits_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetMemoryLimits_v1 is not found") + return (__nvmlDeviceSetMemoryLimits_v1)( + device, limits) + + +cdef nvmlReturn_t _nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetMemoryLimits_v1 + _check_or_init_nvml() + if __nvmlDeviceGetMemoryLimits_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetMemoryLimits_v1 is not found") + return (__nvmlDeviceGetMemoryLimits_v1)( + device, limits) + + +cdef nvmlReturn_t _nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, nvmlGpuFabricInfo_v4_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetGpuFabricInfo_v4 + _check_or_init_nvml() + if __nvmlDeviceGetGpuFabricInfo_v4 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetGpuFabricInfo_v4 is not found") + return (__nvmlDeviceGetGpuFabricInfo_v4)( + device, gpuFabricInfo) + + +cdef nvmlReturn_t _nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDevicePerfMetricsGetSamples_v1 + _check_or_init_nvml() + if __nvmlDevicePerfMetricsGetSamples_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDevicePerfMetricsGetSamples_v1 is not found") + return (__nvmlDevicePerfMetricsGetSamples_v1)( + device, samples) + + +cdef nvmlReturn_t _nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t* setBwModeAsync) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceSetNvlinkBwModeAsync_v1 + _check_or_init_nvml() + if __nvmlDeviceSetNvlinkBwModeAsync_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceSetNvlinkBwModeAsync_v1 is not found") + return (__nvmlDeviceSetNvlinkBwModeAsync_v1)( + device, setBwModeAsync) + + +cdef nvmlReturn_t _nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetNvLinkTelemetrySamples_v1 + _check_or_init_nvml() + if __nvmlDeviceGetNvLinkTelemetrySamples_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetNvLinkTelemetrySamples_v1 is not found") + return (__nvmlDeviceGetNvLinkTelemetrySamples_v1)( + device, samples) + + +cdef nvmlReturn_t _nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, const nvmlGpuOperationalEventConfig_v1_t* config) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetRegisterGpuOperationalEvents_v1 + _check_or_init_nvml() + if __nvmlEventSetRegisterGpuOperationalEvents_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetRegisterGpuOperationalEvents_v1 is not found") + return (__nvmlEventSetRegisterGpuOperationalEvents_v1)( + eventSet, config) + + +cdef nvmlReturn_t _nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventSetWait_v3_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetWait_v3 + _check_or_init_nvml() + if __nvmlEventSetWait_v3 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetWait_v3 is not found") + return (__nvmlEventSetWait_v3)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, nvmlEventSetGetContextCount_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetContextCount_v1 + _check_or_init_nvml() + if __nvmlEventSetGetContextCount_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetContextCount_v1 is not found") + return (__nvmlEventSetGetContextCount_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, nvmlEventSetGetContextInfo_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetContextInfo_v1 + _check_or_init_nvml() + if __nvmlEventSetGetContextInfo_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetContextInfo_v1 is not found") + return (__nvmlEventSetGetContextInfo_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetContextData_v1(nvmlEventSet_t set, nvmlEventSetGetContextData_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetContextData_v1 + _check_or_init_nvml() + if __nvmlEventSetGetContextData_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetContextData_v1 is not found") + return (__nvmlEventSetGetContextData_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 + _check_or_init_nvml() + if __nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1 is not found") + return (__nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1)( + set, params) + + +cdef nvmlReturn_t _nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t* pBankRemapperStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + global __nvmlDeviceGetBankRemapperStatus_v1 + _check_or_init_nvml() + if __nvmlDeviceGetBankRemapperStatus_v1 == NULL: + with gil: + raise FunctionNotFoundError("function nvmlDeviceGetBankRemapperStatus_v1 is not found") + return (__nvmlDeviceGetBankRemapperStatus_v1)( + device, pBankRemapperStatus) diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd index 020f113c03b..1da9da1cdcf 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ff79428bd0afac112d0a9f6131f9ed097b8d0ebc4574444a0e4a41e7f6e260d0 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1710f2e6f38e8023555cf41d7faf7c3aba487689e58eddac250903cc33d6d4fe from ..cynvrtc cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx index 65fb17fd67c..861fc42e34b 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_linux.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9f1c40aea658b74e1a42facbd2f201ea40500829e8442f8b6cc86d9b6c505268 +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d8397f8100cfd6d26ff1c1f4ea795dd81e92f4beb60d304b5306733152305760 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx index d3a33266ed1..917f6c45dd6 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvrtc_windows.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=70771457725c58846635384e6abc57f4ac479190c1fa0f3b0f174ba9420d20b9 +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b324edc3b551146f59d4df5588a6f5d1f06ec91d193333dcda5c35ca49dc251d # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd index e4ac3cf1258..5b9abafa5df 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/_internal/nvvm.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a27b041eb470b98bf5b1a0a92ace9467c5f3921d47ee10557a4f00ff1e4ac411 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6be47c668a3a1086937075cb5f4798941232ec81027841b98ee6ca66c277ff0c from ..cynvvm cimport * diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx index 9ca6695547c..39329bc9b64 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_linux.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5d1c4358f6dd269e4a5313c7a717acafaebf90ab58acc30002affa060c8389b4 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=cf645e79d2d72cd4c10d5f4fcd6bab245f292559ac432180554c0d944aa03dae # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx index bebeae150a7..047c99f2b9f 100644 --- a/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/nvvm_windows.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fb154012a5a055db532eb391202398888c164eb266582ebc67ce3b5f8eb2c485 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d826369ce197164240eae2ca22bc88bb193a3ec936946b9d3b5b906b503fb446 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_internal/runtime.pxd b/cuda_bindings/cuda/bindings/_internal/runtime.pxd index 04a943808a3..f7f47c97856 100644 --- a/cuda_bindings/cuda/bindings/_internal/runtime.pxd +++ b/cuda_bindings/cuda/bindings/_internal/runtime.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=afc5b9003f3efc6f826b46b17b5294f581a00a97f82beaad39634b5037b7669a +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0ffe9d8d30b5d068a7a7a368d66ca9f4904fbc62224f8617c3968dd73f017e25 from ..cyruntime cimport * # EGL/GL/VDPAU helper declarations (implementations included in runtime_linux/windows.pyx) @@ -337,3 +337,4 @@ cdef cudaError_t _cudaMemcpyWithAttributesAsync(void* dst, const void* src, size cdef cudaError_t _cudaMemcpy3DWithAttributesAsync(cudaMemcpy3DBatchOp* op, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil cdef cudaError_t _cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/cuda_bindings/cuda/bindings/_internal/runtime_linux.pyx b/cuda_bindings/cuda/bindings/_internal/runtime_linux.pyx index 2d1409ce2be..1ae37127bd1 100644 --- a/cuda_bindings/cuda/bindings/_internal/runtime_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/runtime_linux.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c45a1e41ddef35af045f2ff91e9703cb77870bf90603b3c5c7369e76f7a539f0 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8a9a7693abb19d9b8586773190de738ea06eff697d16683a49ce67bfa4426788 import os from libc.stdint cimport uintptr_t @@ -1043,6 +1043,9 @@ cdef extern from 'cuda_runtime_api.h' nogil: cdef extern from 'cuda_runtime_api.h' nogil: cudaError_t _static_cudaStreamBeginRecaptureToGraph "cudaStreamBeginRecaptureToGraph" (cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) noexcept +cdef extern from 'cuda_runtime_api.h' nogil: + cudaError_t _static_cudaMemGetLocationInfo "cudaMemGetLocationInfo" (void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) noexcept + ############################################################################### # Wrapper functions @@ -3286,3 +3289,10 @@ cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStrea if usePTDS: return ptds._cudaStreamBeginRecaptureToGraph(stream, mode, graph, callbackData) return _static_cudaStreamBeginRecaptureToGraph(stream, mode, graph, callbackData) + + +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemGetLocationInfo(devPtr, size, summaryGranularity, samplingGranularity, location_out) + return _static_cudaMemGetLocationInfo(devPtr, size, summaryGranularity, samplingGranularity, location_out) diff --git a/cuda_bindings/cuda/bindings/_internal/runtime_ptds.pxd b/cuda_bindings/cuda/bindings/_internal/runtime_ptds.pxd index e1685cd3680..322ecce25ce 100644 --- a/cuda_bindings/cuda/bindings/_internal/runtime_ptds.pxd +++ b/cuda_bindings/cuda/bindings/_internal/runtime_ptds.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fa210f57cc23e0c4cdcad28a1ab8292bc74cc6b557bb3ca1700d1be8c25aa6af +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=997d3bde508f97fcb58d0bfe138041c865c8c738f43dec215826d8498ad73cf2 from ..cyruntime cimport * @@ -332,3 +332,4 @@ cdef cudaError_t _cudaMemcpyWithAttributesAsync(void* dst, const void* src, size cdef cudaError_t _cudaMemcpy3DWithAttributesAsync(cudaMemcpy3DBatchOp* op, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil cdef cudaError_t _cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil diff --git a/cuda_bindings/cuda/bindings/_internal/runtime_ptds_linux.pyx b/cuda_bindings/cuda/bindings/_internal/runtime_ptds_linux.pyx index 0f940954d0d..730bd35b917 100644 --- a/cuda_bindings/cuda/bindings/_internal/runtime_ptds_linux.pyx +++ b/cuda_bindings/cuda/bindings/_internal/runtime_ptds_linux.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=33b0c77f7174d41189a91abfe73613b5ba48bd31b5da37d509da61c00b11a004 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0a50966ff0481d081895f8a962cedc08239c3637de07e4a554eec0cdf08d6670 cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM @@ -977,6 +977,9 @@ cdef extern from 'cuda_runtime_api.h' nogil: cdef extern from 'cuda_runtime_api.h' nogil: cudaError_t _static_cudaStreamBeginRecaptureToGraph "cudaStreamBeginRecaptureToGraph" (cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) noexcept +cdef extern from 'cuda_runtime_api.h' nogil: + cudaError_t _static_cudaMemGetLocationInfo "cudaMemGetLocationInfo" (void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) noexcept + ############################################################################### # Wrapper functions @@ -2260,3 +2263,7 @@ cdef cudaError_t _cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodePara cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil: return _static_cudaStreamBeginRecaptureToGraph(stream, mode, graph, callbackData) + + +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return _static_cudaMemGetLocationInfo(devPtr, size, summaryGranularity, samplingGranularity, location_out) diff --git a/cuda_bindings/cuda/bindings/_internal/runtime_ptds_windows.pyx b/cuda_bindings/cuda/bindings/_internal/runtime_ptds_windows.pyx index 0f940954d0d..730bd35b917 100644 --- a/cuda_bindings/cuda/bindings/_internal/runtime_ptds_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/runtime_ptds_windows.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=33b0c77f7174d41189a91abfe73613b5ba48bd31b5da37d509da61c00b11a004 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=0a50966ff0481d081895f8a962cedc08239c3637de07e4a554eec0cdf08d6670 cdef extern from "": """ #define CUDA_API_PER_THREAD_DEFAULT_STREAM @@ -977,6 +977,9 @@ cdef extern from 'cuda_runtime_api.h' nogil: cdef extern from 'cuda_runtime_api.h' nogil: cudaError_t _static_cudaStreamBeginRecaptureToGraph "cudaStreamBeginRecaptureToGraph" (cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) noexcept +cdef extern from 'cuda_runtime_api.h' nogil: + cudaError_t _static_cudaMemGetLocationInfo "cudaMemGetLocationInfo" (void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) noexcept + ############################################################################### # Wrapper functions @@ -2260,3 +2263,7 @@ cdef cudaError_t _cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodePara cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil: return _static_cudaStreamBeginRecaptureToGraph(stream, mode, graph, callbackData) + + +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return _static_cudaMemGetLocationInfo(devPtr, size, summaryGranularity, samplingGranularity, location_out) diff --git a/cuda_bindings/cuda/bindings/_internal/runtime_windows.pyx b/cuda_bindings/cuda/bindings/_internal/runtime_windows.pyx index f848344f483..01a9d803c50 100644 --- a/cuda_bindings/cuda/bindings/_internal/runtime_windows.pyx +++ b/cuda_bindings/cuda/bindings/_internal/runtime_windows.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5f0e930fd8c13f49036a66fc40729a3270cc44d8b16234b1387b93e51f0e0a0f +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ea5305267da9d9a72f329179f57a5ba85d5ba93f7dbb80eb6deb188f735f3d68 import os from libc.stdint cimport uintptr_t @@ -1031,6 +1031,9 @@ cdef extern from 'cuda_runtime_api.h' nogil: cdef extern from 'cuda_runtime_api.h' nogil: cudaError_t _static_cudaStreamBeginRecaptureToGraph "cudaStreamBeginRecaptureToGraph" (cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) noexcept +cdef extern from 'cuda_runtime_api.h' nogil: + cudaError_t _static_cudaMemGetLocationInfo "cudaMemGetLocationInfo" (void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) noexcept + ############################################################################### # Wrapper functions @@ -3274,3 +3277,10 @@ cdef cudaError_t _cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStrea if usePTDS: return ptds._cudaStreamBeginRecaptureToGraph(stream, mode, graph, callbackData) return _static_cudaStreamBeginRecaptureToGraph(stream, mode, graph, callbackData) + + +cdef cudaError_t _cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil: + cdef bint usePTDS = cudaPythonInit() + if usePTDS: + return ptds._cudaMemGetLocationInfo(devPtr, size, summaryGranularity, samplingGranularity, location_out) + return _static_cudaMemGetLocationInfo(devPtr, size, summaryGranularity, samplingGranularity, location_out) diff --git a/cuda_bindings/cuda/bindings/_v2/nvrtc.pxd b/cuda_bindings/cuda/bindings/_v2/nvrtc.pxd index c288aa4cffa..9c5978e5474 100644 --- a/cuda_bindings/cuda/bindings/_v2/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/_v2/nvrtc.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e55c11afd649f273847d4a36e76eb1629e95dea0f15dac7624de259db8203e28 +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5c7c24ae0ae5a6032e23f801fe9c3151a434eebd3b3429fbfd799985f87b184c # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx b/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx index ffa3973e950..9cc508aeef6 100644 --- a/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/_v2/nvrtc.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a36c7e54cf29166832dd9aebc1fa71cc3649498794a2846e707396419caebe10 +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3b41a6e66b9064266d04521a6cc9b9a4f715c453d21323ab9741f9e34e6f2d80 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/cudla.pxd b/cuda_bindings/cuda/bindings/cudla.pxd index bb11235cbb6..90cddb7e342 100644 --- a/cuda_bindings/cuda/bindings/cudla.pxd +++ b/cuda_bindings/cuda/bindings/cudla.pxd @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b82680ec867e23638b173760105c35030e0cba5c9a8b3bb536ce5bb3381ec1fb +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f6b70193e4ca3c62bd5749b3d19d305f0e268225bf1a6dcf6b95091cb0511791 # <<<< PREAMBLE CONTENT >>>> @@ -43,6 +43,7 @@ ctypedef cudlaModuleLoadFlags _ModuleLoadFlags ctypedef cudlaSubmissionFlags _SubmissionFlags ctypedef cudlaAccessPermissionFlags _AccessPermissionFlags ctypedef cudlaDevAttributeType _DevAttributeType +ctypedef cudlaScratchMemoryConfig _ScratchMemoryConfig ############################################################################### diff --git a/cuda_bindings/cuda/bindings/cudla.pyx b/cuda_bindings/cuda/bindings/cudla.pyx index 75b1f05f2ca..9d04eb6013d 100644 --- a/cuda_bindings/cuda/bindings/cudla.pyx +++ b/cuda_bindings/cuda/bindings/cudla.pyx @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3c177b7a0328c0f6f16067c8c9f4e5a002bd019e8c17c017ba9f77af21da8d75 +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=27847299a8355597d74d78c538539764838b579ac5331197a0773132e9c1fc18 # <<<< PREAMBLE CONTENT >>>> @@ -1728,6 +1728,14 @@ class DevAttributeType(_cyb_IntEnum): UNIFIED_ADDRESSING = CUDLA_UNIFIED_ADDRESSING DEVICE_VERSION = CUDLA_DEVICE_VERSION +class ScratchMemoryConfig(_cyb_IntEnum): + """ + See `cudlaScratchMemoryConfig`. + """ + SCRATCH_MEMORY_DEFAULT = CUDLA_SCRATCH_MEMORY_DEFAULT + SCRATCH_MEMORY_SHARED_STATIC = CUDLA_SCRATCH_MEMORY_SHARED_STATIC + MAX = CUDLA_SCRATCH_MEMORY_CONFIG_MAX + ############################################################################### # Error handling diff --git a/cuda_bindings/cuda/bindings/cufile.pxd b/cuda_bindings/cuda/bindings/cufile.pxd index 74633880658..1970c4f614a 100644 --- a/cuda_bindings/cuda/bindings/cufile.pxd +++ b/cuda_bindings/cuda/bindings/cufile.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b10e4f1751ee5423db23c6fc953cb0ae37bff7e8937bf1d39ac5fd6eeb0e4e87 +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=616e51ad15aa071792eceba5db17a6fb2b845b219395e2fdcc6278d3621f52de diff --git a/cuda_bindings/cuda/bindings/cufile.pyx b/cuda_bindings/cuda/bindings/cufile.pyx index e8127feb6c3..7365ed4b62b 100644 --- a/cuda_bindings/cuda/bindings/cufile.pyx +++ b/cuda_bindings/cuda/bindings/cufile.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=df46a6921d93f83249134c7705b2809f57145b6fb72f6f40c4657ecd1b443b81 +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=99d6a9660bb3015680d55d4d2da20861cecfd836de22a90892eeb64a480acafa # <<<< PREAMBLE CONTENT >>>> @@ -1198,6 +1198,163 @@ cdef class PerGpuStats: return obj +cdef _get_io_vec_dtype_offsets(): + cdef CUfileIOVec_t pod + return _numpy.dtype({ + 'names': ['base_', 'len'], + 'formats': [_numpy.intp, _numpy.uint64], + 'offsets': [ + (&(pod.base)) - (&pod), + (&(pod.len)) - (&pod), + ], + 'itemsize': sizeof(CUfileIOVec_t), + }) + +io_vec_dtype = _get_io_vec_dtype_offsets() + +cdef class IOVec: + """Empty-initialize an array of `CUfileIOVec_t`. + The resulting object is of length `size` and of dtype `io_vec_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `CUfileIOVec_t` + """ + cdef: + readonly object _data + object _owner + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=io_vec_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(CUfileIOVec_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(CUfileIOVec_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.IOVec_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.IOVec object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, IOVec)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def base_(self): + """Union[~_numpy.intp, int]: """ + if self._data.size == 1: + return int(self._data.base_[0]) + return self._data.base_ + + @base_.setter + def base_(self, val): + self._data.base_ = val + + @property + def len(self): + """Union[~_numpy.uint64, int]: """ + if self._data.size == 1: + return int(self._data.len[0]) + return self._data.len + + @len.setter + def len(self, val): + self._data.len = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return IOVec.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == io_vec_dtype: + return IOVec.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an IOVec instance with the memory from the given buffer.""" + return IOVec.from_data(_numpy.frombuffer(buffer, dtype=io_vec_dtype)) + + @staticmethod + def from_data(data): + """Create an IOVec instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `io_vec_dtype` holding the data. + """ + cdef IOVec obj = IOVec.__new__(IOVec) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != io_vec_dtype: + raise ValueError("data array must be of dtype io_vec_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an IOVec instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef IOVec obj = IOVec.__new__(IOVec) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(CUfileIOVec_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=io_vec_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + cdef _get_descr_dtype_offsets(): cdef CUfileDescr_t pod return _numpy.dtype({ @@ -1504,8 +1661,8 @@ cdef class _py_anon_pod2: cdef _get_stats_level1_dtype_offsets(): cdef CUfileStatsLevel1_t pod return _numpy.dtype({ - 'names': ['read_ops', 'write_ops', 'hdl_register_ops', 'hdl_deregister_ops', 'buf_register_ops', 'buf_deregister_ops', 'read_bytes', 'write_bytes', 'read_bw_bytes_per_sec', 'write_bw_bytes_per_sec', 'read_lat_avg_us', 'write_lat_avg_us', 'read_ops_per_sec', 'write_ops_per_sec', 'read_lat_sum_us', 'write_lat_sum_us', 'batch_submit_ops', 'batch_complete_ops', 'batch_setup_ops', 'batch_cancel_ops', 'batch_destroy_ops', 'batch_enqueued_ops', 'batch_posix_enqueued_ops', 'batch_processed_ops', 'batch_posix_processed_ops', 'batch_nvfs_submit_ops', 'batch_p2p_submit_ops', 'batch_aio_submit_ops', 'batch_iouring_submit_ops', 'batch_mixed_io_submit_ops', 'batch_total_submit_ops', 'batch_read_bytes', 'batch_write_bytes', 'batch_read_bw_bytes', 'batch_write_bw_bytes', 'batch_submit_lat_avg_us', 'batch_completion_lat_avg_us', 'batch_submit_ops_per_sec', 'batch_complete_ops_per_sec', 'batch_submit_lat_sum_us', 'batch_completion_lat_sum_us', 'last_batch_read_bytes', 'last_batch_write_bytes'], - 'formats': [op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64], + 'names': ['read_ops', 'write_ops', 'hdl_register_ops', 'hdl_deregister_ops', 'buf_register_ops', 'buf_deregister_ops', 'read_bytes', 'write_bytes', 'read_bw_bytes_per_sec', 'write_bw_bytes_per_sec', 'read_lat_avg_us', 'write_lat_avg_us', 'read_ops_per_sec', 'write_ops_per_sec', 'read_lat_sum_us', 'write_lat_sum_us', 'batch_submit_ops', 'batch_complete_ops', 'batch_setup_ops', 'batch_cancel_ops', 'batch_destroy_ops', 'batch_enqueued_ops', 'batch_posix_enqueued_ops', 'batch_processed_ops', 'batch_posix_processed_ops', 'batch_nvfs_submit_ops', 'batch_p2p_submit_ops', 'batch_aio_submit_ops', 'batch_iouring_submit_ops', 'batch_mixed_io_submit_ops', 'batch_total_submit_ops', 'batch_read_bytes', 'batch_write_bytes', 'batch_read_bw_bytes', 'batch_write_bw_bytes', 'batch_submit_lat_avg_us', 'batch_completion_lat_avg_us', 'batch_submit_ops_per_sec', 'batch_complete_ops_per_sec', 'batch_submit_lat_sum_us', 'batch_completion_lat_sum_us', 'last_batch_read_bytes', 'last_batch_write_bytes', 'readv_ops', 'writev_ops', 'readv_bytes', 'writev_bytes', 'readv_bw_bytes_per_sec', 'writev_bw_bytes_per_sec', 'readv_lat_avg_us', 'writev_lat_avg_us', 'readv_ops_per_sec', 'writev_ops_per_sec', 'readv_lat_sum_us', 'writev_lat_sum_us'], + 'formats': [op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, op_counter_dtype, op_counter_dtype, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64], 'offsets': [ (&(pod.read_ops)) - (&pod), (&(pod.write_ops)) - (&pod), @@ -1550,6 +1707,18 @@ cdef _get_stats_level1_dtype_offsets(): (&(pod.batch_completion_lat_sum_us)) - (&pod), (&(pod.last_batch_read_bytes)) - (&pod), (&(pod.last_batch_write_bytes)) - (&pod), + (&(pod.readv_ops)) - (&pod), + (&(pod.writev_ops)) - (&pod), + (&(pod.readv_bytes)) - (&pod), + (&(pod.writev_bytes)) - (&pod), + (&(pod.readv_bw_bytes_per_sec)) - (&pod), + (&(pod.writev_bw_bytes_per_sec)) - (&pod), + (&(pod.readv_lat_avg_us)) - (&pod), + (&(pod.writev_lat_avg_us)) - (&pod), + (&(pod.readv_ops_per_sec)) - (&pod), + (&(pod.writev_ops_per_sec)) - (&pod), + (&(pod.readv_lat_sum_us)) - (&pod), + (&(pod.writev_lat_sum_us)) - (&pod), ], 'itemsize': sizeof(CUfileStatsLevel1_t), }) @@ -1958,6 +2127,38 @@ cdef class StatsLevel1: cdef OpCounter val_ = val _cyb_memcpy(&(self._ptr[0].batch_total_submit_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + @property + def readv_ops(self): + """OpCounter: """ + return OpCounter.from_ptr( + &(self._ptr[0].readv_ops), + readonly=self._readonly, + owner=self, + ) + + @readv_ops.setter + def readv_ops(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + cdef OpCounter val_ = val + _cyb_memcpy(&(self._ptr[0].readv_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + + @property + def writev_ops(self): + """OpCounter: """ + return OpCounter.from_ptr( + &(self._ptr[0].writev_ops), + readonly=self._readonly, + owner=self, + ) + + @writev_ops.setter + def writev_ops(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + cdef OpCounter val_ = val + _cyb_memcpy(&(self._ptr[0].writev_ops), (val_._get_ptr()), sizeof(CUfileOpCounter_t) * 1) + @property def read_bytes(self): """int: """ @@ -2200,6 +2401,116 @@ cdef class StatsLevel1: raise ValueError("This StatsLevel1 instance is read-only") self._ptr[0].last_batch_write_bytes = val + @property + def readv_bytes(self): + """int: """ + return self._ptr[0].readv_bytes + + @readv_bytes.setter + def readv_bytes(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_bytes = val + + @property + def writev_bytes(self): + """int: """ + return self._ptr[0].writev_bytes + + @writev_bytes.setter + def writev_bytes(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_bytes = val + + @property + def readv_bw_bytes_per_sec(self): + """int: """ + return self._ptr[0].readv_bw_bytes_per_sec + + @readv_bw_bytes_per_sec.setter + def readv_bw_bytes_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_bw_bytes_per_sec = val + + @property + def writev_bw_bytes_per_sec(self): + """int: """ + return self._ptr[0].writev_bw_bytes_per_sec + + @writev_bw_bytes_per_sec.setter + def writev_bw_bytes_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_bw_bytes_per_sec = val + + @property + def readv_lat_avg_us(self): + """int: """ + return self._ptr[0].readv_lat_avg_us + + @readv_lat_avg_us.setter + def readv_lat_avg_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_lat_avg_us = val + + @property + def writev_lat_avg_us(self): + """int: """ + return self._ptr[0].writev_lat_avg_us + + @writev_lat_avg_us.setter + def writev_lat_avg_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_lat_avg_us = val + + @property + def readv_ops_per_sec(self): + """int: """ + return self._ptr[0].readv_ops_per_sec + + @readv_ops_per_sec.setter + def readv_ops_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_ops_per_sec = val + + @property + def writev_ops_per_sec(self): + """int: """ + return self._ptr[0].writev_ops_per_sec + + @writev_ops_per_sec.setter + def writev_ops_per_sec(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_ops_per_sec = val + + @property + def readv_lat_sum_us(self): + """int: """ + return self._ptr[0].readv_lat_sum_us + + @readv_lat_sum_us.setter + def readv_lat_sum_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].readv_lat_sum_us = val + + @property + def writev_lat_sum_us(self): + """int: """ + return self._ptr[0].writev_lat_sum_us + + @writev_lat_sum_us.setter + def writev_lat_sum_us(self, val): + if self._readonly: + raise ValueError("This StatsLevel1 instance is read-only") + self._ptr[0].writev_lat_sum_us = val + @staticmethod def from_buffer(buffer): """Create an StatsLevel1 instance with the memory from the given buffer.""" @@ -2855,7 +3166,8 @@ class DriverControlFlags(_cyb_FastEnum): """ USE_POLL_MODE = (CU_FILE_USE_POLL_MODE, 'use POLL mode. properties.use_poll_mode') ALLOW_COMPAT_MODE = (CU_FILE_ALLOW_COMPAT_MODE, 'allow COMPATIBILITY mode. properties.allow_compat_mode') - POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'Vanilla posix io mode. properties.posix_io_mode') + VANILLA_POSIX_IO_MODE = (CU_FILE_VANILLA_POSIX_IO_MODE, 'Vanilla posix io mode. properties.vanilla_posix_io_mode') + POSIX_IO_MODE = (CU_FILE_POSIX_IO_MODE, 'alias for backward compatibility') FALLBACK_IO_MODE = (CU_FILE_FALLBACK_IO_MODE, 'Fallback io mode. properties.gds_fallback_io') class FeatureFlags(_cyb_FastEnum): @@ -2934,6 +3246,8 @@ class BoolConfigParameter(_cyb_FastEnum): FORCE_ODIRECT_MODE = CUFILE_PARAM_FORCE_ODIRECT_MODE SKIP_TOPOLOGY_DETECTION = CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION STREAM_MEMOPS_BYPASS = CUFILE_PARAM_STREAM_MEMOPS_BYPASS + PROPERTIES_POSIX_IO_MODE = CUFILE_PARAM_PROPERTIES_POSIX_IO_MODE + GDS_FALLBACK_IO = CUFILE_PARAM_GDS_FALLBACK_IO class StringConfigParameter(_cyb_FastEnum): """ @@ -2942,6 +3256,7 @@ class StringConfigParameter(_cyb_FastEnum): LOGGING_LEVEL = CUFILE_PARAM_LOGGING_LEVEL ENV_LOGFILE_PATH = CUFILE_PARAM_ENV_LOGFILE_PATH LOG_DIR = CUFILE_PARAM_LOG_DIR + RDMA_TRANSPORT = CUFILE_PARAM_RDMA_TRANSPORT class ArrayConfigParameter(_cyb_FastEnum): """ @@ -3437,6 +3752,8 @@ cpdef get_parameter_posix_pool_slab_array(intptr_t size_values, intptr_t count_v check_status(__status__) + + cpdef str op_status_error(int status): """cufileop status string. @@ -3499,4 +3816,48 @@ cpdef write(intptr_t fh, intptr_t buf_ptr_base, size_t size, off_t file_offset, return status +cpdef readv(intptr_t fh, IOVec iov, off_t file_offset, unsigned int flags=0): + """Read data from a registered file handle into a scatter list of device or host buffers. + + Args: + fh (intptr_t): ``CUfileHandle_t`` opaque file handle. + iov (IOVec): scatter/gather descriptor array; each element specifies a + base pointer (device or host) and a byte length. + file_offset (off_t): file offset from the beginning of the file. + flags (unsigned int): reserved; must be 0. + + Returns: + ssize_t: number of bytes read on success. + + .. seealso:: `cuFileReadv` + """ + cdef intptr_t iov_ptr = (iov)._get_ptr() + cdef size_t iovcnt = len(iov) + with nogil: + status = cuFileReadv(fh, iov_ptr, iovcnt, file_offset, flags) + check_status(status) + return status + + +cpdef writev(intptr_t fh, IOVec iov, off_t file_offset, unsigned int flags=0): + """Write data to a registered file handle from a gather list of device or host buffers. + + Args: + fh (intptr_t): ``CUfileHandle_t`` opaque file handle. + iov (IOVec): scatter/gather descriptor array; each element specifies a + base pointer (device or host) and a byte length. + file_offset (off_t): file offset from the beginning of the file. + flags (unsigned int): reserved; must be 0. + + Returns: + ssize_t: number of bytes written on success. + + .. seealso:: `cuFileWritev` + """ + cdef intptr_t iov_ptr = (iov)._get_ptr() + cdef size_t iovcnt = len(iov) + with nogil: + status = cuFileWritev(fh, iov_ptr, iovcnt, file_offset, flags) + check_status(status) + return status del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/cycudla.pxd b/cuda_bindings/cuda/bindings/cycudla.pxd index 5cd9cb3264e..bd47c37e1c6 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pxd +++ b/cuda_bindings/cuda/bindings/cycudla.pxd @@ -1,9 +1,9 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. # This layer exposes the C header to Cython as-is. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=be6683c55e3dcbd7c8c958a5d174e208adc510f1c3623b3ea97576e7e42c9c57 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f769acaca3dada01ba364b7053e43bcc2439f912fee376ebf3f2139fd8786203 # <<<< PREAMBLE CONTENT >>>> @@ -88,6 +88,11 @@ ctypedef enum cudlaDevAttributeType "cudlaDevAttributeType": CUDLA_UNIFIED_ADDRESSING "CUDLA_UNIFIED_ADDRESSING" = 0 CUDLA_DEVICE_VERSION "CUDLA_DEVICE_VERSION" = 1 +ctypedef enum cudlaScratchMemoryConfig "cudlaScratchMemoryConfig": + CUDLA_SCRATCH_MEMORY_DEFAULT "CUDLA_SCRATCH_MEMORY_DEFAULT" = (0U << 1) + CUDLA_SCRATCH_MEMORY_SHARED_STATIC "CUDLA_SCRATCH_MEMORY_SHARED_STATIC" = (1U << 1) + CUDLA_SCRATCH_MEMORY_CONFIG_MAX "CUDLA_SCRATCH_MEMORY_CONFIG_MAX" = 0x7FFFFFFF + # types ctypedef void* cudlaDevHandle 'cudlaDevHandle' diff --git a/cuda_bindings/cuda/bindings/cycudla.pyx b/cuda_bindings/cuda/bindings/cycudla.pyx index 63810aaec58..7249bd7135c 100644 --- a/cuda_bindings/cuda/bindings/cycudla.pyx +++ b/cuda_bindings/cuda/bindings/cycudla.pyx @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2024-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated across versions from 1.5.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9e8c534ff8b9d4e348af657e66d81b4758d90e7a3b840705267282c5cc4e8093 +# This code was automatically generated across versions from 1.5.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ef5d2f05cc1ae1fe20b8f9133f0e88a82406c97909ee9327fe4ed0645dae6ecb # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/cycufile.pxd b/cuda_bindings/cuda/bindings/cycufile.pxd index ac614bf80da..3196f6a5eab 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pxd +++ b/cuda_bindings/cuda/bindings/cycufile.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=1051fa856de24c84b3c8d3b2996adb28c5db2530a86f49c240b05eb0dab0954d +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ee9acc9a7052fdb1b1eddc639c1fbe72ac5f3b2a9179cd832240c916edce8d74 # <<<< PREAMBLE CONTENT >>>> @@ -117,6 +117,7 @@ cdef extern from 'cufile.h': ctypedef enum CUfileDriverControlFlags_t: CU_FILE_USE_POLL_MODE CU_FILE_ALLOW_COMPAT_MODE + CU_FILE_VANILLA_POSIX_IO_MODE CU_FILE_POSIX_IO_MODE CU_FILE_FALLBACK_IO_MODE @@ -182,12 +183,15 @@ cdef extern from 'cufile.h': CUFILE_PARAM_FORCE_ODIRECT_MODE CUFILE_PARAM_SKIP_TOPOLOGY_DETECTION CUFILE_PARAM_STREAM_MEMOPS_BYPASS + CUFILE_PARAM_PROPERTIES_POSIX_IO_MODE + CUFILE_PARAM_GDS_FALLBACK_IO cdef extern from 'cufile.h': ctypedef enum CUFileStringConfigParameter_t: CUFILE_PARAM_LOGGING_LEVEL CUFILE_PARAM_ENV_LOGFILE_PATH CUFILE_PARAM_LOG_DIR + CUFILE_PARAM_RDMA_TRANSPORT cdef extern from 'cufile.h': ctypedef enum CUFileArrayConfigParameter_t: @@ -295,6 +299,11 @@ cdef extern from 'cufile.h': uint64_t n_mmap_free uint64_t reg_bytes +cdef extern from 'cufile.h': + ctypedef struct CUfileIOVec_t 'CUfileIOVec_t': + void* base + size_t len + cdef extern from 'cufile.h': ctypedef struct CUfileDrvProps_t 'CUfileDrvProps_t': cuda_bindings_cufile__anon_pod0 nvfs @@ -359,6 +368,18 @@ cdef extern from 'cufile.h': uint64_t batch_completion_lat_sum_us uint64_t last_batch_read_bytes uint64_t last_batch_write_bytes + CUfileOpCounter_t readv_ops + CUfileOpCounter_t writev_ops + uint64_t readv_bytes + uint64_t writev_bytes + uint64_t readv_bw_bytes_per_sec + uint64_t writev_bw_bytes_per_sec + uint64_t readv_lat_avg_us + uint64_t writev_lat_avg_us + uint64_t readv_ops_per_sec + uint64_t writev_ops_per_sec + uint64_t readv_lat_sum_us + uint64_t writev_lat_sum_us cdef extern from 'cufile.h': ctypedef struct CUfileIOParams_t 'CUfileIOParams_t': @@ -449,3 +470,5 @@ cdef CUfileError_t cuFileGetStatsL3(CUfileStatsLevel3_t* stats) except?CUFILE_LOADING_ERROR nogil cdef CUfileError_t cuFileSetParameterPosixPoolSlabArray(const size_t* size_values, const size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil cdef CUfileError_t cuFileGetParameterPosixPoolSlabArray(size_t* size_values, size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil +cdef ssize_t cuFileReadv(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil +cdef ssize_t cuFileWritev(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil diff --git a/cuda_bindings/cuda/bindings/cycufile.pyx b/cuda_bindings/cuda/bindings/cycufile.pyx index ef94b75c02e..71e499b791d 100644 --- a/cuda_bindings/cuda/bindings/cycufile.pyx +++ b/cuda_bindings/cuda/bindings/cycufile.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=21f23d353f9a8d02c92a5c5740cfa8bed67c952fbf262b8181fdfb6f65e52a73 +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=331732354093d8b2560607ca720e2d2a8a4531704b11582ac7c5811f14261273 # <<<< PREAMBLE CONTENT >>>> @@ -194,3 +194,11 @@ cdef CUfileError_t cuFileSetParameterPosixPoolSlabArray(const size_t* size_value cdef CUfileError_t cuFileGetParameterPosixPoolSlabArray(size_t* size_values, size_t* count_values, int len) except?CUFILE_LOADING_ERROR nogil: return _cufile._cuFileGetParameterPosixPoolSlabArray(size_values, count_values, len) + + +cdef ssize_t cuFileReadv(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil: + return _cufile._cuFileReadv(fh, iov, iovcnt, file_offset, flags) + + +cdef ssize_t cuFileWritev(CUfileHandle_t fh, const CUfileIOVec_t* iov, size_t iovcnt, off_t file_offset, unsigned flags) except* nogil: + return _cufile._cuFileWritev(fh, iov, iovcnt, file_offset, flags) diff --git a/cuda_bindings/cuda/bindings/cydriver.pxd b/cuda_bindings/cuda/bindings/cydriver.pxd index 786cf22e7fb..db2e3f3bdb4 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pxd +++ b/cuda_bindings/cuda/bindings/cydriver.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bb890a59df1f24c75b658b283d480647d1201feb4e6b644edd4742022b7fbf8c +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=26d9c23bcf10595e40a03f65b7b7491e2fa5d7161458b6183c53353665bf6f52 # <<<< PREAMBLE CONTENT >>>> @@ -406,12 +406,17 @@ cdef extern from 'cuda.h': CU_DEVICE_ATTRIBUTE_HOST_ALLOC_DMA_BUF_SUPPORTED CU_DEVICE_ATTRIBUTE_ONLY_PARTIAL_HOST_NATIVE_ATOMIC_SUPPORTED CU_DEVICE_ATTRIBUTE_ATOMIC_REDUCTION_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT + CU_DEVICE_ATTRIBUTE_MAX_OVERSIZED_SHARED_MEMORY_PER_BLOCK CU_DEVICE_ATTRIBUTE_D3D12_CIG_STREAMS_SUPPORTED CU_DEVICE_ATTRIBUTE_DMA_BUF_MMAP_SUPPORTED CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_UNICAST_SUPPORTED CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_MULTICAST_SUPPORTED CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_COUNTED_OPS_SUPPORTED CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_UNICAST_ACCESS_ON_OWNER_DEVICE_SUPPORTED + CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_MULTIPROCESSOR_COUNT + CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_SUPPORTED_HANDLE_TYPES + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED CU_DEVICE_ATTRIBUTE_MAX ctypedef CUdevice_attribute_enum CUdevice_attribute @@ -438,6 +443,7 @@ cdef extern from 'cuda.h': CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE + CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL ctypedef CUpointer_attribute_enum CUpointer_attribute cdef extern from 'cuda.h': @@ -459,6 +465,7 @@ cdef extern from 'cuda.h': CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED + CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE CU_FUNC_ATTRIBUTE_MAX ctypedef CUfunction_attribute_enum CUfunction_attribute @@ -585,17 +592,20 @@ cdef extern from 'cuda.h': CU_TARGET_COMPUTE_100 CU_TARGET_COMPUTE_110 CU_TARGET_COMPUTE_103 + CU_TARGET_COMPUTE_107 CU_TARGET_COMPUTE_120 CU_TARGET_COMPUTE_121 CU_TARGET_COMPUTE_90A CU_TARGET_COMPUTE_100A CU_TARGET_COMPUTE_110A CU_TARGET_COMPUTE_103A + CU_TARGET_COMPUTE_107A CU_TARGET_COMPUTE_120A CU_TARGET_COMPUTE_121A CU_TARGET_COMPUTE_100F CU_TARGET_COMPUTE_110F CU_TARGET_COMPUTE_103F + CU_TARGET_COMPUTE_107F CU_TARGET_COMPUTE_120F CU_TARGET_COMPUTE_121F CU_TARGET_COMPUTE_101 @@ -665,6 +675,7 @@ cdef extern from 'cuda.h': CU_LIMIT_SHMEM_SIZE CU_LIMIT_CIG_ENABLED CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED + CU_LIMIT_PER_BLOCK_MEMORY_SIZE CU_LIMIT_MAX ctypedef CUlimit_enum CUlimit @@ -738,6 +749,7 @@ cdef extern from 'cuda.h': CU_CLUSTER_SCHEDULING_POLICY_DEFAULT CU_CLUSTER_SCHEDULING_POLICY_SPREAD CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING + CU_CLUSTER_SCHEDULING_POLICY_RUBIN_DSMEM_LOCALITY ctypedef CUclusterSchedulingPolicy_enum CUclusterSchedulingPolicy cdef extern from 'cuda.h': @@ -829,6 +841,7 @@ cdef extern from 'cuda.h': CUDA_ERROR_STUB_LIBRARY CUDA_ERROR_CALL_REQUIRES_NEWER_DRIVER CUDA_ERROR_DEVICE_UNAVAILABLE + CUDA_ERROR_MULTICAST_RESOURCE_FULL CUDA_ERROR_NO_DEVICE CUDA_ERROR_INVALID_DEVICE CUDA_ERROR_DEVICE_NOT_LICENSED @@ -857,6 +870,7 @@ cdef extern from 'cuda.h': CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC CUDA_ERROR_CONTAINED + CUDA_ERROR_INSUFFICIENT_LOADER_VERSION CUDA_ERROR_INVALID_SOURCE CUDA_ERROR_FILE_NOT_FOUND CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND @@ -919,6 +933,7 @@ cdef extern from 'cuda.h': CUDA_ERROR_KEY_ROTATION CUDA_ERROR_STREAM_DETACHED CUDA_ERROR_GRAPH_RECAPTURE_FAILURE + CUDA_ERROR_FABRIC_NOT_READY CUDA_ERROR_UNKNOWN ctypedef cudaError_enum CUresult @@ -1090,6 +1105,7 @@ cdef extern from 'cuda.h': CU_MEM_LOCATION_TYPE_HOST_NUMA CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT CU_MEM_LOCATION_TYPE_INVISIBLE + CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN CU_MEM_LOCATION_TYPE_MAX ctypedef CUmemLocationType_enum CUmemLocationType @@ -1176,6 +1192,7 @@ cdef extern from 'cuda.h': CU_MEMPOOL_ATTR_LOCATION_TYPE CU_MEMPOOL_ATTR_MAX_POOL_SIZE CU_MEMPOOL_ATTR_HW_DECOMPRESS_ENABLED + CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID ctypedef CUmemPool_attribute_enum CUmemPool_attribute cdef extern from 'cuda.h': @@ -1289,6 +1306,8 @@ cdef extern from 'cuda.h': CU_PROCESS_STATE_LOCKED CU_PROCESS_STATE_CHECKPOINTED CU_PROCESS_STATE_FAILED + CU_PROCESS_STATE_CHECKPOINTING + CU_PROCESS_STATE_RESTORING ctypedef CUprocessState_enum CUprocessState cdef extern from 'cuda.h': @@ -1545,6 +1564,7 @@ cdef extern from 'cuda.h': ctypedef enum CUdevSmResourceGroup_flags "CUdevSmResourceGroup_flags": CU_DEV_SM_RESOURCE_GROUP_DEFAULT CU_DEV_SM_RESOURCE_GROUP_BACKFILL + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID cdef extern from 'cuda.h': ctypedef enum CUdevSmResourceSplitByCount_flags "CUdevSmResourceSplitByCount_flags": @@ -1574,6 +1594,8 @@ cdef extern from 'cuda.h': CU_SHARED_MEMORY_MODE_DEFAULT CU_SHARED_MEMORY_MODE_REQUIRE_PORTABLE CU_SHARED_MEMORY_MODE_ALLOW_NON_PORTABLE + CU_SHARED_MEMORY_MODE_ALLOW_OVERSIZED_SHARED_MEMORY + CU_SHARED_MEMORY_MODE_PREFER_OVERSIZED_SHARED_MEMORY ctypedef CUsharedMemoryMode_enum CUsharedMemoryMode cdef extern from 'cuda.h': @@ -1606,8 +1628,16 @@ cdef extern from 'cuda.h': CU_GRAPH_RECAPTURE_INELIGIBLE_FOR_UPDATE CU_GRAPH_RECAPTURE_ERROR ctypedef CUgraphRecaptureStatus_enum CUgraphRecaptureStatus + +cdef extern from 'cuda.h': + ctypedef enum CUcliqueType_enum: + CU_CLIQUE_TYPE_UNICAST_POINTER + CU_CLIQUE_TYPE_MULTICAST_POINTER + CU_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT + CU_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT + ctypedef CUcliqueType_enum CUcliqueType cdef enum: _CURESULT_INTERNAL_LOADING_ERROR = CUresult.CUDA_ERROR_NOT_FOUND -cdef enum: CUDA_VERSION = 13030 +cdef enum: CUDA_VERSION = 13040 # TYPES @@ -1943,6 +1973,12 @@ cdef extern from 'cuda.h': ctypedef CUcoredumpCallbackEntry_st* CUcoredumpCallbackHandle 'CUcoredumpCallbackHandle' +cdef extern from 'cuda.h': + ctypedef struct CUIcheckpointOperation_st: + pass + ctypedef CUIcheckpointOperation_st* CUcheckpointOperationHandle 'CUcheckpointOperationHandle' + + cdef extern from 'cuda.h': cdef struct CUuuid_st: char bytes[16] @@ -1981,12 +2017,12 @@ cdef extern from 'cuda.h': unsigned char remote ctypedef CUlaunchMemSyncDomainMap_st CUlaunchMemSyncDomainMap -cdef struct cuda_bindings_driver__anon_pod4: +cdef struct cuda_bindings_driver__anon_pod5: unsigned int x unsigned int y unsigned int z -cdef struct cuda_bindings_driver__anon_pod7: +cdef struct cuda_bindings_driver__anon_pod8: unsigned int x unsigned int y unsigned int z @@ -2005,44 +2041,44 @@ cdef extern from 'cuda.h': size_t dataWindowSize ctypedef CUlibraryHostUniversalFunctionAndDataTable_st CUlibraryHostUniversalFunctionAndDataTable -cdef struct cuda_bindings_driver__anon_pod10: +cdef struct cuda_bindings_driver__anon_pod11: unsigned int width unsigned int height unsigned int depth -cdef struct cuda_bindings_driver__anon_pod16: +cdef struct cuda_bindings_driver__anon_pod17: int reserved[32] -cdef struct cuda_bindings_driver__anon_pod18: +cdef struct cuda_bindings_driver__anon_pod19: void* handle void* name -cdef struct cuda_bindings_driver__anon_pod20: +cdef struct cuda_bindings_driver__anon_pod21: void* handle void* name -cdef struct cuda_bindings_driver__anon_pod22: +cdef struct cuda_bindings_driver__anon_pod23: unsigned long long value -cdef union cuda_bindings_driver__anon_pod23: +cdef union cuda_bindings_driver__anon_pod24: void* fence unsigned long long reserved -cdef struct cuda_bindings_driver__anon_pod24: +cdef struct cuda_bindings_driver__anon_pod25: unsigned long long key -cdef struct cuda_bindings_driver__anon_pod26: +cdef struct cuda_bindings_driver__anon_pod27: unsigned long long value -cdef union cuda_bindings_driver__anon_pod27: +cdef union cuda_bindings_driver__anon_pod28: void* fence unsigned long long reserved -cdef struct cuda_bindings_driver__anon_pod28: +cdef struct cuda_bindings_driver__anon_pod29: unsigned long long key unsigned int timeoutMs -cdef struct cuda_bindings_driver__anon_pod31: +cdef struct cuda_bindings_driver__anon_pod34: unsigned int level unsigned int layer unsigned int offsetX @@ -2052,12 +2088,16 @@ cdef struct cuda_bindings_driver__anon_pod31: unsigned int extentHeight unsigned int extentDepth -cdef struct cuda_bindings_driver__anon_pod32: +cdef struct cuda_bindings_driver__anon_pod35: unsigned int layer unsigned long long offset unsigned long long size -cdef struct cuda_bindings_driver__anon_pod35: +cdef struct cuda_bindings_driver__anon_pod38: + unsigned char deviceId + unsigned char localityDomainId + +cdef struct cuda_bindings_driver__anon_pod39: unsigned char compressionType unsigned char gpuDirectRDMACapable unsigned short usage @@ -2069,6 +2109,7 @@ cdef extern from 'cuda.h': unsigned int minSmPartitionSize unsigned int smCoscheduledAlignment unsigned int flags + unsigned int localityDomainId ctypedef CUdevSmResource_st CUdevSmResource cdef extern from 'cuda.h': @@ -2082,7 +2123,8 @@ cdef extern from 'cuda.h': unsigned int coscheduledSmCount unsigned int preferredCoscheduledSmCount unsigned int flags - unsigned int reserved[12] + unsigned int localityDomainId + unsigned int reserved[11] ctypedef CU_DEV_SM_RESOURCE_GROUP_PARAMS_st CU_DEV_SM_RESOURCE_GROUP_PARAMS cdef extern from 'cuda.h': @@ -2096,9 +2138,15 @@ cdef extern from 'cuda.h': unsigned char data[64] ctypedef CUlogicalEndpointFabricHandle_st CUlogicalEndpointFabricHandle -cdef struct cuda_bindings_driver__anon_pod43: +cdef struct cuda_bindings_driver__anon_pod48: unsigned int numDevices +cdef extern from 'cuda.h': + cdef struct CUcliqueInfo_st: + CUcliqueType type + unsigned int id + ctypedef CUcliqueInfo_st CUcliqueInfo + cdef extern from 'cuda.h': ctypedef size_t (*CUoccupancyB2DSize 'CUoccupancyB2DSize')( int blockSize @@ -2145,11 +2193,6 @@ cdef extern from 'cuda.h': cuuint64_t reserved1[7] ctypedef CUcheckpointLockArgs_st CUcheckpointLockArgs -cdef extern from 'cuda.h': - cdef struct CUcheckpointCheckpointArgs_st: - cuuint64_t reserved[8] - ctypedef CUcheckpointCheckpointArgs_st CUcheckpointCheckpointArgs - cdef extern from 'cuda.h': cdef struct CUcheckpointUnlockArgs_st: cuuint64_t reserved[8] @@ -2289,30 +2332,25 @@ cdef extern from 'cuda.h': CUcontext ctx ctypedef CUDA_KERNEL_NODE_PARAMS_v3_st CUDA_KERNEL_NODE_PARAMS_v3 -cdef struct cuda_bindings_driver__anon_pod12: +cdef struct cuda_bindings_driver__anon_pod13: CUarray hArray -cdef struct cuda_bindings_driver__anon_pod13: +cdef struct cuda_bindings_driver__anon_pod14: CUmipmappedArray hMipmappedArray -cdef union cuda_bindings_driver__anon_pod29: +cdef union cuda_bindings_driver__anon_pod32: CUmipmappedArray mipmap CUarray array -cdef struct cuda_bindings_driver__anon_pod5: +cdef struct cuda_bindings_driver__anon_pod6: CUevent event int flags int triggerAtBlockStart -cdef struct cuda_bindings_driver__anon_pod6: +cdef struct cuda_bindings_driver__anon_pod7: CUevent event int flags -cdef extern from 'cuda.h': - cdef struct CUDA_EVENT_RECORD_NODE_PARAMS_st: - CUevent event - ctypedef CUDA_EVENT_RECORD_NODE_PARAMS_st CUDA_EVENT_RECORD_NODE_PARAMS - cdef extern from 'cuda.h': cdef struct CUDA_EVENT_WAIT_NODE_PARAMS_st: CUevent event @@ -2361,7 +2399,7 @@ cdef extern from 'cuda.h': CUgraphNode errorFromNode ctypedef CUgraphExecUpdateResultInfo_st CUgraphExecUpdateResultInfo_v1 -cdef struct cuda_bindings_driver__anon_pod8: +cdef struct cuda_bindings_driver__anon_pod9: int deviceUpdatable CUgraphDeviceNode devNode @@ -2380,53 +2418,40 @@ cdef extern from 'cuda.h': void* userData ctypedef CUDA_HOST_NODE_PARAMS_st CUDA_HOST_NODE_PARAMS_v1 -cdef extern from 'cuda.h': - cdef struct CUDA_HOST_NODE_PARAMS_v2_st: - CUhostFn fn - void* userData - unsigned int syncMode - ctypedef CUDA_HOST_NODE_PARAMS_v2_st CUDA_HOST_NODE_PARAMS_v2 - cdef extern from 'cuda.h': cdef struct CUDA_ARRAY_SPARSE_PROPERTIES_st: - cuda_bindings_driver__anon_pod10 tileExtent + cuda_bindings_driver__anon_pod11 tileExtent unsigned int miptailFirstLevel unsigned long long miptailSize unsigned int flags unsigned int reserved[4] ctypedef CUDA_ARRAY_SPARSE_PROPERTIES_st CUDA_ARRAY_SPARSE_PROPERTIES_v1 -cdef union cuda_bindings_driver__anon_pod17: +cdef union cuda_bindings_driver__anon_pod18: int fd - cuda_bindings_driver__anon_pod18 win32 + cuda_bindings_driver__anon_pod19 win32 void* nvSciBufObject -cdef union cuda_bindings_driver__anon_pod19: +cdef union cuda_bindings_driver__anon_pod20: int fd - cuda_bindings_driver__anon_pod20 win32 + cuda_bindings_driver__anon_pod21 win32 void* nvSciSyncObj -cdef struct cuda_bindings_driver__anon_pod21: - cuda_bindings_driver__anon_pod22 fence - cuda_bindings_driver__anon_pod23 nvSciSync - cuda_bindings_driver__anon_pod24 keyedMutex +cdef struct cuda_bindings_driver__anon_pod22: + cuda_bindings_driver__anon_pod23 fence + cuda_bindings_driver__anon_pod24 nvSciSync + cuda_bindings_driver__anon_pod25 keyedMutex unsigned int reserved[12] -cdef struct cuda_bindings_driver__anon_pod25: - cuda_bindings_driver__anon_pod26 fence - cuda_bindings_driver__anon_pod27 nvSciSync - cuda_bindings_driver__anon_pod28 keyedMutex +cdef struct cuda_bindings_driver__anon_pod26: + cuda_bindings_driver__anon_pod27 fence + cuda_bindings_driver__anon_pod28 nvSciSync + cuda_bindings_driver__anon_pod29 keyedMutex unsigned int reserved[10] -cdef union cuda_bindings_driver__anon_pod30: - cuda_bindings_driver__anon_pod31 sparseLevel - cuda_bindings_driver__anon_pod32 miptail - -cdef extern from 'cuda.h': - cdef struct CUmemLocation_st: - CUmemLocationType type - int id - ctypedef CUmemLocation_st CUmemLocation_v1 +cdef union cuda_bindings_driver__anon_pod33: + cuda_bindings_driver__anon_pod34 sparseLevel + cuda_bindings_driver__anon_pod35 miptail cdef extern from 'cuda.h': cdef struct CUstreamCigCaptureParams_st: @@ -2568,13 +2593,13 @@ cdef extern from 'cuda.h': size_t Depth ctypedef CUDA_MEMCPY3D_PEER_st CUDA_MEMCPY3D_PEER_v1 -cdef struct cuda_bindings_driver__anon_pod14: +cdef struct cuda_bindings_driver__anon_pod15: CUdeviceptr devPtr CUarray_format format unsigned int numChannels size_t sizeInBytes -cdef struct cuda_bindings_driver__anon_pod15: +cdef struct cuda_bindings_driver__anon_pod16: CUdeviceptr devPtr CUarray_format format unsigned int numChannels @@ -2587,6 +2612,13 @@ cdef extern from 'cuda.h': CUdeviceptr dptr ctypedef CUDA_MEM_FREE_NODE_PARAMS_st CUDA_MEM_FREE_NODE_PARAMS +cdef extern from 'cuda.h': + cdef struct CUcheckpointCustomStoragePerDeviceData_st: + CUdeviceptr devPtr + size_t size + CUstream stream + ctypedef CUcheckpointCustomStoragePerDeviceData_st CUcheckpointCustomStoragePerDeviceData + cdef extern from 'cuda.h': cdef struct CUdevWorkqueueConfigResource_st: CUdevice device @@ -2594,7 +2626,7 @@ cdef extern from 'cuda.h': CUdevWorkqueueConfigScope sharingScope ctypedef CUdevWorkqueueConfigResource_st CUdevWorkqueueConfigResource -cdef struct cuda_bindings_driver__anon_pod42: +cdef struct cuda_bindings_driver__anon_pod47: CUdevice device cdef extern from 'cuda.h': @@ -2605,7 +2637,7 @@ cdef extern from 'cuda.h': ) -cdef union cuda_bindings_driver__anon_pod9: +cdef union cuda_bindings_driver__anon_pod10: CUexecAffinitySmCount smCount cdef extern from 'cuda.h': @@ -2616,10 +2648,10 @@ cdef extern from 'cuda.h': unsigned int reserved[16] ctypedef CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1 -cdef union cuda_bindings_driver__anon_pod33: +cdef union cuda_bindings_driver__anon_pod36: CUmemGenericAllocationHandle memHandle -cdef struct cuda_bindings_driver__anon_pod38: +cdef struct cuda_bindings_driver__anon_pod42: CUarray array CUoffset3D offset @@ -2641,16 +2673,16 @@ cdef extern from 'cuda.h': CUaccessPolicyWindow accessPolicyWindow int cooperative CUsynchronizationPolicy syncPolicy - cuda_bindings_driver__anon_pod4 clusterDim + cuda_bindings_driver__anon_pod5 clusterDim CUclusterSchedulingPolicy clusterSchedulingPolicyPreference int programmaticStreamSerializationAllowed - cuda_bindings_driver__anon_pod5 programmaticEvent - cuda_bindings_driver__anon_pod6 launchCompletionEvent + cuda_bindings_driver__anon_pod6 programmaticEvent + cuda_bindings_driver__anon_pod7 launchCompletionEvent int priority CUlaunchMemSyncDomainMap memSyncDomainMap CUlaunchMemSyncDomain memSyncDomain - cuda_bindings_driver__anon_pod7 preferredClusterDim - cuda_bindings_driver__anon_pod8 deviceUpdatableKernelNode + cuda_bindings_driver__anon_pod8 preferredClusterDim + cuda_bindings_driver__anon_pod9 deviceUpdatableKernelNode unsigned int sharedMemCarveout unsigned int nvlinkUtilCentricScheduling CUlaunchAttributePortableClusterMode portableClusterSizeMode @@ -2658,11 +2690,20 @@ cdef extern from 'cuda.h': ctypedef CUlaunchAttributeValue_union CUlaunchAttributeValue cdef extern from 'cuda.h': - cdef struct CUcheckpointRestoreArgs_st: - CUcheckpointGpuPair* gpuPairs - unsigned int gpuPairsCount - char reserved[((64 - 8) - 4)] - ctypedef CUcheckpointRestoreArgs_st CUcheckpointRestoreArgs + cdef struct CUDA_HOST_NODE_PARAMS_v2_st: + CUhostFn fn + void* userData + unsigned int syncMode + CUcontext ctx + CUgreenCtx gCtx + ctypedef CUDA_HOST_NODE_PARAMS_v2_st CUDA_HOST_NODE_PARAMS_v2 + +cdef extern from 'cuda.h': + cdef struct CUDA_EVENT_RECORD_NODE_PARAMS_st: + CUevent event + CUcontext ctx + CUgreenCtx gCtx + ctypedef CUDA_EVENT_RECORD_NODE_PARAMS_st CUDA_EVENT_RECORD_NODE_PARAMS cdef extern from 'cuda.h': cdef struct CUasyncNotificationInfo_st: @@ -2681,7 +2722,7 @@ cdef extern from 'cuda.h': cdef extern from 'cuda.h': cdef struct CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: CUexternalMemoryHandleType type - cuda_bindings_driver__anon_pod17 handle + cuda_bindings_driver__anon_pod18 handle unsigned long long size unsigned int flags unsigned int reserved[16] @@ -2690,28 +2731,31 @@ cdef extern from 'cuda.h': cdef extern from 'cuda.h': cdef struct CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: CUexternalSemaphoreHandleType type - cuda_bindings_driver__anon_pod19 handle + cuda_bindings_driver__anon_pod20 handle unsigned int flags unsigned int reserved[16] ctypedef CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1 cdef extern from 'cuda.h': cdef struct CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st: - cuda_bindings_driver__anon_pod21 params + cuda_bindings_driver__anon_pod22 params unsigned int flags unsigned int reserved[16] ctypedef CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1 cdef extern from 'cuda.h': cdef struct CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st: - cuda_bindings_driver__anon_pod25 params + cuda_bindings_driver__anon_pod26 params unsigned int flags unsigned int reserved[16] ctypedef CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1 cdef extern from 'cuda.h': - ctypedef CUmemLocation_v1 CUmemLocation 'CUmemLocation' - + cdef struct CUmemLocation_st: + CUmemLocationType type + int id + cuda_bindings_driver__anon_pod38 localized + ctypedef CUmemLocation_st CUmemLocation_v1 cdef extern from 'cuda.h': cdef union CUstreamBatchMemOpParams_union: @@ -2740,17 +2784,24 @@ cdef extern from 'cuda.h': ctypedef CUDA_MEMCPY3D_PEER_v1 CUDA_MEMCPY3D_PEER 'CUDA_MEMCPY3D_PEER' -cdef union cuda_bindings_driver__anon_pod11: - cuda_bindings_driver__anon_pod12 array - cuda_bindings_driver__anon_pod13 mipmap - cuda_bindings_driver__anon_pod14 linear - cuda_bindings_driver__anon_pod15 pitch2D - cuda_bindings_driver__anon_pod16 reserved +cdef union cuda_bindings_driver__anon_pod12: + cuda_bindings_driver__anon_pod13 array + cuda_bindings_driver__anon_pod14 mipmap + cuda_bindings_driver__anon_pod15 linear + cuda_bindings_driver__anon_pod16 pitch2D + cuda_bindings_driver__anon_pod17 reserved + +cdef extern from 'cuda.h': + cdef struct CUcheckpointCustomStorageInfo_st: + CUcheckpointOperationHandle handle + CUcheckpointCustomStoragePerDeviceData* perDeviceData + unsigned int deviceCount + ctypedef CUcheckpointCustomStorageInfo_st CUcheckpointCustomStorageInfo cdef extern from 'cuda.h': cdef struct CUexecAffinityParam_st: CUexecAffinityType type - cuda_bindings_driver__anon_pod9 param + cuda_bindings_driver__anon_pod10 param ctypedef CUexecAffinityParam_st CUexecAffinityParam_v1 cdef extern from 'cuda.h': @@ -2760,12 +2811,12 @@ cdef extern from 'cuda.h': cdef extern from 'cuda.h': cdef struct CUarrayMapInfo_st: CUresourcetype resourceType - cuda_bindings_driver__anon_pod29 resource + cuda_bindings_driver__anon_pod32 resource CUarraySparseSubresourceType subresourceType - cuda_bindings_driver__anon_pod30 subresource + cuda_bindings_driver__anon_pod33 subresource CUmemOperationType memOperationType CUmemHandleType memHandleType - cuda_bindings_driver__anon_pod33 memHandle + cuda_bindings_driver__anon_pod36 memHandle unsigned long long offset unsigned int deviceBitMask unsigned int flags @@ -2811,44 +2862,8 @@ cdef extern from 'cuda.h': cdef extern from 'cuda.h': - cdef struct CUmemAllocationProp_st: - CUmemAllocationType type - CUmemAllocationHandleType requestedHandleTypes - CUmemLocation location - void* win32HandleMetaData - cuda_bindings_driver__anon_pod35 allocFlags - ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1 - -cdef extern from 'cuda.h': - cdef struct CUmemAccessDesc_st: - CUmemLocation location - CUmemAccess_flags flags - ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1 - -cdef extern from 'cuda.h': - cdef struct CUmemPoolProps_st: - CUmemAllocationType allocType - CUmemAllocationHandleType handleTypes - CUmemLocation location - void* win32SecurityAttributes - size_t maxSize - unsigned short usage - unsigned char reserved[54] - ctypedef CUmemPoolProps_st CUmemPoolProps_v1 - -cdef extern from 'cuda.h': - cdef struct CUmemcpyAttributes_st: - CUmemcpySrcAccessOrder srcAccessOrder - CUmemLocation srcLocHint - CUmemLocation dstLocHint - unsigned int flags - ctypedef CUmemcpyAttributes_st CUmemcpyAttributes_v1 + ctypedef CUmemLocation_v1 CUmemLocation 'CUmemLocation' -cdef struct cuda_bindings_driver__anon_pod37: - CUdeviceptr ptr - size_t rowLength - size_t layerHeight - CUmemLocation locHint cdef extern from 'cuda.h': ctypedef CUstreamBatchMemOpParams_v1 CUstreamBatchMemOpParams 'CUstreamBatchMemOpParams' @@ -2865,10 +2880,25 @@ cdef extern from 'cuda.h': cdef extern from 'cuda.h': cdef struct CUDA_RESOURCE_DESC_st: CUresourcetype resType - cuda_bindings_driver__anon_pod11 res + cuda_bindings_driver__anon_pod12 res unsigned int flags ctypedef CUDA_RESOURCE_DESC_st CUDA_RESOURCE_DESC_v1 +cdef extern from 'cuda.h': + cdef struct CUcheckpointCheckpointArgs_st: + CUcheckpointCustomStorageInfo** customStorageInfo_out + char reserved[56] + ctypedef CUcheckpointCheckpointArgs_st CUcheckpointCheckpointArgs + +cdef extern from 'cuda.h': + cdef struct CUcheckpointRestoreArgs_st: + CUcheckpointGpuPair* gpuPairs + unsigned int gpuPairsCount + unsigned int padding0 + CUcheckpointCustomStorageInfo** customStorageInfo_out + char reserved[40] + ctypedef CUcheckpointRestoreArgs_st CUcheckpointRestoreArgs + cdef extern from 'cuda.h': cdef struct CUdevResource_st: CUdevResourceType type @@ -2883,8 +2913,8 @@ cdef extern from 'cuda.h': cdef extern from 'cuda.h': cdef struct CUlogicalEndpointProp_struct: CUlogicalEndpointType type - cuda_bindings_driver__anon_pod42 unicast - cuda_bindings_driver__anon_pod43 multicast + cuda_bindings_driver__anon_pod47 unicast + cuda_bindings_driver__anon_pod48 multicast unsigned long long size unsigned int ipcHandleTypes unsigned int flags @@ -2932,6 +2962,8 @@ cdef extern from 'cuda.h': CUexternalSemaphore* extSemArray CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* paramsArray unsigned int numExtSems + CUcontext ctx + CUgreenCtx gCtx ctypedef CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 cdef extern from 'cuda.h': @@ -2946,27 +2978,50 @@ cdef extern from 'cuda.h': CUexternalSemaphore* extSemArray CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* paramsArray unsigned int numExtSems + CUcontext ctx + CUgreenCtx gCtx ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2 cdef extern from 'cuda.h': - ctypedef CUmemAllocationProp_v1 CUmemAllocationProp 'CUmemAllocationProp' - + cdef struct CUmemAllocationProp_st: + CUmemAllocationType type + CUmemAllocationHandleType requestedHandleTypes + CUmemLocation location + void* win32HandleMetaData + cuda_bindings_driver__anon_pod39 allocFlags + ctypedef CUmemAllocationProp_st CUmemAllocationProp_v1 cdef extern from 'cuda.h': - ctypedef CUmemAccessDesc_v1 CUmemAccessDesc 'CUmemAccessDesc' - + cdef struct CUmemAccessDesc_st: + CUmemLocation location + CUmemAccess_flags flags + ctypedef CUmemAccessDesc_st CUmemAccessDesc_v1 cdef extern from 'cuda.h': - ctypedef CUmemPoolProps_v1 CUmemPoolProps 'CUmemPoolProps' - + cdef struct CUmemPoolProps_st: + CUmemAllocationType allocType + CUmemAllocationHandleType handleTypes + CUmemLocation location + void* win32SecurityAttributes + size_t maxSize + unsigned short usage + unsigned char gpuDirectRDMACapable + unsigned char reserved[53] + ctypedef CUmemPoolProps_st CUmemPoolProps_v1 cdef extern from 'cuda.h': - ctypedef CUmemcpyAttributes_v1 CUmemcpyAttributes 'CUmemcpyAttributes' - + cdef struct CUmemcpyAttributes_st: + CUmemcpySrcAccessOrder srcAccessOrder + CUmemLocation srcLocHint + CUmemLocation dstLocHint + unsigned int flags + ctypedef CUmemcpyAttributes_st CUmemcpyAttributes_v1 -cdef union cuda_bindings_driver__anon_pod36: - cuda_bindings_driver__anon_pod37 ptr - cuda_bindings_driver__anon_pod38 array +cdef struct cuda_bindings_driver__anon_pod41: + CUdeviceptr ptr + size_t rowLength + size_t layerHeight + CUmemLocation locHint cdef extern from 'cuda.h': cdef struct CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st: @@ -3007,6 +3062,30 @@ cdef extern from 'cuda.h': ctypedef CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1 CUDA_EXT_SEM_WAIT_NODE_PARAMS 'CUDA_EXT_SEM_WAIT_NODE_PARAMS' +cdef extern from 'cuda.h': + ctypedef CUmemAllocationProp_v1 CUmemAllocationProp 'CUmemAllocationProp' + + +cdef extern from 'cuda.h': + ctypedef CUmemAccessDesc_v1 CUmemAccessDesc 'CUmemAccessDesc' + + +cdef extern from 'cuda.h': + ctypedef CUmemPoolProps_v1 CUmemPoolProps 'CUmemPoolProps' + + +cdef extern from 'cuda.h': + ctypedef CUmemcpyAttributes_v1 CUmemcpyAttributes 'CUmemcpyAttributes' + + +cdef union cuda_bindings_driver__anon_pod40: + cuda_bindings_driver__anon_pod41 ptr + cuda_bindings_driver__anon_pod42 array + +cdef extern from 'cuda.h': + ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 CUDA_BATCH_MEM_OP_NODE_PARAMS 'CUDA_BATCH_MEM_OP_NODE_PARAMS' + + cdef extern from 'cuda.h': cdef struct CUDA_MEM_ALLOC_NODE_PARAMS_v1_st: CUmemPoolProps poolProps @@ -3028,13 +3107,9 @@ cdef extern from 'cuda.h': cdef extern from 'cuda.h': cdef struct CUmemcpy3DOperand_st: CUmemcpy3DOperandType type - cuda_bindings_driver__anon_pod36 op + cuda_bindings_driver__anon_pod40 op ctypedef CUmemcpy3DOperand_st CUmemcpy3DOperand_v1 -cdef extern from 'cuda.h': - ctypedef CUDA_BATCH_MEM_OP_NODE_PARAMS_v1 CUDA_BATCH_MEM_OP_NODE_PARAMS 'CUDA_BATCH_MEM_OP_NODE_PARAMS' - - cdef extern from 'cuda.h': ctypedef CUDA_MEM_ALLOC_NODE_PARAMS_v1 CUDA_MEM_ALLOC_NODE_PARAMS 'CUDA_MEM_ALLOC_NODE_PARAMS' @@ -3643,6 +3718,13 @@ cdef CUresult cuLogicalEndpointImport(CUlogicalEndpointId leId, const void* hand cdef CUresult cuLogicalEndpointGetLimits(cuuint64_t* bindAlignment, cuuint64_t* maxSize, const CUlogicalEndpointProp* prop) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuLogicalEndpointQuery(CUlogicalEndpointId leId, cuuint32_t count, int* queryStatus) except ?CUDA_ERROR_NOT_FOUND nogil cdef CUresult cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMode mode, CUgraph hGraph, CUgraphRecaptureCallback callbackFunc, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetFabricClusterUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetCliqueCount(size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuDeviceGetCliqueInfo(CUcliqueInfo* cliqueInfo, size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuMemGetLocationInfo(CUdeviceptr ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, CUmemLocation* location_out) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphAddNode_v3(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuGraphNodeSetParams_v2(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil +cdef CUresult cuCheckpointOperationComplete(CUcheckpointOperationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil # TODO: Extract these defines somehow? @@ -3727,6 +3809,7 @@ cdef enum: CU_MEM_CREATE_USAGE_TILE_POOL = 1 cdef enum: CU_MEM_CREATE_USAGE_HW_DECOMPRESS = 2 +cdef enum: CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE = 4 cdef enum: CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = 2 diff --git a/cuda_bindings/cuda/bindings/cydriver.pyx b/cuda_bindings/cuda/bindings/cydriver.pyx index 2ca1d97644e..82676152c39 100644 --- a/cuda_bindings/cuda/bindings/cydriver.pyx +++ b/cuda_bindings/cuda/bindings/cydriver.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=5b828e2ee0de9b245c71a6ba9361656ab10f7564caa7e3d9c162b2c6a07fb3df +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=99b0dd6a5b631fb108b5d2422c62f8fd4660630dda543978357a03d96c5dc201 from ._internal cimport driver as _driver cdef CUresult cuGetErrorString(CUresult error, const char** pStr) except ?CUDA_ERROR_NOT_FOUND nogil: @@ -2073,3 +2073,31 @@ cdef CUresult cuLogicalEndpointQuery(CUlogicalEndpointId leId, cuuint32_t count, cdef CUresult cuStreamBeginRecaptureToGraph(CUstream hStream, CUstreamCaptureMode mode, CUgraph hGraph, CUgraphRecaptureCallback callbackFunc, void* userData) except ?CUDA_ERROR_NOT_FOUND nogil: return _driver._cuStreamBeginRecaptureToGraph(hStream, mode, hGraph, callbackFunc, userData) + + +cdef CUresult cuDeviceGetFabricClusterUuid(CUuuid* uuid, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuDeviceGetFabricClusterUuid(uuid, dev) + + +cdef CUresult cuDeviceGetCliqueCount(size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuDeviceGetCliqueCount(count, dev) + + +cdef CUresult cuDeviceGetCliqueInfo(CUcliqueInfo* cliqueInfo, size_t* count, CUdevice dev) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuDeviceGetCliqueInfo(cliqueInfo, count, dev) + + +cdef CUresult cuMemGetLocationInfo(CUdeviceptr ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, CUmemLocation* location_out) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuMemGetLocationInfo(ptr, size, summaryGranularity, samplingGranularity, location_out) + + +cdef CUresult cuGraphAddNode_v3(CUgraphNode* phGraphNode, CUgraph hGraph, const CUgraphNode* dependencies, const CUgraphEdgeData* dependencyData, size_t numDependencies, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuGraphAddNode_v3(phGraphNode, hGraph, dependencies, dependencyData, numDependencies, nodeParams) + + +cdef CUresult cuGraphNodeSetParams_v2(CUgraphNode hNode, CUgraphNodeParams* nodeParams) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuGraphNodeSetParams_v2(hNode, nodeParams) + + +cdef CUresult cuCheckpointOperationComplete(CUcheckpointOperationHandle handle) except ?CUDA_ERROR_NOT_FOUND nogil: + return _driver._cuCheckpointOperationComplete(handle) diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pxd b/cuda_bindings/cuda/bindings/cynvfatbin.pxd index 503520b21c6..b61707a47c8 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. @@ -11,7 +11,7 @@ ############################################################################### # enums -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=98d5f975bf907917386bb6f6ef0dd0f6dc1a52c8068be876935a0a80554a8d8e +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4eaac7021af14308210cbd9dd8bf938f0b09d395ef079368750627da493fa06e ctypedef enum nvFatbinResult "nvFatbinResult": NVFATBIN_SUCCESS "NVFATBIN_SUCCESS" = 0 NVFATBIN_ERROR_INTERNAL "NVFATBIN_ERROR_INTERNAL" diff --git a/cuda_bindings/cuda/bindings/cynvfatbin.pyx b/cuda_bindings/cuda/bindings/cynvfatbin.pyx index 86bdd89f0f3..a943e7bbf01 100644 --- a/cuda_bindings/cuda/bindings/cynvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/cynvfatbin.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bae30bbdaff2009b86c05de2a46bbaecad9e63327c93a10b6f2e8a2d95fd6a60 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ac4e507008fec5a9a6963e6539b4a783ca1908452fc4bdb300119af7a1312ff0 from ._internal cimport nvfatbin as _nvfatbin diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pxd b/cuda_bindings/cuda/bindings/cynvjitlink.pxd index 6a93bc269de..1c240342c91 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. @@ -11,7 +11,7 @@ ############################################################################### # enums -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d5650f46aa9baca8a379aa5dece6b9069474ad81e53b0af898fe89e0095f4e8f +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7bd3a5876758225a37a98b496a1423047d3a446a4a0956ebc11b17f0abe2128a # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/cynvjitlink.pyx b/cuda_bindings/cuda/bindings/cynvjitlink.pyx index ecf4cafbaf8..0359f23f216 100644 --- a/cuda_bindings/cuda/bindings/cynvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/cynvjitlink.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7618d44448c6e1142afb5ad6cb3b7e15e1d775705ff4aaadbb8fe8744cccb1a4 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3abd933ead70f75181084a0ac8ea01c523839c18b93820a2c560e9b945de6d3e # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/cynvml.pxd b/cuda_bindings/cuda/bindings/cynvml.pxd index 9b2cd749775..780241c5a3a 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pxd +++ b/cuda_bindings/cuda/bindings/cynvml.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. @@ -11,7 +11,7 @@ ############################################################################### # enums -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=54d380973e59fbf316058a81b2026313f3564008841e322dd7dc3c7915e4ee87 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=60a5b20aeb8f2f1b807c72675995ed6bf5943e58f3b9ab24933f51d4a7246f6f ctypedef enum nvmlBridgeChipType_t "nvmlBridgeChipType_t": NVML_BRIDGE_CHIP_PLX "NVML_BRIDGE_CHIP_PLX" = 0 NVML_BRIDGE_CHIP_BRO4 "NVML_BRIDGE_CHIP_BRO4" = 1 @@ -197,7 +197,10 @@ ctypedef enum nvmlBrandType_t "nvmlBrandType_t": NVML_BRAND_NVIDIA "NVML_BRAND_NVIDIA" = 14 NVML_BRAND_GEFORCE_RTX "NVML_BRAND_GEFORCE_RTX" = 15 NVML_BRAND_TITAN_RTX "NVML_BRAND_TITAN_RTX" = 16 - NVML_BRAND_COUNT "NVML_BRAND_COUNT" = 18 + NVML_BRAND_NVIDIA_DLA "NVML_BRAND_NVIDIA_DLA" = 17 + NVML_BRAND_NVIDIA_VGAMEDEV "NVML_BRAND_NVIDIA_VGAMEDEV" = 18 + NVML_BRAND_NVIDIA_NPU "NVML_BRAND_NVIDIA_NPU" = 19 + NVML_BRAND_COUNT "NVML_BRAND_COUNT" = 20 ctypedef enum nvmlTemperatureThresholds_t "nvmlTemperatureThresholds_t": NVML_TEMPERATURE_THRESHOLD_SHUTDOWN "NVML_TEMPERATURE_THRESHOLD_SHUTDOWN" = 0 @@ -212,6 +215,7 @@ ctypedef enum nvmlTemperatureThresholds_t "nvmlTemperatureThresholds_t": ctypedef enum nvmlTemperatureSensors_t "nvmlTemperatureSensors_t": NVML_TEMPERATURE_GPU "NVML_TEMPERATURE_GPU" = 0 + NVML_TEMPERATURE_GPU_MAX "NVML_TEMPERATURE_GPU_MAX" = 1 NVML_TEMPERATURE_COUNT "NVML_TEMPERATURE_COUNT" ctypedef enum nvmlComputeMode_t "nvmlComputeMode_t": @@ -381,6 +385,7 @@ ctypedef enum nvmlGridLicenseFeatureCode_t "nvmlGridLicenseFeatureCode_t": NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION "NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION" = NVML_GRID_LICENSE_FEATURE_CODE_NVIDIA_RTX NVML_GRID_LICENSE_FEATURE_CODE_GAMING "NVML_GRID_LICENSE_FEATURE_CODE_GAMING" = 3 NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE "NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE" = 4 + NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV "NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV" = 5 ctypedef enum nvmlVgpuCapability_t "nvmlVgpuCapability_t": NVML_VGPU_CAP_NVLINK_P2P "NVML_VGPU_CAP_NVLINK_P2P" = 0 @@ -417,6 +422,8 @@ ctypedef enum nvmlDeviceGpuRecoveryAction_t "nvmlDeviceGpuRecoveryAction_t": NVML_GPU_RECOVERY_ACTION_DRAIN_P2P "NVML_GPU_RECOVERY_ACTION_DRAIN_P2P" = 3 NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET "NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET" = 4 NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN "NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN" = 5 + NVML_GPU_RECOVERY_ACTION_BUS_RESET "NVML_GPU_RECOVERY_ACTION_BUS_RESET" = 6 + NVML_GPU_RECOVERY_ACTION_SYSTEM_REBOOT "NVML_GPU_RECOVERY_ACTION_SYSTEM_REBOOT" = 7 ctypedef enum nvmlFanState_t "nvmlFanState_t": NVML_FAN_NORMAL "NVML_FAN_NORMAL" = 0 @@ -769,7 +776,151 @@ ctypedef enum nvmlGpmMetricId_t "nvmlGpmMetricId_t": NVML_GPM_METRIC_NVLINK_L34_TX "NVML_GPM_METRIC_NVLINK_L34_TX" = 330 NVML_GPM_METRIC_NVLINK_L35_RX "NVML_GPM_METRIC_NVLINK_L35_RX" = 331 NVML_GPM_METRIC_NVLINK_L35_TX "NVML_GPM_METRIC_NVLINK_L35_TX" = 332 - NVML_GPM_METRIC_MAX "NVML_GPM_METRIC_MAX" = 333 + NVML_GPM_METRIC_NVLINK_L36_RX "NVML_GPM_METRIC_NVLINK_L36_RX" = 333 + NVML_GPM_METRIC_NVLINK_L36_TX "NVML_GPM_METRIC_NVLINK_L36_TX" = 334 + NVML_GPM_METRIC_NVLINK_L37_RX "NVML_GPM_METRIC_NVLINK_L37_RX" = 335 + NVML_GPM_METRIC_NVLINK_L37_TX "NVML_GPM_METRIC_NVLINK_L37_TX" = 336 + NVML_GPM_METRIC_NVLINK_L38_RX "NVML_GPM_METRIC_NVLINK_L38_RX" = 337 + NVML_GPM_METRIC_NVLINK_L38_TX "NVML_GPM_METRIC_NVLINK_L38_TX" = 338 + NVML_GPM_METRIC_NVLINK_L39_RX "NVML_GPM_METRIC_NVLINK_L39_RX" = 339 + NVML_GPM_METRIC_NVLINK_L39_TX "NVML_GPM_METRIC_NVLINK_L39_TX" = 340 + NVML_GPM_METRIC_NVLINK_L40_RX "NVML_GPM_METRIC_NVLINK_L40_RX" = 341 + NVML_GPM_METRIC_NVLINK_L40_TX "NVML_GPM_METRIC_NVLINK_L40_TX" = 342 + NVML_GPM_METRIC_NVLINK_L41_RX "NVML_GPM_METRIC_NVLINK_L41_RX" = 343 + NVML_GPM_METRIC_NVLINK_L41_TX "NVML_GPM_METRIC_NVLINK_L41_TX" = 344 + NVML_GPM_METRIC_NVLINK_L42_RX "NVML_GPM_METRIC_NVLINK_L42_RX" = 345 + NVML_GPM_METRIC_NVLINK_L42_TX "NVML_GPM_METRIC_NVLINK_L42_TX" = 346 + NVML_GPM_METRIC_NVLINK_L43_RX "NVML_GPM_METRIC_NVLINK_L43_RX" = 347 + NVML_GPM_METRIC_NVLINK_L43_TX "NVML_GPM_METRIC_NVLINK_L43_TX" = 348 + NVML_GPM_METRIC_NVLINK_L44_RX "NVML_GPM_METRIC_NVLINK_L44_RX" = 349 + NVML_GPM_METRIC_NVLINK_L44_TX "NVML_GPM_METRIC_NVLINK_L44_TX" = 350 + NVML_GPM_METRIC_NVLINK_L45_RX "NVML_GPM_METRIC_NVLINK_L45_RX" = 351 + NVML_GPM_METRIC_NVLINK_L45_TX "NVML_GPM_METRIC_NVLINK_L45_TX" = 352 + NVML_GPM_METRIC_NVLINK_L46_RX "NVML_GPM_METRIC_NVLINK_L46_RX" = 353 + NVML_GPM_METRIC_NVLINK_L46_TX "NVML_GPM_METRIC_NVLINK_L46_TX" = 354 + NVML_GPM_METRIC_NVLINK_L47_RX "NVML_GPM_METRIC_NVLINK_L47_RX" = 355 + NVML_GPM_METRIC_NVLINK_L47_TX "NVML_GPM_METRIC_NVLINK_L47_TX" = 356 + NVML_GPM_METRIC_NVLINK_L48_RX "NVML_GPM_METRIC_NVLINK_L48_RX" = 357 + NVML_GPM_METRIC_NVLINK_L48_TX "NVML_GPM_METRIC_NVLINK_L48_TX" = 358 + NVML_GPM_METRIC_NVLINK_L49_RX "NVML_GPM_METRIC_NVLINK_L49_RX" = 359 + NVML_GPM_METRIC_NVLINK_L49_TX "NVML_GPM_METRIC_NVLINK_L49_TX" = 360 + NVML_GPM_METRIC_NVLINK_L50_RX "NVML_GPM_METRIC_NVLINK_L50_RX" = 361 + NVML_GPM_METRIC_NVLINK_L50_TX "NVML_GPM_METRIC_NVLINK_L50_TX" = 362 + NVML_GPM_METRIC_NVLINK_L51_RX "NVML_GPM_METRIC_NVLINK_L51_RX" = 363 + NVML_GPM_METRIC_NVLINK_L51_TX "NVML_GPM_METRIC_NVLINK_L51_TX" = 364 + NVML_GPM_METRIC_NVLINK_L52_RX "NVML_GPM_METRIC_NVLINK_L52_RX" = 365 + NVML_GPM_METRIC_NVLINK_L52_TX "NVML_GPM_METRIC_NVLINK_L52_TX" = 366 + NVML_GPM_METRIC_NVLINK_L53_RX "NVML_GPM_METRIC_NVLINK_L53_RX" = 367 + NVML_GPM_METRIC_NVLINK_L53_TX "NVML_GPM_METRIC_NVLINK_L53_TX" = 368 + NVML_GPM_METRIC_NVLINK_L54_RX "NVML_GPM_METRIC_NVLINK_L54_RX" = 369 + NVML_GPM_METRIC_NVLINK_L54_TX "NVML_GPM_METRIC_NVLINK_L54_TX" = 370 + NVML_GPM_METRIC_NVLINK_L55_RX "NVML_GPM_METRIC_NVLINK_L55_RX" = 371 + NVML_GPM_METRIC_NVLINK_L55_TX "NVML_GPM_METRIC_NVLINK_L55_TX" = 372 + NVML_GPM_METRIC_NVLINK_L56_RX "NVML_GPM_METRIC_NVLINK_L56_RX" = 373 + NVML_GPM_METRIC_NVLINK_L56_TX "NVML_GPM_METRIC_NVLINK_L56_TX" = 374 + NVML_GPM_METRIC_NVLINK_L57_RX "NVML_GPM_METRIC_NVLINK_L57_RX" = 375 + NVML_GPM_METRIC_NVLINK_L57_TX "NVML_GPM_METRIC_NVLINK_L57_TX" = 376 + NVML_GPM_METRIC_NVLINK_L58_RX "NVML_GPM_METRIC_NVLINK_L58_RX" = 377 + NVML_GPM_METRIC_NVLINK_L58_TX "NVML_GPM_METRIC_NVLINK_L58_TX" = 378 + NVML_GPM_METRIC_NVLINK_L59_RX "NVML_GPM_METRIC_NVLINK_L59_RX" = 379 + NVML_GPM_METRIC_NVLINK_L59_TX "NVML_GPM_METRIC_NVLINK_L59_TX" = 380 + NVML_GPM_METRIC_NVLINK_L60_RX "NVML_GPM_METRIC_NVLINK_L60_RX" = 381 + NVML_GPM_METRIC_NVLINK_L60_TX "NVML_GPM_METRIC_NVLINK_L60_TX" = 382 + NVML_GPM_METRIC_NVLINK_L61_RX "NVML_GPM_METRIC_NVLINK_L61_RX" = 383 + NVML_GPM_METRIC_NVLINK_L61_TX "NVML_GPM_METRIC_NVLINK_L61_TX" = 384 + NVML_GPM_METRIC_NVLINK_L62_RX "NVML_GPM_METRIC_NVLINK_L62_RX" = 385 + NVML_GPM_METRIC_NVLINK_L62_TX "NVML_GPM_METRIC_NVLINK_L62_TX" = 386 + NVML_GPM_METRIC_NVLINK_L63_RX "NVML_GPM_METRIC_NVLINK_L63_RX" = 387 + NVML_GPM_METRIC_NVLINK_L63_TX "NVML_GPM_METRIC_NVLINK_L63_TX" = 388 + NVML_GPM_METRIC_NVLINK_L64_RX "NVML_GPM_METRIC_NVLINK_L64_RX" = 389 + NVML_GPM_METRIC_NVLINK_L64_TX "NVML_GPM_METRIC_NVLINK_L64_TX" = 390 + NVML_GPM_METRIC_NVLINK_L65_RX "NVML_GPM_METRIC_NVLINK_L65_RX" = 391 + NVML_GPM_METRIC_NVLINK_L65_TX "NVML_GPM_METRIC_NVLINK_L65_TX" = 392 + NVML_GPM_METRIC_NVLINK_L66_RX "NVML_GPM_METRIC_NVLINK_L66_RX" = 393 + NVML_GPM_METRIC_NVLINK_L66_TX "NVML_GPM_METRIC_NVLINK_L66_TX" = 394 + NVML_GPM_METRIC_NVLINK_L67_RX "NVML_GPM_METRIC_NVLINK_L67_RX" = 395 + NVML_GPM_METRIC_NVLINK_L67_TX "NVML_GPM_METRIC_NVLINK_L67_TX" = 396 + NVML_GPM_METRIC_NVLINK_L68_RX "NVML_GPM_METRIC_NVLINK_L68_RX" = 397 + NVML_GPM_METRIC_NVLINK_L68_TX "NVML_GPM_METRIC_NVLINK_L68_TX" = 398 + NVML_GPM_METRIC_NVLINK_L69_RX "NVML_GPM_METRIC_NVLINK_L69_RX" = 399 + NVML_GPM_METRIC_NVLINK_L69_TX "NVML_GPM_METRIC_NVLINK_L69_TX" = 400 + NVML_GPM_METRIC_NVLINK_L70_RX "NVML_GPM_METRIC_NVLINK_L70_RX" = 401 + NVML_GPM_METRIC_NVLINK_L70_TX "NVML_GPM_METRIC_NVLINK_L70_TX" = 402 + NVML_GPM_METRIC_NVLINK_L71_RX "NVML_GPM_METRIC_NVLINK_L71_RX" = 403 + NVML_GPM_METRIC_NVLINK_L71_TX "NVML_GPM_METRIC_NVLINK_L71_TX" = 404 + NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC" = 405 + NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC" = 406 + NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC" = 407 + NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC" = 408 + NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC" = 409 + NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC" = 410 + NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC" = 411 + NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC" = 412 + NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC" = 413 + NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC" = 414 + NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC" = 415 + NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC" = 416 + NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC" = 417 + NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC" = 418 + NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC" = 419 + NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC" = 420 + NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC" = 421 + NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC" = 422 + NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC" = 423 + NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC" = 424 + NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC" = 425 + NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC" = 426 + NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC" = 427 + NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC" = 428 + NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC" = 429 + NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC" = 430 + NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC" = 431 + NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC" = 432 + NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC" = 433 + NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC" = 434 + NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC" = 435 + NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC" = 436 + NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC" = 437 + NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC" = 438 + NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC" = 439 + NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC" = 440 + NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC" = 441 + NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC" = 442 + NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC" = 443 + NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC" = 444 + NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC" = 445 + NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC" = 446 + NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC" = 447 + NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC" = 448 + NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC" = 449 + NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC" = 450 + NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC" = 451 + NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC" = 452 + NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC" = 453 + NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC" = 454 + NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC" = 455 + NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC" = 456 + NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC" = 457 + NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC" = 458 + NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC" = 459 + NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC" = 460 + NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC" = 461 + NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC" = 462 + NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC" = 463 + NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC" = 464 + NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC" = 465 + NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC" = 466 + NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC" = 467 + NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC" = 468 + NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC" = 469 + NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC" = 470 + NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC" = 471 + NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC" = 472 + NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC" = 473 + NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC" = 474 + NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC" = 475 + NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC "NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC" = 476 + NVML_GPM_METRIC_MAX "NVML_GPM_METRIC_MAX" = 477 ctypedef enum nvmlPowerProfileType_t "nvmlPowerProfileType_t": NVML_POWER_PROFILE_MAX_P "NVML_POWER_PROFILE_MAX_P" = 0 @@ -787,7 +938,17 @@ ctypedef enum nvmlPowerProfileType_t "nvmlPowerProfileType_t": NVML_POWER_PROFILE_SYNC_BALANCED "NVML_POWER_PROFILE_SYNC_BALANCED" = 12 NVML_POWER_PROFILE_HPC "NVML_POWER_PROFILE_HPC" = 13 NVML_POWER_PROFILE_MIG "NVML_POWER_PROFILE_MIG" = 14 - NVML_POWER_PROFILE_MAX "NVML_POWER_PROFILE_MAX" = 15 + NVML_POWER_PROFILE_MAX_Q_1 "NVML_POWER_PROFILE_MAX_Q_1" = 15 + NVML_POWER_PROFILE_NETWORK_BOUND "NVML_POWER_PROFILE_NETWORK_BOUND" = 16 + NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE" = 17 + NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE "NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE" = 18 + NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE "NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE" = 19 + NVML_POWER_PROFILE_TRAINING "NVML_POWER_PROFILE_TRAINING" = 20 + NVML_POWER_PROFILE_INFERENCE "NVML_POWER_PROFILE_INFERENCE" = 21 + NVML_POWER_PROFILE_MAX_Q_2 "NVML_POWER_PROFILE_MAX_Q_2" = 22 + NVML_POWER_PROFILE_MAX_Q_3 "NVML_POWER_PROFILE_MAX_Q_3" = 23 + NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND "NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND" = 24 + NVML_POWER_PROFILE_MAX "NVML_POWER_PROFILE_MAX" = 25 ctypedef enum nvmlDeviceAddressingModeType_t "nvmlDeviceAddressingModeType_t": NVML_DEVICE_ADDRESSING_MODE_NONE "NVML_DEVICE_ADDRESSING_MODE_NONE" = 0 @@ -801,6 +962,14 @@ ctypedef enum nvmlPRMCounterId_t "nvmlPRMCounterId_t": NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS" = 101 NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY" = 102 NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES" = 103 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY" = 104 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY" = 105 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT" = 106 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT" = 107 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT" = 108 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS" = 109 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME" = 110 + NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME "NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME" = 111 NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT "NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT" = 201 NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES" = 301 NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR "NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR" = 302 @@ -827,6 +996,34 @@ ctypedef enum nvmlProcessMode_t "nvmlProcessMode_t": ctypedef enum nvmlCPERType_t "nvmlCPERType_t": NVML_CPER_ACCESS_TYPE_GPU "NVML_CPER_ACCESS_TYPE_GPU" = (1 << 0) +ctypedef enum nvmlGpuOperationalEventLogLevel_t "nvmlGpuOperationalEventLogLevel_t": + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL" = 0 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY" = 10 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG" = 20 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE" = 30 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING" = 40 + NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR "NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR" = 50 + +ctypedef enum nvmlOperationalEventSeverity_t "nvmlOperationalEventSeverity_t": + NVML_OPERATIONAL_EVENT_SEVERITY_ALL "NVML_OPERATIONAL_EVENT_SEVERITY_ALL" = 0 + NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL "NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL" = 10 + NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED "NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED" = 20 + NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE "NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE" = 30 + NVML_OPERATIONAL_EVENT_SEVERITY_FATAL "NVML_OPERATIONAL_EVENT_SEVERITY_FATAL" = 40 + +ctypedef enum nvmlEventDataType_t "nvmlEventDataType_t": + NVML_EVENT_DATA_TYPE_NVML_EVENT "NVML_EVENT_DATA_TYPE_NVML_EVENT" = 0 + NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT "NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT" = 1 + +ctypedef enum nvmlGpuOperationalEventContextType_t "nvmlGpuOperationalEventContextType_t": + NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_UNKNOWN "NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_UNKNOWN" = 0 + NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID "NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID" = 1 + +ctypedef enum nvmlNvlinkTelemetrySampleType_t "nvmlNvlinkTelemetrySampleType_t": + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX" = 0 + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX" = 1 + NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT "NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT" = 2 + # types ctypedef struct nvmlPciInfoExt_v1_t 'nvmlPciInfoExt_v1_t': @@ -1507,6 +1704,113 @@ ctypedef struct nvmlAccountingStats_v2_t 'nvmlAccountingStats_v2_t': unsigned long long time unsigned long long startTime +ctypedef struct nvmlSetMemoryLimits_v1_t 'nvmlSetMemoryLimits_v1_t': + char* nameSpace + unsigned long long softLimit + unsigned long long hardLimit + +ctypedef struct nvmlGetMemoryLimits_v1_t 'nvmlGetMemoryLimits_v1_t': + char* nameSpace + unsigned long long softLimit + unsigned long long hardLimit + unsigned long long currentUsed + +ctypedef struct nvmlPmgrPwrTuple_t 'nvmlPmgrPwrTuple_t': + unsigned int pwrmW + +ctypedef struct nvmlRailMetrics_t 'nvmlRailMetrics_t': + unsigned int freqkHz + unsigned long long utilPct + +ctypedef struct nvmlPwrModelMetricsDlppm1xPerf_t 'nvmlPwrModelMetricsDlppm1xPerf_t': + unsigned int perfms + +ctypedef struct nvmlPwrModelMetricsSamplePfpp1x_t 'nvmlPwrModelMetricsSamplePfpp1x_t': + unsigned int freqkHz[16] + unsigned int estTgpPwrmW + +ctypedef struct nvmlPwrModelOperatingPointPfpp1x_t 'nvmlPwrModelOperatingPointPfpp1x_t': + unsigned int freqkHz + unsigned int pwrmW + +ctypedef struct nvmlAdaptiveTgpModeInfo_v1_t 'nvmlAdaptiveTgpModeInfo_v1_t': + nvmlEnableState_t inBandEnableRequest + nvmlEnableState_t featureAllowedByAdmin + nvmlEnableState_t adminOverrideEnabled + nvmlEnableState_t enablementStatus + unsigned int adjustedLimitMw + +ctypedef struct nvmlEventSetGetContextCount_v1_t 'nvmlEventSetGetContextCount_v1_t': + unsigned int count + +ctypedef struct nvmlEventSetGetContextInfo_v1_t 'nvmlEventSetGetContextInfo_v1_t': + unsigned int index + unsigned int nvmlGpuOperationalEventContextType + unsigned int sourceEventContextType + unsigned int dataSize + unsigned short dataFormatVersion + +ctypedef struct nvmlEventSetGetContextData_v1_t 'nvmlEventSetGetContextData_v1_t': + void* data + unsigned int index + unsigned int dataSize + +ctypedef struct nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t 'nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t': + unsigned int index + unsigned int xidCode + +ctypedef struct nvmlGpuFabricClique_v1_t 'nvmlGpuFabricClique_v1_t': + unsigned char type + unsigned int id + +ctypedef struct nvmlGpuOperationalEventConfig_v1_t 'nvmlGpuOperationalEventConfig_v1_t': + char uuid[96] + unsigned int minLogLevel + unsigned int minSeverity + +ctypedef struct nvmlEventSetWait_v3_t 'nvmlEventSetWait_v3_t': + unsigned int timeoutMs + unsigned int dataType + char uuid[96] + char sourceModule[16] + unsigned long long eventType + unsigned long long eventData + unsigned long long groupCursor + unsigned long long instanceId + unsigned long long timestampUsec + unsigned long long traceId + unsigned int gpuInstanceId + unsigned int computeInstanceId + unsigned int severity + unsigned int categoryId + unsigned int moduleEventCode + unsigned int scope + unsigned int originator + unsigned int moduleInstance + unsigned int chipletId + unsigned int logLevel + unsigned int attributes + unsigned int groupCperSize + unsigned int groupAttributes + unsigned char groupSize + unsigned char groupIndex + +ctypedef struct nvmlNvlinkSetBwModeAsync_v1_t 'nvmlNvlinkSetBwModeAsync_v1_t': + unsigned int bSetBest + unsigned int bwMode + unsigned int asyncPollTimeoutMs + +ctypedef struct nvmlNvlinkTelemetrySample_v1_t 'nvmlNvlinkTelemetrySample_v1_t': + unsigned int linkId + unsigned int sampleType + unsigned int sampleCount + unsigned long long* samples + nvmlReturn_t nvmlReturn + +ctypedef struct nvmlEccBankRemapperHistogram_v1_t 'nvmlEccBankRemapperHistogram_v1_t': + unsigned int maxSpareGroupCount + unsigned int noSpareGroupCount + ctypedef nvmlPciInfoExt_v1_t nvmlPciInfoExt_t 'nvmlPciInfoExt_t' ctypedef nvmlCoolerInfo_v1_t nvmlCoolerInfo_t 'nvmlCoolerInfo_t' @@ -1864,6 +2168,36 @@ ctypedef struct nvmlVgpuSchedulerLogInfo_v2_t 'nvmlVgpuSchedulerLogInfo_v2_t': unsigned int entriesCount nvmlVgpuSchedulerLogEntry_v2_t logEntries[200] +ctypedef struct nvmlCoreRailMetrics_t 'nvmlCoreRailMetrics_t': + nvmlRailMetrics_t rails[2] + +ctypedef struct nvmlPwrModelMetricsPfpp1x_t 'nvmlPwrModelMetricsPfpp1x_t': + unsigned char numVfPoints + nvmlPwrModelMetricsSamplePfpp1x_t estimatedMetrics[32] + unsigned char bValid + nvmlPwrModelOperatingPointPfpp1x_t maxPerfPerWattPoint + nvmlPwrModelOperatingPointPfpp1x_t fmaxAtVmaxPoint + unsigned int tgpHeadroommW + +ctypedef struct nvmlGpuFabricInfo_v4_t 'nvmlGpuFabricInfo_v4_t': + unsigned char clusterUuid[16] + nvmlReturn_t status + nvmlGpuFabricClique_v1_t cliques[64] + unsigned int numCliques + nvmlGpuFabricState_t state + unsigned int healthMask + unsigned char healthSummary + +ctypedef struct nvmlNvlinkTelemetrySamples_v1_t 'nvmlNvlinkTelemetrySamples_v1_t': + unsigned int telemetryCount + nvmlNvlinkTelemetrySample_v1_t* telemetrySamples + +ctypedef struct nvmlEccBankRemapperStatus_v1_t 'nvmlEccBankRemapperStatus_v1_t': + unsigned int activeRemappings + unsigned int inactiveRemappings + unsigned int bPending + nvmlEccBankRemapperHistogram_v1_t histogram + ctypedef nvmlVgpuTypeIdInfo_v1_t nvmlVgpuTypeIdInfo_t 'nvmlVgpuTypeIdInfo_t' ctypedef nvmlVgpuTypeMaxInstance_v1_t nvmlVgpuTypeMaxInstance_t 'nvmlVgpuTypeMaxInstance_t' @@ -1962,7 +2296,7 @@ ctypedef struct nvmlGpmMetricsGet_t 'nvmlGpmMetricsGet_t': unsigned int numMetrics nvmlGpmSample_t sample1 nvmlGpmSample_t sample2 - nvmlGpmMetric_t metrics[333] + nvmlGpmMetric_t metrics[477] ctypedef nvmlWorkloadPowerProfileInfo_v1_t nvmlWorkloadPowerProfileInfo_t 'nvmlWorkloadPowerProfileInfo_t' @@ -1977,6 +2311,16 @@ ctypedef struct nvmlNvLinkInfo_v2_t 'nvmlNvLinkInfo_v2_t': unsigned int isNvleEnabled nvmlNvlinkFirmwareInfo_t firmwareInfo +ctypedef struct nvmlPwrModelMetricsDlppm1x_t 'nvmlPwrModelMetricsDlppm1x_t': + unsigned char bValid + nvmlCoreRailMetrics_t coreRail + nvmlRailMetrics_t fbRail + nvmlPmgrPwrTuple_t tgpPwrTuple + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics + +ctypedef struct nvmlPerfMetricsPfpp1xSample_t 'nvmlPerfMetricsPfpp1xSample_t': + nvmlPwrModelMetricsPfpp1x_t estimatedMetrics + ctypedef nvmlVgpuProcessesUtilizationInfo_v1_t nvmlVgpuProcessesUtilizationInfo_t 'nvmlVgpuProcessesUtilizationInfo_t' ctypedef nvmlVgpuInstancesUtilizationInfo_v1_t nvmlVgpuInstancesUtilizationInfo_t 'nvmlVgpuInstancesUtilizationInfo_t' @@ -1998,8 +2342,39 @@ ctypedef struct nvmlWorkloadPowerProfileProfilesInfo_v1_t 'nvmlWorkloadPowerProf ctypedef nvmlNvLinkInfo_v2_t nvmlNvLinkInfo_t 'nvmlNvLinkInfo_t' +ctypedef struct nvmlPwrModelMetricsDlppm1xDramclkEstimates_t 'nvmlPwrModelMetricsDlppm1xDramclkEstimates_t': + nvmlPwrModelMetricsDlppm1x_t estimatedMetrics[8] + unsigned char numEstimatedMetrics + ctypedef nvmlWorkloadPowerProfileProfilesInfo_v1_t nvmlWorkloadPowerProfileProfilesInfo_t 'nvmlWorkloadPowerProfileProfilesInfo_t' +ctypedef struct nvmlObservedMetrics_t 'nvmlObservedMetrics_t': + nvmlPwrModelMetricsDlppm1xDramclkEstimates_t initialDramclkEst[3] + unsigned char bValid + nvmlCoreRailMetrics_t coreRail + nvmlRailMetrics_t fbRail + nvmlPmgrPwrTuple_t tgpPwrTuple + nvmlPwrModelMetricsDlppm1xPerf_t perfMetrics + +ctypedef struct nvmlPerfMetricsDlppc2xSample_t 'nvmlPerfMetricsDlppc2xSample_t': + nvmlObservedMetrics_t observedMetrics + +ctypedef union cuda_bindings_nvml__anon_pod8: + nvmlPerfMetricsDlppc2xSample_t dlppc2x + nvmlPerfMetricsPfpp1xSample_t pfpp1x + +ctypedef struct nvmlPerfMetricControllerSample_t 'nvmlPerfMetricControllerSample_t': + unsigned int controllerType + cuda_bindings_nvml__anon_pod8 data + +ctypedef struct nvmlPerfMetricsSample_t 'nvmlPerfMetricsSample_t': + unsigned char numControllerData + nvmlPerfMetricControllerSample_t controllerData[4] + +ctypedef struct nvmlPerfMetricsSamples_v1_t 'nvmlPerfMetricsSamples_v1_t': + unsigned int numSamples + nvmlPerfMetricsSample_t samples[13] + ############################################################################### # Functions @@ -2360,3 +2735,18 @@ cdef nvmlReturn_t nvmlSystemGetCPER_v1(nvmlGetCPER_v1_t* cper) except?_NVMLRETUR cdef nvmlReturn_t nvmlDeviceGetBBXTimeData_v1(nvmlDevice_t device, nvmlBBXTimeData_v1_t* timeData) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceGetAccountingStats_v2(nvmlDevice_t device, nvmlAccountingStats_v2_t* stats) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil cdef nvmlReturn_t nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemappedRowsInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, nvmlGpuFabricInfo_v4_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t* setBwModeAsync) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, const nvmlGpuOperationalEventConfig_v1_t* config) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventSetWait_v3_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, nvmlEventSetGetContextCount_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, nvmlEventSetGetContextInfo_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetContextData_v1(nvmlEventSet_t set, nvmlEventSetGetContextData_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil +cdef nvmlReturn_t nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t* pBankRemapperStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil diff --git a/cuda_bindings/cuda/bindings/cynvml.pyx b/cuda_bindings/cuda/bindings/cynvml.pyx index 9b2f7df7c54..c309bc66eaa 100644 --- a/cuda_bindings/cuda/bindings/cynvml.pyx +++ b/cuda_bindings/cuda/bindings/cynvml.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b30ca4e9dfac73d38cb872e4dc7d80d69cbb7e516c50e048cb34234a6c0198a6 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f5af75e5d248a615a2165cbd490ef48486c2b9e3a3957aec27050eda3de5f329 from ._internal cimport nvml as _nvml @@ -1430,3 +1430,63 @@ cdef nvmlReturn_t nvmlDeviceGetAccountingStats_v2(nvmlDevice_t device, nvmlAccou cdef nvmlReturn_t nvmlDeviceGetRemappedRows_v2(nvmlDevice_t device, nvmlRemappedRowsInfo_v2_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: return _nvml._nvmlDeviceGetRemappedRows_v2(device, info) + + +cdef nvmlReturn_t nvmlDeviceSetAdaptiveTgpMode_v1(nvmlDevice_t device, nvmlEnableState_t mode) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceSetAdaptiveTgpMode_v1(device, mode) + + +cdef nvmlReturn_t nvmlDeviceGetAdaptiveTgpModeInfo_v1(nvmlDevice_t device, nvmlAdaptiveTgpModeInfo_v1_t* info) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetAdaptiveTgpModeInfo_v1(device, info) + + +cdef nvmlReturn_t nvmlDeviceSetMemoryLimits_v1(nvmlDevice_t device, nvmlSetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceSetMemoryLimits_v1(device, limits) + + +cdef nvmlReturn_t nvmlDeviceGetMemoryLimits_v1(nvmlDevice_t device, nvmlGetMemoryLimits_v1_t* limits) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetMemoryLimits_v1(device, limits) + + +cdef nvmlReturn_t nvmlDeviceGetGpuFabricInfo_v4(nvmlDevice_t device, nvmlGpuFabricInfo_v4_t* gpuFabricInfo) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetGpuFabricInfo_v4(device, gpuFabricInfo) + + +cdef nvmlReturn_t nvmlDevicePerfMetricsGetSamples_v1(nvmlDevice_t device, nvmlPerfMetricsSamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDevicePerfMetricsGetSamples_v1(device, samples) + + +cdef nvmlReturn_t nvmlDeviceSetNvlinkBwModeAsync_v1(nvmlDevice_t device, nvmlNvlinkSetBwModeAsync_v1_t* setBwModeAsync) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceSetNvlinkBwModeAsync_v1(device, setBwModeAsync) + + +cdef nvmlReturn_t nvmlDeviceGetNvLinkTelemetrySamples_v1(nvmlDevice_t device, nvmlNvlinkTelemetrySamples_v1_t* samples) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetNvLinkTelemetrySamples_v1(device, samples) + + +cdef nvmlReturn_t nvmlEventSetRegisterGpuOperationalEvents_v1(nvmlEventSet_t eventSet, const nvmlGpuOperationalEventConfig_v1_t* config) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlEventSetRegisterGpuOperationalEvents_v1(eventSet, config) + + +cdef nvmlReturn_t nvmlEventSetWait_v3(nvmlEventSet_t set, nvmlEventSetWait_v3_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlEventSetWait_v3(set, params) + + +cdef nvmlReturn_t nvmlEventSetGetContextCount_v1(nvmlEventSet_t set, nvmlEventSetGetContextCount_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlEventSetGetContextCount_v1(set, params) + + +cdef nvmlReturn_t nvmlEventSetGetContextInfo_v1(nvmlEventSet_t set, nvmlEventSetGetContextInfo_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlEventSetGetContextInfo_v1(set, params) + + +cdef nvmlReturn_t nvmlEventSetGetContextData_v1(nvmlEventSet_t set, nvmlEventSetGetContextData_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlEventSetGetContextData_v1(set, params) + + +cdef nvmlReturn_t nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(nvmlEventSet_t set, nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t* params) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(set, params) + + +cdef nvmlReturn_t nvmlDeviceGetBankRemapperStatus_v1(nvmlDevice_t device, nvmlEccBankRemapperStatus_v1_t* pBankRemapperStatus) except?_NVMLRETURN_T_INTERNAL_LOADING_ERROR nogil: + return _nvml._nvmlDeviceGetBankRemapperStatus_v1(device, pBankRemapperStatus) diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pxd b/cuda_bindings/cuda/bindings/cynvrtc.pxd index e5f8515143e..62f3056d226 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pxd +++ b/cuda_bindings/cuda/bindings/cynvrtc.pxd @@ -2,12 +2,12 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. # ENUMS -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=fafcdba712e021a2e4074da6a78ec267bd613e0cc657ad7e2c783231b6f095fd +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a5c9499b37f9bbb764b0cac167daeae7f4539de7093938c95d2fdc83fe70e8f6 cdef extern from 'nvrtc.h': ctypedef enum nvrtcResult "nvrtcResult": NVRTC_SUCCESS diff --git a/cuda_bindings/cuda/bindings/cynvrtc.pyx b/cuda_bindings/cuda/bindings/cynvrtc.pyx index 6289a40092a..77481cfd41f 100644 --- a/cuda_bindings/cuda/bindings/cynvrtc.pyx +++ b/cuda_bindings/cuda/bindings/cynvrtc.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9725757222bfc514253ab6a6113b4e6b1c33fab841fe2fff8ebb1012ecf7715b +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=6f99f863837a6b8fb2da89dfe53cb7a4d42ae5e413c181bbfb8e557a1fec0bff from ._internal cimport nvrtc as _nvrtc cdef const char* nvrtcGetErrorString(nvrtcResult result) except?NULL nogil: diff --git a/cuda_bindings/cuda/bindings/cynvvm.pxd b/cuda_bindings/cuda/bindings/cynvvm.pxd index f25e7e84b3b..1dea8578b40 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pxd +++ b/cuda_bindings/cuda/bindings/cynvvm.pxd @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. ############################################################################### @@ -10,7 +10,7 @@ ############################################################################### # enums -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=79be0fd21f7c6b6112743eb60ce9e69287a66999ecaaa063d87a52ab64982bce +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=060a4e1d735676d6239664555a8a07b292481085ca0f5b5f362ce5289f20ca6d ctypedef enum nvvmResult "nvvmResult": NVVM_SUCCESS "NVVM_SUCCESS" = 0 NVVM_ERROR_OUT_OF_MEMORY "NVVM_ERROR_OUT_OF_MEMORY" = 1 diff --git a/cuda_bindings/cuda/bindings/cynvvm.pyx b/cuda_bindings/cuda/bindings/cynvvm.pyx index 43f036a36c0..45028385633 100644 --- a/cuda_bindings/cuda/bindings/cynvvm.pyx +++ b/cuda_bindings/cuda/bindings/cynvvm.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7ea5803be62646c287bad43350e27d3254f35d25ab50b9c54f7ac5695b4c3114 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f235b24d553d40a065b8e5df12f584994d30eb6a3f52fc0dd35d7202c703f05b from ._internal cimport nvvm as _nvvm diff --git a/cuda_bindings/cuda/bindings/cyruntime.pxd b/cuda_bindings/cuda/bindings/cyruntime.pxd index 7eb76712237..2d705a6be16 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pxd +++ b/cuda_bindings/cuda/bindings/cyruntime.pxd @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a7205ec1f1749acd8f9e32e85660d77d8ccb60a0d038bb63fb4b015496f23d07 +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c3643e519b69bdb09b9c4c6ff3ecd3aebb180636d00e9a7bd2fe129cbed3eeb4 from libc.stdint cimport uint32_t, uint64_t @@ -243,6 +243,7 @@ cdef extern from 'driver_types.h': cudaErrorUnsupportedExecAffinity cudaErrorUnsupportedDevSideSync cudaErrorContained + cudaErrorInsufficientLoaderVersion cudaErrorInvalidSource cudaErrorFileNotFound cudaErrorSharedObjectSymbolNotFound @@ -304,6 +305,7 @@ cdef extern from 'driver_types.h': cudaErrorInvalidResourceConfiguration cudaErrorStreamDetached cudaErrorGraphRecaptureFailure + cudaErrorFabricNotReady cudaErrorUnknown cudaErrorApiFailureBase @@ -401,6 +403,7 @@ cdef extern from 'driver_types.h': cudaClusterSchedulingPolicyDefault cudaClusterSchedulingPolicySpread cudaClusterSchedulingPolicyLoadBalancing + cudaClusterSchedulingPolicyRubinDsmemLocality cdef extern from 'driver_types.h': cdef enum cudaStreamUpdateCaptureDependenciesFlags: @@ -493,6 +496,7 @@ cdef extern from 'driver_types.h': cudaFuncAttributeRequiredClusterDepth cudaFuncAttributeNonPortableClusterSizeAllowed cudaFuncAttributeClusterSchedulingPolicyPreference + cudaFuncAttributeSharedMemoryMode cudaFuncAttributeMax cdef extern from 'driver_types.h': @@ -530,6 +534,7 @@ cdef extern from 'driver_types.h': cudaLimitDevRuntimePendingLaunchCount cudaLimitMaxL2FetchGranularity cudaLimitPersistingL2CacheSize + cudaLimitPerBlockMemorySize cdef extern from 'driver_types.h': cdef enum cudaMemoryAdvise: @@ -711,7 +716,10 @@ cdef extern from 'driver_types.h': cudaDevAttrReserved145 cudaDevAttrOnlyPartialHostNativeAtomicSupported cudaDevAttrAtomicReductionSupported + cudaDevAttrLocalityDomainCount + cudaDevAttrOversizedSharedMemoryPerBlock cudaDevAttrCigStreamsSupported + cudaDevAttrLocalityDomainMultiprocessorCount cudaDevAttrMax cudaDevAttrCooperativeMultiDeviceLaunch cudaDevAttrMaxTimelineSemaphoreInteropSupported @@ -732,6 +740,7 @@ cdef extern from 'driver_types.h': cudaMemPoolAttrLocationType cudaMemPoolAttrMaxPoolSize cudaMemPoolAttrHwDecompressEnabled + cudaMemPoolAttrLocalityDomainId cdef extern from 'driver_types.h': cdef enum cudaMemLocationType: @@ -742,6 +751,7 @@ cdef extern from 'driver_types.h': cudaMemLocationTypeHostNuma cudaMemLocationTypeHostNumaCurrent cudaMemLocationTypeInvisible + cudaMemLocationTypeDeviceLocalityDomain cdef extern from 'driver_types.h': cdef enum cudaMemAccessFlags: @@ -1077,6 +1087,7 @@ cdef extern from 'library_types.h': CUDA_R_6F_E2M3 CUDA_R_6F_E3M2 CUDA_R_4F_E2M1 + CUDA_R_8F_UE5M3 ctypedef cudaDataType_t cudaDataType cdef enum cudaEglFrameType_enum: @@ -1272,6 +1283,7 @@ cdef extern from 'driver_types.h': cdef enum cudaDevSmResourceGroup_flags: cudaDevSmResourceGroupDefault cudaDevSmResourceGroupBackfill + cudaDevSmResourceGroupLocalityDomainId cdef extern from 'driver_types.h': cdef enum cudaDevSmResourceSplitByCount_flags: @@ -1313,6 +1325,8 @@ cdef extern from 'driver_types.h': cudaSharedMemoryModeDefault cudaSharedMemoryModeRequirePortable cudaSharedMemoryModeAllowNonPortable + cudaSharedMemoryModeAllowOversizedSharedMemory + cudaSharedMemoryModePreferOversizedSharedMemory cdef extern from 'driver_types.h': cdef enum cudaGraphRecaptureStatus: @@ -1456,14 +1470,6 @@ cdef extern from 'driver_types.h': unsigned int lastLayer unsigned int reserved[16] -cdef extern from 'driver_types.h': - cdef struct cudaPointerAttributes: - cudaMemoryType type - int device - void* devicePointer - void* hostPointer - long reserved[8] - cdef extern from 'driver_types.h': cdef struct cudaFuncAttributes: size_t sharedSizeBytes @@ -1483,9 +1489,13 @@ cdef extern from 'driver_types.h': int clusterSchedulingPolicyPreference int nonPortableClusterSizeAllowed int deviceNodeUpdateStatus - int reserved1 + cudaSharedMemoryMode sharedMemoryMode int reserved[14] +cdef struct cuda_bindings_runtime__anon_pod9: + unsigned char deviceId + unsigned char localityDomainId + cdef extern from 'driver_types.h': cdef struct cudaMemPoolPtrExportData: unsigned char reserved[64] @@ -1611,7 +1621,7 @@ cdef extern from 'driver_types.h': char reserved[64] ctypedef cudaMemFabricHandle_st cudaMemFabricHandle_t -cdef struct cuda_bindings_runtime__anon_pod12: +cdef struct cuda_bindings_runtime__anon_pod14: void* handle void* name @@ -1622,28 +1632,28 @@ cdef extern from 'driver_types.h': unsigned int flags unsigned int reserved[16] -cdef struct cuda_bindings_runtime__anon_pod14: +cdef struct cuda_bindings_runtime__anon_pod16: void* handle void* name -cdef struct cuda_bindings_runtime__anon_pod16: +cdef struct cuda_bindings_runtime__anon_pod18: unsigned long long value -cdef union cuda_bindings_runtime__anon_pod17: +cdef union cuda_bindings_runtime__anon_pod19: void* fence unsigned long long reserved -cdef struct cuda_bindings_runtime__anon_pod18: +cdef struct cuda_bindings_runtime__anon_pod20: unsigned long long key -cdef struct cuda_bindings_runtime__anon_pod20: +cdef struct cuda_bindings_runtime__anon_pod22: unsigned long long value -cdef union cuda_bindings_runtime__anon_pod21: +cdef union cuda_bindings_runtime__anon_pod23: void* fence unsigned long long reserved -cdef struct cuda_bindings_runtime__anon_pod22: +cdef struct cuda_bindings_runtime__anon_pod24: unsigned long long key unsigned int timeoutMs @@ -1664,7 +1674,7 @@ cdef extern from 'driver_types.h': unsigned char reserved[5] ctypedef cudaGraphEdgeData_st cudaGraphEdgeData -cdef struct cuda_bindings_runtime__anon_pod26: +cdef struct cuda_bindings_runtime__anon_pod28: void* pValue size_t offset size_t size @@ -1675,17 +1685,17 @@ cdef extern from 'driver_types.h': unsigned char remote ctypedef cudaLaunchMemSyncDomainMap_st cudaLaunchMemSyncDomainMap -cdef struct cuda_bindings_runtime__anon_pod27: +cdef struct cuda_bindings_runtime__anon_pod29: unsigned int x unsigned int y unsigned int z -cdef struct cuda_bindings_runtime__anon_pod29: +cdef struct cuda_bindings_runtime__anon_pod31: unsigned int x unsigned int y unsigned int z -cdef struct cuda_bindings_runtime__anon_pod33: +cdef struct cuda_bindings_runtime__anon_pod35: unsigned long long bytesOverBudget cdef extern from '': @@ -1710,6 +1720,7 @@ cdef extern from 'driver_types.h': unsigned int minSmPartitionSize unsigned int smCoscheduledAlignment unsigned int flags + unsigned int localityDomainId cdef extern from 'driver_types.h': cdef struct cudaDevWorkqueueConfigResource: @@ -1727,7 +1738,8 @@ cdef extern from 'driver_types.h': unsigned int coscheduledSmCount unsigned int preferredCoscheduledSmCount unsigned int flags - unsigned int reserved[12] + unsigned int localityDomainId + unsigned int reserved[11] ctypedef cudaDevSmResourceGroupParams_st cudaDevSmResourceGroupParams cdef extern from 'cuda_runtime_api.h': @@ -1753,20 +1765,16 @@ cdef extern from 'cuda_runtime_api.h': ) -cdef extern from 'driver_types.h': - cdef struct cudaEventRecordNodeParams: - cudaEvent_t event - cdef extern from 'driver_types.h': cdef struct cudaEventWaitNodeParams: cudaEvent_t event -cdef struct cuda_bindings_runtime__anon_pod28: +cdef struct cuda_bindings_runtime__anon_pod30: cudaEvent_t event int flags int triggerAtBlockStart -cdef struct cuda_bindings_runtime__anon_pod30: +cdef struct cuda_bindings_runtime__anon_pod32: cudaEvent_t event int flags @@ -1790,7 +1798,7 @@ cdef extern from 'driver_types.h': cudaGraphNode_t errorFromNode ctypedef cudaGraphExecUpdateResultInfo_st cudaGraphExecUpdateResultInfo -cdef struct cuda_bindings_runtime__anon_pod31: +cdef struct cuda_bindings_runtime__anon_pod33: int deviceUpdatable cudaGraphDeviceNode_t devNode @@ -1812,6 +1820,11 @@ cdef extern from 'driver_types.h': cudaGraph_t* phGraph_out cudaExecutionContext_t ctx +cdef extern from 'driver_types.h': + cdef struct cudaEventRecordNodeParams: + cudaEvent_t event + cudaExecutionContext_t ctx + cdef struct cuda_bindings_runtime__anon_pod4: void* devPtr cudaChannelFormatDesc desc @@ -1842,7 +1855,7 @@ cdef extern from 'driver_types.h': unsigned int flags unsigned int reserved[4] -cdef union cuda_bindings_runtime__anon_pod34: +cdef union cuda_bindings_runtime__anon_pod36: cudaArray_t pArray[3] cudaPitchedPtr pPitch[3] @@ -1888,45 +1901,51 @@ cdef extern from 'driver_types.h': cudaHostFn_t fn void* userData unsigned int syncMode + cudaExecutionContext_t ctx cdef extern from 'driver_types.h': - cdef struct cudaMemLocation: - cudaMemLocationType type - int id + cdef struct cudaPointerAttributes: + cudaMemoryType type + int device + void* devicePointer + void* hostPointer + int localityDomainOrdinal + long unused + long reserved[7] -cdef struct cuda_bindings_runtime__anon_pod10: +cdef struct cuda_bindings_runtime__anon_pod12: cudaArray_t array cudaOffset3D offset -cdef union cuda_bindings_runtime__anon_pod11: +cdef union cuda_bindings_runtime__anon_pod13: int fd - cuda_bindings_runtime__anon_pod12 win32 + cuda_bindings_runtime__anon_pod14 win32 void* nvSciBufObject -cdef union cuda_bindings_runtime__anon_pod13: +cdef union cuda_bindings_runtime__anon_pod15: int fd - cuda_bindings_runtime__anon_pod14 win32 + cuda_bindings_runtime__anon_pod16 win32 void* nvSciSyncObj -cdef struct cuda_bindings_runtime__anon_pod15: - cuda_bindings_runtime__anon_pod16 fence - cuda_bindings_runtime__anon_pod17 nvSciSync - cuda_bindings_runtime__anon_pod18 keyedMutex +cdef struct cuda_bindings_runtime__anon_pod17: + cuda_bindings_runtime__anon_pod18 fence + cuda_bindings_runtime__anon_pod19 nvSciSync + cuda_bindings_runtime__anon_pod20 keyedMutex unsigned int reserved[12] -cdef struct cuda_bindings_runtime__anon_pod19: - cuda_bindings_runtime__anon_pod20 fence - cuda_bindings_runtime__anon_pod21 nvSciSync - cuda_bindings_runtime__anon_pod22 keyedMutex +cdef struct cuda_bindings_runtime__anon_pod21: + cuda_bindings_runtime__anon_pod22 fence + cuda_bindings_runtime__anon_pod23 nvSciSync + cuda_bindings_runtime__anon_pod24 keyedMutex unsigned int reserved[10] -cdef union cuda_bindings_runtime__anon_pod25: +cdef union cuda_bindings_runtime__anon_pod27: dim3 gridDim - cuda_bindings_runtime__anon_pod26 param + cuda_bindings_runtime__anon_pod28 param unsigned int isEnabled -cdef union cuda_bindings_runtime__anon_pod32: - cuda_bindings_runtime__anon_pod33 overBudget +cdef union cuda_bindings_runtime__anon_pod34: + cuda_bindings_runtime__anon_pod35 overBudget cdef extern from 'driver_types.h': cdef struct cudaKernelNodeParamsV2: @@ -1947,16 +1966,16 @@ cdef extern from 'driver_types.h': cudaAccessPolicyWindow accessPolicyWindow int cooperative cudaSynchronizationPolicy syncPolicy - cuda_bindings_runtime__anon_pod27 clusterDim + cuda_bindings_runtime__anon_pod29 clusterDim cudaClusterSchedulingPolicy clusterSchedulingPolicyPreference int programmaticStreamSerializationAllowed - cuda_bindings_runtime__anon_pod28 programmaticEvent + cuda_bindings_runtime__anon_pod30 programmaticEvent int priority cudaLaunchMemSyncDomainMap memSyncDomainMap cudaLaunchMemSyncDomain memSyncDomain - cuda_bindings_runtime__anon_pod29 preferredClusterDim - cuda_bindings_runtime__anon_pod30 launchCompletionEvent - cuda_bindings_runtime__anon_pod31 deviceUpdatableKernelNode + cuda_bindings_runtime__anon_pod31 preferredClusterDim + cuda_bindings_runtime__anon_pod32 launchCompletionEvent + cuda_bindings_runtime__anon_pod33 deviceUpdatableKernelNode unsigned int sharedMemCarveout unsigned int nvlinkUtilCentricScheduling cudaLaunchAttributePortableClusterMode portableClusterSizeMode @@ -1970,7 +1989,7 @@ cdef union cuda_bindings_runtime__anon_pod1: cuda_bindings_runtime__anon_pod6 reserved cdef struct cudaEglFrame_st: - cuda_bindings_runtime__anon_pod34 frame + cuda_bindings_runtime__anon_pod36 frame cudaEglPlaneDesc planeDesc[3] unsigned int planeCount cudaEglFrameType frameType @@ -1985,37 +2004,15 @@ cdef extern from 'driver_types.h': cudaMemcpy3DParms copyParams cdef extern from 'driver_types.h': - cdef struct cudaMemAccessDesc: - cudaMemLocation location - cudaMemAccessFlags flags - -cdef extern from 'driver_types.h': - cdef struct cudaMemPoolProps: - cudaMemAllocationType allocType - cudaMemAllocationHandleType handleTypes - cudaMemLocation location - void* win32SecurityAttributes - size_t maxSize - unsigned short usage - unsigned char reserved[54] - -cdef extern from 'driver_types.h': - cdef struct cudaMemcpyAttributes: - cudaMemcpySrcAccessOrder srcAccessOrder - cudaMemLocation srcLocHint - cudaMemLocation dstLocHint - unsigned int flags - -cdef struct cuda_bindings_runtime__anon_pod9: - void* ptr - size_t rowLength - size_t layerHeight - cudaMemLocation locHint + cdef struct cudaMemLocation: + cudaMemLocationType type + int id + cuda_bindings_runtime__anon_pod9 localized cdef extern from 'driver_types.h': cdef struct cudaExternalMemoryHandleDesc: cudaExternalMemoryHandleType type - cuda_bindings_runtime__anon_pod11 handle + cuda_bindings_runtime__anon_pod13 handle unsigned long long size unsigned int flags unsigned int reserved[16] @@ -2023,19 +2020,19 @@ cdef extern from 'driver_types.h': cdef extern from 'driver_types.h': cdef struct cudaExternalSemaphoreHandleDesc: cudaExternalSemaphoreHandleType type - cuda_bindings_runtime__anon_pod13 handle + cuda_bindings_runtime__anon_pod15 handle unsigned int flags unsigned int reserved[16] cdef extern from 'driver_types.h': cdef struct cudaExternalSemaphoreSignalParams: - cuda_bindings_runtime__anon_pod15 params + cuda_bindings_runtime__anon_pod17 params unsigned int flags unsigned int reserved[16] cdef extern from 'driver_types.h': cdef struct cudaExternalSemaphoreWaitParams: - cuda_bindings_runtime__anon_pod19 params + cuda_bindings_runtime__anon_pod21 params unsigned int flags unsigned int reserved[16] @@ -2043,12 +2040,12 @@ cdef extern from 'driver_types.h': cdef struct cudaGraphKernelNodeUpdate: cudaGraphDeviceNode_t node cudaGraphKernelNodeField field - cuda_bindings_runtime__anon_pod25 updateData + cuda_bindings_runtime__anon_pod27 updateData cdef extern from 'driver_types.h': cdef struct cudaAsyncNotificationInfo: cudaAsyncNotificationType type - cuda_bindings_runtime__anon_pod32 info + cuda_bindings_runtime__anon_pod34 info ctypedef cudaAsyncNotificationInfo cudaAsyncNotificationInfo_t cdef extern from 'driver_types.h': @@ -2069,24 +2066,32 @@ cdef extern from 'driver_types.h': unsigned int flags cdef extern from 'driver_types.h': - cdef struct cudaMemAllocNodeParams: - cudaMemPoolProps poolProps - cudaMemAccessDesc* accessDescs - size_t accessDescCount - size_t bytesize - void* dptr + cdef struct cudaMemAccessDesc: + cudaMemLocation location + cudaMemAccessFlags flags cdef extern from 'driver_types.h': - cdef struct cudaMemAllocNodeParamsV2: - cudaMemPoolProps poolProps - cudaMemAccessDesc* accessDescs - size_t accessDescCount - size_t bytesize - void* dptr + cdef struct cudaMemPoolProps: + cudaMemAllocationType allocType + cudaMemAllocationHandleType handleTypes + cudaMemLocation location + void* win32SecurityAttributes + size_t maxSize + unsigned short usage + unsigned char reserved[54] + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpyAttributes: + cudaMemcpySrcAccessOrder srcAccessOrder + cudaMemLocation srcLocHint + cudaMemLocation dstLocHint + unsigned int flags -cdef union cuda_bindings_runtime__anon_pod8: - cuda_bindings_runtime__anon_pod9 ptr - cuda_bindings_runtime__anon_pod10 array +cdef struct cuda_bindings_runtime__anon_pod11: + void* ptr + size_t rowLength + size_t layerHeight + cudaMemLocation locHint cdef extern from 'driver_types.h': cdef struct cudaExternalSemaphoreSignalNodeParams: @@ -2099,6 +2104,7 @@ cdef extern from 'driver_types.h': cudaExternalSemaphore_t* extSemArray cudaExternalSemaphoreSignalParams* paramsArray unsigned int numExtSems + cudaExecutionContext_t ctx cdef extern from 'driver_types.h': cdef struct cudaExternalSemaphoreWaitNodeParams: @@ -2111,19 +2117,32 @@ cdef extern from 'driver_types.h': cudaExternalSemaphore_t* extSemArray cudaExternalSemaphoreWaitParams* paramsArray unsigned int numExtSems + cudaExecutionContext_t ctx cdef extern from 'driver_types.h': - cdef struct cudaMemcpy3DOperand: - cudaMemcpy3DOperandType type - cuda_bindings_runtime__anon_pod8 op + cdef struct cudaMemAllocNodeParams: + cudaMemPoolProps poolProps + cudaMemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + void* dptr cdef extern from 'driver_types.h': - cdef struct cudaMemcpy3DBatchOp: - cudaMemcpy3DOperand src - cudaMemcpy3DOperand dst - cudaExtent extent - cudaMemcpySrcAccessOrder srcAccessOrder - unsigned int flags + cdef struct cudaMemAllocNodeParamsV2: + cudaMemPoolProps poolProps + cudaMemAccessDesc* accessDescs + size_t accessDescCount + size_t bytesize + void* dptr + +cdef union cuda_bindings_runtime__anon_pod10: + cuda_bindings_runtime__anon_pod11 ptr + cuda_bindings_runtime__anon_pod12 array + +cdef extern from 'driver_types.h': + cdef struct cudaMemcpy3DOperand: + cudaMemcpy3DOperandType type + cuda_bindings_runtime__anon_pod10 op cdef extern from 'driver_types.h': cdef struct cudaGraphNodeParams: @@ -2144,6 +2163,14 @@ cdef extern from 'driver_types.h': cudaConditionalNodeParams conditional long long reserved2 +cdef extern from 'driver_types.h': + cdef struct cudaMemcpy3DBatchOp: + cudaMemcpy3DOperand src + cudaMemcpy3DOperand dst + cudaExtent extent + cudaMemcpySrcAccessOrder srcAccessOrder + unsigned int flags + cdef extern from 'cuda_runtime_api.h': ctypedef cudaError_t (*cudaGraphRecaptureCallback_t 'cudaGraphRecaptureCallback_t')( void* data, @@ -2529,6 +2556,7 @@ cdef cudaError_t cudaMemcpyWithAttributesAsync(void* dst, const void* src, size_ cdef cudaError_t cudaMemcpy3DWithAttributesAsync(cudaMemcpy3DBatchOp* op, unsigned long long flags, cudaStream_t stream) except ?cudaErrorCallRequiresNewerDriver nogil cdef cudaError_t cudaGraphNodeGetParams(cudaGraphNode_t node, cudaGraphNodeParams* nodeParams) except ?cudaErrorCallRequiresNewerDriver nogil cdef cudaError_t cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStreamCaptureMode mode, cudaGraph_t graph, cudaGraphRecaptureCallbackData* callbackData) except ?cudaErrorCallRequiresNewerDriver nogil +cdef cudaError_t cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil # C #define integer constants from driver_types.h required for ABI compat with lowpp layer cdef extern from 'driver_types.h': diff --git a/cuda_bindings/cuda/bindings/cyruntime.pyx b/cuda_bindings/cuda/bindings/cyruntime.pyx index bc3f12896c8..2e6e08aa3cf 100644 --- a/cuda_bindings/cuda/bindings/cyruntime.pyx +++ b/cuda_bindings/cuda/bindings/cyruntime.pyx @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.0 to 13.3.0. Do not modify it directly. +# This code was automatically generated across versions from 12.9.0 to 13.4.1. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=034f6c5c936d547d3106aa249f8f85b67389eac8b90ab569aa74815f08d699af +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d40a4f5510e4271a0984232f64fe01ac712187b248fb15167fbc8e40f024d512 from ._internal cimport runtime as _runtime cdef cudaError_t cudaDeviceReset() except ?cudaErrorCallRequiresNewerDriver nogil: @@ -1363,6 +1363,10 @@ cdef cudaError_t cudaStreamBeginRecaptureToGraph(cudaStream_t stream, cudaStream return _runtime._cudaStreamBeginRecaptureToGraph(stream, mode, graph, callbackData) +cdef cudaError_t cudaMemGetLocationInfo(void* devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, cudaMemLocation* location_out) except ?cudaErrorCallRequiresNewerDriver nogil: + return _runtime._cudaMemGetLocationInfo(devPtr, size, summaryGranularity, samplingGranularity, location_out) + + ############################################################################### # Static inline helpers from driver_functions.h ############################################################################### diff --git a/cuda_bindings/cuda/bindings/driver.pxd b/cuda_bindings/cuda/bindings/driver.pxd index 8c5e32e0f65..454c4cd7e59 100644 --- a/cuda_bindings/cuda/bindings/driver.pxd +++ b/cuda_bindings/cuda/bindings/driver.pxd @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=3559a38253c9137d67c5955419f694d32429a7355b84c6e7e06ba1d43a296193 +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4f3e3117475b43ef1ebbe0cd972d2aa6ef4dc5d449a43f1d9ad1d01625604c32 cimport cuda.bindings.cydriver as cydriver include "_lib/utils.pxd" @@ -328,6 +328,20 @@ cdef class CUlinkState: cdef cydriver.CUlinkState* _pvt_ptr cdef list _keepalive +cdef class CUcheckpointOperationHandle: + """ + + Handle for a CUDA custom storage checkpoint or restore operation awaiting completion + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + cdef cydriver.CUcheckpointOperationHandle _pvt_val + cdef cydriver.CUcheckpointOperationHandle* _pvt_ptr + cdef class CUcoredumpCallbackHandle: """ Opaque handle representing a registered coredump status callback. @@ -1409,12 +1423,20 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: The sync mode to use for the host task + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() Get memory address of class instance """ - cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st* _val_ptr cdef cydriver.CUDA_HOST_NODE_PARAMS_v2_st* _pvt_ptr cdef CUhostFn _fn @@ -1423,6 +1445,12 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: cdef _HelperInputVoidPtr _cyuserData + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + cdef class CUDA_CONDITIONAL_NODE_PARAMS: """ Conditional node parameters @@ -1453,7 +1481,7 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: empty nodes, child graphs, memsets, memcopies, and conditionals. This applies recursively to child graphs and conditional bodies. - All kernels, including kernels in nested conditionals or child - graphs at any level, must belong to the same CUDA context. + graphs at any level, must belong to the same device context. These graphs may be populated using graph node creation APIs or cuStreamBeginCaptureToGraph. CU_GRAPH_COND_TYPE_IF: phGraph_out[0] is executed when the condition is non-zero. If `size` == 2, @@ -1980,7 +2008,7 @@ cdef class CUexecAffinitySmCount_st: cdef cydriver.CUexecAffinitySmCount_st _pvt_val cdef cydriver.CUexecAffinitySmCount_st* _pvt_ptr -cdef class anon_union3: +cdef class anon_union4: """ Attributes ---------- @@ -2010,7 +2038,7 @@ cdef class CUexecAffinityParam_st: Type of execution affinity. - param : anon_union3 + param : anon_union4 @@ -2022,7 +2050,7 @@ cdef class CUexecAffinityParam_st: cdef cydriver.CUexecAffinityParam_st* _val_ptr cdef cydriver.CUexecAffinityParam_st* _pvt_ptr - cdef anon_union3 _param + cdef anon_union4 _param cdef class CUctxCigParam_st: @@ -2847,7 +2875,7 @@ cdef class anon_struct11: """ cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr -cdef class anon_union4: +cdef class anon_union5: """ Attributes ---------- @@ -2898,7 +2926,7 @@ cdef class CUDA_RESOURCE_DESC_st: Resource type - res : anon_union4 + res : anon_union5 @@ -2914,7 +2942,7 @@ cdef class CUDA_RESOURCE_DESC_st: cdef cydriver.CUDA_RESOURCE_DESC_st* _val_ptr cdef cydriver.CUDA_RESOURCE_DESC_st* _pvt_ptr - cdef anon_union4 _res + cdef anon_union5 _res cdef class CUDA_TEXTURE_DESC_st: @@ -3148,7 +3176,7 @@ cdef class anon_struct12: cdef _HelperInputVoidPtr _cyname -cdef class anon_union5: +cdef class anon_union6: """ Attributes ---------- @@ -3189,7 +3217,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: Type of the handle - handle : anon_union5 + handle : anon_union6 @@ -3209,7 +3237,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _val_ptr cdef cydriver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st* _pvt_ptr - cdef anon_union5 _handle + cdef anon_union6 _handle cdef class CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st: @@ -3296,7 +3324,7 @@ cdef class anon_struct13: cdef _HelperInputVoidPtr _cyname -cdef class anon_union6: +cdef class anon_union7: """ Attributes ---------- @@ -3337,7 +3365,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: Type of the handle - handle : anon_union6 + handle : anon_union7 @@ -3353,7 +3381,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _val_ptr cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st* _pvt_ptr - cdef anon_union6 _handle + cdef anon_union7 _handle cdef class anon_struct14: @@ -3372,7 +3400,7 @@ cdef class anon_struct14: """ cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st* _pvt_ptr -cdef class anon_union7: +cdef class anon_union8: """ Attributes ---------- @@ -3416,7 +3444,7 @@ cdef class anon_struct16: - nvSciSync : anon_union7 + nvSciSync : anon_union8 @@ -3434,7 +3462,7 @@ cdef class anon_struct16: cdef anon_struct14 _fence - cdef anon_union7 _nvSciSync + cdef anon_union8 _nvSciSync cdef anon_struct15 _keyedMutex @@ -3489,7 +3517,7 @@ cdef class anon_struct17: """ cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st* _pvt_ptr -cdef class anon_union8: +cdef class anon_union9: """ Attributes ---------- @@ -3537,7 +3565,7 @@ cdef class anon_struct19: - nvSciSync : anon_union8 + nvSciSync : anon_union9 @@ -3555,7 +3583,7 @@ cdef class anon_struct19: cdef anon_struct17 _fence - cdef anon_union8 _nvSciSync + cdef anon_union9 _nvSciSync cdef anon_struct18 _keyedMutex @@ -3650,12 +3678,20 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: paramsArray. + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() Get memory address of class instance """ - cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st* _val_ptr cdef cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st* _pvt_ptr cdef size_t _extSemArray_length @@ -3666,6 +3702,12 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS* _paramsArray + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: """ Semaphore wait node parameters @@ -3722,12 +3764,20 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: paramsArray. + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() Get memory address of class instance """ - cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st _pvt_val + cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st* _val_ptr cdef cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st* _pvt_ptr cdef size_t _extSemArray_length @@ -3738,7 +3788,13 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: cdef cydriver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS* _paramsArray -cdef class anon_union9: + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + +cdef class anon_union12: """ Attributes ---------- @@ -3832,7 +3888,7 @@ cdef class anon_struct21: """ cdef cydriver.CUarrayMapInfo_st* _pvt_ptr -cdef class anon_union10: +cdef class anon_union13: """ Attributes ---------- @@ -3858,7 +3914,7 @@ cdef class anon_union10: cdef anon_struct21 _miptail -cdef class anon_union11: +cdef class anon_union14: """ Attributes ---------- @@ -3889,7 +3945,7 @@ cdef class CUarrayMapInfo_st: Resource type - resource : anon_union9 + resource : anon_union12 @@ -3897,7 +3953,7 @@ cdef class CUarrayMapInfo_st: Sparse subresource type - subresource : anon_union10 + subresource : anon_union13 @@ -3909,7 +3965,7 @@ cdef class CUarrayMapInfo_st: Memory handle type - memHandle : anon_union11 + memHandle : anon_union14 @@ -3933,15 +3989,35 @@ cdef class CUarrayMapInfo_st: cdef cydriver.CUarrayMapInfo_st* _val_ptr cdef cydriver.CUarrayMapInfo_st* _pvt_ptr - cdef anon_union9 _resource + cdef anon_union12 _resource + + + cdef anon_union13 _subresource + + + cdef anon_union14 _memHandle + + +cdef class anon_struct22: + """ + Attributes + ---------- + + deviceId : bytes - cdef anon_union10 _subresource + localityDomainId : bytes - cdef anon_union11 _memHandle + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUmemLocation_st* _pvt_ptr + cdef class CUmemLocation_st: """ Specifies a memory location. @@ -3959,6 +4035,11 @@ cdef class CUmemLocation_st: CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA. + localized : anon_struct22 + Identifier for + CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. + + Methods ------- getPtr() @@ -3967,7 +4048,10 @@ cdef class CUmemLocation_st: cdef cydriver.CUmemLocation_st* _val_ptr cdef cydriver.CUmemLocation_st* _pvt_ptr -cdef class anon_struct22: + cdef anon_struct22 _localized + + +cdef class anon_struct23: """ Attributes ---------- @@ -4018,7 +4102,7 @@ cdef class CUmemAllocationProp_st: In all other cases, this field is required to be zero. - allocFlags : anon_struct22 + allocFlags : anon_struct23 @@ -4036,7 +4120,7 @@ cdef class CUmemAllocationProp_st: cdef _HelperInputVoidPtr _cywin32HandleMetaData - cdef anon_struct22 _allocFlags + cdef anon_struct23 _allocFlags cdef class CUmulticastObjectProp_st: @@ -4172,6 +4256,24 @@ cdef class CUmemPoolProps_st: Bitmask indicating intended usage for the pool. + gpuDirectRDMACapable : bytes + Allocation hint for requesting GPUDirect RDMA capable memory. On + devices that support GPUDirect RDMA, this flag indicates that the + memory will be used for GPUDirect RDMA. On platforms where the + default RDMA path does not support localized allocations, this flag + has the following effects: - For MPS clients using MLOPart/locality + domains, this flag has the effect of disabling localization for the + pool. This allows the pool to be used for GPUDirect RDMA with the + default RDMA path. - For pools that are localized using CUDA + locality domain APIs, using this flag will have no effect, but + attempting to export the localized memory without forcing PCIe will + return an error. To use GPUDirect RDMA with localized pools on + platforms where the default RDMA path does not support localized + allocations, handles must be acquired with the flag + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory + pools are only compatible with dma_buf mappings. + + Methods ------- getPtr() @@ -4293,7 +4395,7 @@ cdef class CUextent3D_st: cdef cydriver.CUextent3D_st _pvt_val cdef cydriver.CUextent3D_st* _pvt_ptr -cdef class anon_struct23: +cdef class anon_struct24: """ Attributes ---------- @@ -4327,7 +4429,7 @@ cdef class anon_struct23: cdef CUmemLocation _locHint -cdef class anon_struct24: +cdef class anon_struct25: """ Attributes ---------- @@ -4353,16 +4455,16 @@ cdef class anon_struct24: cdef CUoffset3D _offset -cdef class anon_union13: +cdef class anon_union16: """ Attributes ---------- - ptr : anon_struct23 + ptr : anon_struct24 - array : anon_struct24 + array : anon_struct25 @@ -4373,10 +4475,10 @@ cdef class anon_union13: """ cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr - cdef anon_struct23 _ptr + cdef anon_struct24 _ptr - cdef anon_struct24 _array + cdef anon_struct25 _array cdef class CUmemcpy3DOperand_st: @@ -4390,7 +4492,7 @@ cdef class CUmemcpy3DOperand_st: - op : anon_union13 + op : anon_union16 @@ -4402,7 +4504,7 @@ cdef class CUmemcpy3DOperand_st: cdef cydriver.CUmemcpy3DOperand_st* _val_ptr cdef cydriver.CUmemcpy3DOperand_st* _pvt_ptr - cdef anon_union13 _op + cdef anon_union16 _op cdef class CUDA_MEMCPY3D_BATCH_OP_st: @@ -4609,17 +4711,31 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: The event to record when the node executes + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() Get memory address of class instance """ - cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st _pvt_val + cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st* _val_ptr cdef cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st* _pvt_ptr cdef CUevent _event + cdef CUcontext _ctx + + + cdef CUgreenCtx _gCtx + + cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: """ Event wait node parameters @@ -4756,6 +4872,77 @@ cdef class CUgraphNodeParams_st: cdef CUDA_CONDITIONAL_NODE_PARAMS _conditional +cdef class CUcheckpointCustomStoragePerDeviceData_st: + """ + Per-GPU data for zero-copy mapped device memory used with CUDA + checkpoint/restore on custom storage + + Attributes + ---------- + + devPtr : CUdeviceptr + Zero-copy mapped device memory pointer for the user to copy to/from + + + size : size_t + Size of mapped memory + + + stream : CUstream + Stream the user may use for the copy; the CUDA driver synchronizes + on this stream before completing checkpoint or restore + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointCustomStoragePerDeviceData_st _pvt_val + cdef cydriver.CUcheckpointCustomStoragePerDeviceData_st* _pvt_ptr + + cdef CUdeviceptr _devPtr + + + cdef CUstream _stream + + +cdef class CUcheckpointCustomStorageInfo_st: + """ + Output from CUDA custom storage checkpoint/restore: per-GPU device + pointers and a handle to complete the operation + + Attributes + ---------- + + handle : CUcheckpointOperationHandle + Handle returned that is needed to complete checkpoint or restore + + + perDeviceData : CUcheckpointCustomStoragePerDeviceData + Returned pointer to array of per-device data, one per device. User + should set to NULL + + + deviceCount : unsigned int + Number of devices (and elements in `perDeviceData` array) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcheckpointCustomStorageInfo_st _pvt_val + cdef cydriver.CUcheckpointCustomStorageInfo_st* _pvt_ptr + + cdef CUcheckpointOperationHandle _handle + + + cdef size_t _perDeviceData_length + cdef cydriver.CUcheckpointCustomStoragePerDeviceData* _perDeviceData + + cdef class CUcheckpointLockArgs_st: """ CUDA checkpoint optional lock arguments @@ -4780,6 +4967,14 @@ cdef class CUcheckpointCheckpointArgs_st: """ CUDA checkpoint optional checkpoint arguments + Attributes + ---------- + + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is checkpointed to + host + + Methods ------- getPtr() @@ -4833,6 +5028,10 @@ cdef class CUcheckpointRestoreArgs_st: Number of gpu pairs to remap + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is restored from host + + Methods ------- getPtr() @@ -4912,6 +5111,29 @@ cdef class CUmemDecompressParams_st: cdef _HelperInputVoidPtr _cydst +cdef class CUcliqueInfo_st: + """ + Fabric clique information + + Attributes + ---------- + + type : CUcliqueType + Type of the fabric clique + + + id : unsigned int + ID of the fabric clique + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cydriver.CUcliqueInfo_st _pvt_val + cdef cydriver.CUcliqueInfo_st* _pvt_ptr + cdef class CUlogicalEndpointFabricHandle_st: """ Fabric handle for a logical endpoint @@ -4931,7 +5153,7 @@ cdef class CUlogicalEndpointFabricHandle_st: cdef cydriver.CUlogicalEndpointFabricHandle_st _pvt_val cdef cydriver.CUlogicalEndpointFabricHandle_st* _pvt_ptr -cdef class anon_struct25: +cdef class anon_struct26: """ Attributes ---------- @@ -4950,7 +5172,7 @@ cdef class anon_struct25: cdef CUdevice _device -cdef class anon_struct26: +cdef class anon_struct27: """ Attributes ---------- @@ -4977,11 +5199,11 @@ cdef class CUlogicalEndpointProp_struct: Type of the logical endpoint defined in CUlogicalEndpointType - unicast : anon_struct25 + unicast : anon_struct26 - multicast : anon_struct26 + multicast : anon_struct27 @@ -5006,10 +5228,10 @@ cdef class CUlogicalEndpointProp_struct: cdef cydriver.CUlogicalEndpointProp_struct* _val_ptr cdef cydriver.CUlogicalEndpointProp_struct* _pvt_ptr - cdef anon_struct25 _unicast + cdef anon_struct26 _unicast - cdef anon_struct26 _multicast + cdef anon_struct27 _multicast cdef class CUdevSmResource_st: @@ -5038,6 +5260,13 @@ cdef class CUdevSmResource_st: CUdevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags. If the + backfill flag is set, SMs may be assigned from other locality + domains. + + Methods ------- getPtr() @@ -5108,6 +5337,11 @@ cdef class CU_DEV_SM_RESOURCE_GROUP_PARAMS_st: CUdevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags + + Methods ------- getPtr() @@ -5172,7 +5406,7 @@ cdef class CUdevResource_st: cdef cydriver.CUdevResource_st* _nextResource -cdef class anon_union17: +cdef class anon_union21: """ Attributes ---------- @@ -5201,7 +5435,7 @@ cdef class CUeglFrame_st: Attributes ---------- - frame : anon_union17 + frame : anon_union21 @@ -5249,7 +5483,7 @@ cdef class CUeglFrame_st: cdef cydriver.CUeglFrame_st* _val_ptr cdef cydriver.CUeglFrame_st* _pvt_ptr - cdef anon_union17 _frame + cdef anon_union21 _frame cdef class CUdeviceptr: @@ -6254,6 +6488,14 @@ cdef class CUDA_HOST_NODE_PARAMS_v2(CUDA_HOST_NODE_PARAMS_v2_st): The sync mode to use for the host task + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -7131,7 +7373,7 @@ cdef class CUexecAffinityParam_v1(CUexecAffinityParam_st): Type of execution affinity. - param : anon_union3 + param : anon_union4 @@ -7153,7 +7395,7 @@ cdef class CUexecAffinityParam(CUexecAffinityParam_v1): Type of execution affinity. - param : anon_union3 + param : anon_union4 @@ -8172,7 +8414,7 @@ cdef class CUDA_RESOURCE_DESC_v1(CUDA_RESOURCE_DESC_st): Resource type - res : anon_union4 + res : anon_union5 @@ -8198,7 +8440,7 @@ cdef class CUDA_RESOURCE_DESC(CUDA_RESOURCE_DESC_v1): Resource type - res : anon_union4 + res : anon_union5 @@ -8587,7 +8829,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_ Type of the handle - handle : anon_union5 + handle : anon_union6 @@ -8617,7 +8859,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC(CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1) Type of the handle - handle : anon_union5 + handle : anon_union6 @@ -8753,7 +8995,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1(CUDA_EXTERNAL_SEMAPHORE_HANDLE Type of the handle - handle : anon_union6 + handle : anon_union7 @@ -8779,7 +9021,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DE Type of the handle - handle : anon_union6 + handle : anon_union7 @@ -8984,6 +9226,14 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2(CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2 paramsArray. + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -9065,6 +9315,14 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2(CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st) paramsArray. + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -9096,7 +9354,7 @@ cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st): Resource type - resource : anon_union9 + resource : anon_union12 @@ -9104,7 +9362,7 @@ cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st): Sparse subresource type - subresource : anon_union10 + subresource : anon_union13 @@ -9116,7 +9374,7 @@ cdef class CUarrayMapInfo_v1(CUarrayMapInfo_st): Memory handle type - memHandle : anon_union11 + memHandle : anon_union14 @@ -9151,7 +9409,7 @@ cdef class CUarrayMapInfo(CUarrayMapInfo_v1): Resource type - resource : anon_union9 + resource : anon_union12 @@ -9159,7 +9417,7 @@ cdef class CUarrayMapInfo(CUarrayMapInfo_v1): Sparse subresource type - subresource : anon_union10 + subresource : anon_union13 @@ -9171,7 +9429,7 @@ cdef class CUarrayMapInfo(CUarrayMapInfo_v1): Memory handle type - memHandle : anon_union11 + memHandle : anon_union14 @@ -9211,6 +9469,11 @@ cdef class CUmemLocation_v1(CUmemLocation_st): CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA. + localized : anon_struct22 + Identifier for + CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. + + Methods ------- getPtr() @@ -9235,6 +9498,11 @@ cdef class CUmemLocation(CUmemLocation_v1): CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA. + localized : anon_struct22 + Identifier for + CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. + + Methods ------- getPtr() @@ -9269,7 +9537,7 @@ cdef class CUmemAllocationProp_v1(CUmemAllocationProp_st): In all other cases, this field is required to be zero. - allocFlags : anon_struct22 + allocFlags : anon_struct23 @@ -9307,7 +9575,7 @@ cdef class CUmemAllocationProp(CUmemAllocationProp_v1): In all other cases, this field is required to be zero. - allocFlags : anon_struct22 + allocFlags : anon_struct23 @@ -9523,6 +9791,24 @@ cdef class CUmemPoolProps_v1(CUmemPoolProps_st): Bitmask indicating intended usage for the pool. + gpuDirectRDMACapable : bytes + Allocation hint for requesting GPUDirect RDMA capable memory. On + devices that support GPUDirect RDMA, this flag indicates that the + memory will be used for GPUDirect RDMA. On platforms where the + default RDMA path does not support localized allocations, this flag + has the following effects: - For MPS clients using MLOPart/locality + domains, this flag has the effect of disabling localization for the + pool. This allows the pool to be used for GPUDirect RDMA with the + default RDMA path. - For pools that are localized using CUDA + locality domain APIs, using this flag will have no effect, but + attempting to export the localized memory without forcing PCIe will + return an error. To use GPUDirect RDMA with localized pools on + platforms where the default RDMA path does not support localized + allocations, handles must be acquired with the flag + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory + pools are only compatible with dma_buf mappings. + + Methods ------- getPtr() @@ -9567,6 +9853,24 @@ cdef class CUmemPoolProps(CUmemPoolProps_v1): Bitmask indicating intended usage for the pool. + gpuDirectRDMACapable : bytes + Allocation hint for requesting GPUDirect RDMA capable memory. On + devices that support GPUDirect RDMA, this flag indicates that the + memory will be used for GPUDirect RDMA. On platforms where the + default RDMA path does not support localized allocations, this flag + has the following effects: - For MPS clients using MLOPart/locality + domains, this flag has the effect of disabling localization for the + pool. This allows the pool to be used for GPUDirect RDMA with the + default RDMA path. - For pools that are localized using CUDA + locality domain APIs, using this flag will have no effect, but + attempting to export the localized memory without forcing PCIe will + return an error. To use GPUDirect RDMA with localized pools on + platforms where the default RDMA path does not support localized + allocations, handles must be acquired with the flag + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory + pools are only compatible with dma_buf mappings. + + Methods ------- getPtr() @@ -9779,7 +10083,7 @@ cdef class CUmemcpy3DOperand_v1(CUmemcpy3DOperand_st): - op : anon_union13 + op : anon_union16 @@ -9801,7 +10105,7 @@ cdef class CUmemcpy3DOperand(CUmemcpy3DOperand_v1): - op : anon_union13 + op : anon_union16 @@ -10047,6 +10351,14 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS(CUDA_EVENT_RECORD_NODE_PARAMS_st): The event to record when the node executes + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -10146,6 +10458,62 @@ cdef class CUgraphNodeParams(CUgraphNodeParams_st): """ pass +cdef class CUcheckpointCustomStoragePerDeviceData(CUcheckpointCustomStoragePerDeviceData_st): + """ + Per-GPU data for zero-copy mapped device memory used with CUDA + checkpoint/restore on custom storage + + Attributes + ---------- + + devPtr : CUdeviceptr + Zero-copy mapped device memory pointer for the user to copy to/from + + + size : size_t + Size of mapped memory + + + stream : CUstream + Stream the user may use for the copy; the CUDA driver synchronizes + on this stream before completing checkpoint or restore + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + +cdef class CUcheckpointCustomStorageInfo(CUcheckpointCustomStorageInfo_st): + """ + Output from CUDA custom storage checkpoint/restore: per-GPU device + pointers and a handle to complete the operation + + Attributes + ---------- + + handle : CUcheckpointOperationHandle + Handle returned that is needed to complete checkpoint or restore + + + perDeviceData : CUcheckpointCustomStoragePerDeviceData + Returned pointer to array of per-device data, one per device. User + should set to NULL + + + deviceCount : unsigned int + Number of devices (and elements in `perDeviceData` array) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + cdef class CUcheckpointLockArgs(CUcheckpointLockArgs_st): """ CUDA checkpoint optional lock arguments @@ -10169,6 +10537,14 @@ cdef class CUcheckpointCheckpointArgs(CUcheckpointCheckpointArgs_st): """ CUDA checkpoint optional checkpoint arguments + Attributes + ---------- + + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is checkpointed to + host + + Methods ------- getPtr() @@ -10214,6 +10590,10 @@ cdef class CUcheckpointRestoreArgs(CUcheckpointRestoreArgs_st): Number of gpu pairs to remap + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is restored from host + + Methods ------- getPtr() @@ -10280,6 +10660,28 @@ cdef class CUmemDecompressParams(CUmemDecompressParams_st): """ pass +cdef class CUcliqueInfo(CUcliqueInfo_st): + """ + Fabric clique information + + Attributes + ---------- + + type : CUcliqueType + Type of the fabric clique + + + id : unsigned int + ID of the fabric clique + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + pass + cdef class CUlogicalEndpointId: """ @@ -10321,11 +10723,11 @@ cdef class CUlogicalEndpointProp(CUlogicalEndpointProp_struct): Type of the logical endpoint defined in CUlogicalEndpointType - unicast : anon_struct25 + unicast : anon_struct26 - multicast : anon_struct26 + multicast : anon_struct27 @@ -10375,6 +10777,13 @@ cdef class CUdevSmResource(CUdevSmResource_st): CUdevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags. If the + backfill flag is set, SMs may be assigned from other locality + domains. + + Methods ------- getPtr() @@ -10439,6 +10848,11 @@ cdef class CU_DEV_SM_RESOURCE_GROUP_PARAMS(CU_DEV_SM_RESOURCE_GROUP_PARAMS_st): CUdevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags + + Methods ------- getPtr() @@ -10539,7 +10953,7 @@ cdef class CUeglFrame_v1(CUeglFrame_st): Attributes ---------- - frame : anon_union17 + frame : anon_union21 @@ -10595,7 +11009,7 @@ cdef class CUeglFrame(CUeglFrame_v1): Attributes ---------- - frame : anon_union17 + frame : anon_union21 diff --git a/cuda_bindings/cuda/bindings/driver.pyx b/cuda_bindings/cuda/bindings/driver.pyx index 71c9d0d2f92..781d040c1f7 100644 --- a/cuda_bindings/cuda/bindings/driver.pyx +++ b/cuda_bindings/cuda/bindings/driver.pyx @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=f62fe4f88ff8394acc48a14d465c00898f1f24f13fbd339862226a544cc8111a +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=79336857bd6bf7884714e40db0ea94f28275fb08b283efa6bae52b1e93529c14 from typing import Any, Optional import cython import ctypes @@ -212,6 +212,20 @@ CU_MEM_CREATE_USAGE_TILE_POOL = cydriver.CU_MEM_CREATE_USAGE_TILE_POOL #: for hardware accelerated decompression. CU_MEM_CREATE_USAGE_HW_DECOMPRESS = cydriver.CU_MEM_CREATE_USAGE_HW_DECOMPRESS +#: Setting this flag forces GPUDirect RDMA on a locality-domain-localized +#: allocation to use the PCIe (BAR1) path, allowing the allocation to +#: remain locality-domain localized on platforms where the platform- +#: coherent RDMA path does not support localized allocations. Because on +#: some platforms the PCIe bandwidth is limited, using this flag may result +#: in lower RDMA bandwidth than the default RDMA mapping link. Note that +#: this flag does not itself force PCIe to be used, and that this must be +#: done when creating the RDMA export. +#: :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED` +#: indicates whether this flag is needed to create GPUDirect RDMA capable +#: localized memory allocations. This flag is only valid if +#: gpuDirectRDMACapable is set. +CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE = cydriver.CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE + #: This flag, if set, indicates that the memory will be used as a buffer #: for hardware accelerated decompression. CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS = cydriver.CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS @@ -2330,6 +2344,18 @@ class CUdevice_attribute(_FastEnum): ) + CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT, + 'Number of locality domains\n' + ) + + + CU_DEVICE_ATTRIBUTE_MAX_OVERSIZED_SHARED_MEMORY_PER_BLOCK = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX_OVERSIZED_SHARED_MEMORY_PER_BLOCK, + 'Maximum oversized shared memory per block\n' + ) + + CU_DEVICE_ATTRIBUTE_D3D12_CIG_STREAMS_SUPPORTED = ( cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_D3D12_CIG_STREAMS_SUPPORTED, 'Device supports CIG streams with D3D12\n' @@ -2366,6 +2392,25 @@ class CUdevice_attribute(_FastEnum): 'Device supports unicast logical endpoint access on the owner device\n' ) + + CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_MULTIPROCESSOR_COUNT = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_MULTIPROCESSOR_COUNT, + 'Number of multiprocessors on each locality domain\n' + ) + + + CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_SUPPORTED_HANDLE_TYPES = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_SUPPORTED_HANDLE_TYPES, + 'Handle types supported with logical endpoint IPC\n' + ) + + + CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED = ( + cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED, + 'Device supports GPUDirect RDMA with localized memory using the default RDMA\n' + 'mapping link\n' + ) + CU_DEVICE_ATTRIBUTE_MAX = cydriver.CUdevice_attribute_enum.CU_DEVICE_ATTRIBUTE_MAX class CUpointer_attribute(_FastEnum): @@ -2507,6 +2552,14 @@ class CUpointer_attribute(_FastEnum): 'memory that is capable to be used for hardware accelerated decompression.\n' ) + + CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL = ( + cydriver.CUpointer_attribute_enum.CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL, + 'Returns in `*data` an integer representing the locality domain ordinal of\n' + 'the memory allocation, or -1 if the allocation is not localized to a\n' + 'locality domain.\n' + ) + class CUfunction_attribute(_FastEnum): """ Function properties @@ -2578,15 +2631,23 @@ class CUfunction_attribute(_FastEnum): cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES, 'The maximum size in bytes of dynamically-allocated shared memory that can\n' 'be used by this function. If the user-specified dynamic shared memory size\n' - 'is larger than this value, the launch will fail. The default value of this\n' - 'attribute is :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK` -\n' + 'is larger than this value, the launch will fail.\n' + 'The default value of this attribute is\n' + ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK` -\n' ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`, except when\n' ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` is greater than\n' ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`, then the\n' 'default value of this attribute is 0. The value can be increased to\n' ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` -\n' - ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`. See\n' - ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`.\n' + 'This attribute is ignored if\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE` or\n' + ':py:obj:`~.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE` is set.\n' + 'This attribute cannot be used to access oversized shared memory. Oversized\n' + 'shared memory can only be accessed by setting\n' + ':py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE` or\n' + ':py:obj:`~.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE`.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) @@ -2597,16 +2658,16 @@ class CUfunction_attribute(_FastEnum): 'the total shared memory. Refer to\n' ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`. This\n' 'is only a hint, and the driver can choose a different ratio if required to\n' - 'execute the function. See :py:obj:`~.cuFuncSetAttribute`,\n' - ':py:obj:`~.cuKernelSetAttribute`\n' + 'execute the function.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = ( cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET, 'If this attribute is set, the kernel must launch with a valid cluster size\n' - 'specified. See :py:obj:`~.cuFuncSetAttribute`,\n' - ':py:obj:`~.cuKernelSetAttribute`\n' + 'specified.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) @@ -2616,8 +2677,8 @@ class CUfunction_attribute(_FastEnum): 'all be positive. The validity of the cluster dimensions is otherwise\n' 'checked at launch time.\n' 'If the value is set during compile time, it cannot be set at runtime.\n' - 'Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED. See\n' - ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + 'Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) @@ -2627,8 +2688,8 @@ class CUfunction_attribute(_FastEnum): 'all be positive. The validity of the cluster dimensions is otherwise\n' 'checked at launch time.\n' 'If the value is set during compile time, it cannot be set at runtime.\n' - 'Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. See\n' - ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + 'Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) @@ -2638,8 +2699,8 @@ class CUfunction_attribute(_FastEnum): 'all be positive. The validity of the cluster dimensions is otherwise\n' 'checked at launch time.\n' 'If the value is set during compile time, it cannot be set at runtime.\n' - 'Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. See\n' - ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + 'Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) @@ -2657,23 +2718,32 @@ class CUfunction_attribute(_FastEnum): 'cluster size for sm_90 is 8 blocks per cluster. This value may increase for\n' 'future compute capabilities.\n' 'The specific hardware unit may support higher cluster sizes that’s not\n' - 'guaranteed to be portable. See :py:obj:`~.cuFuncSetAttribute`,\n' - ':py:obj:`~.cuKernelSetAttribute`\n' + 'guaranteed to be portable.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = ( cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE, 'The block scheduling policy of a function. The value type is\n' - ':py:obj:`~.CUclusterSchedulingPolicy` / cudaClusterSchedulingPolicy. See\n' - ':py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' + ':py:obj:`~.CUclusterSchedulingPolicy` / cudaClusterSchedulingPolicy.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED = ( cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED, 'Whether the function can be updated on device. 1 means device node update\n' - 'is supported, 0 is unsupported. See :py:obj:`~.cuFuncGetAttribute`.\n' + 'is supported, 0 is unsupported.\n' + 'See :py:obj:`~.cuFuncGetAttribute`.\n' + ) + + + CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE = ( + cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE, + 'The shared memory mode of a function. The value type is\n' + ':py:obj:`~.CUsharedMemoryMode` / cudaSharedMemoryMode.\n' + 'See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute`\n' ) CU_FUNC_ATTRIBUTE_MAX = cydriver.CUfunction_attribute_enum.CU_FUNC_ATTRIBUTE_MAX @@ -3368,6 +3438,12 @@ class CUjit_target(_FastEnum): ) + CU_TARGET_COMPUTE_107 = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_107, + 'Compute device class 10.7.\n' + ) + + CU_TARGET_COMPUTE_110 = ( cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_110, 'Compute device class 11.0.\n' @@ -3398,9 +3474,11 @@ class CUjit_target(_FastEnum): 'Compute device class 11.0 with accelerated features.\n' ) + CU_TARGET_COMPUTE_103A = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103A - CU_TARGET_COMPUTE_103A = ( - cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103A, + + CU_TARGET_COMPUTE_107A = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_107A, 'Compute device class 12.0. with accelerated features.\n' ) @@ -3428,9 +3506,11 @@ class CUjit_target(_FastEnum): 'Compute device class 11.0 with family features.\n' ) + CU_TARGET_COMPUTE_103F = cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103F + - CU_TARGET_COMPUTE_103F = ( - cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_103F, + CU_TARGET_COMPUTE_107F = ( + cydriver.CUjit_target_enum.CU_TARGET_COMPUTE_107F, 'Compute device class 12.0. with family features.\n' ) @@ -3677,6 +3757,12 @@ class CUlimit(_FastEnum): 'than available\n' ) + + CU_LIMIT_PER_BLOCK_MEMORY_SIZE = ( + cydriver.CUlimit_enum.CU_LIMIT_PER_BLOCK_MEMORY_SIZE, + 'Per-block memory size\n' + ) + CU_LIMIT_MAX = cydriver.CUlimit_enum.CU_LIMIT_MAX class CUresourcetype(_FastEnum): @@ -3893,8 +3979,8 @@ class CUgraphDependencyType(_FastEnum): CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC = ( cydriver.CUgraphDependencyType_enum.CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC, 'This dependency type allows the downstream node to use\n' - '`cudaGridDependencySynchronize()`. It may only be used between kernel\n' - 'nodes, and must be used with either the\n' + 'cudaGridDependencySynchronize(). It may only be used between kernel nodes,\n' + 'and must be used with either the\n' ':py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or\n' ':py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port.\n' ) @@ -3980,6 +4066,8 @@ class CUclusterSchedulingPolicy(_FastEnum): 'allow the hardware to load-balance the blocks in a cluster to the SMs\n' ) + CU_CLUSTER_SCHEDULING_POLICY_RUBIN_DSMEM_LOCALITY = cydriver.CUclusterSchedulingPolicy_enum.CU_CLUSTER_SCHEDULING_POLICY_RUBIN_DSMEM_LOCALITY + class CUlaunchMemSyncDomain(_FastEnum): """ Memory Synchronization Domain A kernel can be launched in a @@ -4069,6 +4157,21 @@ class CUsharedMemoryMode(_FastEnum): ':py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN`\n' ) + + CU_SHARED_MEMORY_MODE_ALLOW_OVERSIZED_SHARED_MEMORY = ( + cydriver.CUsharedMemoryMode_enum.CU_SHARED_MEMORY_MODE_ALLOW_OVERSIZED_SHARED_MEMORY, + 'Specifies that oversized shared memory configurations may be used (with the\n' + 'limitation of only 8kB L1 cache)\n' + ) + + + CU_SHARED_MEMORY_MODE_PREFER_OVERSIZED_SHARED_MEMORY = ( + cydriver.CUsharedMemoryMode_enum.CU_SHARED_MEMORY_MODE_PREFER_OVERSIZED_SHARED_MEMORY, + 'Specifies that oversized shared memory configurations may be used (with the\n' + 'limitation of only 8kB L1 cache), and prefer an oversized shared memory\n' + 'configuration\n' + ) + class CUlaunchAttributeID(_FastEnum): """ Launch attributes enum; used as id field of @@ -4310,8 +4413,8 @@ class CUlaunchAttributeID(_FastEnum): CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE = ( cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE, - 'Valid for graph nodes, launches. This indicates if the kernel is allowed to\n' - 'use a non-portable dynamic shared memory mode.\n' + "Valid for graph nodes, launches. This controls a kernel's use of non-\n" + 'portable or oversized shared memory configurations.\n' ) class CUstreamCaptureStatus(_FastEnum): @@ -4557,6 +4660,13 @@ class CUresult(_FastEnum): ) + CUDA_ERROR_MULTICAST_RESOURCE_FULL = ( + cydriver.cudaError_enum.CUDA_ERROR_MULTICAST_RESOURCE_FULL, + 'The API call failed because of a hardware resource required to bind memory\n' + 'to a multicast object is unavailable.\n' + ) + + CUDA_ERROR_NO_DEVICE = ( cydriver.cudaError_enum.CUDA_ERROR_NO_DEVICE, 'This indicates that no CUDA-capable devices were detected by the installed\n' @@ -4757,6 +4867,12 @@ class CUresult(_FastEnum): ) + CUDA_ERROR_INSUFFICIENT_LOADER_VERSION = ( + cydriver.cudaError_enum.CUDA_ERROR_INSUFFICIENT_LOADER_VERSION, + 'This indicates that the Loader version is insufficient for fatbin\n' + ) + + CUDA_ERROR_INVALID_SOURCE = ( cydriver.cudaError_enum.CUDA_ERROR_INVALID_SOURCE, 'This indicates that the device kernel source is invalid. This includes\n' @@ -5259,6 +5375,16 @@ class CUresult(_FastEnum): ) + CUDA_ERROR_FABRIC_NOT_READY = ( + cydriver.cudaError_enum.CUDA_ERROR_FABRIC_NOT_READY, + 'The GPU fabric is not ready within the bounded wait while the fabric\n' + 'manager probe is still in progress (or not converging in time).\n' + 'Applications may retry after a delay; for the initialization wait budget,\n' + 'see environment variables such as CUDA_FABRIC_INIT_TIMEOUT_MS. The CUDA\n' + 'Runtime uses the same value as :py:obj:`~.cudaErrorFabricNotReady`.\n' + ) + + CUDA_ERROR_UNKNOWN = ( cydriver.cudaError_enum.CUDA_ERROR_UNKNOWN, 'This indicates that an unknown internal error has occurred.\n' @@ -5877,6 +6003,13 @@ class CUmemLocationType(_FastEnum): 'CU_DEVICE_INVALID\n' ) + + CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN = ( + cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN, + 'Location is a portion of device memory, specified by the locality domain\n' + 'ID.\n' + ) + CU_MEM_LOCATION_TYPE_MAX = cydriver.CUmemLocationType_enum.CU_MEM_LOCATION_TYPE_MAX class CUmemAllocationType(_FastEnum): @@ -6181,6 +6314,19 @@ class CUmemPool_attribute(_FastEnum): 'enabled\n' ) + + CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID = ( + cydriver.CUmemPool_attribute_enum.CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID, + '(value type = int) The locality domain ID for the mempool, if the mempool\n' + 'is localized to a locality domain. A value of -1 indicates that the mempool\n' + 'is not localized.\n' + 'Note: On devices with a single locality domain, mempools created with\n' + ':py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN` and\n' + 'localityDomainId 0 are equivalent to full-device mempools created with\n' + ':py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`. The value of this attribute will\n' + 'be -1 for such mempools.\n' + ) + class CUmemcpyFlags(_FastEnum): """ Flags to specify for copies within a batch. For more details see @@ -6609,6 +6755,18 @@ class CUprocessState(_FastEnum): 'process\n' ) + + CU_PROCESS_STATE_CHECKPOINTING = ( + cydriver.CUprocessState_enum.CU_PROCESS_STATE_CHECKPOINTING, + 'Application memory contents are being checkpointed\n' + ) + + + CU_PROCESS_STATE_RESTORING = ( + cydriver.CUprocessState_enum.CU_PROCESS_STATE_RESTORING, + 'Application memory contents are being restored\n' + ) + class CUmoduleLoadingMode(_FastEnum): """ CUDA Lazy Loading status @@ -6655,6 +6813,35 @@ class CUmemDecompressAlgorithm(_FastEnum): 'LZ4 is supported.\n' ) +class CUcliqueType(_FastEnum): + """ + Fabric clique types + """ + + + CU_CLIQUE_TYPE_UNICAST_POINTER = ( + cydriver.CUcliqueType_enum.CU_CLIQUE_TYPE_UNICAST_POINTER, + 'Unicast pointer clique\n' + ) + + + CU_CLIQUE_TYPE_MULTICAST_POINTER = ( + cydriver.CUcliqueType_enum.CU_CLIQUE_TYPE_MULTICAST_POINTER, + 'Multicast pointer clique\n' + ) + + + CU_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT = ( + cydriver.CUcliqueType_enum.CU_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT, + 'Unicast logical endpoint clique\n' + ) + + + CU_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT = ( + cydriver.CUcliqueType_enum.CU_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT, + 'Multicast logical endpoint clique\n' + ) + class CUlogicalEndpointIpcHandleType(_FastEnum): """ IPC handle types that can be requested/queried for a given logical @@ -6801,6 +6988,13 @@ class CUdevSmResourceGroup_flags(_FastEnum): CU_DEV_SM_RESOURCE_GROUP_BACKFILL = cydriver.CUdevSmResourceGroup_flags.CU_DEV_SM_RESOURCE_GROUP_BACKFILL + + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID = ( + cydriver.CUdevSmResourceGroup_flags.CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID, + 'The SMs must be located on a specific locality domain, specified by\n' + 'localityDomainId\n' + ) + class CUdevSmResourceSplitByCount_flags(_FastEnum): """ @@ -8130,8 +8324,8 @@ class CUkernelNodeAttrID(_FastEnum): CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE = ( cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE, - 'Valid for graph nodes, launches. This indicates if the kernel is allowed to\n' - 'use a non-portable dynamic shared memory mode.\n' + "Valid for graph nodes, launches. This controls a kernel's use of non-\n" + 'portable or oversized shared memory configurations.\n' ) class CUstreamAttrID(_FastEnum): @@ -8375,8 +8569,8 @@ class CUstreamAttrID(_FastEnum): CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE = ( cydriver.CUlaunchAttributeID_enum.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE, - 'Valid for graph nodes, launches. This indicates if the kernel is allowed to\n' - 'use a non-portable dynamic shared memory mode.\n' + "Valid for graph nodes, launches. This controls a kernel's use of non-\n" + 'portable or oversized shared memory configurations.\n' ) cdef class CUmemGenericAllocationHandle: @@ -9211,6 +9405,40 @@ cdef class CUlinkState: def getPtr(self): return self._pvt_ptr +cdef class CUcheckpointOperationHandle: + """ + + Handle for a CUDA custom storage checkpoint or restore operation awaiting completion + + Methods + ------- + getPtr() + Get memory address of class instance + + """ + def __cinit__(self, void_ptr init_value = 0, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + self._pvt_ptr[0] = init_value + else: + self._pvt_ptr = _ptr + def __init__(self, *args, **kwargs): + pass + def __repr__(self): + return '' + def __index__(self): + return self.__int__() + def __eq__(self, other): + if not isinstance(other, CUcheckpointOperationHandle): + return False + return self._pvt_ptr[0] == (other)._pvt_ptr[0] + def __hash__(self): + return hash((self._pvt_ptr[0])) + def __int__(self): + return self._pvt_ptr[0] + def getPtr(self): + return self._pvt_ptr + cdef class CUcoredumpCallbackHandle: """ Opaque handle representing a registered coredump status callback. @@ -12656,6 +12884,14 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: The sync mode to use for the host task + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -12663,7 +12899,8 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._pvt_ptr = &self._pvt_val + self._val_ptr = calloc(1, sizeof(cydriver.CUDA_HOST_NODE_PARAMS_v2_st)) + self._pvt_ptr = self._val_ptr else: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): @@ -12671,8 +12908,15 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: self._fn = CUhostFn(_ptr=&self._pvt_ptr[0].fn) + + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + + + self._gCtx = CUgreenCtx(_ptr=&self._pvt_ptr[0].gCtx) + def __dealloc__(self): - pass + if self._val_ptr is not NULL: + free(self._val_ptr) def getPtr(self): return self._pvt_ptr def __repr__(self): @@ -12696,6 +12940,18 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: except ValueError: str_list += ['syncMode : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + + + try: + str_list += ['gCtx : ' + str(self.gCtx)] + except ValueError: + str_list += ['gCtx : '] + return '\n'.join(str_list) else: return '' @@ -12734,6 +12990,40 @@ cdef class CUDA_HOST_NODE_PARAMS_v2_st: self._pvt_ptr[0].syncMode = syncMode + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + + @property + def gCtx(self): + return self._gCtx + @gCtx.setter + def gCtx(self, gCtx): + cdef cydriver.CUgreenCtx cygCtx + if gCtx is None: + cygCtx = 0 + elif isinstance(gCtx, (CUgreenCtx,)): + pgCtx = int(gCtx) + cygCtx = pgCtx + else: + pgCtx = int(CUgreenCtx(gCtx)) + cygCtx = pgCtx + self._gCtx._pvt_ptr[0] = cygCtx + + cdef class CUDA_CONDITIONAL_NODE_PARAMS: """ Conditional node parameters @@ -12764,7 +13054,7 @@ cdef class CUDA_CONDITIONAL_NODE_PARAMS: empty nodes, child graphs, memsets, memcopies, and conditionals. This applies recursively to child graphs and conditional bodies. - All kernels, including kernels in nested conditionals or child - graphs at any level, must belong to the same CUDA context. + graphs at any level, must belong to the same device context. These graphs may be populated using graph node creation APIs or cuStreamBeginCaptureToGraph. CU_GRAPH_COND_TYPE_IF: phGraph_out[0] is executed when the condition is non-zero. If `size` == 2, @@ -14407,7 +14697,7 @@ cdef class CUexecAffinitySmCount_st: self._pvt_ptr[0].val = val -cdef class anon_union3: +cdef class anon_union4: """ Attributes ---------- @@ -14465,7 +14755,7 @@ cdef class CUexecAffinityParam_st: Type of execution affinity. - param : anon_union3 + param : anon_union4 @@ -14483,7 +14773,7 @@ cdef class CUexecAffinityParam_st: def __init__(self, void_ptr _ptr = 0): pass - self._param = anon_union3(_ptr=self._pvt_ptr) + self._param = anon_union4(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -14521,7 +14811,7 @@ cdef class CUexecAffinityParam_st: def param(self): return self._param @param.setter - def param(self, param not None : anon_union3): + def param(self, param not None : anon_union4): string.memcpy(&self._pvt_ptr[0].param, param.getPtr(), sizeof(self._pvt_ptr[0].param)) @@ -17404,7 +17694,7 @@ cdef class anon_struct11: else: return '' -cdef class anon_union4: +cdef class anon_union5: """ Attributes ---------- @@ -17525,7 +17815,7 @@ cdef class CUDA_RESOURCE_DESC_st: Resource type - res : anon_union4 + res : anon_union5 @@ -17547,7 +17837,7 @@ cdef class CUDA_RESOURCE_DESC_st: def __init__(self, void_ptr _ptr = 0): pass - self._res = anon_union4(_ptr=self._pvt_ptr) + self._res = anon_union5(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -17591,7 +17881,7 @@ cdef class CUDA_RESOURCE_DESC_st: def res(self): return self._res @res.setter - def res(self, res not None : anon_union4): + def res(self, res not None : anon_union5): string.memcpy(&self._pvt_ptr[0].res, res.getPtr(), sizeof(self._pvt_ptr[0].res)) @@ -18384,7 +18674,7 @@ cdef class anon_struct12: self._pvt_ptr[0].handle.win32.name = self._cyname.cptr -cdef class anon_union5: +cdef class anon_union6: """ Attributes ---------- @@ -18479,7 +18769,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: Type of the handle - handle : anon_union5 + handle : anon_union6 @@ -18505,7 +18795,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: def __init__(self, void_ptr _ptr = 0): pass - self._handle = anon_union5(_ptr=self._pvt_ptr) + self._handle = anon_union6(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -18555,7 +18845,7 @@ cdef class CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st: def handle(self): return self._handle @handle.setter - def handle(self, handle not None : anon_union5): + def handle(self, handle not None : anon_union6): string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) @@ -18811,7 +19101,7 @@ cdef class anon_struct13: self._pvt_ptr[0].handle.win32.name = self._cyname.cptr -cdef class anon_union6: +cdef class anon_union7: """ Attributes ---------- @@ -18906,7 +19196,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: Type of the handle - handle : anon_union6 + handle : anon_union7 @@ -18928,7 +19218,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: def __init__(self, void_ptr _ptr = 0): pass - self._handle = anon_union6(_ptr=self._pvt_ptr) + self._handle = anon_union7(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -18972,7 +19262,7 @@ cdef class CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st: def handle(self): return self._handle @handle.setter - def handle(self, handle not None : anon_union6): + def handle(self, handle not None : anon_union7): string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) @@ -19028,7 +19318,7 @@ cdef class anon_struct14: self._pvt_ptr[0].params.fence.value = value -cdef class anon_union7: +cdef class anon_union8: """ Attributes ---------- @@ -19126,7 +19416,7 @@ cdef class anon_struct16: - nvSciSync : anon_union7 + nvSciSync : anon_union8 @@ -19148,7 +19438,7 @@ cdef class anon_struct16: self._fence = anon_struct14(_ptr=self._pvt_ptr) - self._nvSciSync = anon_union7(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union8(_ptr=self._pvt_ptr) self._keyedMutex = anon_struct15(_ptr=self._pvt_ptr) @@ -19194,7 +19484,7 @@ cdef class anon_struct16: def nvSciSync(self): return self._nvSciSync @nvSciSync.setter - def nvSciSync(self, nvSciSync not None : anon_union7): + def nvSciSync(self, nvSciSync not None : anon_union8): string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) @@ -19326,7 +19616,7 @@ cdef class anon_struct17: self._pvt_ptr[0].params.fence.value = value -cdef class anon_union8: +cdef class anon_union9: """ Attributes ---------- @@ -19442,7 +19732,7 @@ cdef class anon_struct19: - nvSciSync : anon_union8 + nvSciSync : anon_union9 @@ -19464,7 +19754,7 @@ cdef class anon_struct19: self._fence = anon_struct17(_ptr=self._pvt_ptr) - self._nvSciSync = anon_union8(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union9(_ptr=self._pvt_ptr) self._keyedMutex = anon_struct18(_ptr=self._pvt_ptr) @@ -19510,7 +19800,7 @@ cdef class anon_struct19: def nvSciSync(self): return self._nvSciSync @nvSciSync.setter - def nvSciSync(self, nvSciSync not None : anon_union8): + def nvSciSync(self, nvSciSync not None : anon_union9): string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) @@ -19754,6 +20044,14 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: paramsArray. + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -19761,13 +20059,21 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._pvt_ptr = &self._pvt_val + self._val_ptr = calloc(1, sizeof(cydriver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st)) + self._pvt_ptr = self._val_ptr else: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass + + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + + + self._gCtx = CUgreenCtx(_ptr=&self._pvt_ptr[0].gCtx) + def __dealloc__(self): - pass + if self._val_ptr is not NULL: + free(self._val_ptr) if self._extSemArray is not NULL: free(self._extSemArray) @@ -19801,6 +20107,18 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: except ValueError: str_list += ['numExtSems : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + + + try: + str_list += ['gCtx : ' + str(self.gCtx)] + except ValueError: + str_list += ['gCtx : '] + return '\n'.join(str_list) else: return '' @@ -19870,6 +20188,40 @@ cdef class CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st: self._pvt_ptr[0].numExtSems = numExtSems + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + + @property + def gCtx(self): + return self._gCtx + @gCtx.setter + def gCtx(self, gCtx): + cdef cydriver.CUgreenCtx cygCtx + if gCtx is None: + cygCtx = 0 + elif isinstance(gCtx, (CUgreenCtx,)): + pgCtx = int(gCtx) + cygCtx = pgCtx + else: + pgCtx = int(CUgreenCtx(gCtx)) + cygCtx = pgCtx + self._gCtx._pvt_ptr[0] = cygCtx + + cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_st: """ Semaphore wait node parameters @@ -20026,6 +20378,14 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: paramsArray. + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -20033,13 +20393,21 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._pvt_ptr = &self._pvt_val + self._val_ptr = calloc(1, sizeof(cydriver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st)) + self._pvt_ptr = self._val_ptr else: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass + + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + + + self._gCtx = CUgreenCtx(_ptr=&self._pvt_ptr[0].gCtx) + def __dealloc__(self): - pass + if self._val_ptr is not NULL: + free(self._val_ptr) if self._extSemArray is not NULL: free(self._extSemArray) @@ -20073,6 +20441,18 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: except ValueError: str_list += ['numExtSems : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + + + try: + str_list += ['gCtx : ' + str(self.gCtx)] + except ValueError: + str_list += ['gCtx : '] + return '\n'.join(str_list) else: return '' @@ -20142,7 +20522,41 @@ cdef class CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st: self._pvt_ptr[0].numExtSems = numExtSems -cdef class anon_union9: + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + + @property + def gCtx(self): + return self._gCtx + @gCtx.setter + def gCtx(self, gCtx): + cdef cydriver.CUgreenCtx cygCtx + if gCtx is None: + cygCtx = 0 + elif isinstance(gCtx, (CUgreenCtx,)): + pgCtx = int(gCtx) + cygCtx = pgCtx + else: + pgCtx = int(CUgreenCtx(gCtx)) + cygCtx = pgCtx + self._gCtx._pvt_ptr[0] = cygCtx + + +cdef class anon_union12: """ Attributes ---------- @@ -20478,7 +20892,7 @@ cdef class anon_struct21: self._pvt_ptr[0].subresource.miptail.size = size -cdef class anon_union10: +cdef class anon_union13: """ Attributes ---------- @@ -20546,7 +20960,7 @@ cdef class anon_union10: string.memcpy(&self._pvt_ptr[0].subresource.miptail, miptail.getPtr(), sizeof(self._pvt_ptr[0].subresource.miptail)) -cdef class anon_union11: +cdef class anon_union14: """ Attributes ---------- @@ -20615,7 +21029,7 @@ cdef class CUarrayMapInfo_st: Resource type - resource : anon_union9 + resource : anon_union12 @@ -20623,7 +21037,7 @@ cdef class CUarrayMapInfo_st: Sparse subresource type - subresource : anon_union10 + subresource : anon_union13 @@ -20635,7 +21049,7 @@ cdef class CUarrayMapInfo_st: Memory handle type - memHandle : anon_union11 + memHandle : anon_union14 @@ -20665,13 +21079,13 @@ cdef class CUarrayMapInfo_st: def __init__(self, void_ptr _ptr = 0): pass - self._resource = anon_union9(_ptr=self._pvt_ptr) + self._resource = anon_union12(_ptr=self._pvt_ptr) - self._subresource = anon_union10(_ptr=self._pvt_ptr) + self._subresource = anon_union13(_ptr=self._pvt_ptr) - self._memHandle = anon_union11(_ptr=self._pvt_ptr) + self._memHandle = anon_union14(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -20757,7 +21171,7 @@ cdef class CUarrayMapInfo_st: def resource(self): return self._resource @resource.setter - def resource(self, resource not None : anon_union9): + def resource(self, resource not None : anon_union12): string.memcpy(&self._pvt_ptr[0].resource, resource.getPtr(), sizeof(self._pvt_ptr[0].resource)) @@ -20773,7 +21187,7 @@ cdef class CUarrayMapInfo_st: def subresource(self): return self._subresource @subresource.setter - def subresource(self, subresource not None : anon_union10): + def subresource(self, subresource not None : anon_union13): string.memcpy(&self._pvt_ptr[0].subresource, subresource.getPtr(), sizeof(self._pvt_ptr[0].subresource)) @@ -20797,7 +21211,7 @@ cdef class CUarrayMapInfo_st: def memHandle(self): return self._memHandle @memHandle.setter - def memHandle(self, memHandle not None : anon_union11): + def memHandle(self, memHandle not None : anon_union14): string.memcpy(&self._pvt_ptr[0].memHandle, memHandle.getPtr(), sizeof(self._pvt_ptr[0].memHandle)) @@ -20825,6 +21239,68 @@ cdef class CUarrayMapInfo_st: self._pvt_ptr[0].flags = flags +cdef class anon_struct22: + """ + Attributes + ---------- + + deviceId : bytes + + + + localityDomainId : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].localized + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + + try: + str_list += ['deviceId : ' + str(self.deviceId)] + except ValueError: + str_list += ['deviceId : '] + + + try: + str_list += ['localityDomainId : ' + str(self.localityDomainId)] + except ValueError: + str_list += ['localityDomainId : '] + + return '\n'.join(str_list) + else: + return '' + + @property + def deviceId(self): + return self._pvt_ptr[0].localized.deviceId + @deviceId.setter + def deviceId(self, unsigned char deviceId): + self._pvt_ptr[0].localized.deviceId = deviceId + + + @property + def localityDomainId(self): + return self._pvt_ptr[0].localized.localityDomainId + @localityDomainId.setter + def localityDomainId(self, unsigned char localityDomainId): + self._pvt_ptr[0].localized.localityDomainId = localityDomainId + + cdef class CUmemLocation_st: """ Specifies a memory location. @@ -20842,6 +21318,11 @@ cdef class CUmemLocation_st: CUmemLocationType::CU_MEM_LOCATION_TYPE_HOST_NUMA. + localized : anon_struct22 + Identifier for + CUmemLocationType::CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN. + + Methods ------- getPtr() @@ -20855,6 +21336,9 @@ cdef class CUmemLocation_st: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass + + self._localized = anon_struct22(_ptr=self._pvt_ptr) + def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) @@ -20875,6 +21359,12 @@ cdef class CUmemLocation_st: except ValueError: str_list += ['id : '] + + try: + str_list += ['localized :\n' + '\n'.join([' ' + line for line in str(self.localized).splitlines()])] + except ValueError: + str_list += ['localized : '] + return '\n'.join(str_list) else: return '' @@ -20895,7 +21385,15 @@ cdef class CUmemLocation_st: self._pvt_ptr[0].id = id -cdef class anon_struct22: + @property + def localized(self): + return self._localized + @localized.setter + def localized(self, localized not None : anon_struct22): + string.memcpy(&self._pvt_ptr[0].localized, localized.getPtr(), sizeof(self._pvt_ptr[0].localized)) + + +cdef class anon_struct23: """ Attributes ---------- @@ -21002,7 +21500,7 @@ cdef class CUmemAllocationProp_st: In all other cases, this field is required to be zero. - allocFlags : anon_struct22 + allocFlags : anon_struct23 @@ -21022,7 +21520,7 @@ cdef class CUmemAllocationProp_st: self._location = CUmemLocation(_ptr=&self._pvt_ptr[0].location) - self._allocFlags = anon_struct22(_ptr=self._pvt_ptr) + self._allocFlags = anon_struct23(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -21102,7 +21600,7 @@ cdef class CUmemAllocationProp_st: def allocFlags(self): return self._allocFlags @allocFlags.setter - def allocFlags(self, allocFlags not None : anon_struct22): + def allocFlags(self, allocFlags not None : anon_struct23): string.memcpy(&self._pvt_ptr[0].allocFlags, allocFlags.getPtr(), sizeof(self._pvt_ptr[0].allocFlags)) @@ -21428,6 +21926,24 @@ cdef class CUmemPoolProps_st: Bitmask indicating intended usage for the pool. + gpuDirectRDMACapable : bytes + Allocation hint for requesting GPUDirect RDMA capable memory. On + devices that support GPUDirect RDMA, this flag indicates that the + memory will be used for GPUDirect RDMA. On platforms where the + default RDMA path does not support localized allocations, this flag + has the following effects: - For MPS clients using MLOPart/locality + domains, this flag has the effect of disabling localization for the + pool. This allows the pool to be used for GPUDirect RDMA with the + default RDMA path. - For pools that are localized using CUDA + locality domain APIs, using this flag will have no effect, but + attempting to export the localized memory without forcing PCIe will + return an error. To use GPUDirect RDMA with localized pools on + platforms where the default RDMA path does not support localized + allocations, handles must be acquired with the flag + CU_MEM_RANGE_FLAG_DMA_BUF_MAPPING_TYPE_PCIE. Note that CUDA memory + pools are only compatible with dma_buf mappings. + + Methods ------- getPtr() @@ -21486,6 +22002,12 @@ cdef class CUmemPoolProps_st: except ValueError: str_list += ['usage : '] + + try: + str_list += ['gpuDirectRDMACapable : ' + str(self.gpuDirectRDMACapable)] + except ValueError: + str_list += ['gpuDirectRDMACapable : '] + return '\n'.join(str_list) else: return '' @@ -21539,6 +22061,14 @@ cdef class CUmemPoolProps_st: self._pvt_ptr[0].usage = usage + @property + def gpuDirectRDMACapable(self): + return self._pvt_ptr[0].gpuDirectRDMACapable + @gpuDirectRDMACapable.setter + def gpuDirectRDMACapable(self, unsigned char gpuDirectRDMACapable): + self._pvt_ptr[0].gpuDirectRDMACapable = gpuDirectRDMACapable + + cdef class CUmemPoolPtrExportData_st: """ Opaque data for exporting a pool allocation @@ -21847,7 +22377,7 @@ cdef class CUextent3D_st: self._pvt_ptr[0].depth = depth -cdef class anon_struct23: +cdef class anon_struct24: """ Attributes ---------- @@ -21961,7 +22491,7 @@ cdef class anon_struct23: string.memcpy(&self._pvt_ptr[0].op.ptr.locHint, locHint.getPtr(), sizeof(self._pvt_ptr[0].op.ptr.locHint)) -cdef class anon_struct24: +cdef class anon_struct25: """ Attributes ---------- @@ -22038,16 +22568,16 @@ cdef class anon_struct24: string.memcpy(&self._pvt_ptr[0].op.array.offset, offset.getPtr(), sizeof(self._pvt_ptr[0].op.array.offset)) -cdef class anon_union13: +cdef class anon_union16: """ Attributes ---------- - ptr : anon_struct23 + ptr : anon_struct24 - array : anon_struct24 + array : anon_struct25 @@ -22062,10 +22592,10 @@ cdef class anon_union13: def __init__(self, void_ptr _ptr): pass - self._ptr = anon_struct23(_ptr=self._pvt_ptr) + self._ptr = anon_struct24(_ptr=self._pvt_ptr) - self._array = anon_struct24(_ptr=self._pvt_ptr) + self._array = anon_struct25(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -22094,7 +22624,7 @@ cdef class anon_union13: def ptr(self): return self._ptr @ptr.setter - def ptr(self, ptr not None : anon_struct23): + def ptr(self, ptr not None : anon_struct24): string.memcpy(&self._pvt_ptr[0].op.ptr, ptr.getPtr(), sizeof(self._pvt_ptr[0].op.ptr)) @@ -22102,7 +22632,7 @@ cdef class anon_union13: def array(self): return self._array @array.setter - def array(self, array not None : anon_struct24): + def array(self, array not None : anon_struct25): string.memcpy(&self._pvt_ptr[0].op.array, array.getPtr(), sizeof(self._pvt_ptr[0].op.array)) @@ -22117,7 +22647,7 @@ cdef class CUmemcpy3DOperand_st: - op : anon_union13 + op : anon_union16 @@ -22135,7 +22665,7 @@ cdef class CUmemcpy3DOperand_st: def __init__(self, void_ptr _ptr = 0): pass - self._op = anon_union13(_ptr=self._pvt_ptr) + self._op = anon_union16(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -22173,7 +22703,7 @@ cdef class CUmemcpy3DOperand_st: def op(self): return self._op @op.setter - def op(self, op not None : anon_union13): + def op(self, op not None : anon_union16): string.memcpy(&self._pvt_ptr[0].op, op.getPtr(), sizeof(self._pvt_ptr[0].op)) @@ -22799,6 +23329,14 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: The event to record when the node executes + ctx : CUcontext + + + + gCtx : CUgreenCtx + + + Methods ------- getPtr() @@ -22806,7 +23344,8 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._pvt_ptr = &self._pvt_val + self._val_ptr = calloc(1, sizeof(cydriver.CUDA_EVENT_RECORD_NODE_PARAMS_st)) + self._pvt_ptr = self._val_ptr else: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): @@ -22814,8 +23353,15 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: self._event = CUevent(_ptr=&self._pvt_ptr[0].event) + + self._ctx = CUcontext(_ptr=&self._pvt_ptr[0].ctx) + + + self._gCtx = CUgreenCtx(_ptr=&self._pvt_ptr[0].gCtx) + def __dealloc__(self): - pass + if self._val_ptr is not NULL: + free(self._val_ptr) def getPtr(self): return self._pvt_ptr def __repr__(self): @@ -22827,6 +23373,18 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: except ValueError: str_list += ['event : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + + + try: + str_list += ['gCtx : ' + str(self.gCtx)] + except ValueError: + str_list += ['gCtx : '] + return '\n'.join(str_list) else: return '' @@ -22848,6 +23406,40 @@ cdef class CUDA_EVENT_RECORD_NODE_PARAMS_st: self._event._pvt_ptr[0] = cyevent + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cydriver.CUcontext cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (CUcontext,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(CUcontext(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + + @property + def gCtx(self): + return self._gCtx + @gCtx.setter + def gCtx(self, gCtx): + cdef cydriver.CUgreenCtx cygCtx + if gCtx is None: + cygCtx = 0 + elif isinstance(gCtx, (CUgreenCtx,)): + pgCtx = int(gCtx) + cygCtx = pgCtx + else: + pgCtx = int(CUgreenCtx(gCtx)) + cygCtx = pgCtx + self._gCtx._pvt_ptr[0] = cygCtx + + cdef class CUDA_EVENT_WAIT_NODE_PARAMS_st: """ Event wait node parameters @@ -23260,6 +23852,245 @@ cdef class CUgraphNodeParams_st: self._pvt_ptr[0].asBytes[i] = b +cdef class CUcheckpointCustomStoragePerDeviceData_st: + """ + Per-GPU data for zero-copy mapped device memory used with CUDA + checkpoint/restore on custom storage + + Attributes + ---------- + + devPtr : CUdeviceptr + Zero-copy mapped device memory pointer for the user to copy to/from + + + size : size_t + Size of mapped memory + + + stream : CUstream + Stream the user may use for the copy; the CUDA driver synchronizes + on this stream before completing checkpoint or restore + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + + self._devPtr = CUdeviceptr(_ptr=&self._pvt_ptr[0].devPtr) + + + self._stream = CUstream(_ptr=&self._pvt_ptr[0].stream) + + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + + try: + str_list += ['devPtr : ' + str(self.devPtr)] + except ValueError: + str_list += ['devPtr : '] + + + try: + str_list += ['size : ' + str(self.size)] + except ValueError: + str_list += ['size : '] + + + try: + str_list += ['stream : ' + str(self.stream)] + except ValueError: + str_list += ['stream : '] + + return '\n'.join(str_list) + else: + return '' + + @property + def devPtr(self): + return self._devPtr + @devPtr.setter + def devPtr(self, devPtr): + cdef cydriver.CUdeviceptr cydevPtr + if devPtr is None: + cydevPtr = 0 + elif isinstance(devPtr, (CUdeviceptr)): + pdevPtr = int(devPtr) + cydevPtr = pdevPtr + else: + pdevPtr = int(CUdeviceptr(devPtr)) + cydevPtr = pdevPtr + self._devPtr._pvt_ptr[0] = cydevPtr + + + + @property + def size(self): + return self._pvt_ptr[0].size + @size.setter + def size(self, size_t size): + self._pvt_ptr[0].size = size + + + @property + def stream(self): + return self._stream + @stream.setter + def stream(self, stream): + cdef cydriver.CUstream cystream + if stream is None: + cystream = 0 + elif isinstance(stream, (CUstream,)): + pstream = int(stream) + cystream = pstream + else: + pstream = int(CUstream(stream)) + cystream = pstream + self._stream._pvt_ptr[0] = cystream + + +cdef class CUcheckpointCustomStorageInfo_st: + """ + Output from CUDA custom storage checkpoint/restore: per-GPU device + pointers and a handle to complete the operation + + Attributes + ---------- + + handle : CUcheckpointOperationHandle + Handle returned that is needed to complete checkpoint or restore + + + perDeviceData : CUcheckpointCustomStoragePerDeviceData + Returned pointer to array of per-device data, one per device. User + should set to NULL + + + deviceCount : unsigned int + Number of devices (and elements in `perDeviceData` array) + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + + self._handle = CUcheckpointOperationHandle(_ptr=&self._pvt_ptr[0].handle) + + def __dealloc__(self): + pass + + if self._perDeviceData is not NULL: + free(self._perDeviceData) + self._pvt_ptr[0].perDeviceData = NULL + + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + + try: + str_list += ['handle : ' + str(self.handle)] + except ValueError: + str_list += ['handle : '] + + + try: + str_list += ['perDeviceData : ' + str(self.perDeviceData)] + except ValueError: + str_list += ['perDeviceData : '] + + + try: + str_list += ['deviceCount : ' + str(self.deviceCount)] + except ValueError: + str_list += ['deviceCount : '] + + return '\n'.join(str_list) + else: + return '' + + @property + def handle(self): + return self._handle + @handle.setter + def handle(self, handle): + cdef cydriver.CUcheckpointOperationHandle cyhandle + if handle is None: + cyhandle = 0 + elif isinstance(handle, (CUcheckpointOperationHandle,)): + phandle = int(handle) + cyhandle = phandle + else: + phandle = int(CUcheckpointOperationHandle(handle)) + cyhandle = phandle + self._handle._pvt_ptr[0] = cyhandle + + + @property + def perDeviceData(self): + arrs = [self._pvt_ptr[0].perDeviceData + x*sizeof(cydriver.CUcheckpointCustomStoragePerDeviceData) for x in range(self._perDeviceData_length)] + return [CUcheckpointCustomStoragePerDeviceData(_ptr=arr) for arr in arrs] + @perDeviceData.setter + def perDeviceData(self, val): + cdef cydriver.CUcheckpointCustomStoragePerDeviceData* _perDeviceData_new + if len(val) == 0: + free(self._perDeviceData) + self._perDeviceData = NULL + self._perDeviceData_length = 0 + self._pvt_ptr[0].perDeviceData = NULL + else: + if self._perDeviceData_length != len(val): + # Allocate and fill a new buffer before touching the + # live state so a failure leaves this object unchanged + # (strong exception guarantee); the old buffer is only + # freed once the resize is known to succeed. + _perDeviceData_new = calloc(len(val), sizeof(cydriver.CUcheckpointCustomStoragePerDeviceData)) + if _perDeviceData_new is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(val)) + 'x' + str(sizeof(cydriver.CUcheckpointCustomStoragePerDeviceData))) + for idx in range(len(val)): + string.memcpy(&_perDeviceData_new[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUcheckpointCustomStoragePerDeviceData)) + free(self._perDeviceData) + self._perDeviceData = _perDeviceData_new + self._perDeviceData_length = len(val) + self._pvt_ptr[0].perDeviceData = _perDeviceData_new + else: + for idx in range(len(val)): + string.memcpy(&self._perDeviceData[idx], (val[idx])._pvt_ptr, sizeof(cydriver.CUcheckpointCustomStoragePerDeviceData)) + + + + @property + def deviceCount(self): + return self._pvt_ptr[0].deviceCount + @deviceCount.setter + def deviceCount(self, unsigned int deviceCount): + self._pvt_ptr[0].deviceCount = deviceCount + + cdef class CUcheckpointLockArgs_st: """ CUDA checkpoint optional lock arguments @@ -23313,6 +24144,14 @@ cdef class CUcheckpointCheckpointArgs_st: """ CUDA checkpoint optional checkpoint arguments + Attributes + ---------- + + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is checkpointed to + host + + Methods ------- getPtr() @@ -23333,10 +24172,23 @@ cdef class CUcheckpointCheckpointArgs_st: if self._pvt_ptr is not NULL: str_list = [] + try: + str_list += ['customStorageInfo_out : ' + str(self.customStorageInfo_out)] + except ValueError: + str_list += ['customStorageInfo_out : '] + return '\n'.join(str_list) else: return '' + @property + def customStorageInfo_out(self): + return self._pvt_ptr[0].customStorageInfo_out + @customStorageInfo_out.setter + def customStorageInfo_out(self, void_ptr customStorageInfo_out): + self._pvt_ptr[0].customStorageInfo_out = customStorageInfo_out + + cdef class CUcheckpointGpuPair_st: """ CUDA checkpoint GPU UUID pairs for device remapping during restore @@ -23425,6 +24277,10 @@ cdef class CUcheckpointRestoreArgs_st: Number of gpu pairs to remap + customStorageInfo_out : CUcheckpointCustomStorageInfo + Optional custom storage; if NULL, GPU memory is restored from host + + Methods ------- getPtr() @@ -23461,6 +24317,12 @@ cdef class CUcheckpointRestoreArgs_st: except ValueError: str_list += ['gpuPairsCount : '] + + try: + str_list += ['customStorageInfo_out : ' + str(self.customStorageInfo_out)] + except ValueError: + str_list += ['customStorageInfo_out : '] + return '\n'.join(str_list) else: return '' @@ -23506,6 +24368,14 @@ cdef class CUcheckpointRestoreArgs_st: self._pvt_ptr[0].gpuPairsCount = gpuPairsCount + @property + def customStorageInfo_out(self): + return self._pvt_ptr[0].customStorageInfo_out + @customStorageInfo_out.setter + def customStorageInfo_out(self, void_ptr customStorageInfo_out): + self._pvt_ptr[0].customStorageInfo_out = customStorageInfo_out + + cdef class CUcheckpointUnlockArgs_st: """ CUDA checkpoint optional unlock arguments @@ -23681,6 +24551,72 @@ cdef class CUmemDecompressParams_st: self._pvt_ptr[0].algo = int(algo) +cdef class CUcliqueInfo_st: + """ + Fabric clique information + + Attributes + ---------- + + type : CUcliqueType + Type of the fabric clique + + + id : unsigned int + ID of the fabric clique + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr = 0): + if _ptr == 0: + self._pvt_ptr = &self._pvt_val + else: + self._pvt_ptr = _ptr + def __init__(self, void_ptr _ptr = 0): + pass + def __dealloc__(self): + pass + def getPtr(self): + return self._pvt_ptr + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + + try: + str_list += ['type : ' + str(self.type)] + except ValueError: + str_list += ['type : '] + + + try: + str_list += ['id : ' + str(self.id)] + except ValueError: + str_list += ['id : '] + + return '\n'.join(str_list) + else: + return '' + + @property + def type(self): + return CUcliqueType(self._pvt_ptr[0].type) + @type.setter + def type(self, type not None : CUcliqueType): + self._pvt_ptr[0].type = int(type) + + + @property + def id(self): + return self._pvt_ptr[0].id + @id.setter + def id(self, unsigned int id): + self._pvt_ptr[0].id = id + + cdef class CUlogicalEndpointFabricHandle_st: """ Fabric handle for a logical endpoint @@ -23732,7 +24668,7 @@ cdef class CUlogicalEndpointFabricHandle_st: self._pvt_ptr[0].data[i] = b -cdef class anon_struct25: +cdef class anon_struct26: """ Attributes ---------- @@ -23789,7 +24725,7 @@ cdef class anon_struct25: -cdef class anon_struct26: +cdef class anon_struct27: """ Attributes ---------- @@ -23844,11 +24780,11 @@ cdef class CUlogicalEndpointProp_struct: Type of the logical endpoint defined in CUlogicalEndpointType - unicast : anon_struct25 + unicast : anon_struct26 - multicast : anon_struct26 + multicast : anon_struct27 @@ -23879,10 +24815,10 @@ cdef class CUlogicalEndpointProp_struct: def __init__(self, void_ptr _ptr = 0): pass - self._unicast = anon_struct25(_ptr=self._pvt_ptr) + self._unicast = anon_struct26(_ptr=self._pvt_ptr) - self._multicast = anon_struct26(_ptr=self._pvt_ptr) + self._multicast = anon_struct27(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -23944,7 +24880,7 @@ cdef class CUlogicalEndpointProp_struct: def unicast(self): return self._unicast @unicast.setter - def unicast(self, unicast not None : anon_struct25): + def unicast(self, unicast not None : anon_struct26): string.memcpy(&self._pvt_ptr[0].unicast, unicast.getPtr(), sizeof(self._pvt_ptr[0].unicast)) @@ -23952,7 +24888,7 @@ cdef class CUlogicalEndpointProp_struct: def multicast(self): return self._multicast @multicast.setter - def multicast(self, multicast not None : anon_struct26): + def multicast(self, multicast not None : anon_struct27): string.memcpy(&self._pvt_ptr[0].multicast, multicast.getPtr(), sizeof(self._pvt_ptr[0].multicast)) @@ -24006,6 +24942,13 @@ cdef class CUdevSmResource_st: CUdevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags. If the + backfill flag is set, SMs may be assigned from other locality + domains. + + Methods ------- getPtr() @@ -24049,6 +24992,12 @@ cdef class CUdevSmResource_st: except ValueError: str_list += ['flags : '] + + try: + str_list += ['localityDomainId : ' + str(self.localityDomainId)] + except ValueError: + str_list += ['localityDomainId : '] + return '\n'.join(str_list) else: return '' @@ -24085,6 +25034,14 @@ cdef class CUdevSmResource_st: self._pvt_ptr[0].flags = flags + @property + def localityDomainId(self): + return self._pvt_ptr[0].localityDomainId + @localityDomainId.setter + def localityDomainId(self, unsigned int localityDomainId): + self._pvt_ptr[0].localityDomainId = localityDomainId + + cdef class CUdevWorkqueueConfigResource_st: """ Attributes @@ -24230,6 +25187,11 @@ cdef class CU_DEV_SM_RESOURCE_GROUP_PARAMS_st: CUdevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags + + Methods ------- getPtr() @@ -24273,6 +25235,12 @@ cdef class CU_DEV_SM_RESOURCE_GROUP_PARAMS_st: except ValueError: str_list += ['flags : '] + + try: + str_list += ['localityDomainId : ' + str(self.localityDomainId)] + except ValueError: + str_list += ['localityDomainId : '] + return '\n'.join(str_list) else: return '' @@ -24309,6 +25277,14 @@ cdef class CU_DEV_SM_RESOURCE_GROUP_PARAMS_st: self._pvt_ptr[0].flags = flags + @property + def localityDomainId(self): + return self._pvt_ptr[0].localityDomainId + @localityDomainId.setter + def localityDomainId(self, unsigned int localityDomainId): + self._pvt_ptr[0].localityDomainId = localityDomainId + + cdef class CUdevResource_st: """ Attributes @@ -24512,7 +25488,7 @@ cdef class CUdevResource_st: -cdef class anon_union17: +cdef class anon_union21: """ Attributes ---------- @@ -24592,7 +25568,7 @@ cdef class CUeglFrame_st: Attributes ---------- - frame : anon_union17 + frame : anon_union21 @@ -24646,7 +25622,7 @@ cdef class CUeglFrame_st: def __init__(self, void_ptr _ptr = 0): pass - self._frame = anon_union17(_ptr=self._pvt_ptr) + self._frame = anon_union21(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -24724,7 +25700,7 @@ cdef class CUeglFrame_st: def frame(self): return self._frame @frame.setter - def frame(self, frame not None : anon_union17): + def frame(self, frame not None : anon_union21): string.memcpy(&self._pvt_ptr[0].frame, frame.getPtr(), sizeof(self._pvt_ptr[0].frame)) @@ -27088,6 +28064,9 @@ def cuCtxSetLimit(limit not None : CUlimit, size_t value): available for persisting L2 cache. This is purely a performance hint and it can be ignored or clamped depending on the platform. + - :py:obj:`~.CU_LIMIT_PER_BLOCK_MEMORY_SIZE` constrols size in bytes of + per-block memory. + Parameters ---------- limit : :py:obj:`~.CUlimit` @@ -27141,17 +28120,24 @@ def cuCtxGetLimit(limit not None : CUlimit): - :py:obj:`~.CU_LIMIT_PERSISTING_L2_CACHE_SIZE`: Persisting L2 cache size in bytes + - :py:obj:`~.CU_LIMIT_PER_BLOCK_MEMORY_SIZE`: Per-block memory in + bytes. + Parameters ---------- limit : :py:obj:`~.CUlimit` - None + Limit to query Returns ------- CUresult - + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_UNSUPPORTED_LIMIT` pvalue : int - None + Returned size of limit + + See Also + -------- + :py:obj:`~.cuCtxCreate`, :py:obj:`~.cuCtxDestroy`, :py:obj:`~.cuCtxGetApiVersion`, :py:obj:`~.cuCtxGetCacheConfig`, :py:obj:`~.cuCtxGetDevice`, :py:obj:`~.cuCtxGetFlags`, :py:obj:`~.cuCtxPopCurrent`, :py:obj:`~.cuCtxPushCurrent`, :py:obj:`~.cuCtxSetCacheConfig`, :py:obj:`~.cuCtxSetLimit`, :py:obj:`~.cuCtxSynchronize`, :py:obj:`~.cudaDeviceGetLimit` """ cdef size_t pvalue = 0 cdef cydriver.CUlimit cylimit = int(limit) @@ -29144,6 +30130,10 @@ def cuKernelGetAttribute(attrib not None : CUfunction_attribute, kernel, dev): The block scheduling policy of a function. The value type is :py:obj:`~.CUclusterSchedulingPolicy`. + - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE`: The shared memory + mode of a function. The value type is :py:obj:`~.CUsharedMemoryMode` + / cudaSharedMemoryMode. + Parameters ---------- attrib : :py:obj:`~.CUfunction_attribute` @@ -29259,6 +30249,10 @@ def cuKernelSetAttribute(attrib not None : CUfunction_attribute, int val, kernel The block scheduling policy of a function. The value type is :py:obj:`~.CUclusterSchedulingPolicy`. + - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE`: The shared memory + mode of a function. The value type is :py:obj:`~.CUsharedMemoryMode` + / cudaSharedMemoryMode. + Parameters ---------- attrib : :py:obj:`~.CUfunction_attribute` @@ -34402,7 +35396,17 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long :py:obj:`~.CUmemAllocationProp.CUmemLocation.id` must be set to 0. Specifying :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT` as the :py:obj:`~.CUmemLocation.type` will result in - :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. Specifying + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN` as the + :py:obj:`~.CUmemLocation.type` will localize the allocation to the + specified locality domain. + :py:obj:`~.CUmemAllocationProp.CUmemLocation.localized`.deviceId must + specify the device ID. + :py:obj:`~.CUmemAllocationProp.CUmemLocation.localized`.localityDomainId + must specify the locality domain ID. The locality domain ID must be a + valid locality domain ID for the specified device. See also + :py:obj:`~.cuDeviceGetAttribute` with the attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT`. Applications that intend to use :py:obj:`~.CU_MEM_HANDLE_TYPE_FABRIC` based memory sharing must ensure: (1) `nvidia-caps-imex-channels` @@ -34450,6 +35454,10 @@ def cuMemCreate(size_t size, prop : Optional[CUmemAllocationProp], unsigned long See Also -------- :py:obj:`~.cuMemRelease`, :py:obj:`~.cuMemExportToShareableHandle`, :py:obj:`~.cuMemImportFromShareableHandle` + + Notes + ----- + On devices with a single locality domain, :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN` and localityDomainId 0 is equivalent to a full-device allocation created with :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`. The resulting allocation will be of type :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`. """ cdef CUmemGenericAllocationHandle handle = CUmemGenericAllocationHandle() cdef cydriver.CUmemAllocationProp* cyprop_ptr = prop._pvt_ptr if prop is not None else NULL @@ -34520,6 +35528,10 @@ def cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags): :py:obj:`~.cuMulticastGetGranularity` with the flag :py:obj:`~.CU_MULTICAST_RECOMMENDED_GRANULARITY`. + When `handle` represents a multicast object, this call may fail if the + devices added via :py:obj:`~.cuMulticastAddDevice` do not belong to the + same clique. + When `handle` represents a multicast object, this call may return CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the @@ -35401,6 +36413,11 @@ def cuMemPoolGetAttribute(pool, attr not None : CUmemPool_attribute): importing process or pools imported via fabric handles across nodes this will be CU_MEM_LOCATION_TYPE_INVISIBLE. + - :py:obj:`~.CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID`: (value type = int) + The locality domain id for the mempool, if the mempool is localized + to a locality domain. A value of -1 indicates that the mempool is not + localized to a locality domain. + - :py:obj:`~.CU_MEMPOOL_ATTR_MAX_POOL_SIZE`: (value type = :py:obj:`~.cuuint64_t`) Maximum size of the pool in bytes, this value may be higher than what was initially passed to cuMemPoolCreate due @@ -35459,7 +36476,7 @@ def cuMemPoolSetAccess(pool, map : Optional[tuple[CUmemAccessDesc] | list[CUmemA Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` See Also -------- @@ -35556,7 +36573,17 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): the host memory node. Specifying :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT` as the :py:obj:`~.CUmemPoolProps.CUmemLocation.type` will result in - :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. To create a memory pool targeting + a specific device locality domain, applications must set + :py:obj:`~.CUmemPoolProps.CUmemLocation.type` to + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`, + :py:obj:`~.CUmemPoolProps.CUmemLocation.localized`.deviceId must + specify the device ID, and + :py:obj:`~.CUmemPoolProps.CUmemLocation.localized`.localityDomainId + must specify the locality domain ID. The locality domain ID must be a + valid locality domain ID for the specified device. See also + :py:obj:`~.cuDeviceGetAttribute` with the attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT`. By default, the pool's memory will be accessible from the device it is allocated on. In the case of pools created with @@ -35620,6 +36647,8 @@ def cuMemPoolCreate(poolProps : Optional[CUmemPoolProps]): Notes ----- + On devices with a single locality domain, a memory pool created with :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN` and localityDomainId 0 is equivalent to a full-device memory pool created with :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`. The pool will report :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE` for :py:obj:`~.CU_MEMPOOL_ATTR_LOCATION_TYPE` and -1 for :py:obj:`~.CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID`. + Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC. """ cdef CUmemoryPool pool = CUmemoryPool() @@ -35679,13 +36708,16 @@ def cuMemGetDefaultMemPool(location : Optional[CUmemLocation], typename not None The memory location can be of one of :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, - :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST`, or - :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`. The allocation type can be - one of :py:obj:`~.CU_MEM_ALLOCATION_TYPE_PINNED` or + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST`, + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, or + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`. The allocation + type can be one of :py:obj:`~.CU_MEM_ALLOCATION_TYPE_PINNED` or :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED`. When the allocation type is :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED`, the location type can also be :py:obj:`~.CU_MEM_LOCATION_TYPE_NONE` to indicate no preferred location for the managed memory pool. + :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED` can not be used with + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`. Parameters ---------- @@ -35721,14 +36753,17 @@ def cuMemGetMemPool(location : Optional[CUmemLocation], typename not None : CUme The memory location can be of one of :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` or + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, or - :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`. The allocation type can be - one of :py:obj:`~.CU_MEM_ALLOCATION_TYPE_PINNED` or + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`. The allocation + type can be one of :py:obj:`~.CU_MEM_ALLOCATION_TYPE_PINNED` or :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED`. When the allocation type is :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED`, the location type can also be :py:obj:`~.CU_MEM_LOCATION_TYPE_NONE` to indicate no preferred - location for the managed memory pool. In all other cases, the call - returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + location for the managed memory pool. + :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED` can not be used with + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`. In all other + cases, the call returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE` Returns the last pool provided to :py:obj:`~.cuMemSetMemPool` or :py:obj:`~.cuDeviceSetMemPool` for this location and allocation type or @@ -35748,7 +36783,7 @@ def cuMemGetMemPool(location : Optional[CUmemLocation], typename not None : CUme Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` pool : :py:obj:`~.CUmemoryPool` None @@ -35771,16 +36806,15 @@ def cuMemSetMemPool(location : Optional[CUmemLocation], typename not None : CUme The memory location can be of one of :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, - :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` or or - :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`. The allocation type can be - one of :py:obj:`~.CU_MEM_ALLOCATION_TYPE_PINNED` or + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` or + :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA`, + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN`. The allocation + type can be one of :py:obj:`~.CU_MEM_ALLOCATION_TYPE_PINNED` or :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED`. When the allocation type is :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED`, the location type can also be :py:obj:`~.CU_MEM_LOCATION_TYPE_NONE` to indicate no preferred - location for the managed memory pool. - :py:obj:`~.CU_MEM_ALLOCATION_TYPE_MANAGED` can not be used with - :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_MEMORY_NODE`. In all other - cases, the call returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + location for the managed memory pool. In all other cases, the call + returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. When a memory pool is set as the current memory pool, the location parameter should be the same as the location of the pool. The location @@ -35806,7 +36840,7 @@ def cuMemSetMemPool(location : Optional[CUmemLocation], typename not None : CUme Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE` + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` See Also -------- @@ -35861,6 +36895,10 @@ def cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream): Notes ----- + The specified memory pool may be from a device different than that of the specified `hStream`. + + Basic stream ordering allows future work submitted into the same stream to use the allocation. Stream query, stream synchronize, and CUDA events can be used to guarantee that the allocation operation completes before work submitted in a separate stream runs. + During stream capture, this function results in the creation of an allocation node. In this case, the allocation is owned by the graph instead of the memory pool. The memory pool's properties are used to set the node's creation parameters. """ cdef cydriver.CUstream cyhStream @@ -36155,6 +37193,10 @@ def cuMulticastAddDevice(mcHandle, dev): be mapped to the multicast object. A call to :py:obj:`~.cuMemMap` will block until all devices have been added. + This call may fail with :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` if the + device specified by `dev` does not belong to the same clique as the + other devices previously added to this multicast object. + Parameters ---------- mcHandle : :py:obj:`~.CUmemGenericAllocationHandle` @@ -36212,6 +37254,27 @@ def cuMulticastBindMem(mcHandle, size_t mcOffset, memHandle, size_t memOffset, s allocated memory. Similarly the `size` + `mcOffset` cannot be larger than the size of the multicast object. + On systems with Rubin+ (SM_107+) GPUs, `memOffset` may be aligned to + 256 instead of the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED`. In such a case the + `size` + `memOffset` cannot be larger than the size of the allocated + memory. Similarly the `size` + `mcOffset` + the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` cannot be larger than the + size of the than the size of the multicast object. The next available + mcOffset for the next bind will be mcOffset + size + the value returned + by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM`. + + Also note that the ability to accept a `memOffset` that is not aligned + to the value returned by :py:obj:`~.cuMulticastGetGranularity` with the + flag :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED` is limited by HW + resources and may result in error + :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` + The memory allocation must have beeen created on one of the devices that was added to the multicast team via :py:obj:`~.cuMulticastAddDevice`. Externally shareable as well as @@ -36221,6 +37284,9 @@ def cuMulticastBindMem(mcHandle, size_t mcOffset, memHandle, size_t memOffset, s call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not initialized or running. + This call may fail if the devices added via + :py:obj:`~.cuMulticastAddDevice` do not belong to the same clique. + This call may return CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and @@ -36244,7 +37310,7 @@ def cuMulticastBindMem(mcHandle, size_t mcOffset, memHandle, size_t memOffset, s Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` See Also -------- @@ -36294,6 +37360,27 @@ def cuMulticastBindMem_v2(mcHandle, dev, size_t mcOffset, memHandle, size_t memO allocated memory. Similarly the `size` + `mcOffset` cannot be larger than the size of the multicast object. + On systems with Rubin+ (SM_107+) GPUs, `memOffset` may be aligned to + 256 instead of the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED`. In such a case the + `size` + `memOffset` cannot be larger than the size of the allocated + memory. Similarly the `size` + `mcOffset` + the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` cannot be larger than the + size of the than the size of the multicast object. The next available + mcOffset for the next bind will be mcOffset + size + the value returned + by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM`. + + Also note that the ability to accept a `memOffset` that is not aligned + to the value returned by :py:obj:`~.cuMulticastGetGranularity` with the + flag :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED` is limited by HW + resources and may result in error + :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` + The memory allocation must have beeen created on one of the devices that was added to the multicast team via :py:obj:`~.cuMulticastAddDevice`. For device memory, i.e., type @@ -36312,6 +37399,9 @@ def cuMulticastBindMem_v2(mcHandle, dev, size_t mcOffset, memHandle, size_t memO call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not initialized or running. + This call may fail if the devices added via + :py:obj:`~.cuMulticastAddDevice` do not belong to the same clique. + This call may return CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and @@ -36338,7 +37428,7 @@ def cuMulticastBindMem_v2(mcHandle, dev, size_t mcOffset, memHandle, size_t memO Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` See Also -------- @@ -36391,6 +37481,26 @@ def cuMulticastBindAddr(mcHandle, size_t mcOffset, memptr, size_t size, unsigned Similarly the `size` + `mcOffset` cannot be larger than the total size of the multicast object. + On systems with Rubin+ (SM_107+) GPUs, `memptr` may be aligned to 256 + instead of the value returned by :py:obj:`~.cuMulticastGetGranularity` + with the flag :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED`. In such a case the + `size` + `memptr` cannot be larger than the size of the allocated + memory. Similarly the `size` + `mcOffset` + the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` cannot be larger than the + size of the than the size of the multicast object. The next available + mcOffset for the next bind will be mcOffset + size + the value returned + by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` + + Also note that the ability to accept a `memptr` that is not aligned to + the value returned by :py:obj:`~.cuMulticastGetGranularity` with the + flag :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED` is limited by HW + resources and may result in error + :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` + The memory allocation must have beeen created on one of the devices that was added to the multicast team via :py:obj:`~.cuMulticastAddDevice`. Externally shareable as well as @@ -36400,6 +37510,9 @@ def cuMulticastBindAddr(mcHandle, size_t mcOffset, memptr, size_t size, unsigned call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not initialized or running. + This call may fail if the devices added via + :py:obj:`~.cuMulticastAddDevice` do not belong to the same clique. + This call may return CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and @@ -36421,7 +37534,7 @@ def cuMulticastBindAddr(mcHandle, size_t mcOffset, memptr, size_t size, unsigned Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` See Also -------- @@ -36469,6 +37582,26 @@ def cuMulticastBindAddr_v2(mcHandle, dev, size_t mcOffset, memptr, size_t size, Similarly the `size` + `mcOffset` cannot be larger than the total size of the multicast object. + On systems with Rubin+ (SM_107+) GPUs, `memptr` may be aligned to 256 + instead of the value returned by :py:obj:`~.cuMulticastGetGranularity` + with the flag :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED`. In such a case the + `size` + `memptr` cannot be larger than the size of the allocated + memory. Similarly the `size` + `mcOffset` + the value returned by + :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` cannot be larger than the + size of the than the size of the multicast object. The next available + mcOffset for the next bind will be mcOffset + size + the value returned + by :py:obj:`~.cuMulticastGetGranularity` with the flag + :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` + + Also note that the ability to accept a `memptr` that is not aligned to + the value returned by :py:obj:`~.cuMulticastGetGranularity` with the + flag :py:obj:`~.CU_MULTICAST_GRANULARITY_MINIMUM` or + :py:obj:`~.CU_MULTICAST_GRANULARITY_RECOMMENDED` is limited by HW + resources and may result in error + :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` + For device memory, i.e., type :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, the memory allocation must have been created on the device specified by `dev`. For host NUMA memory, i.e., type @@ -36485,6 +37618,9 @@ def cuMulticastBindAddr_v2(mcHandle, dev, size_t mcOffset, memptr, size_t size, call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary system software is not initialized or running. + This call may fail if the devices added via + :py:obj:`~.cuMulticastAddDevice` do not belong to the same clique. + This call may return CUDA_ERROR_ILLEGAL_STATE if the system configuration is in an illegal state. In such cases, to continue using multicast, verify that the system configuration is in a valid state and @@ -36509,7 +37645,7 @@ def cuMulticastBindAddr_v2(mcHandle, dev, size_t mcOffset, memptr, size_t size, Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, :py:obj:`~.CUDA_ERROR_OUT_OF_MEMORY`, :py:obj:`~.CUDA_ERROR_SYSTEM_NOT_READY`, :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE`, :py:obj:`~.CUDA_ERROR_MULTICAST_RESOURCE_FULL` See Also -------- @@ -36639,6 +37775,126 @@ def cuMulticastGetGranularity(prop : Optional[CUmulticastObjectProp], option not return (_CUresult(err), None) return (_CUresult_SUCCESS, granularity) +@cython.embedsignature(True) +def cuDeviceGetFabricClusterUuid(dev): + """ Retrieves the fabric cluster UUID. + + Retrieves the fabric cluster UUID for the given device. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device for which the fabric cluster UUID is requested. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + uuid : :py:obj:`~.CUuuid` + Fabric cluster UUID. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef CUuuid uuid = CUuuid() + with nogil: + err = cydriver.cuDeviceGetFabricClusterUuid(uuid._pvt_ptr, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_CUresult(err), None) + return (_CUresult_SUCCESS, uuid) + +@cython.embedsignature(True) +def cuDeviceGetCliqueCount(dev): + """ Retrieves the number of fabric cliques. + + Retrieves the number of fabric cliques that the device is part of. + + Parameters + ---------- + dev : :py:obj:`~.CUdevice` + Device for which the number of fabric cliques is requested. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + count : int + Number of fabric cliques that the device is part of. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef size_t count = 0 + with nogil: + err = cydriver.cuDeviceGetCliqueCount(&count, cydev) + if err != cydriver.CUDA_SUCCESS: + return (_CUresult(err), None) + return (_CUresult_SUCCESS, count) + +@cython.embedsignature(True) +def cuDeviceGetCliqueInfo(size_t count, dev): + """ Retrieves fabric clique information. + + Returns the fabric clique information for the cliques that the device + is a part of. User must specify the size of the `cliqueInfo` array in + `count`. The same parameter `count` will return the actual number of + entries updated in the `cliqueInfo` array. + + Parameters + ---------- + count : int + Input: Size of the `cliqueInfo` array. Output: Number of entries + updated in the `cliqueInfo` array. + dev : :py:obj:`~.CUdevice` + Device for which the clique information is requested. + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED`, :py:obj:`~.CUDA_ERROR_DEINITIALIZED`, :py:obj:`~.CUDA_ERROR_NOT_PERMITTED`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + cliqueInfo : list[:py:obj:`~.CUcliqueInfo`] + Array to store the fabric clique information. + count : int + Input: Size of the `cliqueInfo` array. Output: Number of entries + updated in the `cliqueInfo` array. + """ + cdef cydriver.CUdevice cydev + if dev is None: + pdev = 0 + elif isinstance(dev, (CUdevice,)): + pdev = int(dev) + else: + pdev = int(CUdevice(dev)) + cydev = pdev + cdef size_t _clique_count = count + cdef cydriver.CUcliqueInfo* cycliqueInfo = NULL + pycliqueInfo = [] + if _clique_count != 0: + cycliqueInfo = calloc(_clique_count, sizeof(cydriver.CUcliqueInfo)) + if cycliqueInfo is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(_clique_count) + 'x' + str(sizeof(cydriver.CUcliqueInfo))) + with nogil: + err = cydriver.cuDeviceGetCliqueInfo(cycliqueInfo, &count, cydev) + if CUresult(err) == CUresult(0): + pycliqueInfo = [CUcliqueInfo() for _ in range(count)] + for idx in range(count): + string.memcpy((pycliqueInfo[idx])._pvt_ptr, &cycliqueInfo[idx], sizeof(cydriver.CUcliqueInfo)) + if cycliqueInfo is not NULL: + free(cycliqueInfo) + if err != cydriver.CUDA_SUCCESS: + return (_CUresult(err), None, None) + return (_CUresult_SUCCESS, pycliqueInfo, count) + @cython.embedsignature(True) def cuLogicalEndpointIdReserve(count): """ Reserves a range of logical endpoint ids. @@ -36809,6 +38065,10 @@ def cuLogicalEndpointAddDevice(leId, dev): devices have been added. User can query whether the logical endpoint is ready for use via :py:obj:`~.cuLogicalEndpointQuery`. + This call may fail with :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` if the + device specified by `dev` does not belong to the same clique as the + other devices previously added to this multicast logical endpoint. + Parameters ---------- leId : :py:obj:`~.CUlogicalEndpointId` @@ -37339,6 +38599,13 @@ def cuLogicalEndpointQuery(leId, count): of 0 if any logical endpoint ID in the given range is not fully constructed, and a non-zero value otherwise. + Construction of a multicast logical endpoint may fail here if the + devices added via :py:obj:`~.cuLogicalEndpointAddDevice` do not belong + to the same clique. + + This API may return :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` if no devices + are found on which this logical endpoint can be accessed. + Parameters ---------- leId : :py:obj:`~.CUlogicalEndpointId` @@ -37523,6 +38790,11 @@ def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr): - Returns a bitmask of the allowed handle types for an allocation that may be passed to :py:obj:`~.cuMemExportToShareableHandle`. + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE`: + + - Returns in `*data` a boolean that indicates if the memory this + pointer is referencing can be used with the GPUDirect RDMA API. + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE`: - Returns in `*data` the handle to the mempool that the allocation was @@ -37534,6 +38806,12 @@ def cuPointerGetAttribute(attribute not None : CUpointer_attribute, ptr): points to memory that is capable to be used for hardware accelerated decompression. + - :py:obj:`~.CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL`: + + - Returns in `*data` an integer representing the locality domain + ordinal of the allocation, or -1 if the allocation is not localized + to a locality domain. + Note that for most allocations in the unified virtual address space the host and device pointer for accessing the allocation will be the same. The exceptions to this are @@ -37623,7 +38901,9 @@ def cuMemPrefetchAsync(devPtr, size_t count, location not None : CUmemLocation, :py:obj:`~.CUmemLocation.type` is etiher :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST` OR :py:obj:`~.CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT`, - :py:obj:`~.CUmemLocation.id` will be ignored. + :py:obj:`~.CUmemLocation.id` will be ignored. Prefetching to + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN` locations is + not supported. The start address and end address of the memory range will be rounded down and rounded up respectively to be aligned to CPU page size before @@ -37685,7 +38965,7 @@ def cuMemPrefetchAsync(devPtr, size_t count, location not None : CUmemLocation, Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`, See Also -------- @@ -37787,23 +39067,25 @@ def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, location n :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`, then :py:obj:`~.CUmemLocation.id` must be a valid device ordinal and the device must have a non-zero value for the device attribute - :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. Setting - the preferred location does not cause data to migrate to that - location immediately. Instead, it guides the migration policy when a - fault occurs on that memory region. If the data is already in its - preferred location and the faulting processor can establish a mapping - without requiring the data to be migrated, then data migration will - be avoided. On the other hand, if the data is not in its preferred - location or if a direct mapping cannot be established, then it will - be migrated to the processor accessing it. It is important to note - that setting the preferred location does not prevent data prefetching - done using :py:obj:`~.cuMemPrefetchAsync`. Having a preferred - location can override the page thrash detection and resolution logic - in the Unified Memory driver. Normally, if a page is detected to be - constantly thrashing between for example host and device memory, the - page may eventually be pinned to host memory by the Unified Memory - driver. But if the preferred location is set as device memory, then - the page will continue to thrash indefinitely. If + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. A + :py:obj:`~.CUmemLocation.type` of + :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN` is + unsupported. Setting the preferred location does not cause data to + migrate to that location immediately. Instead, it guides the + migration policy when a fault occurs on that memory region. If the + data is already in its preferred location and the faulting processor + can establish a mapping without requiring the data to be migrated, + then data migration will be avoided. On the other hand, if the data + is not in its preferred location or if a direct mapping cannot be + established, then it will be migrated to the processor accessing it. + It is important to note that setting the preferred location does not + prevent data prefetching done using :py:obj:`~.cuMemPrefetchAsync`. + Having a preferred location can override the page thrash detection + and resolution logic in the Unified Memory driver. Normally, if a + page is detected to be constantly thrashing between for example host + and device memory, the page may eventually be pinned to host memory + by the Unified Memory driver. But if the preferred location is set as + device memory, then the page will continue to thrash indefinitely. If :py:obj:`~.CU_MEM_ADVISE_SET_READ_MOSTLY` is also set on this memory region or any subset of it, then the policies associated with that advice will override the policies of this advice, unless read @@ -37894,7 +39176,7 @@ def cuMemAdvise(devPtr, size_t count, advice not None : CUmem_advise, location n Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE` + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_DEVICE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` See Also -------- @@ -38237,6 +39519,88 @@ def cuMemDiscardAndPrefetchBatchAsync(dptrs : Optional[tuple[CUdeviceptr] | list free(cyprefetchLocs) return (_CUresult(err),) +@cython.embedsignature(True) +def cuMemGetLocationInfo(ptr, size_t size, size_t summaryGranularity, size_t samplingGranularity, location_out : Optional[CUmemLocation]): + """ Gets residency information for a memory address range. + + Retrieves memory location information for the specified address range + starting at `ptr` with size `size`. The API summarizes the location + information with a granularity specified by `summaryGranularity`. For + each summary region, the API determines the most common location by + sampling memory at intervals defined by `samplingGranularity` within + that region. + + The location information is returned in the `location_out` array, with + one entry per summary region. The total number of locations returned + will be ceil(size/summaryGranularity). The user is expected to allocate + the `location_out` array with sufficient memory. + + For example, with an address range of 1GB, a `summaryGranularity` of + 128MB, and a `samplingGranularity` of 2MB, the function will: + + - Divide the 1GB range into 8 summary regions of 128MB each + + - Within each 128MB region, sample every 2MB to determine the most + common location. If there is a tie a random winner is chosen. + + - Populate the `location_out` array with 8 entries, one for each 128MB + region `summaryGranularity` should be less than or equal to `size` + and greater than 0. `samplingGranularity` should be less than or + equal to `summaryGranularity`. If the `samplingGranularity` is set to + 0, a system dependent value is used as the granularity. In all other + cases, the call returns :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + When the memory is not resident on any processor, the call returns + :py:obj:`~.CUDA_SUCCESS` and the returned location type for that + interval is :py:obj:`~.CU_MEM_LOCATION_TYPE_NONE`. + + The memory range must refer to one of the following: + + - Managed memory allocated via :py:obj:`~.cuMemAllocManaged`, via + :py:obj:`~.cuMemAllocFromPool` from a managed memory pool or declared + via managed variables. + + - System-allocated pageable memory that is not registered via + :py:obj:`~.cuMemHostRegister`. If the memory range does not refer to + one of the above, the call returns + :py:obj:`~.CUDA_ERROR_INVALID_VALUE`. + + All devices on the system must have non-zero value of device attribute + :py:obj:`~.CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS`. If not, this + call returns :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED`. + + Parameters + ---------- + ptr : :py:obj:`~.CUdeviceptr` + Starting address of the memory range to query + size : size_t + Size in bytes of the memory range to query + summaryGranularity : size_t + Granularity in bytes at which to summarize location information + samplingGranularity : size_t + Granularity in bytes at which to sample memory within each summary + region + location_out : :py:obj:`~.CUmemLocation` + Array to store location information, one entry per summary region + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + cdef cydriver.CUdeviceptr cyptr + if ptr is None: + pptr = 0 + elif isinstance(ptr, (CUdeviceptr,)): + pptr = int(ptr) + else: + pptr = int(CUdeviceptr(ptr)) + cyptr = pptr + cdef cydriver.CUmemLocation* cylocation_out_ptr = location_out._pvt_ptr if location_out is not None else NULL + with nogil: + err = cydriver.cuMemGetLocationInfo(cyptr, size, summaryGranularity, samplingGranularity, cylocation_out_ptr) + return (_CUresult(err),) + @cython.embedsignature(True) def cuMemRangeGetAttribute(size_t dataSize, attribute not None : CUmem_range_attribute, devPtr, size_t count): """ Query an attribute of a given memory range. @@ -38563,6 +39927,8 @@ def cuPointerGetAttributes(unsigned int numAttributes, attributes : Optional[tup - :py:obj:`~.CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES` + - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE` + - :py:obj:`~.CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE` - :py:obj:`~.CU_POINTER_ATTRIBUTE_IS_HW_DECOMPRESS_CAPABLE` @@ -40750,10 +42116,10 @@ def cuImportExternalMemory(memHandleDesc : Optional[CUDA_EXTERNAL_MEMORY_HANDLE_ :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.handle.fd` must be a valid file descriptor referencing a dma_buf object and :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.flags` must be zero. - Importing a dma_buf object is supported only on Tegra Jetson platform - starting with Thor series. Mapping an imported dma_buf object as CUDA - mipmapped array using - :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray` is not supported. + Importing a dma_buf object is supported only on Tegra platform starting + with Thor series. Mapping an imported dma_buf object as CUDA mipmapped + array using :py:obj:`~.cuExternalMemoryGetMappedMipmappedArray` is not + supported. The size of the memory object must be specified in :py:obj:`~.CUDA_EXTERNAL_MEMORY_HANDLE_DESC.size`. @@ -41840,6 +43206,10 @@ def cuFuncGetAttribute(attrib not None : CUfunction_attribute, hfunc): The block scheduling policy of a function. The value type is :py:obj:`~.CUclusterSchedulingPolicy`. + - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE`: The shared memory + mode of a function. The value type is :py:obj:`~.CUsharedMemoryMode` + / cudaSharedMemoryMode. + With a few execeptions, function attributes may also be queried on unloaded function handles returned from :py:obj:`~.cuModuleEnumerateFunctions`. @@ -41950,6 +43320,10 @@ def cuFuncSetAttribute(hfunc, attrib not None : CUfunction_attribute, int value) The block scheduling policy of a function. The value type is :py:obj:`~.CUclusterSchedulingPolicy`. + - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE`: The shared memory + mode of a function. The value type is :py:obj:`~.CUsharedMemoryMode` + / cudaSharedMemoryMode. + Parameters ---------- hfunc : :py:obj:`~.CUfunction` @@ -44653,6 +46027,10 @@ def cuGraphEventRecordNodeSetEvent(hNode, event): See Also -------- :py:obj:`~.cuGraphNodeSetParams`, :py:obj:`~.cuGraphAddEventRecordNode`, :py:obj:`~.cuGraphEventRecordNodeGetEvent`, :py:obj:`~.cuGraphEventWaitNodeSetEvent`, :py:obj:`~.cuEventRecordWithFlags`, :py:obj:`~.cuStreamWaitEvent` + + Notes + ----- + This function will reset the node's context to the event's device context. """ cdef cydriver.CUevent cyevent if event is None: @@ -48497,6 +49875,104 @@ def cuGraphAddNode(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUg return (_CUresult(err), None) return (_CUresult_SUCCESS, phGraphNode) +@cython.embedsignature(True) +def cuGraphAddNode_v3(hGraph, dependencies : Optional[tuple[CUgraphNode] | list[CUgraphNode]], dependencyData : Optional[tuple[CUgraphEdgeData] | list[CUgraphEdgeData]], size_t numDependencies, nodeParams : Optional[CUgraphNodeParams]): + """ Adds a node of arbitrary type to a graph. + + Creates a new node in `hGraph` described by `nodeParams` with + `numDependencies` dependencies specified via `dependencies`. + `numDependencies` may be 0. `dependencies` may be null if + `numDependencies` is 0. `dependencies` may not have any duplicate + entries. + + `nodeParams` is a tagged union. The node type should be specified in + the `typename` field, and type-specific parameters in the corresponding + union member. All unused bytes - that is, `reserved0` and all bytes + past the utilized union member - must be set to zero. It is recommended + to use brace initialization or memset to ensure all bytes are + initialized. + + Note that for some node types, `nodeParams` may contain "out + parameters" which are modified during the call, such as + `nodeParams->alloc.dptr`. + + For kernel nodes, if both the kernel node's :py:obj:`~.CUfunction` and + ctx are non-NULL, the underlying device context of ctx must match the + device context that the :py:obj:`~.CUfunction` was loaded into; + otherwise the call returns :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`. + + A handle to the new node will be returned in `phGraphNode`. + + Parameters + ---------- + hGraph : :py:obj:`~.CUgraph` or :py:obj:`~.cudaGraph_t` + Graph to which to add the node + dependencies : list[:py:obj:`~.CUgraphNode`] + Dependencies of the node + dependencyData : list[:py:obj:`~.CUgraphEdgeData`] + Optional edge data for the dependencies. If NULL, the data is + assumed to be default (zeroed) for all dependencies. + numDependencies : size_t + Number of dependencies + nodeParams : :py:obj:`~.CUgraphNodeParams` + Specification of the node + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + phGraphNode : :py:obj:`~.CUgraphNode` + Returns newly created node + + See Also + -------- + :py:obj:`~.cuGraphCreate`, :py:obj:`~.cuGraphNodeSetParams_v2`, :py:obj:`~.cuGraphExecNodeSetParams` + """ + dependencyData = [] if dependencyData is None else dependencyData + if not all(isinstance(_x, (CUgraphEdgeData,)) for _x in dependencyData): + raise TypeError("Argument 'dependencyData' is not instance of type (expected tuple[cydriver.CUgraphEdgeData,] or list[cydriver.CUgraphEdgeData,]") + dependencies = [] if dependencies is None else dependencies + if not all(isinstance(_x, (CUgraphNode,)) for _x in dependencies): + raise TypeError("Argument 'dependencies' is not instance of type (expected tuple[cydriver.CUgraphNode,] or list[cydriver.CUgraphNode,]") + cdef cydriver.CUgraph cyhGraph + if hGraph is None: + phGraph = 0 + elif isinstance(hGraph, (CUgraph,)): + phGraph = int(hGraph) + else: + phGraph = int(CUgraph(hGraph)) + cyhGraph = phGraph + cdef CUgraphNode phGraphNode = CUgraphNode() + cdef cydriver.CUgraphNode* cydependencies = NULL + if len(dependencies) > 1: + cydependencies = calloc(len(dependencies), sizeof(cydriver.CUgraphNode)) + if cydependencies is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencies)) + 'x' + str(sizeof(cydriver.CUgraphNode))) + else: + for idx in range(len(dependencies)): + cydependencies[idx] = (dependencies[idx])._pvt_ptr[0] + elif len(dependencies) == 1: + cydependencies = (dependencies[0])._pvt_ptr + cdef cydriver.CUgraphEdgeData* cydependencyData = NULL + if len(dependencyData) > 1: + cydependencyData = calloc(len(dependencyData), sizeof(cydriver.CUgraphEdgeData)) + if cydependencyData is NULL: + raise MemoryError('Failed to allocate length x size memory: ' + str(len(dependencyData)) + 'x' + str(sizeof(cydriver.CUgraphEdgeData))) + for idx in range(len(dependencyData)): + string.memcpy(&cydependencyData[idx], (dependencyData[idx])._pvt_ptr, sizeof(cydriver.CUgraphEdgeData)) + elif len(dependencyData) == 1: + cydependencyData = (dependencyData[0])._pvt_ptr + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphAddNode_v3(phGraphNode._pvt_ptr, cyhGraph, cydependencies, cydependencyData, numDependencies, cynodeParams_ptr) + if len(dependencies) > 1 and cydependencies is not NULL: + free(cydependencies) + if len(dependencyData) > 1 and cydependencyData is not NULL: + free(cydependencyData) + if err != cydriver.CUDA_SUCCESS: + return (_CUresult(err), None) + return (_CUresult_SUCCESS, phGraphNode) + @cython.embedsignature(True) def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): """ Update a graph node's parameters. @@ -48538,6 +50014,52 @@ def cuGraphNodeSetParams(hNode, nodeParams : Optional[CUgraphNodeParams]): err = cydriver.cuGraphNodeSetParams(cyhNode, cynodeParams_ptr) return (_CUresult(err),) +@cython.embedsignature(True) +def cuGraphNodeSetParams_v2(hNode, nodeParams : Optional[CUgraphNodeParams]): + """ Update a graph node's parameters. + + Sets the parameters of graph node `hNode` to `nodeParams`. The node + type specified by `nodeParams->type` must match the type of `hNode`. + `nodeParams` must be fully initialized and all unused bytes (reserved, + padding) zeroed. + + Modifying parameters is not supported for node types + CU_GRAPH_NODE_TYPE_MEM_ALLOC and CU_GRAPH_NODE_TYPE_MEM_FREE. + + For kernel nodes, if both the kernel node's :py:obj:`~.CUfunction` and + ctx are non-NULL, the underlying device context of ctx must match the + device context that the :py:obj:`~.CUfunction` was loaded into; + otherwise the call returns :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`. + + Parameters + ---------- + hNode : :py:obj:`~.CUgraphNode` or :py:obj:`~.cudaGraphNode_t` + Node to set the parameters for + nodeParams : :py:obj:`~.CUgraphNodeParams` + Parameters to copy + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS`, :py:obj:`~.CUDA_ERROR_INVALID_VALUE`, :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`, :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + + See Also + -------- + :py:obj:`~.cuGraphAddNode_v3`, :py:obj:`~.cuGraphNodeGetParams`, :py:obj:`~.cuGraphExecNodeSetParams` + """ + cdef cydriver.CUgraphNode cyhNode + if hNode is None: + phNode = 0 + elif isinstance(hNode, (CUgraphNode,)): + phNode = int(hNode) + else: + phNode = int(CUgraphNode(hNode)) + cyhNode = phNode + cdef cydriver.CUgraphNodeParams* cynodeParams_ptr = nodeParams._pvt_ptr if nodeParams is not None else NULL + with nogil: + err = cydriver.cuGraphNodeSetParams_v2(cyhNode, cynodeParams_ptr) + return (_CUresult(err),) + @cython.embedsignature(True) def cuGraphNodeGetParams(hNode): """ Return a graph node's parameters. @@ -53983,18 +55505,20 @@ def cuDevSmResourceSplit(unsigned int nbGroups, input_ : Optional[CUdevResource] - `smCount:` must be either 0 or in the range of [2,inputSmCount] where inputSmCount is the amount of SMs the `input` resource has. `smCount` must be a multiple of 2, as well as a multiple of - `coscheduledSmCount`. When assigning SMs to a group (and if results - are expected by having the `result` parameter set), `smCount` - cannot end up with 0 or a value less than `coscheduledSmCount` - otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION will be - returned. + `coscheduledSmCount` if it is nonzero. When assigning SMs to a + group (and if results are expected by having the `result` parameter + set), `smCount` cannot end up with 0 or a value less than + `coscheduledSmCount` otherwise + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION will be returned. - `coscheduledSmCount:` allows grouping SMs together in order to be able to launch clusters on Compute Architecture 9.0+. The default value may be queried from the device’s :py:obj:`~.CU_DEV_RESOURCE_TYPE_SM` resource (8 on Compute Architecture 9.0+ and 2 otherwise). The maximum is 32 on Compute - Architecture 9.0+ and 2 otherwise. + Architecture 9.0+ and 2 otherwise. A `coscheduledSmCount` of 0 uses + the default value internally while preserving 0 in `groupParams`. + Cluster occupancy will be derived from the resulting SM topology. - `preferredCoscheduledSmCount:` Attempts to merge `coscheduledSmCount` groups into larger groups, in order to make @@ -54003,10 +55527,24 @@ def cuDevSmResourceSplit(unsigned int nbGroups, input_ : Optional[CUdevResource] - `flags:` - - `CU_DEV_SM_RESOURCE_GROUP_BACKFILL:` lets `smCount` be a non-multiple - of `coscheduledSmCount`, filling the difference between SM count and - already assigned co-scheduled groupings with other SMs. This lets any - resulting group behave similar to the `remainder` group for example. + - `CU_DEV_SM_RESOURCE_GROUP_BACKFILL:` Treats constraints as a hint, + ignoring them if necessary to reach the requested `smCount`. Lets + `smCount` be a non-multiple of `coscheduledSmCount`, filling the + difference between SM count and already assigned co-scheduled groupings + with other SMs. This lets any resulting group behave similar to the + `remainder` group for example. When used with + `CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID`, backfill fills up to the + requested `smCount` using the target locality domain first, then SMs + not attributed to any locality domain, then SMs from other locality + domains. If no SMs can be found in the requested locality domain, + CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. + + - `CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID:` Specifies that the SM + partition should be localized to the specified `localityDomainId`. + + - `localityDomainId:` Specifies the locality domain that the + partitioned SMs must be located on. Only valid when + CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID is set in flags. Example params and their effect: @@ -54119,8 +55657,11 @@ def cuDevResourceGenerateDesc(resources : Optional[tuple[CUdevResource] | list[C resources are provided in `resources` and they are of type :py:obj:`~.CU_DEV_RESOURCE_TYPE_SM`, they must be outputs (whether `result` or `remaining`) from the same split API instance and have - the same smCoscheduledAlignment values, otherwise - CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. + the same smCoscheduledAlignment and localityDomainId values, + otherwise CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. + + The output descriptor `phDesc` will remain valid for the lifetime of + the process. Note: The API is not supported on 32-bit platforms. @@ -54778,12 +56319,61 @@ def cuCheckpointProcessLock(int pid, args : Optional[CUcheckpointLockArgs]): def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpointArgs]): """ Checkpoint a CUDA process's GPU memory contents. - Checkpoints a CUDA process specified by `pid` that is in the LOCKED - state. The GPU memory contents will be brought into host memory and all - underlying references will be released. Process must be in the LOCKED - state to checkpoint. - - Upon successful return the process will be in the CHECKPOINTED state. + Checkpoints a CUDA process specified by `pid`. The GPU memory contents + will be brought into host memory or mapped onto the calling process's + GPUs for user-defined behavior. Underlying GPU references are released + when checkpointing completes. The process must be in the + :py:obj:`~.CU_PROCESS_STATE_LOCKED` state to checkpoint. + + When :py:obj:`~.CUcheckpointCheckpointArgs.customStorageInfo_out` is + not NULL, all the GPU memory allocated by the process with `pid` will + be mapped onto the calling process's GPUs so the application can copy + the memory to custom storage. Upon return of this call, the pointer + referenced by + :py:obj:`~.CUcheckpointCheckpointArgs.customStorageInfo_out` will point + to a :py:obj:`~.CUcheckpointCustomStorageInfo` struct allocated and + populated by the driver. For each GPU which contains data from the + checkpointed process, there is a corresponding entry in the + :py:obj:`~.CUcheckpointCustomStoragePerDeviceData` array. + + - The device pointers and sizes for the contiguously mapped memory on a + particular GPU are set in the + :py:obj:`~.CUcheckpointCustomStoragePerDeviceData.devPtr` and + :py:obj:`~.CUcheckpointCustomStoragePerDeviceData.size` fields + respectively. + + - A stream belonging to the primary context of a particular GPU is set + in :py:obj:`~.CUcheckpointCustomStoragePerDeviceData.stream`. The + application can use the stream to find out which GPU the memory is + mapped on and to enqueue the copies to custom storage. + + The application is responsible for copying the mapped data from the GPU + at the specified device address to custom storage. When checkpointing + to custom storage, the application is expected to call + :py:obj:`~.cuCheckpointOperationComplete`. The + :py:obj:`~.CUcheckpointCustomStorageInfo.handle` set by this call + should be passed to :py:obj:`~.cuCheckpointOperationComplete` in + `handle`. The driver synchronizes all the streams in + :py:obj:`~.cuCheckpointOperationComplete`, at which point the copy to + custom storage is considered complete. + + When checkpointing to custom storage, the application is expected to + retain primary contexts of all the devices used by the process to be + checkpointed. Otherwise :py:obj:`~.cuCheckpointProcessCheckpoint` will + return :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`. Unlike other checkpoint + operations, checkpointing to custom storage requires :py:obj:`~.cuInit` + to have been called before execution. Checkpointing the calling + process's GPU memory to custom storage is not supported. Upon + successful return, the target process will be in the + :py:obj:`~.CU_PROCESS_STATE_CHECKPOINTING` state. + + When :py:obj:`~.CUcheckpointCheckpointArgs.customStorageInfo_out` is + NULL, the GPU memory contents will be brought into host memory by + :py:obj:`~.cuCheckpointProcessCheckpoint`. The application is not + expected to copy the GPU memory contents. The application is also not + expected to call :py:obj:`~.cuCheckpointOperationComplete`. Upon + successful return, the target process will be in the + :py:obj:`~.CU_PROCESS_STATE_CHECKPOINTED` state. Parameters ---------- @@ -54795,7 +56385,7 @@ def cuCheckpointProcessCheckpoint(int pid, args : Optional[CUcheckpointCheckpoin Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` """ cdef cydriver.CUcheckpointCheckpointArgs* cyargs_ptr = args._pvt_ptr if args is not None else NULL with nogil: @@ -54807,18 +56397,67 @@ def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs] """ Restore a CUDA process's GPU memory contents from its last checkpoint. Restores a CUDA process specified by `pid` from its last checkpoint. - Process must be in the CHECKPOINTED state to restore. + Process must be in the :py:obj:`~.CU_PROCESS_STATE_CHECKPOINTED` state + to restore. GPU UUID pairs can be specified in `args` to remap the process old GPUs onto new GPUs. The GPU to restore onto needs to have enough memory and be of the same chip type as the old GPU. If an array of GPU UUID pairs is specified, it must contain every checkpointed GPU. - Upon successful return the process will be in the LOCKED state. - CUDA process restore requires persistence mode to be enabled or :py:obj:`~.cuInit` to have been called before execution. + When :py:obj:`~.CUcheckpointRestoreArgs.customStorageInfo_out` is not + NULL, all the GPU memory to be restored for the process with `pid` will + be mapped onto the calling process's GPUs so the application can copy + the memory back to the GPU. + + Upon return of this call, the pointer referenced by + :py:obj:`~.CUcheckpointRestoreArgs.customStorageInfo_out` will point to + a :py:obj:`~.CUcheckpointCustomStorageInfo` struct allocated and + populated by the driver. For each GPU which contains data from the + restored process, there is a corresponding entry in the + :py:obj:`~.CUcheckpointCustomStoragePerDeviceData` array. + + - The device pointers and sizes for the contiguously mapped memory on a + particular GPU are set in the + :py:obj:`~.CUcheckpointCustomStoragePerDeviceData.devPtr` and + :py:obj:`~.CUcheckpointCustomStoragePerDeviceData.size` fields + respectively. + + - A stream belonging to the primary context of the GPU is set in + :py:obj:`~.CUcheckpointCustomStoragePerDeviceData.stream`. The + application can use the stream to find out which GPU the memory is + mapped on and to enqueue the copies from custom storage back to the + GPU. + + The application is responsible for copying the data from custom storage + to the GPU at the specified device address. When restoring from custom + storage, the application is expected to call + :py:obj:`~.cuCheckpointOperationComplete`. The + :py:obj:`~.CUcheckpointCustomStorageInfo.handle` set by this call + should be passed to :py:obj:`~.cuCheckpointOperationComplete` in + `handle`. The driver synchronizes all the streams in + :py:obj:`~.cuCheckpointOperationComplete`, at which point the copy from + custom storage is considered complete. + + When restoring from custom storage, the application is expected to + retain primary contexts of all the devices used by the process to be + restored. Otherwise :py:obj:`~.cuCheckpointProcessRestore` will return + :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT`. Restoring the calling process's + GPU memory from custom storage is not supported. Upon successful + return, the target process will be in the + :py:obj:`~.CU_PROCESS_STATE_RESTORING` state. + + When :py:obj:`~.CUcheckpointRestoreArgs.customStorageInfo_out` is NULL, + the GPU memory contents will be restored from host memory by + :py:obj:`~.cuCheckpointProcessRestore`. The application is not expected + to copy back the GPU memory contents. The application is also not + expected to call :py:obj:`~.cuCheckpointOperationComplete`. Upon + successful return, the target process will be in the + :py:obj:`~.CU_PROCESS_STATE_LOCKED` state. + Parameters ---------- pid : int @@ -54829,7 +56468,7 @@ def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs] Returns ------- CUresult - :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` :py:obj:`~.CUDA_ERROR_INVALID_CONTEXT` See Also -------- @@ -54840,6 +56479,64 @@ def cuCheckpointProcessRestore(int pid, args : Optional[CUcheckpointRestoreArgs] err = cydriver.cuCheckpointProcessRestore(pid, cyargs_ptr) return (_CUresult(err),) +@cython.embedsignature(True) +def cuCheckpointOperationComplete(handle): + """ Complete a custom-storage checkpoint or restore operation. + + After :py:obj:`~.cuCheckpointProcessCheckpoint` or + :py:obj:`~.cuCheckpointProcessRestore` with custom storage, + :py:obj:`~.cuCheckpointOperationComplete` should be called when the + application has finished or enqueued (on a stream) the required copies + (for checkpoint, GPU mappings to custom storage and for restore, custom + storage into GPU mappings) so the driver can finish the operation. + + :py:obj:`~.cuCheckpointOperationComplete` will first synchronize on the + streams returned by :py:obj:`~.cuCheckpointProcessCheckpoint` or + :py:obj:`~.cuCheckpointProcessRestore`. The driver assumes that the + application has completed copying the memory to or from custom storage + once synchronization is done. None of the streams returned by + :py:obj:`~.cuCheckpointProcessCheckpoint` or + :py:obj:`~.cuCheckpointProcessRestore` should be in stream capture + mode; any attempt to do so would result in + :py:obj:`~.CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED`. Once the + synchronization is done, :py:obj:`~.cuCheckpointOperationComplete` will + unmap the GPU memory that was mapped on each GPU in a particular + :py:obj:`~.cuCheckpointProcessCheckpoint` or + :py:obj:`~.cuCheckpointProcessRestore` operation. + :py:obj:`~.cuCheckpointOperationComplete` identifies the operation to + be completed using `handle`. This handle is set by + :py:obj:`~.cuCheckpointProcessCheckpoint` or + :py:obj:`~.cuCheckpointProcessRestore`. + + When the call returns successfully, the target process will be in the + :py:obj:`~.CU_PROCESS_STATE_CHECKPOINTED` state when completing a + checkpoint operation or the :py:obj:`~.CU_PROCESS_STATE_LOCKED` state + when completing a restore operation. + + Parameters + ---------- + handle : :py:obj:`~.CUcheckpointOperationHandle` + :py:obj:`~.CUcheckpointCustomStorageInfo.handle` set by a prior + :py:obj:`~.cuCheckpointProcessCheckpoint` or + :py:obj:`~.cuCheckpointProcessRestore` call + + Returns + ------- + CUresult + :py:obj:`~.CUDA_SUCCESS` :py:obj:`~.CUDA_ERROR_INVALID_VALUE` :py:obj:`~.CUDA_ERROR_NOT_INITIALIZED` :py:obj:`~.CUDA_ERROR_ILLEGAL_STATE` :py:obj:`~.CUDA_ERROR_NOT_SUPPORTED` + """ + cdef cydriver.CUcheckpointOperationHandle cyhandle + if handle is None: + phandle = 0 + elif isinstance(handle, (CUcheckpointOperationHandle,)): + phandle = int(handle) + else: + phandle = int(CUcheckpointOperationHandle(handle)) + cyhandle = phandle + with nogil: + err = cydriver.cuCheckpointOperationComplete(cyhandle) + return (_CUresult(err),) + @cython.embedsignature(True) def cuCheckpointProcessUnlock(int pid, args : Optional[CUcheckpointUnlockArgs]): """ Unlock a CUDA process to allow CUDA API calls. @@ -56751,6 +58448,21 @@ def sizeof(objType): if objType == CUgraphNodeParams: return sizeof(cydriver.CUgraphNodeParams) + if objType == CUcheckpointCustomStoragePerDeviceData_st: + return sizeof(cydriver.CUcheckpointCustomStoragePerDeviceData_st) + + if objType == CUcheckpointCustomStoragePerDeviceData: + return sizeof(cydriver.CUcheckpointCustomStoragePerDeviceData) + + if objType == CUcheckpointOperationHandle: + return sizeof(cydriver.CUcheckpointOperationHandle) + + if objType == CUcheckpointCustomStorageInfo_st: + return sizeof(cydriver.CUcheckpointCustomStorageInfo_st) + + if objType == CUcheckpointCustomStorageInfo: + return sizeof(cydriver.CUcheckpointCustomStorageInfo) + if objType == CUcheckpointLockArgs_st: return sizeof(cydriver.CUcheckpointLockArgs_st) @@ -56787,6 +58499,12 @@ def sizeof(objType): if objType == CUmemDecompressParams: return sizeof(cydriver.CUmemDecompressParams) + if objType == CUcliqueInfo_st: + return sizeof(cydriver.CUcliqueInfo_st) + + if objType == CUcliqueInfo: + return sizeof(cydriver.CUcliqueInfo) + if objType == CUlogicalEndpointId: return sizeof(cydriver.CUlogicalEndpointId) @@ -56994,6 +58712,10 @@ cdef int _add_native_handle_getters() except?-1: _add_cuda_native_handle_getter(CUlinkState, CUlinkState_getter) + def CUcheckpointOperationHandle_getter(CUcheckpointOperationHandle x): return (x._pvt_ptr[0]) + _add_cuda_native_handle_getter(CUcheckpointOperationHandle, CUcheckpointOperationHandle_getter) + + def CUcoredumpCallbackHandle_getter(CUcoredumpCallbackHandle x): return (x._pvt_ptr[0]) _add_cuda_native_handle_getter(CUcoredumpCallbackHandle, CUcoredumpCallbackHandle_getter) diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pxd b/cuda_bindings/cuda/bindings/nvfatbin.pxd index d27d4002320..192e7f55fde 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pxd +++ b/cuda_bindings/cuda/bindings/nvfatbin.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=d9fd5ffb6adedf403c2fee0594d979c6ad2221c94f886cdaaa5efb01c1fa1421 +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9ead77b928fe2009e92249025e5b38bf079a25fc0d9737aafd3cbeddb5c86661 diff --git a/cuda_bindings/cuda/bindings/nvfatbin.pyx b/cuda_bindings/cuda/bindings/nvfatbin.pyx index 0e485dd80dc..477026d721e 100644 --- a/cuda_bindings/cuda/bindings/nvfatbin.pyx +++ b/cuda_bindings/cuda/bindings/nvfatbin.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.4.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=464151e9be344b663eb001d24b780328f477470afca263a03384394a057b74bd +# This code was automatically generated across versions from 12.4.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a696e744ee4520d7a8db8937f28c9ae9b92ff208900c1aba6b3dcf866a960e64 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pxd b/cuda_bindings/cuda/bindings/nvjitlink.pxd index 714bbbc33ee..b383554eaca 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pxd +++ b/cuda_bindings/cuda/bindings/nvjitlink.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b3986e82e5ac57f70277f1ab470024ff95d353999f98723724c7eb62f6a409a1 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=bdd807ca03377f36b064e28eaa2421255316987c009a65a55f05fbc1a22e2bf3 diff --git a/cuda_bindings/cuda/bindings/nvjitlink.pyx b/cuda_bindings/cuda/bindings/nvjitlink.pyx index 89076249cf9..5476ab63c89 100644 --- a/cuda_bindings/cuda/bindings/nvjitlink.pyx +++ b/cuda_bindings/cuda/bindings/nvjitlink.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=4f142d6dd069dd459052ff17e4e585b764e7a8b4298051df3c6c0d39e1c67ded +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=930ba914df7615926a16dd5224f9250eb512e83c1b85e8282470f252706359a8 # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/nvml.pxd b/cuda_bindings/cuda/bindings/nvml.pxd index ce3c1db4852..6f35132912f 100644 --- a/cuda_bindings/cuda/bindings/nvml.pxd +++ b/cuda_bindings/cuda/bindings/nvml.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b6fe9a4efd0077f8c09ef4f826880ad0a54100455d4465953c4127d3de8c4d91 +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=635b329217b9c57fce06de4ffd743372a120b5039eb247f49205bd4d2baf663c @@ -147,6 +147,11 @@ ctypedef nvmlPRMCounterId_t _PRMCounterId ctypedef nvmlPowerProfileOperation_t _PowerProfileOperation ctypedef nvmlProcessMode_t _ProcessMode ctypedef nvmlCPERType_t _CPERType +ctypedef nvmlGpuOperationalEventLogLevel_t _GpuOperationalEventLogLevel +ctypedef nvmlOperationalEventSeverity_t _OperationalEventSeverity +ctypedef nvmlEventDataType_t _EventDataType +ctypedef nvmlGpuOperationalEventContextType_t _GpuOperationalEventContextType +ctypedef nvmlNvlinkTelemetrySampleType_t _NvlinkTelemetrySampleType ############################################################################### @@ -438,3 +443,14 @@ cpdef object system_get_cper_v1() cpdef object device_get_bbx_time_data_v1(intptr_t device) cpdef object device_get_accounting_stats_v2(intptr_t device) cpdef object device_get_remapped_rows_v2(intptr_t device) +cpdef device_set_adaptive_tgp_mode_v1(intptr_t device, int mode) +cpdef object device_get_adaptive_tgp_mode_info_v1(intptr_t device) +cpdef device_set_memory_limits_v1(intptr_t device, intptr_t limits) +cpdef object device_get_memory_limits_v1(intptr_t device) +cpdef object device_get_gpu_fabric_info_v4(intptr_t device) +cpdef object device_perf_metrics_get_samples_v1(intptr_t device) +cpdef object device_set_nvlink_bw_mode_async_v1(intptr_t device) +cpdef object device_get_nv_link_telemetry_samples_v1(intptr_t device) +cpdef event_set_register_gpu_operational_events_v1(intptr_t event_set, intptr_t config) +cpdef object event_set_get_context_count_v1(intptr_t set) +cpdef object device_get_bank_remapper_status_v1(intptr_t device) diff --git a/cuda_bindings/cuda/bindings/nvml.pyx b/cuda_bindings/cuda/bindings/nvml.pyx index c5a45d8c6c5..9f0d104abba 100644 --- a/cuda_bindings/cuda/bindings/nvml.pyx +++ b/cuda_bindings/cuda/bindings/nvml.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.9.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=e6b2e2f1456e0ba7ef3201063d4e670ba71db9334bb671005b63224aeecded0a +# This code was automatically generated across versions from 12.9.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7447d022b0937ff32b98e8a8a6f0a3e0564884c4a217b51e9312290015c7a406 # <<<< PREAMBLE CONTENT >>>> @@ -374,6 +374,9 @@ class BrandType(_cyb_FastEnum): BRAND_NVIDIA = NVML_BRAND_NVIDIA BRAND_GEFORCE_RTX = NVML_BRAND_GEFORCE_RTX BRAND_TITAN_RTX = NVML_BRAND_TITAN_RTX + BRAND_NVIDIA_DLA = NVML_BRAND_NVIDIA_DLA + BRAND_NVIDIA_VGAMEDEV = NVML_BRAND_NVIDIA_VGAMEDEV + BRAND_NVIDIA_NPU = NVML_BRAND_NVIDIA_NPU BRAND_COUNT = NVML_BRAND_COUNT class TemperatureThresholds(_cyb_FastEnum): @@ -382,14 +385,14 @@ class TemperatureThresholds(_cyb_FastEnum): See `nvmlTemperatureThresholds_t`. """ - TEMPERATURE_THRESHOLD_SHUTDOWN = NVML_TEMPERATURE_THRESHOLD_SHUTDOWN - TEMPERATURE_THRESHOLD_SLOWDOWN = NVML_TEMPERATURE_THRESHOLD_SLOWDOWN - TEMPERATURE_THRESHOLD_MEM_MAX = NVML_TEMPERATURE_THRESHOLD_MEM_MAX - TEMPERATURE_THRESHOLD_GPU_MAX = NVML_TEMPERATURE_THRESHOLD_GPU_MAX - TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN - TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR - TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX - TEMPERATURE_THRESHOLD_GPS_CURR = NVML_TEMPERATURE_THRESHOLD_GPS_CURR + TEMPERATURE_THRESHOLD_SHUTDOWN = (NVML_TEMPERATURE_THRESHOLD_SHUTDOWN, 'Temperature at which the GPU will shut down for HW protection') + TEMPERATURE_THRESHOLD_SLOWDOWN = (NVML_TEMPERATURE_THRESHOLD_SLOWDOWN, 'Temperature at which the GPU will begin HW slowdown') + TEMPERATURE_THRESHOLD_MEM_MAX = (NVML_TEMPERATURE_THRESHOLD_MEM_MAX, 'Memory Temperature at which the GPU will begin SW slowdown') + TEMPERATURE_THRESHOLD_GPU_MAX = (NVML_TEMPERATURE_THRESHOLD_GPU_MAX, 'GPU Temperature at which the GPU can be throttled below base clock') + TEMPERATURE_THRESHOLD_ACOUSTIC_MIN = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MIN, 'Minimum GPU Temperature that can be set as acoustic threshold') + TEMPERATURE_THRESHOLD_ACOUSTIC_CURR = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_CURR, 'Current temperature that is set as acoustic threshold.') + TEMPERATURE_THRESHOLD_ACOUSTIC_MAX = (NVML_TEMPERATURE_THRESHOLD_ACOUSTIC_MAX, 'Maximum GPU temperature that can be set as acoustic threshold.') + TEMPERATURE_THRESHOLD_GPS_CURR = (NVML_TEMPERATURE_THRESHOLD_GPS_CURR, 'Current temperature that is set as gps threshold.') TEMPERATURE_THRESHOLD_COUNT = NVML_TEMPERATURE_THRESHOLD_COUNT class TemperatureSensors(_cyb_FastEnum): @@ -399,6 +402,7 @@ class TemperatureSensors(_cyb_FastEnum): See `nvmlTemperatureSensors_t`. """ TEMPERATURE_GPU = (NVML_TEMPERATURE_GPU, 'Temperature sensor for the GPU die.') + TEMPERATURE_GPU_MAX = (NVML_TEMPERATURE_GPU_MAX, 'Temperature from the hottest part of the GPU die.') TEMPERATURE_COUNT = NVML_TEMPERATURE_COUNT class ComputeMode(_cyb_FastEnum): @@ -677,6 +681,7 @@ class GridLicenseFeatureCode(_cyb_FastEnum): VWORKSTATION = (NVML_GRID_LICENSE_FEATURE_CODE_VWORKSTATION, 'Deprecated, do not use.') GAMING = (NVML_GRID_LICENSE_FEATURE_CODE_GAMING, 'Gaming.') COMPUTE = (NVML_GRID_LICENSE_FEATURE_CODE_COMPUTE, 'Compute.') + VGAMEDEV = (NVML_GRID_LICENSE_FEATURE_CODE_VGAMEDEV, 'vGameDev') class VgpuCapability(_cyb_FastEnum): """ @@ -733,6 +738,8 @@ class DeviceGpuRecoveryAction(_cyb_FastEnum): GPU_RECOVERY_ACTION_DRAIN_P2P = (NVML_GPU_RECOVERY_ACTION_DRAIN_P2P, 'Drain P2P.') GPU_RECOVERY_ACTION_DRAIN_AND_RESET = (NVML_GPU_RECOVERY_ACTION_DRAIN_AND_RESET, 'Drain P2P and Reset Gpu.') GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN = (NVML_GPU_RECOVERY_ACTION_RECOVER_IMEX_DOMAIN, 'Recover IMEX Domain.') + GPU_RECOVERY_ACTION_BUS_RESET = (NVML_GPU_RECOVERY_ACTION_BUS_RESET, "Reset the GPU's PCIe bus.") + GPU_RECOVERY_ACTION_SYSTEM_REBOOT = (NVML_GPU_RECOVERY_ACTION_SYSTEM_REBOOT, 'Reboot the system.') class FanState(_cyb_FastEnum): """ @@ -903,152 +910,152 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_NVLINK_L16_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L16_TX_PER_SEC, 'NvLink write bandwidth for link 16 in MiB/sec.') GPM_METRIC_NVLINK_L17_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_RX_PER_SEC, 'NvLink read bandwidth for link 17 in MiB/sec.') GPM_METRIC_NVLINK_L17_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L17_TX_PER_SEC, 'NvLink write bandwidth for link 17 in MiB/sec.') - GPM_METRIC_C2C_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC - GPM_METRIC_C2C_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC - GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC - GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC - GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC - GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC - GPM_METRIC_HOSTMEM_CACHE_HIT = NVML_GPM_METRIC_HOSTMEM_CACHE_HIT - GPM_METRIC_HOSTMEM_CACHE_MISS = NVML_GPM_METRIC_HOSTMEM_CACHE_MISS - GPM_METRIC_PEERMEM_CACHE_HIT = NVML_GPM_METRIC_PEERMEM_CACHE_HIT - GPM_METRIC_PEERMEM_CACHE_MISS = NVML_GPM_METRIC_PEERMEM_CACHE_MISS - GPM_METRIC_DRAM_CACHE_HIT = NVML_GPM_METRIC_DRAM_CACHE_HIT - GPM_METRIC_DRAM_CACHE_MISS = NVML_GPM_METRIC_DRAM_CACHE_MISS - GPM_METRIC_NVENC_0_UTIL = NVML_GPM_METRIC_NVENC_0_UTIL - GPM_METRIC_NVENC_1_UTIL = NVML_GPM_METRIC_NVENC_1_UTIL - GPM_METRIC_NVENC_2_UTIL = NVML_GPM_METRIC_NVENC_2_UTIL - GPM_METRIC_NVENC_3_UTIL = NVML_GPM_METRIC_NVENC_3_UTIL - GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR0_CTXSW_REQUESTS = NVML_GPM_METRIC_GR0_CTXSW_REQUESTS - GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT - GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR1_CTXSW_REQUESTS = NVML_GPM_METRIC_GR1_CTXSW_REQUESTS - GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT - GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR2_CTXSW_REQUESTS = NVML_GPM_METRIC_GR2_CTXSW_REQUESTS - GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT - GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR3_CTXSW_REQUESTS = NVML_GPM_METRIC_GR3_CTXSW_REQUESTS - GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT - GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR4_CTXSW_REQUESTS = NVML_GPM_METRIC_GR4_CTXSW_REQUESTS - GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT - GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR5_CTXSW_REQUESTS = NVML_GPM_METRIC_GR5_CTXSW_REQUESTS - GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT - GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR6_CTXSW_REQUESTS = NVML_GPM_METRIC_GR6_CTXSW_REQUESTS - GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT - GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED - GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE - GPM_METRIC_GR7_CTXSW_REQUESTS = NVML_GPM_METRIC_GR7_CTXSW_REQUESTS - GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ - GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT - GPM_METRIC_NVLINK_L18_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC - GPM_METRIC_NVLINK_L18_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC - GPM_METRIC_NVLINK_L19_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC - GPM_METRIC_NVLINK_L19_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC - GPM_METRIC_NVLINK_L20_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC - GPM_METRIC_NVLINK_L20_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC - GPM_METRIC_NVLINK_L21_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC - GPM_METRIC_NVLINK_L21_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC - GPM_METRIC_NVLINK_L22_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC - GPM_METRIC_NVLINK_L22_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC - GPM_METRIC_NVLINK_L23_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC - GPM_METRIC_NVLINK_L23_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC - GPM_METRIC_NVLINK_L24_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC - GPM_METRIC_NVLINK_L24_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC - GPM_METRIC_NVLINK_L25_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC - GPM_METRIC_NVLINK_L25_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC - GPM_METRIC_NVLINK_L26_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC - GPM_METRIC_NVLINK_L26_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC - GPM_METRIC_NVLINK_L27_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC - GPM_METRIC_NVLINK_L27_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC - GPM_METRIC_NVLINK_L28_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC - GPM_METRIC_NVLINK_L28_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC - GPM_METRIC_NVLINK_L29_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC - GPM_METRIC_NVLINK_L29_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC - GPM_METRIC_NVLINK_L30_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC - GPM_METRIC_NVLINK_L30_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC - GPM_METRIC_NVLINK_L31_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC - GPM_METRIC_NVLINK_L31_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC - GPM_METRIC_NVLINK_L32_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC - GPM_METRIC_NVLINK_L32_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC - GPM_METRIC_NVLINK_L33_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC - GPM_METRIC_NVLINK_L33_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC - GPM_METRIC_NVLINK_L34_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC - GPM_METRIC_NVLINK_L34_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC - GPM_METRIC_NVLINK_L35_RX_PER_SEC = NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC - GPM_METRIC_NVLINK_L35_TX_PER_SEC = NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC + GPM_METRIC_C2C_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_TOTAL_TX_PER_SEC, 'C2C total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_TOTAL_RX_PER_SEC, 'C2C total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_DATA_TX_PER_SEC, 'C2C data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_DATA_RX_PER_SEC, 'C2C data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_TOTAL_TX_PER_SEC, 'C2C link 0 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_TOTAL_RX_PER_SEC, 'C2C link 0 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_DATA_TX_PER_SEC, 'C2C link 0 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK0_DATA_RX_PER_SEC, 'C2C link 0 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_TOTAL_TX_PER_SEC, 'C2C link 1 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_TOTAL_RX_PER_SEC, 'C2C link 1 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_DATA_TX_PER_SEC, 'C2C link 1 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK1_DATA_RX_PER_SEC, 'C2C link 1 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_TOTAL_TX_PER_SEC, 'C2C link 2 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_TOTAL_RX_PER_SEC, 'C2C link 2 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_DATA_TX_PER_SEC, 'C2C link 2 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK2_DATA_RX_PER_SEC, 'C2C link 2 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_TOTAL_TX_PER_SEC, 'C2C link 3 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_TOTAL_RX_PER_SEC, 'C2C link 3 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_DATA_TX_PER_SEC, 'C2C link 3 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK3_DATA_RX_PER_SEC, 'C2C link 3 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_TOTAL_TX_PER_SEC, 'C2C link 4 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_TOTAL_RX_PER_SEC, 'C2C link 4 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_DATA_TX_PER_SEC, 'C2C link 4 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK4_DATA_RX_PER_SEC, 'C2C link 4 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_TOTAL_TX_PER_SEC, 'C2C link 5 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_TOTAL_RX_PER_SEC, 'C2C link 5 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_DATA_TX_PER_SEC, 'C2C link 5 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK5_DATA_RX_PER_SEC, 'C2C link 5 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_TOTAL_TX_PER_SEC, 'C2C link 6 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_TOTAL_RX_PER_SEC, 'C2C link 6 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_DATA_TX_PER_SEC, 'C2C link 6 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK6_DATA_RX_PER_SEC, 'C2C link 6 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_TOTAL_TX_PER_SEC, 'C2C link 7 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_TOTAL_RX_PER_SEC, 'C2C link 7 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_DATA_TX_PER_SEC, 'C2C link 7 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK7_DATA_RX_PER_SEC, 'C2C link 7 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_TOTAL_TX_PER_SEC, 'C2C link 8 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_TOTAL_RX_PER_SEC, 'C2C link 8 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_DATA_TX_PER_SEC, 'C2C link 8 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK8_DATA_RX_PER_SEC, 'C2C link 8 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_TOTAL_TX_PER_SEC, 'C2C link 9 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_TOTAL_RX_PER_SEC, 'C2C link 9 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_DATA_TX_PER_SEC, 'C2C link 9 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK9_DATA_RX_PER_SEC, 'C2C link 9 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_TOTAL_TX_PER_SEC, 'C2C link 10 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_TOTAL_RX_PER_SEC, 'C2C link 10 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_DATA_TX_PER_SEC, 'C2C link 10 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK10_DATA_RX_PER_SEC, 'C2C link 10 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_TOTAL_TX_PER_SEC, 'C2C link 11 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_TOTAL_RX_PER_SEC, 'C2C link 11 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_DATA_TX_PER_SEC, 'C2C link 11 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK11_DATA_RX_PER_SEC, 'C2C link 11 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_TOTAL_TX_PER_SEC, 'C2C link 12 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_TOTAL_RX_PER_SEC, 'C2C link 12 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_DATA_TX_PER_SEC, 'C2C link 12 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK12_DATA_RX_PER_SEC, 'C2C link 12 data receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_TOTAL_TX_PER_SEC, 'C2C link 13 total transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_TOTAL_RX_PER_SEC, 'C2C link 13 total receive bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_DATA_TX_PER_SEC, 'C2C link 13 data transmit bandwidth in MiB/sec.') + GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC = (NVML_GPM_METRIC_C2C_LINK13_DATA_RX_PER_SEC, 'C2C link 13 data receive bandwidth in MiB/sec.') + GPM_METRIC_HOSTMEM_CACHE_HIT = (NVML_GPM_METRIC_HOSTMEM_CACHE_HIT, 'Percentage of host memory cache hits. 0.0 - 100.0.') + GPM_METRIC_HOSTMEM_CACHE_MISS = (NVML_GPM_METRIC_HOSTMEM_CACHE_MISS, 'Percentage of host memory cache misses. 0.0 - 100.0.') + GPM_METRIC_PEERMEM_CACHE_HIT = (NVML_GPM_METRIC_PEERMEM_CACHE_HIT, 'Percentage of peer memory cache hits. 0.0 - 100.0.') + GPM_METRIC_PEERMEM_CACHE_MISS = (NVML_GPM_METRIC_PEERMEM_CACHE_MISS, 'Percentage of peer memory cache misses. 0.0 - 100.0.') + GPM_METRIC_DRAM_CACHE_HIT = (NVML_GPM_METRIC_DRAM_CACHE_HIT, 'Percentage of DRAM cache hits. 0.0 - 100.0.') + GPM_METRIC_DRAM_CACHE_MISS = (NVML_GPM_METRIC_DRAM_CACHE_MISS, 'Percentage of DRAM cache misses. 0.0 - 100.0.') + GPM_METRIC_NVENC_0_UTIL = (NVML_GPM_METRIC_NVENC_0_UTIL, 'Percent utilization of NVENC 0. 0.0 - 100.0.') + GPM_METRIC_NVENC_1_UTIL = (NVML_GPM_METRIC_NVENC_1_UTIL, 'Percent utilization of NVENC 1. 0.0 - 100.0.') + GPM_METRIC_NVENC_2_UTIL = (NVML_GPM_METRIC_NVENC_2_UTIL, 'Percent utilization of NVENC 2. 0.0 - 100.0.') + GPM_METRIC_NVENC_3_UTIL = (NVML_GPM_METRIC_NVENC_3_UTIL, 'Percent utilization of NVENC 3. 0.0 - 100.0.') + GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 0.') + GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 0.') + GPM_METRIC_GR0_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR0_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 0.') + GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR0_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 0.') + GPM_METRIC_GR0_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR0_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 0 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 1.') + GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 1.') + GPM_METRIC_GR1_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR1_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 1.') + GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR1_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 1.') + GPM_METRIC_GR1_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR1_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 1 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 2.') + GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 2.') + GPM_METRIC_GR2_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR2_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 2.') + GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR2_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 2.') + GPM_METRIC_GR2_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR2_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 2 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 3.') + GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 3.') + GPM_METRIC_GR3_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR3_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 3.') + GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR3_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 3.') + GPM_METRIC_GR3_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR3_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 3 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 4.') + GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 4.') + GPM_METRIC_GR4_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR4_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 4.') + GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR4_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 4.') + GPM_METRIC_GR4_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR4_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 4 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 5.') + GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 5.') + GPM_METRIC_GR5_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR5_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 5.') + GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR5_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 5.') + GPM_METRIC_GR5_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR5_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 5 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 6.') + GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 6.') + GPM_METRIC_GR6_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR6_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 6.') + GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR6_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 6.') + GPM_METRIC_GR6_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR6_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 6 context switches were active. 0.0 - 100.0.') + GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ELAPSED, 'Total context switch cycles elapsed for GR engine 7.') + GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_ACTIVE, 'Active context switch cycles for GR engine 7.') + GPM_METRIC_GR7_CTXSW_REQUESTS = (NVML_GPM_METRIC_GR7_CTXSW_REQUESTS, 'Number of context switch requests for GR engine 7.') + GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ = (NVML_GPM_METRIC_GR7_CTXSW_CYCLES_PER_REQ, 'Average context switch cycles per request for GR engine 7.') + GPM_METRIC_GR7_CTXSW_ACTIVE_PCT = (NVML_GPM_METRIC_GR7_CTXSW_ACTIVE_PCT, 'Percentage of time GR engine 7 context switches were active. 0.0 - 100.0.') + GPM_METRIC_NVLINK_L18_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L18_RX_PER_SEC, 'NvLink read bandwidth for link 18 in MiB/sec.') + GPM_METRIC_NVLINK_L18_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L18_TX_PER_SEC, 'NvLink write bandwidth for link 18 in MiB/sec.') + GPM_METRIC_NVLINK_L19_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L19_RX_PER_SEC, 'NvLink read bandwidth for link 19 in MiB/sec.') + GPM_METRIC_NVLINK_L19_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L19_TX_PER_SEC, 'NvLink write bandwidth for link 19 in MiB/sec.') + GPM_METRIC_NVLINK_L20_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L20_RX_PER_SEC, 'NvLink read bandwidth for link 20 in MiB/sec.') + GPM_METRIC_NVLINK_L20_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L20_TX_PER_SEC, 'NvLink write bandwidth for link 20 in MiB/sec.') + GPM_METRIC_NVLINK_L21_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L21_RX_PER_SEC, 'NvLink read bandwidth for link 21 in MiB/sec.') + GPM_METRIC_NVLINK_L21_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L21_TX_PER_SEC, 'NvLink write bandwidth for link 21 in MiB/sec.') + GPM_METRIC_NVLINK_L22_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L22_RX_PER_SEC, 'NvLink read bandwidth for link 22 in MiB/sec.') + GPM_METRIC_NVLINK_L22_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L22_TX_PER_SEC, 'NvLink write bandwidth for link 22 in MiB/sec.') + GPM_METRIC_NVLINK_L23_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L23_RX_PER_SEC, 'NvLink read bandwidth for link 23 in MiB/sec.') + GPM_METRIC_NVLINK_L23_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L23_TX_PER_SEC, 'NvLink write bandwidth for link 23 in MiB/sec.') + GPM_METRIC_NVLINK_L24_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L24_RX_PER_SEC, 'NvLink read bandwidth for link 24 in MiB/sec.') + GPM_METRIC_NVLINK_L24_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L24_TX_PER_SEC, 'NvLink write bandwidth for link 24 in MiB/sec.') + GPM_METRIC_NVLINK_L25_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L25_RX_PER_SEC, 'NvLink read bandwidth for link 25 in MiB/sec.') + GPM_METRIC_NVLINK_L25_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L25_TX_PER_SEC, 'NvLink write bandwidth for link 25 in MiB/sec.') + GPM_METRIC_NVLINK_L26_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L26_RX_PER_SEC, 'NvLink read bandwidth for link 26 in MiB/sec.') + GPM_METRIC_NVLINK_L26_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L26_TX_PER_SEC, 'NvLink write bandwidth for link 26 in MiB/sec.') + GPM_METRIC_NVLINK_L27_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L27_RX_PER_SEC, 'NvLink read bandwidth for link 27 in MiB/sec.') + GPM_METRIC_NVLINK_L27_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L27_TX_PER_SEC, 'NvLink write bandwidth for link 27 in MiB/sec.') + GPM_METRIC_NVLINK_L28_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L28_RX_PER_SEC, 'NvLink read bandwidth for link 28 in MiB/sec.') + GPM_METRIC_NVLINK_L28_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L28_TX_PER_SEC, 'NvLink write bandwidth for link 28 in MiB/sec.') + GPM_METRIC_NVLINK_L29_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L29_RX_PER_SEC, 'NvLink read bandwidth for link 29 in MiB/sec.') + GPM_METRIC_NVLINK_L29_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L29_TX_PER_SEC, 'NvLink write bandwidth for link 29 in MiB/sec.') + GPM_METRIC_NVLINK_L30_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L30_RX_PER_SEC, 'NvLink read bandwidth for link 30 in MiB/sec.') + GPM_METRIC_NVLINK_L30_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L30_TX_PER_SEC, 'NvLink write bandwidth for link 30 in MiB/sec.') + GPM_METRIC_NVLINK_L31_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L31_RX_PER_SEC, 'NvLink read bandwidth for link 31 in MiB/sec.') + GPM_METRIC_NVLINK_L31_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L31_TX_PER_SEC, 'NvLink write bandwidth for link 31 in MiB/sec.') + GPM_METRIC_NVLINK_L32_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L32_RX_PER_SEC, 'NvLink read bandwidth for link 32 in MiB/sec.') + GPM_METRIC_NVLINK_L32_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L32_TX_PER_SEC, 'NvLink write bandwidth for link 32 in MiB/sec.') + GPM_METRIC_NVLINK_L33_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L33_RX_PER_SEC, 'NvLink read bandwidth for link 33 in MiB/sec.') + GPM_METRIC_NVLINK_L33_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L33_TX_PER_SEC, 'NvLink write bandwidth for link 33 in MiB/sec.') + GPM_METRIC_NVLINK_L34_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L34_RX_PER_SEC, 'NvLink read bandwidth for link 34 in MiB/sec.') + GPM_METRIC_NVLINK_L34_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L34_TX_PER_SEC, 'NvLink write bandwidth for link 34 in MiB/sec.') + GPM_METRIC_NVLINK_L35_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L35_RX_PER_SEC, 'NvLink read bandwidth for link 35 in MiB/sec.') + GPM_METRIC_NVLINK_L35_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L35_TX_PER_SEC, 'NvLink write bandwidth for link 35 in MiB/sec.') GPM_METRIC_SM_CYCLES_ELAPSED = (NVML_GPM_METRIC_SM_CYCLES_ELAPSED, "The GPU's SM cycles elapsed since reboot.") GPM_METRIC_SM_CYCLES_ACTIVE = (NVML_GPM_METRIC_SM_CYCLES_ACTIVE, "The GPU's SM activity since reboot.") GPM_METRIC_MMA_CYCLES_ACTIVE = (NVML_GPM_METRIC_MMA_CYCLES_ACTIVE, "The GPU's SM MMA tensor activity since reboot.") @@ -1060,8 +1067,8 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_PCIE_RX = (NVML_GPM_METRIC_PCIE_RX, 'The PCIe RX traffic since reboot.') GPM_METRIC_INTEGER_CYCLES_ACTIVE = (NVML_GPM_METRIC_INTEGER_CYCLES_ACTIVE, "The GPU's SM integer activity since reboot.") GPM_METRIC_FP64_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP64_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") - GPM_METRIC_FP32_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP32_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") - GPM_METRIC_FP16_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP16_CYCLES_ACTIVE, "The GPU's SM FP64 activity since reboot.") + GPM_METRIC_FP32_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP32_CYCLES_ACTIVE, "The GPU's SM FP32 activity since reboot.") + GPM_METRIC_FP16_CYCLES_ACTIVE = (NVML_GPM_METRIC_FP16_CYCLES_ACTIVE, "The GPU's SM FP16 activity since reboot.") GPM_METRIC_NVLINK_L0_RX = (NVML_GPM_METRIC_NVLINK_L0_RX, 'NvLink read for link 0 in bytes since reboot.') GPM_METRIC_NVLINK_L0_TX = (NVML_GPM_METRIC_NVLINK_L0_TX, 'NvLink write for link 0 in bytes since reboot.') GPM_METRIC_NVLINK_L1_RX = (NVML_GPM_METRIC_NVLINK_L1_RX, 'NvLink read for link 1 in bytes since reboot.') @@ -1134,6 +1141,150 @@ class GpmMetricId(_cyb_FastEnum): GPM_METRIC_NVLINK_L34_TX = (NVML_GPM_METRIC_NVLINK_L34_TX, 'NvLink write for link 34 in bytes since reboot.') GPM_METRIC_NVLINK_L35_RX = (NVML_GPM_METRIC_NVLINK_L35_RX, 'NvLink read for link 35 in bytes since reboot.') GPM_METRIC_NVLINK_L35_TX = (NVML_GPM_METRIC_NVLINK_L35_TX, 'NvLink write for link 35 in bytes since reboot.') + GPM_METRIC_NVLINK_L36_RX = (NVML_GPM_METRIC_NVLINK_L36_RX, 'NvLink read for link 36 in bytes since reboot.') + GPM_METRIC_NVLINK_L36_TX = (NVML_GPM_METRIC_NVLINK_L36_TX, 'NvLink write for link 36 in bytes since reboot.') + GPM_METRIC_NVLINK_L37_RX = (NVML_GPM_METRIC_NVLINK_L37_RX, 'NvLink read for link 37 in bytes since reboot.') + GPM_METRIC_NVLINK_L37_TX = (NVML_GPM_METRIC_NVLINK_L37_TX, 'NvLink write for link 37 in bytes since reboot.') + GPM_METRIC_NVLINK_L38_RX = (NVML_GPM_METRIC_NVLINK_L38_RX, 'NvLink read for link 38 in bytes since reboot.') + GPM_METRIC_NVLINK_L38_TX = (NVML_GPM_METRIC_NVLINK_L38_TX, 'NvLink write for link 38 in bytes since reboot.') + GPM_METRIC_NVLINK_L39_RX = (NVML_GPM_METRIC_NVLINK_L39_RX, 'NvLink read for link 39 in bytes since reboot.') + GPM_METRIC_NVLINK_L39_TX = (NVML_GPM_METRIC_NVLINK_L39_TX, 'NvLink write for link 39 in bytes since reboot.') + GPM_METRIC_NVLINK_L40_RX = (NVML_GPM_METRIC_NVLINK_L40_RX, 'NvLink read for link 40 in bytes since reboot.') + GPM_METRIC_NVLINK_L40_TX = (NVML_GPM_METRIC_NVLINK_L40_TX, 'NvLink write for link 40 in bytes since reboot.') + GPM_METRIC_NVLINK_L41_RX = (NVML_GPM_METRIC_NVLINK_L41_RX, 'NvLink read for link 41 in bytes since reboot.') + GPM_METRIC_NVLINK_L41_TX = (NVML_GPM_METRIC_NVLINK_L41_TX, 'NvLink write for link 41 in bytes since reboot.') + GPM_METRIC_NVLINK_L42_RX = (NVML_GPM_METRIC_NVLINK_L42_RX, 'NvLink read for link 42 in bytes since reboot.') + GPM_METRIC_NVLINK_L42_TX = (NVML_GPM_METRIC_NVLINK_L42_TX, 'NvLink write for link 42 in bytes since reboot.') + GPM_METRIC_NVLINK_L43_RX = (NVML_GPM_METRIC_NVLINK_L43_RX, 'NvLink read for link 43 in bytes since reboot.') + GPM_METRIC_NVLINK_L43_TX = (NVML_GPM_METRIC_NVLINK_L43_TX, 'NvLink write for link 43 in bytes since reboot.') + GPM_METRIC_NVLINK_L44_RX = (NVML_GPM_METRIC_NVLINK_L44_RX, 'NvLink read for link 44 in bytes since reboot.') + GPM_METRIC_NVLINK_L44_TX = (NVML_GPM_METRIC_NVLINK_L44_TX, 'NvLink write for link 44 in bytes since reboot.') + GPM_METRIC_NVLINK_L45_RX = (NVML_GPM_METRIC_NVLINK_L45_RX, 'NvLink read for link 45 in bytes since reboot.') + GPM_METRIC_NVLINK_L45_TX = (NVML_GPM_METRIC_NVLINK_L45_TX, 'NvLink write for link 45 in bytes since reboot.') + GPM_METRIC_NVLINK_L46_RX = (NVML_GPM_METRIC_NVLINK_L46_RX, 'NvLink read for link 46 in bytes since reboot.') + GPM_METRIC_NVLINK_L46_TX = (NVML_GPM_METRIC_NVLINK_L46_TX, 'NvLink write for link 46 in bytes since reboot.') + GPM_METRIC_NVLINK_L47_RX = (NVML_GPM_METRIC_NVLINK_L47_RX, 'NvLink read for link 47 in bytes since reboot.') + GPM_METRIC_NVLINK_L47_TX = (NVML_GPM_METRIC_NVLINK_L47_TX, 'NvLink write for link 47 in bytes since reboot.') + GPM_METRIC_NVLINK_L48_RX = (NVML_GPM_METRIC_NVLINK_L48_RX, 'NvLink read for link 48 in bytes since reboot.') + GPM_METRIC_NVLINK_L48_TX = (NVML_GPM_METRIC_NVLINK_L48_TX, 'NvLink write for link 48 in bytes since reboot.') + GPM_METRIC_NVLINK_L49_RX = (NVML_GPM_METRIC_NVLINK_L49_RX, 'NvLink read for link 49 in bytes since reboot.') + GPM_METRIC_NVLINK_L49_TX = (NVML_GPM_METRIC_NVLINK_L49_TX, 'NvLink write for link 49 in bytes since reboot.') + GPM_METRIC_NVLINK_L50_RX = (NVML_GPM_METRIC_NVLINK_L50_RX, 'NvLink read for link 50 in bytes since reboot.') + GPM_METRIC_NVLINK_L50_TX = (NVML_GPM_METRIC_NVLINK_L50_TX, 'NvLink write for link 50 in bytes since reboot.') + GPM_METRIC_NVLINK_L51_RX = (NVML_GPM_METRIC_NVLINK_L51_RX, 'NvLink read for link 51 in bytes since reboot.') + GPM_METRIC_NVLINK_L51_TX = (NVML_GPM_METRIC_NVLINK_L51_TX, 'NvLink write for link 51 in bytes since reboot.') + GPM_METRIC_NVLINK_L52_RX = (NVML_GPM_METRIC_NVLINK_L52_RX, 'NvLink read for link 52 in bytes since reboot.') + GPM_METRIC_NVLINK_L52_TX = (NVML_GPM_METRIC_NVLINK_L52_TX, 'NvLink write for link 52 in bytes since reboot.') + GPM_METRIC_NVLINK_L53_RX = (NVML_GPM_METRIC_NVLINK_L53_RX, 'NvLink read for link 53 in bytes since reboot.') + GPM_METRIC_NVLINK_L53_TX = (NVML_GPM_METRIC_NVLINK_L53_TX, 'NvLink write for link 53 in bytes since reboot.') + GPM_METRIC_NVLINK_L54_RX = (NVML_GPM_METRIC_NVLINK_L54_RX, 'NvLink read for link 54 in bytes since reboot.') + GPM_METRIC_NVLINK_L54_TX = (NVML_GPM_METRIC_NVLINK_L54_TX, 'NvLink write for link 54 in bytes since reboot.') + GPM_METRIC_NVLINK_L55_RX = (NVML_GPM_METRIC_NVLINK_L55_RX, 'NvLink read for link 55 in bytes since reboot.') + GPM_METRIC_NVLINK_L55_TX = (NVML_GPM_METRIC_NVLINK_L55_TX, 'NvLink write for link 55 in bytes since reboot.') + GPM_METRIC_NVLINK_L56_RX = (NVML_GPM_METRIC_NVLINK_L56_RX, 'NvLink read for link 56 in bytes since reboot.') + GPM_METRIC_NVLINK_L56_TX = (NVML_GPM_METRIC_NVLINK_L56_TX, 'NvLink write for link 56 in bytes since reboot.') + GPM_METRIC_NVLINK_L57_RX = (NVML_GPM_METRIC_NVLINK_L57_RX, 'NvLink read for link 57 in bytes since reboot.') + GPM_METRIC_NVLINK_L57_TX = (NVML_GPM_METRIC_NVLINK_L57_TX, 'NvLink write for link 57 in bytes since reboot.') + GPM_METRIC_NVLINK_L58_RX = (NVML_GPM_METRIC_NVLINK_L58_RX, 'NvLink read for link 58 in bytes since reboot.') + GPM_METRIC_NVLINK_L58_TX = (NVML_GPM_METRIC_NVLINK_L58_TX, 'NvLink write for link 58 in bytes since reboot.') + GPM_METRIC_NVLINK_L59_RX = (NVML_GPM_METRIC_NVLINK_L59_RX, 'NvLink read for link 59 in bytes since reboot.') + GPM_METRIC_NVLINK_L59_TX = (NVML_GPM_METRIC_NVLINK_L59_TX, 'NvLink write for link 59 in bytes since reboot.') + GPM_METRIC_NVLINK_L60_RX = (NVML_GPM_METRIC_NVLINK_L60_RX, 'NvLink read for link 60 in bytes since reboot.') + GPM_METRIC_NVLINK_L60_TX = (NVML_GPM_METRIC_NVLINK_L60_TX, 'NvLink write for link 60 in bytes since reboot.') + GPM_METRIC_NVLINK_L61_RX = (NVML_GPM_METRIC_NVLINK_L61_RX, 'NvLink read for link 61 in bytes since reboot.') + GPM_METRIC_NVLINK_L61_TX = (NVML_GPM_METRIC_NVLINK_L61_TX, 'NvLink write for link 61 in bytes since reboot.') + GPM_METRIC_NVLINK_L62_RX = (NVML_GPM_METRIC_NVLINK_L62_RX, 'NvLink read for link 62 in bytes since reboot.') + GPM_METRIC_NVLINK_L62_TX = (NVML_GPM_METRIC_NVLINK_L62_TX, 'NvLink write for link 62 in bytes since reboot.') + GPM_METRIC_NVLINK_L63_RX = (NVML_GPM_METRIC_NVLINK_L63_RX, 'NvLink read for link 63 in bytes since reboot.') + GPM_METRIC_NVLINK_L63_TX = (NVML_GPM_METRIC_NVLINK_L63_TX, 'NvLink write for link 63 in bytes since reboot.') + GPM_METRIC_NVLINK_L64_RX = (NVML_GPM_METRIC_NVLINK_L64_RX, 'NvLink read for link 64 in bytes since reboot.') + GPM_METRIC_NVLINK_L64_TX = (NVML_GPM_METRIC_NVLINK_L64_TX, 'NvLink write for link 64 in bytes since reboot.') + GPM_METRIC_NVLINK_L65_RX = (NVML_GPM_METRIC_NVLINK_L65_RX, 'NvLink read for link 65 in bytes since reboot.') + GPM_METRIC_NVLINK_L65_TX = (NVML_GPM_METRIC_NVLINK_L65_TX, 'NvLink write for link 65 in bytes since reboot.') + GPM_METRIC_NVLINK_L66_RX = (NVML_GPM_METRIC_NVLINK_L66_RX, 'NvLink read for link 66 in bytes since reboot.') + GPM_METRIC_NVLINK_L66_TX = (NVML_GPM_METRIC_NVLINK_L66_TX, 'NvLink write for link 66 in bytes since reboot.') + GPM_METRIC_NVLINK_L67_RX = (NVML_GPM_METRIC_NVLINK_L67_RX, 'NvLink read for link 67 in bytes since reboot.') + GPM_METRIC_NVLINK_L67_TX = (NVML_GPM_METRIC_NVLINK_L67_TX, 'NvLink write for link 67 in bytes since reboot.') + GPM_METRIC_NVLINK_L68_RX = (NVML_GPM_METRIC_NVLINK_L68_RX, 'NvLink read for link 68 in bytes since reboot.') + GPM_METRIC_NVLINK_L68_TX = (NVML_GPM_METRIC_NVLINK_L68_TX, 'NvLink write for link 68 in bytes since reboot.') + GPM_METRIC_NVLINK_L69_RX = (NVML_GPM_METRIC_NVLINK_L69_RX, 'NvLink read for link 69 in bytes since reboot.') + GPM_METRIC_NVLINK_L69_TX = (NVML_GPM_METRIC_NVLINK_L69_TX, 'NvLink write for link 69 in bytes since reboot.') + GPM_METRIC_NVLINK_L70_RX = (NVML_GPM_METRIC_NVLINK_L70_RX, 'NvLink read for link 70 in bytes since reboot.') + GPM_METRIC_NVLINK_L70_TX = (NVML_GPM_METRIC_NVLINK_L70_TX, 'NvLink write for link 70 in bytes since reboot.') + GPM_METRIC_NVLINK_L71_RX = (NVML_GPM_METRIC_NVLINK_L71_RX, 'NvLink read for link 71 in bytes since reboot.') + GPM_METRIC_NVLINK_L71_TX = (NVML_GPM_METRIC_NVLINK_L71_TX, 'NvLink write for link 71 in bytes since reboot.') + GPM_METRIC_NVLINK_L36_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L36_RX_PER_SEC, 'NvLink read bandwidth for link 36 in MiB/sec.') + GPM_METRIC_NVLINK_L36_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L36_TX_PER_SEC, 'NvLink write bandwidth for link 36 in MiB/sec.') + GPM_METRIC_NVLINK_L37_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L37_RX_PER_SEC, 'NvLink read bandwidth for link 37 in MiB/sec.') + GPM_METRIC_NVLINK_L37_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L37_TX_PER_SEC, 'NvLink write bandwidth for link 37 in MiB/sec.') + GPM_METRIC_NVLINK_L38_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L38_RX_PER_SEC, 'NvLink read bandwidth for link 38 in MiB/sec.') + GPM_METRIC_NVLINK_L38_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L38_TX_PER_SEC, 'NvLink write bandwidth for link 38 in MiB/sec.') + GPM_METRIC_NVLINK_L39_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L39_RX_PER_SEC, 'NvLink read bandwidth for link 39 in MiB/sec.') + GPM_METRIC_NVLINK_L39_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L39_TX_PER_SEC, 'NvLink write bandwidth for link 39 in MiB/sec.') + GPM_METRIC_NVLINK_L40_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L40_RX_PER_SEC, 'NvLink read bandwidth for link 40 in MiB/sec.') + GPM_METRIC_NVLINK_L40_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L40_TX_PER_SEC, 'NvLink write bandwidth for link 40 in MiB/sec.') + GPM_METRIC_NVLINK_L41_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L41_RX_PER_SEC, 'NvLink read bandwidth for link 41 in MiB/sec.') + GPM_METRIC_NVLINK_L41_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L41_TX_PER_SEC, 'NvLink write bandwidth for link 41 in MiB/sec.') + GPM_METRIC_NVLINK_L42_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L42_RX_PER_SEC, 'NvLink read bandwidth for link 42 in MiB/sec.') + GPM_METRIC_NVLINK_L42_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L42_TX_PER_SEC, 'NvLink write bandwidth for link 42 in MiB/sec.') + GPM_METRIC_NVLINK_L43_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L43_RX_PER_SEC, 'NvLink read bandwidth for link 43 in MiB/sec.') + GPM_METRIC_NVLINK_L43_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L43_TX_PER_SEC, 'NvLink write bandwidth for link 43 in MiB/sec.') + GPM_METRIC_NVLINK_L44_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L44_RX_PER_SEC, 'NvLink read bandwidth for link 44 in MiB/sec.') + GPM_METRIC_NVLINK_L44_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L44_TX_PER_SEC, 'NvLink write bandwidth for link 44 in MiB/sec.') + GPM_METRIC_NVLINK_L45_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L45_RX_PER_SEC, 'NvLink read bandwidth for link 45 in MiB/sec.') + GPM_METRIC_NVLINK_L45_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L45_TX_PER_SEC, 'NvLink write bandwidth for link 45 in MiB/sec.') + GPM_METRIC_NVLINK_L46_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L46_RX_PER_SEC, 'NvLink read bandwidth for link 46 in MiB/sec.') + GPM_METRIC_NVLINK_L46_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L46_TX_PER_SEC, 'NvLink write bandwidth for link 46 in MiB/sec.') + GPM_METRIC_NVLINK_L47_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L47_RX_PER_SEC, 'NvLink read bandwidth for link 47 in MiB/sec.') + GPM_METRIC_NVLINK_L47_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L47_TX_PER_SEC, 'NvLink write bandwidth for link 47 in MiB/sec.') + GPM_METRIC_NVLINK_L48_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L48_RX_PER_SEC, 'NvLink read bandwidth for link 48 in MiB/sec.') + GPM_METRIC_NVLINK_L48_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L48_TX_PER_SEC, 'NvLink write bandwidth for link 48 in MiB/sec.') + GPM_METRIC_NVLINK_L49_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L49_RX_PER_SEC, 'NvLink read bandwidth for link 49 in MiB/sec.') + GPM_METRIC_NVLINK_L49_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L49_TX_PER_SEC, 'NvLink write bandwidth for link 49 in MiB/sec.') + GPM_METRIC_NVLINK_L50_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L50_RX_PER_SEC, 'NvLink read bandwidth for link 50 in MiB/sec.') + GPM_METRIC_NVLINK_L50_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L50_TX_PER_SEC, 'NvLink write bandwidth for link 50 in MiB/sec.') + GPM_METRIC_NVLINK_L51_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L51_RX_PER_SEC, 'NvLink read bandwidth for link 51 in MiB/sec.') + GPM_METRIC_NVLINK_L51_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L51_TX_PER_SEC, 'NvLink write bandwidth for link 51 in MiB/sec.') + GPM_METRIC_NVLINK_L52_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L52_RX_PER_SEC, 'NvLink read bandwidth for link 52 in MiB/sec.') + GPM_METRIC_NVLINK_L52_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L52_TX_PER_SEC, 'NvLink write bandwidth for link 52 in MiB/sec.') + GPM_METRIC_NVLINK_L53_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L53_RX_PER_SEC, 'NvLink read bandwidth for link 53 in MiB/sec.') + GPM_METRIC_NVLINK_L53_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L53_TX_PER_SEC, 'NvLink write bandwidth for link 53 in MiB/sec.') + GPM_METRIC_NVLINK_L54_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L54_RX_PER_SEC, 'NvLink read bandwidth for link 54 in MiB/sec.') + GPM_METRIC_NVLINK_L54_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L54_TX_PER_SEC, 'NvLink write bandwidth for link 54 in MiB/sec.') + GPM_METRIC_NVLINK_L55_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L55_RX_PER_SEC, 'NvLink read bandwidth for link 55 in MiB/sec.') + GPM_METRIC_NVLINK_L55_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L55_TX_PER_SEC, 'NvLink write bandwidth for link 55 in MiB/sec.') + GPM_METRIC_NVLINK_L56_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L56_RX_PER_SEC, 'NvLink read bandwidth for link 56 in MiB/sec.') + GPM_METRIC_NVLINK_L56_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L56_TX_PER_SEC, 'NvLink write bandwidth for link 56 in MiB/sec.') + GPM_METRIC_NVLINK_L57_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L57_RX_PER_SEC, 'NvLink read bandwidth for link 57 in MiB/sec.') + GPM_METRIC_NVLINK_L57_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L57_TX_PER_SEC, 'NvLink write bandwidth for link 57 in MiB/sec.') + GPM_METRIC_NVLINK_L58_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L58_RX_PER_SEC, 'NvLink read bandwidth for link 58 in MiB/sec.') + GPM_METRIC_NVLINK_L58_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L58_TX_PER_SEC, 'NvLink write bandwidth for link 58 in MiB/sec.') + GPM_METRIC_NVLINK_L59_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L59_RX_PER_SEC, 'NvLink read bandwidth for link 59 in MiB/sec.') + GPM_METRIC_NVLINK_L59_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L59_TX_PER_SEC, 'NvLink write bandwidth for link 59 in MiB/sec.') + GPM_METRIC_NVLINK_L60_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L60_RX_PER_SEC, 'NvLink read bandwidth for link 60 in MiB/sec.') + GPM_METRIC_NVLINK_L60_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L60_TX_PER_SEC, 'NvLink write bandwidth for link 60 in MiB/sec.') + GPM_METRIC_NVLINK_L61_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L61_RX_PER_SEC, 'NvLink read bandwidth for link 61 in MiB/sec.') + GPM_METRIC_NVLINK_L61_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L61_TX_PER_SEC, 'NvLink write bandwidth for link 61 in MiB/sec.') + GPM_METRIC_NVLINK_L62_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L62_RX_PER_SEC, 'NvLink read bandwidth for link 62 in MiB/sec.') + GPM_METRIC_NVLINK_L62_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L62_TX_PER_SEC, 'NvLink write bandwidth for link 62 in MiB/sec.') + GPM_METRIC_NVLINK_L63_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L63_RX_PER_SEC, 'NvLink read bandwidth for link 63 in MiB/sec.') + GPM_METRIC_NVLINK_L63_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L63_TX_PER_SEC, 'NvLink write bandwidth for link 63 in MiB/sec.') + GPM_METRIC_NVLINK_L64_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L64_RX_PER_SEC, 'NvLink read bandwidth for link 64 in MiB/sec.') + GPM_METRIC_NVLINK_L64_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L64_TX_PER_SEC, 'NvLink write bandwidth for link 64 in MiB/sec.') + GPM_METRIC_NVLINK_L65_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L65_RX_PER_SEC, 'NvLink read bandwidth for link 65 in MiB/sec.') + GPM_METRIC_NVLINK_L65_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L65_TX_PER_SEC, 'NvLink write bandwidth for link 65 in MiB/sec.') + GPM_METRIC_NVLINK_L66_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L66_RX_PER_SEC, 'NvLink read bandwidth for link 66 in MiB/sec.') + GPM_METRIC_NVLINK_L66_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L66_TX_PER_SEC, 'NvLink write bandwidth for link 66 in MiB/sec.') + GPM_METRIC_NVLINK_L67_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L67_RX_PER_SEC, 'NvLink read bandwidth for link 67 in MiB/sec.') + GPM_METRIC_NVLINK_L67_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L67_TX_PER_SEC, 'NvLink write bandwidth for link 67 in MiB/sec.') + GPM_METRIC_NVLINK_L68_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L68_RX_PER_SEC, 'NvLink read bandwidth for link 68 in MiB/sec.') + GPM_METRIC_NVLINK_L68_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L68_TX_PER_SEC, 'NvLink write bandwidth for link 68 in MiB/sec.') + GPM_METRIC_NVLINK_L69_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L69_RX_PER_SEC, 'NvLink read bandwidth for link 69 in MiB/sec.') + GPM_METRIC_NVLINK_L69_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L69_TX_PER_SEC, 'NvLink write bandwidth for link 69 in MiB/sec.') + GPM_METRIC_NVLINK_L70_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L70_RX_PER_SEC, 'NvLink read bandwidth for link 70 in MiB/sec.') + GPM_METRIC_NVLINK_L70_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L70_TX_PER_SEC, 'NvLink write bandwidth for link 70 in MiB/sec.') + GPM_METRIC_NVLINK_L71_RX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L71_RX_PER_SEC, 'NvLink read bandwidth for link 71 in MiB/sec.') + GPM_METRIC_NVLINK_L71_TX_PER_SEC = (NVML_GPM_METRIC_NVLINK_L71_TX_PER_SEC, 'NvLink write bandwidth for link 71 in MiB/sec.') GPM_METRIC_MAX = (NVML_GPM_METRIC_MAX, 'Maximum value above +1.') class PowerProfileType(_cyb_FastEnum): @@ -1155,6 +1306,16 @@ class PowerProfileType(_cyb_FastEnum): POWER_PROFILE_SYNC_BALANCED = NVML_POWER_PROFILE_SYNC_BALANCED POWER_PROFILE_HPC = NVML_POWER_PROFILE_HPC POWER_PROFILE_MIG = NVML_POWER_PROFILE_MIG + POWER_PROFILE_MAX_Q_1 = NVML_POWER_PROFILE_MAX_Q_1 + POWER_PROFILE_NETWORK_BOUND = NVML_POWER_PROFILE_NETWORK_BOUND + POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE = NVML_POWER_PROFILE_HIGH_THROUGHPUT_INFERENCE + POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE = NVML_POWER_PROFILE_MEDIUM_THROUGHPUT_INFERENCE + POWER_PROFILE_LOW_LATENCY_INFERENCE = NVML_POWER_PROFILE_LOW_LATENCY_INFERENCE + POWER_PROFILE_TRAINING = NVML_POWER_PROFILE_TRAINING + POWER_PROFILE_INFERENCE = NVML_POWER_PROFILE_INFERENCE + POWER_PROFILE_MAX_Q_2 = NVML_POWER_PROFILE_MAX_Q_2 + POWER_PROFILE_MAX_Q_3 = NVML_POWER_PROFILE_MAX_Q_3 + POWER_PROFILE_LOW_PRIORITY_BACKGROUND = NVML_POWER_PROFILE_LOW_PRIORITY_BACKGROUND POWER_PROFILE_MAX = NVML_POWER_PROFILE_MAX class DeviceAddressingModeType(_cyb_FastEnum): @@ -1173,21 +1334,29 @@ class PRMCounterId(_cyb_FastEnum): See `nvmlPRMCounterId_t`. """ - NONE = NVML_PRM_COUNTER_ID_NONE - PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS - PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS - PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS - PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY - PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES - PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT - PPCNT_PLR_RCV_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES - PPCNT_PLR_RCV_CODE_ERR = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR - PPCNT_PLR_RCV_UNCORRECTABLE_CODE = NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE - PPCNT_PLR_XMIT_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES - PPCNT_PLR_XMIT_RETRY_CODES = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES - PPCNT_PLR_XMIT_RETRY_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS - PPCNT_PLR_SYNC_EVENTS = NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS - PPRM_OPER_RECOVERY = NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY + NONE = (NVML_PRM_COUNTER_ID_NONE, 'Sentinel.') + PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_LINK_DOWN_EVENTS, 'PPCNT group 0x12, link_down_events.') + PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PHYSICAL_LAYER_CTRS_SUCCESSFUL_RECOVERY_EVENTS, 'PPCNT group 0x12, successful_recovery_events.') + PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_EVENTS, 'PPCNT group 0x1A, total_successful_recovery_events.') + PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_SINCE_LAST_RECOVERY, 'PPCNT group 0x1A, time_since_last_recovery.') + PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_BETWEEN_LAST_TWO_RECOVERIES, 'PPCNT group 0x1A, time_between_last_two_recoveries.') + PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TIME_IN_LAST_HOST_SERDES_FEQ_RECOVERY, 'PPCNT group 0x1A, time_in_last_host_serdes_feq_recovery.') + PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_TIME_IN_HOST_SERDES_FEQ_RECOVERY, 'PPCNT group 0x1A, total_time_in_host_serdes_feq_recovery.') + PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_RECOVERY_COUNT, 'PPCNT group 0x1A, total_host_serdes_feq_recovery_count.') + PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_HOST_SERDES_FEQ_SUCCESSFUL_RECOVERY_COUNT, 'PPCNT group 0x1A, total_host_serdes_feq_successful_recovery_count.') + PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_HOST_SERDES_FEQ_ATTEMPTS_COUNT, 'PPCNT group 0x1A, last_host_serdes_feq_attempts_count.') + PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_STEP_ATTEMPTS, 'PPCNT group 0x1A, last_successful_recovery_step_attempts.') + PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_LAST_SUCCESSFUL_RECOVERY_TIME, 'PPCNT group 0x1A, last_successful_recovery_time.') + PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME = (NVML_PRM_COUNTER_ID_PPCNT_RECOVERY_CTRS_TOTAL_SUCCESSFUL_RECOVERY_TIME, 'PPCNT group 0x1A, total_successful_recovery_time.') + PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT = (NVML_PRM_COUNTER_ID_PPCNT_PORTCOUNTERS_PORT_XMIT_WAIT, 'PPCNT group 0x20, port_xmit_wait.') + PPCNT_PLR_RCV_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODES, 'PPCNT group 0x22, plr_rcv_codes.') + PPCNT_PLR_RCV_CODE_ERR = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_CODE_ERR, 'PPCNT group 0x22, plr_rcv_code_err.') + PPCNT_PLR_RCV_UNCORRECTABLE_CODE = (NVML_PRM_COUNTER_ID_PPCNT_PLR_RCV_UNCORRECTABLE_CODE, 'PPCNT group 0x22, plr_rcv_uncorrectable_code.') + PPCNT_PLR_XMIT_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_CODES, 'PPCNT group 0x22, plr_xmit_codes.') + PPCNT_PLR_XMIT_RETRY_CODES = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_CODES, 'PPCNT group 0x22, plr_xmit_retry_codes.') + PPCNT_PLR_XMIT_RETRY_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PLR_XMIT_RETRY_EVENTS, 'PPCNT group 0x22, plr_xmit_retry_events.') + PPCNT_PLR_SYNC_EVENTS = (NVML_PRM_COUNTER_ID_PPCNT_PLR_SYNC_EVENTS, 'PPCNT group 0x22, plr_sync_events.') + PPRM_OPER_RECOVERY = (NVML_PRM_COUNTER_ID_PPRM_OPER_RECOVERY, 'PPRM, oper_recovery.') class PowerProfileOperation(_cyb_FastEnum): """ @@ -1221,6 +1390,76 @@ class CPERType(_cyb_FastEnum): """ CPER_ACCESS_TYPE_GPU = (NVML_CPER_ACCESS_TYPE_GPU, 'Access GPU CPER records.') +class GpuOperationalEventLogLevel(_cyb_FastEnum): + """ + Log-level values used by GPU Operational Events. These values are used + both for event reporting in `nvmlEventSetWait_v3_t` and for + subscription filtering in `nvmlGpuOperationalEventConfig_v1_t`. Higher + numeric values represent more selective log levels. + `NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL` disables log-level filtering + when used as a subscription threshold. Event data may contain newer + log-level values that are not named in this header; clients should + handle unrecognized numeric values. + + See `nvmlGpuOperationalEventLogLevel_t`. + """ + ALL = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL, 'Matches all GPU Operational Event log levels.') + TELEMETRY = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_TELEMETRY, 'High-volume telemetry events.') + DIAG = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_DIAG, 'Diagnostic events.') + NOTICE = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_NOTICE, 'Notable operational events.') + WARNING = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_WARNING, 'Warning events.') + ERROR = (NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ERROR, 'Error events.') + +class OperationalEventSeverity(_cyb_FastEnum): + """ + Severity values used by Operational Events. These values are used both + for event reporting in `nvmlEventSetWait_v3_t` and for subscription + filtering in `nvmlGpuOperationalEventConfig_v1_t`. Higher numeric + values represent more selective severities. + `NVML_OPERATIONAL_EVENT_SEVERITY_ALL` disables severity filtering when + used as a subscription threshold. Event data may contain newer severity + values that are not named in this header; clients should handle + unrecognized numeric values. + + See `nvmlOperationalEventSeverity_t`. + """ + ALL = (NVML_OPERATIONAL_EVENT_SEVERITY_ALL, 'Matches all Operational Event severities.') + INFORMATIONAL = (NVML_OPERATIONAL_EVENT_SEVERITY_INFORMATIONAL, 'Informational event.') + CORRECTED = (NVML_OPERATIONAL_EVENT_SEVERITY_CORRECTED, 'Corrected error event.') + RECOVERABLE = (NVML_OPERATIONAL_EVENT_SEVERITY_RECOVERABLE, 'Recoverable error event.') + FATAL = (NVML_OPERATIONAL_EVENT_SEVERITY_FATAL, 'Fatal error event.') + +class EventDataType(_cyb_FastEnum): + """ + Event data formats returned by `nvmlEventSetWait_v3`. + + See `nvmlEventDataType_t`. + """ + EVENT = (NVML_EVENT_DATA_TYPE_NVML_EVENT, 'NVML event-bit data. `eventType` contains an NVML event bit.') + GPU_OPERATIONAL_EVENT = (NVML_EVENT_DATA_TYPE_GPU_OPERATIONAL_EVENT, 'Structured GPU Operational Event data.') + +class GpuOperationalEventContextType(_cyb_FastEnum): + """ + NVML-defined GPU Operational Event context classifications. These + values describe the NVML public interpretation of a context payload. + The original source-defined context type is returned separately in + `nvmlEventSetGetContextInfo_v1_t.sourceEventContextType`. + + See `nvmlGpuOperationalEventContextType_t`. + """ + UNKNOWN = (NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_UNKNOWN, 'No NVML public interpretation is defined for this context payload.') + LEGACY_XID = (NVML_GPU_OPERATIONAL_EVENT_CONTEXT_TYPE_LEGACY_XID, 'Context payload can be decoded with `nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1`.') + +class NvlinkTelemetrySampleType(_cyb_FastEnum): + """ + Per-link NVLink telemetry sample types. + + See `nvmlNvlinkTelemetrySampleType_t`. + """ + THROUGHPUT_RAW_TX = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_TX, 'Raw TX flit counter for a single link.') + THROUGHPUT_RAW_RX = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_THROUGHPUT_RAW_RX, 'Raw RX flit counter for a single link.') + COUNT = (NVML_NVLINK_TELEMETRY_SAMPLE_TYPE_COUNT, 'Number of valid sample types.') + class AffinityScope(_FastEnum): NODE = (0, "Scope of NUMA node for affinity queries") @@ -1608,6 +1847,11 @@ class FieldId(_FastEnum): PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_TAR_WIN_MULT = (287, "Current primary floor target window multiplier value for admin override") PWR_SMOOTHING_ADMIN_OVERRIDE_PRIMARY_FLOOR_ACT_OFFSET = (288, "Current primary floor activation offset value in Watts for admin override") + DEV_ACTIVE_BANK_REMAPPINGS = (303, "Number of active bank remappings") + DEV_INACTIVE_BANK_REMAPPINGS = (304, "Number of inactive bank remappings") + DEV_BANK_REMAPPER_HISTOGRAM_MAX = (305, "Number of groups with full bank remap availability") + DEV_BANK_REMAPPER_HISTOGRAM_NONE = (306, "Number of groups with no spare bank remap availability") + DEV_PENDING_BANK_REMAPPING = (307, "If any banks are pending remapping. 1=yes 0=no") NVLINK_MAX_LINKS = 18 @@ -1643,6 +1887,9 @@ class DeviceArch(_FastEnum): ADA = 8 HOPPER = 9 BLACKWELL = 10 + DLA = 11 + DLA2 = 12 + NPU3 = 15 UNKNOWN = 0xFFFFFFFF @@ -1804,6 +2051,8 @@ class ClocksEventReasons(_FastEnum): THROTTLE_REASON_HW_THERMAL_SLOWDOWN = 0x0000000000000040 THROTTLE_REASON_HW_POWER_BRAKE_SLOWDOWN = 0x0000000000000080 EVENT_REASON_DISPLAY_CLOCK_SETTING = 0x0000000000000100 + EVENT_REASON_BOARD_LIMIT = 0x0000000000000200 + EVENT_REASON_RELIABILITY = 0x0000000000000400 EVENT_REASON_NONE = 0x0000000000000000 @@ -1920,6 +2169,7 @@ class NvlinkState(_FastEnum): INACTIVE = 0x0 ACTIVE = 0x1 SLEEP = 0x2 + ACTIVE_TRAFFIC_DISABLED = 0x3 class NvlinkFirmwareUcodeType(_FastEnum): @@ -15047,7 +15297,7 @@ cdef class GpuFabricInfo_v3: @property def version(self): - """int: Structure version identifier (set to nvmlGpuFabricInfo_v2).""" + """int: Structure version identifier (set to nvmlGpuFabricInfo_v3).""" return self._ptr[0].version @version.setter @@ -16895,49 +17145,52 @@ cdef class CPERCursor_v1: return obj -cdef _get_excluded_device_info_dtype_offsets(): - cdef nvmlExcludedDeviceInfo_t pod +cdef _get_set_memory_limits_v1_dtype_offsets(): + cdef nvmlSetMemoryLimits_v1_t pod return _numpy.dtype({ - 'names': ['pci_info', 'uuid'], - 'formats': [pci_info_dtype, (_numpy.int8, 80)], + 'names': ['name_space', 'soft_limit', 'hard_limit'], + 'formats': [_numpy.intp, _numpy.uint64, _numpy.uint64], 'offsets': [ - (&(pod.pciInfo)) - (&pod), - (&(pod.uuid)) - (&pod), + (&(pod.nameSpace)) - (&pod), + (&(pod.softLimit)) - (&pod), + (&(pod.hardLimit)) - (&pod), ], - 'itemsize': sizeof(nvmlExcludedDeviceInfo_t), + 'itemsize': sizeof(nvmlSetMemoryLimits_v1_t), }) -excluded_device_info_dtype = _get_excluded_device_info_dtype_offsets() +set_memory_limits_v1_dtype = _get_set_memory_limits_v1_dtype_offsets() -cdef class ExcludedDeviceInfo: - """Empty-initialize an instance of `nvmlExcludedDeviceInfo_t`. +cdef class SetMemoryLimits_v1: + """Empty-initialize an instance of `nvmlSetMemoryLimits_v1_t`. - .. seealso:: `nvmlExcludedDeviceInfo_t` + .. seealso:: `nvmlSetMemoryLimits_v1_t` """ cdef: - nvmlExcludedDeviceInfo_t *_ptr + nvmlSetMemoryLimits_v1_t *_ptr object _owner bint _owned bint _readonly + dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlSetMemoryLimits_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ExcludedDeviceInfo") + raise MemoryError("Error allocating SetMemoryLimits_v1") self._owner = None self._owned = True self._readonly = False + self._refs = {} def __dealloc__(self): - cdef nvmlExcludedDeviceInfo_t *ptr + cdef nvmlSetMemoryLimits_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" + return f"<{__name__}.SetMemoryLimits_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -16951,24 +17204,24 @@ cdef class ExcludedDeviceInfo: return (self._ptr) def __eq__(self, other): - cdef ExcludedDeviceInfo other_ - if not isinstance(other, ExcludedDeviceInfo): + cdef SetMemoryLimits_v1 other_ + if not isinstance(other, SetMemoryLimits_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlSetMemoryLimits_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlSetMemoryLimits_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlSetMemoryLimits_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) + raise MemoryError("Error allocating SetMemoryLimits_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlSetMemoryLimits_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -16976,53 +17229,61 @@ cdef class ExcludedDeviceInfo: setattr(self, key, val) @property - def pci_info(self): - """PciInfo: """ - return PciInfo.from_ptr( - &(self._ptr[0].pciInfo), - readonly=self._readonly, - owner=self, - ) + def name_space(self): + """str: [in] Full path to sysfs cgroup file name""" + cdef char* ptr = self._ptr[0].nameSpace + if ptr: + return _cyb_cpython.PyUnicode_FromString(ptr) + return "" - @pci_info.setter - def pci_info(self, val): + @name_space.setter + def name_space(self, val): if self._readonly: - raise ValueError("This ExcludedDeviceInfo instance is read-only") - cdef PciInfo val_ = val - _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) + raise ValueError("This SetMemoryLimits_v1 instance is read-only") + cdef bytes buf = val.encode() + cdef char *ptr = buf + self._refs["name_space"] = buf + self._ptr[0].nameSpace = ptr @property - def uuid(self): - """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) + def soft_limit(self): + """int: [in] Soft memory limit in Bytes.""" + return self._ptr[0].softLimit - @uuid.setter - def uuid(self, val): + @soft_limit.setter + def soft_limit(self, val): if self._readonly: - raise ValueError("This ExcludedDeviceInfo instance is read-only") - cdef bytes buf = val.encode() - if len(buf) >= 80: - raise ValueError("String too long for field uuid, max length is 79") - cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].uuid), ptr, 80) + raise ValueError("This SetMemoryLimits_v1 instance is read-only") + self._ptr[0].softLimit = val + + @property + def hard_limit(self): + """int: [in] Hard memory limit in Bytes.""" + return self._ptr[0].hardLimit + + @hard_limit.setter + def hard_limit(self, val): + if self._readonly: + raise ValueError("This SetMemoryLimits_v1 instance is read-only") + self._ptr[0].hardLimit = val @staticmethod def from_buffer(buffer): - """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) + """Create an SetMemoryLimits_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlSetMemoryLimits_v1_t), SetMemoryLimits_v1) @staticmethod def from_data(data): - """Create an ExcludedDeviceInfo instance wrapping the given NumPy array. + """Create an SetMemoryLimits_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `set_memory_limits_v1_dtype` holding the data. """ - return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) + return _cyb_from_data(data, "set_memory_limits_v1_dtype", set_memory_limits_v1_dtype, SetMemoryLimits_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an ExcludedDeviceInfo instance wrapping the given pointer. + """Create an SetMemoryLimits_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -17031,69 +17292,70 @@ cdef class ExcludedDeviceInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) + cdef SetMemoryLimits_v1 obj = SetMemoryLimits_v1.__new__(SetMemoryLimits_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlSetMemoryLimits_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating ExcludedDeviceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) + raise MemoryError("Error allocating SetMemoryLimits_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlSetMemoryLimits_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly + obj._refs = {} return obj -cdef _get_process_detail_list_v1_dtype_offsets(): - cdef nvmlProcessDetailList_v1_t pod +cdef _get_get_memory_limits_v1_dtype_offsets(): + cdef nvmlGetMemoryLimits_v1_t pod return _numpy.dtype({ - 'names': ['version', 'mode', 'num_proc_array_entries', 'proc_array'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp], + 'names': ['name_space', 'soft_limit', 'hard_limit', 'current_used'], + 'formats': [_numpy.intp, _numpy.uint64, _numpy.uint64, _numpy.uint64], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.mode)) - (&pod), - (&(pod.numProcArrayEntries)) - (&pod), - (&(pod.procArray)) - (&pod), + (&(pod.nameSpace)) - (&pod), + (&(pod.softLimit)) - (&pod), + (&(pod.hardLimit)) - (&pod), + (&(pod.currentUsed)) - (&pod), ], - 'itemsize': sizeof(nvmlProcessDetailList_v1_t), + 'itemsize': sizeof(nvmlGetMemoryLimits_v1_t), }) -process_detail_list_v1_dtype = _get_process_detail_list_v1_dtype_offsets() +get_memory_limits_v1_dtype = _get_get_memory_limits_v1_dtype_offsets() -cdef class ProcessDetailList_v1: - """Empty-initialize an instance of `nvmlProcessDetailList_v1_t`. +cdef class GetMemoryLimits_v1: + """Empty-initialize an instance of `nvmlGetMemoryLimits_v1_t`. - .. seealso:: `nvmlProcessDetailList_v1_t` + .. seealso:: `nvmlGetMemoryLimits_v1_t` """ cdef: - nvmlProcessDetailList_v1_t *_ptr + nvmlGetMemoryLimits_v1_t *_ptr object _owner bint _owned bint _readonly dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGetMemoryLimits_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ProcessDetailList_v1") + raise MemoryError("Error allocating GetMemoryLimits_v1") self._owner = None self._owned = True self._readonly = False self._refs = {} def __dealloc__(self): - cdef nvmlProcessDetailList_v1_t *ptr + cdef nvmlGetMemoryLimits_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" + return f"<{__name__}.GetMemoryLimits_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -17107,24 +17369,24 @@ cdef class ProcessDetailList_v1: return (self._ptr) def __eq__(self, other): - cdef ProcessDetailList_v1 other_ - if not isinstance(other, ProcessDetailList_v1): + cdef GetMemoryLimits_v1 other_ + if not isinstance(other, GetMemoryLimits_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGetMemoryLimits_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGetMemoryLimits_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGetMemoryLimits_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) + raise MemoryError("Error allocating GetMemoryLimits_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGetMemoryLimits_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -17132,65 +17394,72 @@ cdef class ProcessDetailList_v1: setattr(self, key, val) @property - def version(self): - """int: Struct version, MUST be nvmlProcessDetailList_v1.""" - return self._ptr[0].version + def name_space(self): + """str: [in] Full path to sysfs cgroup file name""" + cdef char* ptr = self._ptr[0].nameSpace + if ptr: + return _cyb_cpython.PyUnicode_FromString(ptr) + return "" - @version.setter - def version(self, val): + @name_space.setter + def name_space(self, val): if self._readonly: - raise ValueError("This ProcessDetailList_v1 instance is read-only") - self._ptr[0].version = val + raise ValueError("This GetMemoryLimits_v1 instance is read-only") + cdef bytes buf = val.encode() + cdef char *ptr = buf + self._refs["name_space"] = buf + self._ptr[0].nameSpace = ptr @property - def mode(self): - """int: Process mode, One of `nvmlProcessMode_t`.""" - return self._ptr[0].mode + def soft_limit(self): + """int: [out] Currently set soft memory limit in Bytes.""" + return self._ptr[0].softLimit - @mode.setter - def mode(self, val): + @soft_limit.setter + def soft_limit(self, val): if self._readonly: - raise ValueError("This ProcessDetailList_v1 instance is read-only") - self._ptr[0].mode = val + raise ValueError("This GetMemoryLimits_v1 instance is read-only") + self._ptr[0].softLimit = val @property - def proc_array(self): - """int: Process array.""" - if self._ptr[0].procArray == NULL or self._ptr[0].numProcArrayEntries == 0: - return [] - return ProcessDetail_v1.from_ptr( - (self._ptr[0].procArray), - self._ptr[0].numProcArrayEntries, - owner=self, - readonly=self._readonly - ) + def hard_limit(self): + """int: [out] Currently set hard memory limit in Bytes.""" + return self._ptr[0].hardLimit - @proc_array.setter - def proc_array(self, val): + @hard_limit.setter + def hard_limit(self, val): if self._readonly: - raise ValueError("This ProcessDetailList_v1 instance is read-only") - cdef ProcessDetail_v1 arr = val - self._ptr[0].procArray = (arr._get_ptr()) - self._ptr[0].numProcArrayEntries = len(arr) - self._refs["proc_array"] = arr + raise ValueError("This GetMemoryLimits_v1 instance is read-only") + self._ptr[0].hardLimit = val + + @property + def current_used(self): + """int: [out] Currently used memory in Bytes.""" + return self._ptr[0].currentUsed + + @current_used.setter + def current_used(self, val): + if self._readonly: + raise ValueError("This GetMemoryLimits_v1 instance is read-only") + self._ptr[0].currentUsed = val @staticmethod def from_buffer(buffer): - """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) + """Create an GetMemoryLimits_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGetMemoryLimits_v1_t), GetMemoryLimits_v1) @staticmethod def from_data(data): - """Create an ProcessDetailList_v1 instance wrapping the given NumPy array. + """Create an GetMemoryLimits_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `get_memory_limits_v1_dtype` holding the data. """ - return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) + return _cyb_from_data(data, "get_memory_limits_v1_dtype", get_memory_limits_v1_dtype, GetMemoryLimits_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an ProcessDetailList_v1 instance wrapping the given pointer. + """Create an GetMemoryLimits_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -17199,16 +17468,16 @@ cdef class ProcessDetailList_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) + cdef GetMemoryLimits_v1 obj = GetMemoryLimits_v1.__new__(GetMemoryLimits_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGetMemoryLimits_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating ProcessDetailList_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) + raise MemoryError("Error allocating GetMemoryLimits_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGetMemoryLimits_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -17216,188 +17485,190 @@ cdef class ProcessDetailList_v1: return obj -cdef _get_bridge_chip_hierarchy_dtype_offsets(): - cdef nvmlBridgeChipHierarchy_t pod +cdef _get_pmgr_pwr_tuple_dtype_offsets(): + cdef nvmlPmgrPwrTuple_t pod return _numpy.dtype({ - 'names': ['bridge_count', 'bridge_chip_info'], - 'formats': [_numpy.uint8, (bridge_chip_info_dtype, 128)], + 'names': ['pwrm_w'], + 'formats': [_numpy.uint32], 'offsets': [ - (&(pod.bridgeCount)) - (&pod), - (&(pod.bridgeChipInfo)) - (&pod), + (&(pod.pwrmW)) - (&pod), ], - 'itemsize': sizeof(nvmlBridgeChipHierarchy_t), + 'itemsize': sizeof(nvmlPmgrPwrTuple_t), }) -bridge_chip_hierarchy_dtype = _get_bridge_chip_hierarchy_dtype_offsets() +pmgr_pwr_tuple_dtype = _get_pmgr_pwr_tuple_dtype_offsets() -cdef class BridgeChipHierarchy: - """Empty-initialize an instance of `nvmlBridgeChipHierarchy_t`. +cdef class PmgrPwrTuple: + """Empty-initialize an array of `nvmlPmgrPwrTuple_t`. + The resulting object is of length `size` and of dtype `pmgr_pwr_tuple_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlBridgeChipHierarchy_t` + .. seealso:: `nvmlPmgrPwrTuple_t` """ cdef: - nvmlBridgeChipHierarchy_t *_ptr + readonly object _data object _owner - bint _owned - bint _readonly - - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating BridgeChipHierarchy") - self._owner = None - self._owned = True - self._readonly = False - def __dealloc__(self): - cdef nvmlBridgeChipHierarchy_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=pmgr_pwr_tuple_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPmgrPwrTuple_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPmgrPwrTuple_t) }" def __repr__(self): - return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" + if self._data.size > 1: + return f"<{__name__}.PmgrPwrTuple_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.PmgrPwrTuple object at {hex(id(self))}>" @property def ptr(self): """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + return self._data.ctypes.data cdef intptr_t _get_ptr(self): - return (self._ptr) + return self._data.ctypes.data def __int__(self): - return (self._ptr) + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size def __eq__(self, other): - cdef BridgeChipHierarchy other_ - if not isinstance(other, BridgeChipHierarchy): + cdef object self_data = self._data + if (not isinstance(other, PmgrPwrTuple)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) + return bool((self_data == other._data).all()) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - pass - - def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable - else: - setattr(self, key, val) + _cyb_cpython.PyBuffer_Release(buffer) @property - def bridge_chip_info(self): - """BridgeChipInfo: """ - return BridgeChipInfo.from_ptr( - &(self._ptr[0].bridgeChipInfo), - self._ptr[0].bridgeCount, - readonly=self._readonly, - owner=self, - ) + def pwrm_w(self): + """Union[~_numpy.uint32, int]: Power consumption in milliwatts.""" + if self._data.size == 1: + return int(self._data.pwrm_w[0]) + return self._data.pwrm_w - @bridge_chip_info.setter - def bridge_chip_info(self, val): - if self._readonly: - raise ValueError("This BridgeChipHierarchy instance is read-only") - cdef BridgeChipInfo val_ = val - if len(val) > 128: - raise ValueError(f"Expected length < 128 for field bridge_chip_info, got {len(val)}") - self._ptr[0].bridgeCount = len(val) - if len(val) == 0: - return - _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) + @pwrm_w.setter + def pwrm_w(self, val): + self._data.pwrm_w = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PmgrPwrTuple.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == pmgr_pwr_tuple_dtype: + return PmgrPwrTuple.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) + """Create an PmgrPwrTuple instance with the memory from the given buffer.""" + return PmgrPwrTuple.from_data(_numpy.frombuffer(buffer, dtype=pmgr_pwr_tuple_dtype)) @staticmethod def from_data(data): - """Create an BridgeChipHierarchy instance wrapping the given NumPy array. + """Create an PmgrPwrTuple instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `pmgr_pwr_tuple_dtype` holding the data. """ - return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) + cdef PmgrPwrTuple obj = PmgrPwrTuple.__new__(PmgrPwrTuple) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != pmgr_pwr_tuple_dtype: + raise ValueError("data array must be of dtype pmgr_pwr_tuple_dtype") + obj._data = data.view(_numpy.recarray) + + return obj @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an BridgeChipHierarchy instance wrapping the given pointer. + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PmgrPwrTuple instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. + size (int): number of structs, default=1. readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating BridgeChipHierarchy") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly + cdef PmgrPwrTuple obj = PmgrPwrTuple.__new__(PmgrPwrTuple) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPmgrPwrTuple_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=pmgr_pwr_tuple_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + return obj -cdef _get_sample_dtype_offsets(): - cdef nvmlSample_t pod +cdef _get_rail_metrics_dtype_offsets(): + cdef nvmlRailMetrics_t pod return _numpy.dtype({ - 'names': ['time_stamp', 'sample_value'], - 'formats': [_numpy.uint64, value_dtype], + 'names': ['freqk_hz', 'util_pct'], + 'formats': [_numpy.uint32, _numpy.uint64], 'offsets': [ - (&(pod.timeStamp)) - (&pod), - (&(pod.sampleValue)) - (&pod), + (&(pod.freqkHz)) - (&pod), + (&(pod.utilPct)) - (&pod), ], - 'itemsize': sizeof(nvmlSample_t), + 'itemsize': sizeof(nvmlRailMetrics_t), }) -sample_dtype = _get_sample_dtype_offsets() +rail_metrics_dtype = _get_rail_metrics_dtype_offsets() -cdef class Sample: - """Empty-initialize an array of `nvmlSample_t`. - The resulting object is of length `size` and of dtype `sample_dtype`. +cdef class RailMetrics: + """Empty-initialize an array of `nvmlRailMetrics_t`. + The resulting object is of length `size` and of dtype `rail_metrics_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlSample_t` + .. seealso:: `nvmlRailMetrics_t` """ cdef: readonly object _data object _owner def __init__(self, size=1): - arr = _numpy.empty(size, dtype=sample_dtype) + arr = _numpy.empty(size, dtype=rail_metrics_dtype) self._data = arr.view(_numpy.recarray) - assert self._data.itemsize == sizeof(nvmlSample_t), \ - f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlSample_t) }" + assert self._data.itemsize == sizeof(nvmlRailMetrics_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlRailMetrics_t) }" def __repr__(self): if self._data.size > 1: - return f"<{__name__}.Sample_Array_{self._data.size} object at {hex(id(self))}>" + return f"<{__name__}.RailMetrics_Array_{self._data.size} object at {hex(id(self))}>" else: - return f"<{__name__}.Sample object at {hex(id(self))}>" + return f"<{__name__}.RailMetrics object at {hex(id(self))}>" @property def ptr(self): @@ -17418,7 +17689,7 @@ cdef class Sample: def __eq__(self, other): cdef object self_data = self._data - if (not isinstance(other, Sample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + if (not isinstance(other, RailMetrics)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False return bool((self_data == other._data).all()) @@ -17429,24 +17700,26 @@ cdef class Sample: _cyb_cpython.PyBuffer_Release(buffer) @property - def time_stamp(self): - """Union[~_numpy.uint64, int]: """ + def freqk_hz(self): + """Union[~_numpy.uint32, int]: Frequency in kilohertz.""" if self._data.size == 1: - return int(self._data.time_stamp[0]) - return self._data.time_stamp + return int(self._data.freqk_hz[0]) + return self._data.freqk_hz - @time_stamp.setter - def time_stamp(self, val): - self._data.time_stamp = val + @freqk_hz.setter + def freqk_hz(self, val): + self._data.freqk_hz = val @property - def sample_value(self): - """value_dtype: """ - return self._data.sample_value + def util_pct(self): + """Union[~_numpy.uint64, int]: Utilization percentage (fixed-point).""" + if self._data.size == 1: + return int(self._data.util_pct[0]) + return self._data.util_pct - @sample_value.setter - def sample_value(self, val): - self._data.sample_value = val + @util_pct.setter + def util_pct(self, val): + self._data.util_pct = val def __getitem__(self, key): cdef ssize_t key_ @@ -17458,10 +17731,10 @@ cdef class Sample: raise IndexError("index is out of bounds") if key_ < 0: key_ += size - return Sample.from_data(self._data[key_:key_+1]) + return RailMetrics.from_data(self._data[key_:key_+1]) out = self._data[key] - if isinstance(out, _numpy.recarray) and out.dtype == sample_dtype: - return Sample.from_data(out) + if isinstance(out, _numpy.recarray) and out.dtype == rail_metrics_dtype: + return RailMetrics.from_data(out) return out def __setitem__(self, key, val): @@ -17469,30 +17742,30 @@ cdef class Sample: @staticmethod def from_buffer(buffer): - """Create an Sample instance with the memory from the given buffer.""" - return Sample.from_data(_numpy.frombuffer(buffer, dtype=sample_dtype)) + """Create an RailMetrics instance with the memory from the given buffer.""" + return RailMetrics.from_data(_numpy.frombuffer(buffer, dtype=rail_metrics_dtype)) @staticmethod def from_data(data): - """Create an Sample instance wrapping the given NumPy array. + """Create an RailMetrics instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a 1D array of dtype `sample_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `rail_metrics_dtype` holding the data. """ - cdef Sample obj = Sample.__new__(Sample) + cdef RailMetrics obj = RailMetrics.__new__(RailMetrics) if not isinstance(data, _numpy.ndarray): raise TypeError("data argument must be a NumPy ndarray") if data.ndim != 1: raise ValueError("data array must be 1D") - if data.dtype != sample_dtype: - raise ValueError("data array must be of dtype sample_dtype") + if data.dtype != rail_metrics_dtype: + raise ValueError("data array must be of dtype rail_metrics_dtype") obj._data = data.view(_numpy.recarray) return obj @staticmethod def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): - """Create an Sample instance wrapping the given pointer. + """Create an RailMetrics instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -17503,60 +17776,55 @@ cdef class Sample: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef Sample obj = Sample.__new__(Sample) + cdef RailMetrics obj = RailMetrics.__new__(RailMetrics) cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( - ptr, sizeof(nvmlSample_t) * size, flag) - data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) + ptr, sizeof(nvmlRailMetrics_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=rail_metrics_dtype) obj._data = data.view(_numpy.recarray) obj._owner = owner return obj -cdef _get_vgpu_instance_utilization_sample_dtype_offsets(): - cdef nvmlVgpuInstanceUtilizationSample_t pod +cdef _get_pwr_model_metrics_dlppm1x_perf_dtype_offsets(): + cdef nvmlPwrModelMetricsDlppm1xPerf_t pod return _numpy.dtype({ - 'names': ['vgpu_instance', 'time_stamp', 'sm_util', 'mem_util', 'enc_util', 'dec_util'], - 'formats': [_numpy.uint32, _numpy.uint64, value_dtype, value_dtype, value_dtype, value_dtype], + 'names': ['perfms'], + 'formats': [_numpy.uint32], 'offsets': [ - (&(pod.vgpuInstance)) - (&pod), - (&(pod.timeStamp)) - (&pod), - (&(pod.smUtil)) - (&pod), - (&(pod.memUtil)) - (&pod), - (&(pod.encUtil)) - (&pod), - (&(pod.decUtil)) - (&pod), + (&(pod.perfms)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuInstanceUtilizationSample_t), + 'itemsize': sizeof(nvmlPwrModelMetricsDlppm1xPerf_t), }) -vgpu_instance_utilization_sample_dtype = _get_vgpu_instance_utilization_sample_dtype_offsets() +pwr_model_metrics_dlppm1x_perf_dtype = _get_pwr_model_metrics_dlppm1x_perf_dtype_offsets() -cdef class VgpuInstanceUtilizationSample: - """Empty-initialize an array of `nvmlVgpuInstanceUtilizationSample_t`. - The resulting object is of length `size` and of dtype `vgpu_instance_utilization_sample_dtype`. +cdef class PwrModelMetricsDlppm1xPerf: + """Empty-initialize an array of `nvmlPwrModelMetricsDlppm1xPerf_t`. + The resulting object is of length `size` and of dtype `pwr_model_metrics_dlppm1x_perf_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuInstanceUtilizationSample_t` + .. seealso:: `nvmlPwrModelMetricsDlppm1xPerf_t` """ cdef: readonly object _data object _owner def __init__(self, size=1): - arr = _numpy.empty(size, dtype=vgpu_instance_utilization_sample_dtype) + arr = _numpy.empty(size, dtype=pwr_model_metrics_dlppm1x_perf_dtype) self._data = arr.view(_numpy.recarray) - assert self._data.itemsize == sizeof(nvmlVgpuInstanceUtilizationSample_t), \ - f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlVgpuInstanceUtilizationSample_t) }" + assert self._data.itemsize == sizeof(nvmlPwrModelMetricsDlppm1xPerf_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPwrModelMetricsDlppm1xPerf_t) }" def __repr__(self): if self._data.size > 1: - return f"<{__name__}.VgpuInstanceUtilizationSample_Array_{self._data.size} object at {hex(id(self))}>" + return f"<{__name__}.PwrModelMetricsDlppm1xPerf_Array_{self._data.size} object at {hex(id(self))}>" else: - return f"<{__name__}.VgpuInstanceUtilizationSample object at {hex(id(self))}>" + return f"<{__name__}.PwrModelMetricsDlppm1xPerf object at {hex(id(self))}>" @property def ptr(self): @@ -17577,7 +17845,7 @@ cdef class VgpuInstanceUtilizationSample: def __eq__(self, other): cdef object self_data = self._data - if (not isinstance(other, VgpuInstanceUtilizationSample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + if (not isinstance(other, PwrModelMetricsDlppm1xPerf)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False return bool((self_data == other._data).all()) @@ -17588,62 +17856,15 @@ cdef class VgpuInstanceUtilizationSample: _cyb_cpython.PyBuffer_Release(buffer) @property - def vgpu_instance(self): - """Union[~_numpy.uint32, int]: """ - if self._data.size == 1: - return int(self._data.vgpu_instance[0]) - return self._data.vgpu_instance - - @vgpu_instance.setter - def vgpu_instance(self, val): - self._data.vgpu_instance = val - - @property - def time_stamp(self): - """Union[~_numpy.uint64, int]: """ + def perfms(self): + """Union[~_numpy.uint32, int]: Performance metric in milliseconds.""" if self._data.size == 1: - return int(self._data.time_stamp[0]) - return self._data.time_stamp - - @time_stamp.setter - def time_stamp(self, val): - self._data.time_stamp = val - - @property - def sm_util(self): - """value_dtype: """ - return self._data.sm_util - - @sm_util.setter - def sm_util(self, val): - self._data.sm_util = val - - @property - def mem_util(self): - """value_dtype: """ - return self._data.mem_util - - @mem_util.setter - def mem_util(self, val): - self._data.mem_util = val + return int(self._data.perfms[0]) + return self._data.perfms - @property - def enc_util(self): - """value_dtype: """ - return self._data.enc_util - - @enc_util.setter - def enc_util(self, val): - self._data.enc_util = val - - @property - def dec_util(self): - """value_dtype: """ - return self._data.dec_util - - @dec_util.setter - def dec_util(self, val): - self._data.dec_util = val + @perfms.setter + def perfms(self, val): + self._data.perfms = val def __getitem__(self, key): cdef ssize_t key_ @@ -17655,10 +17876,10 @@ cdef class VgpuInstanceUtilizationSample: raise IndexError("index is out of bounds") if key_ < 0: key_ += size - return VgpuInstanceUtilizationSample.from_data(self._data[key_:key_+1]) + return PwrModelMetricsDlppm1xPerf.from_data(self._data[key_:key_+1]) out = self._data[key] - if isinstance(out, _numpy.recarray) and out.dtype == vgpu_instance_utilization_sample_dtype: - return VgpuInstanceUtilizationSample.from_data(out) + if isinstance(out, _numpy.recarray) and out.dtype == pwr_model_metrics_dlppm1x_perf_dtype: + return PwrModelMetricsDlppm1xPerf.from_data(out) return out def __setitem__(self, key, val): @@ -17666,30 +17887,30 @@ cdef class VgpuInstanceUtilizationSample: @staticmethod def from_buffer(buffer): - """Create an VgpuInstanceUtilizationSample instance with the memory from the given buffer.""" - return VgpuInstanceUtilizationSample.from_data(_numpy.frombuffer(buffer, dtype=vgpu_instance_utilization_sample_dtype)) + """Create an PwrModelMetricsDlppm1xPerf instance with the memory from the given buffer.""" + return PwrModelMetricsDlppm1xPerf.from_data(_numpy.frombuffer(buffer, dtype=pwr_model_metrics_dlppm1x_perf_dtype)) @staticmethod def from_data(data): - """Create an VgpuInstanceUtilizationSample instance wrapping the given NumPy array. + """Create an PwrModelMetricsDlppm1xPerf instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a 1D array of dtype `vgpu_instance_utilization_sample_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `pwr_model_metrics_dlppm1x_perf_dtype` holding the data. """ - cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) + cdef PwrModelMetricsDlppm1xPerf obj = PwrModelMetricsDlppm1xPerf.__new__(PwrModelMetricsDlppm1xPerf) if not isinstance(data, _numpy.ndarray): raise TypeError("data argument must be a NumPy ndarray") if data.ndim != 1: raise ValueError("data array must be 1D") - if data.dtype != vgpu_instance_utilization_sample_dtype: - raise ValueError("data array must be of dtype vgpu_instance_utilization_sample_dtype") + if data.dtype != pwr_model_metrics_dlppm1x_perf_dtype: + raise ValueError("data array must be of dtype pwr_model_metrics_dlppm1x_perf_dtype") obj._data = data.view(_numpy.recarray) return obj @staticmethod def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): - """Create an VgpuInstanceUtilizationSample instance wrapping the given pointer. + """Create an PwrModelMetricsDlppm1xPerf instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -17700,62 +17921,56 @@ cdef class VgpuInstanceUtilizationSample: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) + cdef PwrModelMetricsDlppm1xPerf obj = PwrModelMetricsDlppm1xPerf.__new__(PwrModelMetricsDlppm1xPerf) cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( - ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) - data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) + ptr, sizeof(nvmlPwrModelMetricsDlppm1xPerf_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=pwr_model_metrics_dlppm1x_perf_dtype) obj._data = data.view(_numpy.recarray) obj._owner = owner return obj -cdef _get_vgpu_instance_utilization_info_v1_dtype_offsets(): - cdef nvmlVgpuInstanceUtilizationInfo_v1_t pod +cdef _get_pwr_model_metrics_sample_pfpp1x_dtype_offsets(): + cdef nvmlPwrModelMetricsSamplePfpp1x_t pod return _numpy.dtype({ - 'names': ['time_stamp', 'vgpu_instance', 'sm_util', 'mem_util', 'enc_util', 'dec_util', 'jpg_util', 'ofa_util'], - 'formats': [_numpy.uint64, _numpy.uint32, value_dtype, value_dtype, value_dtype, value_dtype, value_dtype, value_dtype], + 'names': ['freqk_hz', 'est_tgp_pwrm_w'], + 'formats': [(_numpy.uint32, 16), _numpy.uint32], 'offsets': [ - (&(pod.timeStamp)) - (&pod), - (&(pod.vgpuInstance)) - (&pod), - (&(pod.smUtil)) - (&pod), - (&(pod.memUtil)) - (&pod), - (&(pod.encUtil)) - (&pod), - (&(pod.decUtil)) - (&pod), - (&(pod.jpgUtil)) - (&pod), - (&(pod.ofaUtil)) - (&pod), + (&(pod.freqkHz)) - (&pod), + (&(pod.estTgpPwrmW)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t), + 'itemsize': sizeof(nvmlPwrModelMetricsSamplePfpp1x_t), }) -vgpu_instance_utilization_info_v1_dtype = _get_vgpu_instance_utilization_info_v1_dtype_offsets() +pwr_model_metrics_sample_pfpp1x_dtype = _get_pwr_model_metrics_sample_pfpp1x_dtype_offsets() -cdef class VgpuInstanceUtilizationInfo_v1: - """Empty-initialize an array of `nvmlVgpuInstanceUtilizationInfo_v1_t`. - The resulting object is of length `size` and of dtype `vgpu_instance_utilization_info_v1_dtype`. +cdef class PwrModelMetricsSamplePfpp1x: + """Empty-initialize an array of `nvmlPwrModelMetricsSamplePfpp1x_t`. + The resulting object is of length `size` and of dtype `pwr_model_metrics_sample_pfpp1x_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuInstanceUtilizationInfo_v1_t` + .. seealso:: `nvmlPwrModelMetricsSamplePfpp1x_t` """ cdef: readonly object _data object _owner def __init__(self, size=1): - arr = _numpy.empty(size, dtype=vgpu_instance_utilization_info_v1_dtype) + arr = _numpy.empty(size, dtype=pwr_model_metrics_sample_pfpp1x_dtype) self._data = arr.view(_numpy.recarray) - assert self._data.itemsize == sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t), \ - f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) }" + assert self._data.itemsize == sizeof(nvmlPwrModelMetricsSamplePfpp1x_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPwrModelMetricsSamplePfpp1x_t) }" def __repr__(self): if self._data.size > 1: - return f"<{__name__}.VgpuInstanceUtilizationInfo_v1_Array_{self._data.size} object at {hex(id(self))}>" + return f"<{__name__}.PwrModelMetricsSamplePfpp1x_Array_{self._data.size} object at {hex(id(self))}>" else: - return f"<{__name__}.VgpuInstanceUtilizationInfo_v1 object at {hex(id(self))}>" + return f"<{__name__}.PwrModelMetricsSamplePfpp1x object at {hex(id(self))}>" @property def ptr(self): @@ -17776,7 +17991,7 @@ cdef class VgpuInstanceUtilizationInfo_v1: def __eq__(self, other): cdef object self_data = self._data - if (not isinstance(other, VgpuInstanceUtilizationInfo_v1)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + if (not isinstance(other, PwrModelMetricsSamplePfpp1x)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False return bool((self_data == other._data).all()) @@ -17787,126 +18002,70 @@ cdef class VgpuInstanceUtilizationInfo_v1: _cyb_cpython.PyBuffer_Release(buffer) @property - def time_stamp(self): - """Union[~_numpy.uint64, int]: CPU Timestamp in microseconds.""" - if self._data.size == 1: - return int(self._data.time_stamp[0]) - return self._data.time_stamp + def freqk_hz(self): + """~_numpy.uint32: (array of length 16).Array of input frequencies in kilohertz for each domain.""" + return self._data.freqk_hz - @time_stamp.setter - def time_stamp(self, val): - self._data.time_stamp = val + @freqk_hz.setter + def freqk_hz(self, val): + self._data.freqk_hz = val @property - def vgpu_instance(self): - """Union[~_numpy.uint32, int]: vGPU Instance""" + def est_tgp_pwrm_w(self): + """Union[~_numpy.uint32, int]: Estimated Total Graphics Power in milliwatts.""" if self._data.size == 1: - return int(self._data.vgpu_instance[0]) - return self._data.vgpu_instance - - @vgpu_instance.setter - def vgpu_instance(self, val): - self._data.vgpu_instance = val + return int(self._data.est_tgp_pwrm_w[0]) + return self._data.est_tgp_pwrm_w - @property - def sm_util(self): - """value_dtype: SM (3D/Compute) Util Value.""" - return self._data.sm_util + @est_tgp_pwrm_w.setter + def est_tgp_pwrm_w(self, val): + self._data.est_tgp_pwrm_w = val - @sm_util.setter - def sm_util(self, val): - self._data.sm_util = val + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PwrModelMetricsSamplePfpp1x.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == pwr_model_metrics_sample_pfpp1x_dtype: + return PwrModelMetricsSamplePfpp1x.from_data(out) + return out - @property - def mem_util(self): - """value_dtype: Frame Buffer Memory Util Value.""" - return self._data.mem_util - - @mem_util.setter - def mem_util(self, val): - self._data.mem_util = val - - @property - def enc_util(self): - """value_dtype: Encoder Util Value.""" - return self._data.enc_util - - @enc_util.setter - def enc_util(self, val): - self._data.enc_util = val - - @property - def dec_util(self): - """value_dtype: Decoder Util Value.""" - return self._data.dec_util - - @dec_util.setter - def dec_util(self, val): - self._data.dec_util = val - - @property - def jpg_util(self): - """value_dtype: Jpeg Util Value.""" - return self._data.jpg_util - - @jpg_util.setter - def jpg_util(self, val): - self._data.jpg_util = val - - @property - def ofa_util(self): - """value_dtype: Ofa Util Value.""" - return self._data.ofa_util - - @ofa_util.setter - def ofa_util(self, val): - self._data.ofa_util = val - - def __getitem__(self, key): - cdef ssize_t key_ - cdef ssize_t size - if isinstance(key, int): - key_ = key - size = self._data.size - if key_ >= size or key_ <= -(size+1): - raise IndexError("index is out of bounds") - if key_ < 0: - key_ += size - return VgpuInstanceUtilizationInfo_v1.from_data(self._data[key_:key_+1]) - out = self._data[key] - if isinstance(out, _numpy.recarray) and out.dtype == vgpu_instance_utilization_info_v1_dtype: - return VgpuInstanceUtilizationInfo_v1.from_data(out) - return out - - def __setitem__(self, key, val): - self._data[key] = val + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an VgpuInstanceUtilizationInfo_v1 instance with the memory from the given buffer.""" - return VgpuInstanceUtilizationInfo_v1.from_data(_numpy.frombuffer(buffer, dtype=vgpu_instance_utilization_info_v1_dtype)) + """Create an PwrModelMetricsSamplePfpp1x instance with the memory from the given buffer.""" + return PwrModelMetricsSamplePfpp1x.from_data(_numpy.frombuffer(buffer, dtype=pwr_model_metrics_sample_pfpp1x_dtype)) @staticmethod def from_data(data): - """Create an VgpuInstanceUtilizationInfo_v1 instance wrapping the given NumPy array. + """Create an PwrModelMetricsSamplePfpp1x instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a 1D array of dtype `vgpu_instance_utilization_info_v1_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `pwr_model_metrics_sample_pfpp1x_dtype` holding the data. """ - cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) + cdef PwrModelMetricsSamplePfpp1x obj = PwrModelMetricsSamplePfpp1x.__new__(PwrModelMetricsSamplePfpp1x) if not isinstance(data, _numpy.ndarray): raise TypeError("data argument must be a NumPy ndarray") if data.ndim != 1: raise ValueError("data array must be 1D") - if data.dtype != vgpu_instance_utilization_info_v1_dtype: - raise ValueError("data array must be of dtype vgpu_instance_utilization_info_v1_dtype") + if data.dtype != pwr_model_metrics_sample_pfpp1x_dtype: + raise ValueError("data array must be of dtype pwr_model_metrics_sample_pfpp1x_dtype") obj._data = data.view(_numpy.recarray) return obj @staticmethod def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): - """Create an VgpuInstanceUtilizationInfo_v1 instance wrapping the given pointer. + """Create an PwrModelMetricsSamplePfpp1x instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -17917,61 +18076,56 @@ cdef class VgpuInstanceUtilizationInfo_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) + cdef PwrModelMetricsSamplePfpp1x obj = PwrModelMetricsSamplePfpp1x.__new__(PwrModelMetricsSamplePfpp1x) cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( - ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) - data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) + ptr, sizeof(nvmlPwrModelMetricsSamplePfpp1x_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=pwr_model_metrics_sample_pfpp1x_dtype) obj._data = data.view(_numpy.recarray) obj._owner = owner return obj -cdef _get_field_value_dtype_offsets(): - cdef nvmlFieldValue_t pod +cdef _get_pwr_model_operating_point_pfpp1x_dtype_offsets(): + cdef nvmlPwrModelOperatingPointPfpp1x_t pod return _numpy.dtype({ - 'names': ['field_id', 'scope_id', 'timestamp', 'latency_usec', 'value_type', 'nvml_return', 'value'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.int64, _numpy.int64, _numpy.int32, _numpy.int32, value_dtype], + 'names': ['freqk_hz', 'pwrm_w'], + 'formats': [_numpy.uint32, _numpy.uint32], 'offsets': [ - (&(pod.fieldId)) - (&pod), - (&(pod.scopeId)) - (&pod), - (&(pod.timestamp)) - (&pod), - (&(pod.latencyUsec)) - (&pod), - (&(pod.valueType)) - (&pod), - (&(pod.nvmlReturn)) - (&pod), - (&(pod.value)) - (&pod), + (&(pod.freqkHz)) - (&pod), + (&(pod.pwrmW)) - (&pod), ], - 'itemsize': sizeof(nvmlFieldValue_t), + 'itemsize': sizeof(nvmlPwrModelOperatingPointPfpp1x_t), }) -field_value_dtype = _get_field_value_dtype_offsets() +pwr_model_operating_point_pfpp1x_dtype = _get_pwr_model_operating_point_pfpp1x_dtype_offsets() -cdef class FieldValue: - """Empty-initialize an array of `nvmlFieldValue_t`. - The resulting object is of length `size` and of dtype `field_value_dtype`. +cdef class PwrModelOperatingPointPfpp1x: + """Empty-initialize an array of `nvmlPwrModelOperatingPointPfpp1x_t`. + The resulting object is of length `size` and of dtype `pwr_model_operating_point_pfpp1x_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlFieldValue_t` + .. seealso:: `nvmlPwrModelOperatingPointPfpp1x_t` """ cdef: readonly object _data object _owner def __init__(self, size=1): - arr = _numpy.empty(size, dtype=field_value_dtype) + arr = _numpy.empty(size, dtype=pwr_model_operating_point_pfpp1x_dtype) self._data = arr.view(_numpy.recarray) - assert self._data.itemsize == sizeof(nvmlFieldValue_t), \ - f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlFieldValue_t) }" + assert self._data.itemsize == sizeof(nvmlPwrModelOperatingPointPfpp1x_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPwrModelOperatingPointPfpp1x_t) }" def __repr__(self): if self._data.size > 1: - return f"<{__name__}.FieldValue_Array_{self._data.size} object at {hex(id(self))}>" + return f"<{__name__}.PwrModelOperatingPointPfpp1x_Array_{self._data.size} object at {hex(id(self))}>" else: - return f"<{__name__}.FieldValue object at {hex(id(self))}>" + return f"<{__name__}.PwrModelOperatingPointPfpp1x object at {hex(id(self))}>" @property def ptr(self): @@ -17992,7 +18146,7 @@ cdef class FieldValue: def __eq__(self, other): cdef object self_data = self._data - if (not isinstance(other, FieldValue)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + if (not isinstance(other, PwrModelOperatingPointPfpp1x)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False return bool((self_data == other._data).all()) @@ -18003,79 +18157,26 @@ cdef class FieldValue: _cyb_cpython.PyBuffer_Release(buffer) @property - def field_id(self): - """Union[~_numpy.uint32, int]: """ - if self._data.size == 1: - return int(self._data.field_id[0]) - return self._data.field_id - - @field_id.setter - def field_id(self, val): - self._data.field_id = val - - @property - def scope_id(self): - """Union[~_numpy.uint32, int]: """ - if self._data.size == 1: - return int(self._data.scope_id[0]) - return self._data.scope_id - - @scope_id.setter - def scope_id(self, val): - self._data.scope_id = val - - @property - def timestamp(self): - """Union[~_numpy.int64, int]: """ - if self._data.size == 1: - return int(self._data.timestamp[0]) - return self._data.timestamp - - @timestamp.setter - def timestamp(self, val): - self._data.timestamp = val - - @property - def latency_usec(self): - """Union[~_numpy.int64, int]: """ - if self._data.size == 1: - return int(self._data.latency_usec[0]) - return self._data.latency_usec - - @latency_usec.setter - def latency_usec(self, val): - self._data.latency_usec = val - - @property - def value_type(self): - """Union[~_numpy.int32, int]: """ + def freqk_hz(self): + """Union[~_numpy.uint32, int]: Operating frequency in kilohertz.""" if self._data.size == 1: - return int(self._data.value_type[0]) - return self._data.value_type + return int(self._data.freqk_hz[0]) + return self._data.freqk_hz - @value_type.setter - def value_type(self, val): - self._data.value_type = val + @freqk_hz.setter + def freqk_hz(self, val): + self._data.freqk_hz = val @property - def nvml_return(self): - """Union[~_numpy.int32, int]: """ + def pwrm_w(self): + """Union[~_numpy.uint32, int]: Power consumption at this frequency in milliwatts.""" if self._data.size == 1: - return int(self._data.nvml_return[0]) - return self._data.nvml_return - - @nvml_return.setter - def nvml_return(self, val): - self._data.nvml_return = val - - @property - def value(self): - """value_dtype: """ - return self._data.value + return int(self._data.pwrm_w[0]) + return self._data.pwrm_w - @value.setter - def value(self, val): - self._data.value = val + @pwrm_w.setter + def pwrm_w(self, val): + self._data.pwrm_w = val def __getitem__(self, key): cdef ssize_t key_ @@ -18087,10 +18188,10 @@ cdef class FieldValue: raise IndexError("index is out of bounds") if key_ < 0: key_ += size - return FieldValue.from_data(self._data[key_:key_+1]) + return PwrModelOperatingPointPfpp1x.from_data(self._data[key_:key_+1]) out = self._data[key] - if isinstance(out, _numpy.recarray) and out.dtype == field_value_dtype: - return FieldValue.from_data(out) + if isinstance(out, _numpy.recarray) and out.dtype == pwr_model_operating_point_pfpp1x_dtype: + return PwrModelOperatingPointPfpp1x.from_data(out) return out def __setitem__(self, key, val): @@ -18098,30 +18199,30 @@ cdef class FieldValue: @staticmethod def from_buffer(buffer): - """Create an FieldValue instance with the memory from the given buffer.""" - return FieldValue.from_data(_numpy.frombuffer(buffer, dtype=field_value_dtype)) + """Create an PwrModelOperatingPointPfpp1x instance with the memory from the given buffer.""" + return PwrModelOperatingPointPfpp1x.from_data(_numpy.frombuffer(buffer, dtype=pwr_model_operating_point_pfpp1x_dtype)) @staticmethod def from_data(data): - """Create an FieldValue instance wrapping the given NumPy array. + """Create an PwrModelOperatingPointPfpp1x instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a 1D array of dtype `field_value_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `pwr_model_operating_point_pfpp1x_dtype` holding the data. """ - cdef FieldValue obj = FieldValue.__new__(FieldValue) + cdef PwrModelOperatingPointPfpp1x obj = PwrModelOperatingPointPfpp1x.__new__(PwrModelOperatingPointPfpp1x) if not isinstance(data, _numpy.ndarray): raise TypeError("data argument must be a NumPy ndarray") if data.ndim != 1: raise ValueError("data array must be 1D") - if data.dtype != field_value_dtype: - raise ValueError("data array must be of dtype field_value_dtype") + if data.dtype != pwr_model_operating_point_pfpp1x_dtype: + raise ValueError("data array must be of dtype pwr_model_operating_point_pfpp1x_dtype") obj._data = data.view(_numpy.recarray) return obj @staticmethod def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): - """Create an FieldValue instance wrapping the given pointer. + """Create an PwrModelOperatingPointPfpp1x instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -18132,61 +18233,63 @@ cdef class FieldValue: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef FieldValue obj = FieldValue.__new__(FieldValue) + cdef PwrModelOperatingPointPfpp1x obj = PwrModelOperatingPointPfpp1x.__new__(PwrModelOperatingPointPfpp1x) cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( - ptr, sizeof(nvmlFieldValue_t) * size, flag) - data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) + ptr, sizeof(nvmlPwrModelOperatingPointPfpp1x_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=pwr_model_operating_point_pfpp1x_dtype) obj._data = data.view(_numpy.recarray) obj._owner = owner return obj -cdef _get_prm_counter_value_v1_dtype_offsets(): - cdef nvmlPRMCounterValue_v1_t pod +cdef _get_adaptive_tgp_mode_info_v1_dtype_offsets(): + cdef nvmlAdaptiveTgpModeInfo_v1_t pod return _numpy.dtype({ - 'names': ['status', 'output_type', 'output_value'], - 'formats': [_numpy.int32, _numpy.int32, value_dtype], + 'names': ['in_band_enable_request', 'feature_allowed_by_admin', 'admin_override_enabled', 'enablement_status', 'adjusted_limit_mw'], + 'formats': [_numpy.int32, _numpy.int32, _numpy.int32, _numpy.int32, _numpy.uint32], 'offsets': [ - (&(pod.status)) - (&pod), - (&(pod.outputType)) - (&pod), - (&(pod.outputValue)) - (&pod), + (&(pod.inBandEnableRequest)) - (&pod), + (&(pod.featureAllowedByAdmin)) - (&pod), + (&(pod.adminOverrideEnabled)) - (&pod), + (&(pod.enablementStatus)) - (&pod), + (&(pod.adjustedLimitMw)) - (&pod), ], - 'itemsize': sizeof(nvmlPRMCounterValue_v1_t), + 'itemsize': sizeof(nvmlAdaptiveTgpModeInfo_v1_t), }) -prm_counter_value_v1_dtype = _get_prm_counter_value_v1_dtype_offsets() +adaptive_tgp_mode_info_v1_dtype = _get_adaptive_tgp_mode_info_v1_dtype_offsets() -cdef class PRMCounterValue_v1: - """Empty-initialize an instance of `nvmlPRMCounterValue_v1_t`. +cdef class AdaptiveTgpModeInfo_v1: + """Empty-initialize an instance of `nvmlAdaptiveTgpModeInfo_v1_t`. - .. seealso:: `nvmlPRMCounterValue_v1_t` + .. seealso:: `nvmlAdaptiveTgpModeInfo_v1_t` """ cdef: - nvmlPRMCounterValue_v1_t *_ptr + nvmlAdaptiveTgpModeInfo_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlAdaptiveTgpModeInfo_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating PRMCounterValue_v1") + raise MemoryError("Error allocating AdaptiveTgpModeInfo_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlPRMCounterValue_v1_t *ptr + cdef nvmlAdaptiveTgpModeInfo_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" + return f"<{__name__}.AdaptiveTgpModeInfo_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -18200,24 +18303,24 @@ cdef class PRMCounterValue_v1: return (self._ptr) def __eq__(self, other): - cdef PRMCounterValue_v1 other_ - if not isinstance(other, PRMCounterValue_v1): + cdef AdaptiveTgpModeInfo_v1 other_ + if not isinstance(other, AdaptiveTgpModeInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlAdaptiveTgpModeInfo_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlAdaptiveTgpModeInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlAdaptiveTgpModeInfo_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + raise MemoryError("Error allocating AdaptiveTgpModeInfo_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlAdaptiveTgpModeInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18225,60 +18328,77 @@ cdef class PRMCounterValue_v1: setattr(self, key, val) @property - def output_value(self): - """Value: Output value.""" - return Value.from_ptr( - &(self._ptr[0].outputValue), - readonly=self._readonly, - owner=self, - ) + def in_band_enable_request(self): + """int: [out] In-band enable requested (NVML_FEATURE_ENABLED) or not requested (NVML_FEATURE_DISABLED)""" + return (self._ptr[0].inBandEnableRequest) - @output_value.setter - def output_value(self, val): + @in_band_enable_request.setter + def in_band_enable_request(self, val): if self._readonly: - raise ValueError("This PRMCounterValue_v1 instance is read-only") - cdef Value val_ = val - _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + raise ValueError("This AdaptiveTgpModeInfo_v1 instance is read-only") + self._ptr[0].inBandEnableRequest = val @property - def status(self): - """int: Status of the PRM counter read.""" - return (self._ptr[0].status) + def feature_allowed_by_admin(self): + """int: [out] Feature allowed by out-of-band/admin (NVML_FEATURE_ENABLED) or not allowed (NVML_FEATURE_DISABLED)""" + return (self._ptr[0].featureAllowedByAdmin) - @status.setter - def status(self, val): + @feature_allowed_by_admin.setter + def feature_allowed_by_admin(self, val): if self._readonly: - raise ValueError("This PRMCounterValue_v1 instance is read-only") - self._ptr[0].status = val + raise ValueError("This AdaptiveTgpModeInfo_v1 instance is read-only") + self._ptr[0].featureAllowedByAdmin = val @property - def output_type(self): - """int: Output value type.""" - return (self._ptr[0].outputType) + def admin_override_enabled(self): + """int: [out] Out-of-band/admin override active (NVML_FEATURE_ENABLED) or inactive (NVML_FEATURE_DISABLED)""" + return (self._ptr[0].adminOverrideEnabled) - @output_type.setter - def output_type(self, val): + @admin_override_enabled.setter + def admin_override_enabled(self, val): if self._readonly: - raise ValueError("This PRMCounterValue_v1 instance is read-only") - self._ptr[0].outputType = val + raise ValueError("This AdaptiveTgpModeInfo_v1 instance is read-only") + self._ptr[0].adminOverrideEnabled = val + + @property + def enablement_status(self): + """int: [out] Enablement after arbitration: active (NVML_FEATURE_ENABLED) or inactive (NVML_FEATURE_DISABLED)""" + return (self._ptr[0].enablementStatus) + + @enablement_status.setter + def enablement_status(self, val): + if self._readonly: + raise ValueError("This AdaptiveTgpModeInfo_v1 instance is read-only") + self._ptr[0].enablementStatus = val + + @property + def adjusted_limit_mw(self): + """int: [out] Adjusted TGP limit in milliwatts (valid only when feature is enabled)""" + return self._ptr[0].adjustedLimitMw + + @adjusted_limit_mw.setter + def adjusted_limit_mw(self, val): + if self._readonly: + raise ValueError("This AdaptiveTgpModeInfo_v1 instance is read-only") + self._ptr[0].adjustedLimitMw = val @staticmethod def from_buffer(buffer): - """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + """Create an AdaptiveTgpModeInfo_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlAdaptiveTgpModeInfo_v1_t), AdaptiveTgpModeInfo_v1) @staticmethod def from_data(data): - """Create an PRMCounterValue_v1 instance wrapping the given NumPy array. + """Create an AdaptiveTgpModeInfo_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `adaptive_tgp_mode_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + return _cyb_from_data(data, "adaptive_tgp_mode_info_v1_dtype", adaptive_tgp_mode_info_v1_dtype, AdaptiveTgpModeInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an PRMCounterValue_v1 instance wrapping the given pointer. + """Create an AdaptiveTgpModeInfo_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -18287,65 +18407,64 @@ cdef class PRMCounterValue_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) + cdef AdaptiveTgpModeInfo_v1 obj = AdaptiveTgpModeInfo_v1.__new__(AdaptiveTgpModeInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlAdaptiveTgpModeInfo_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating PRMCounterValue_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + raise MemoryError("Error allocating AdaptiveTgpModeInfo_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlAdaptiveTgpModeInfo_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_gpu_thermal_settings_dtype_offsets(): - cdef nvmlGpuThermalSettings_t pod +cdef _get_event_set_get_context_count_v1_dtype_offsets(): + cdef nvmlEventSetGetContextCount_v1_t pod return _numpy.dtype({ - 'names': ['count', 'sensor'], - 'formats': [_numpy.uint32, (_py_anon_pod0_dtype, 3)], + 'names': ['count'], + 'formats': [_numpy.uint32], 'offsets': [ (&(pod.count)) - (&pod), - (&(pod.sensor)) - (&pod), ], - 'itemsize': sizeof(nvmlGpuThermalSettings_t), + 'itemsize': sizeof(nvmlEventSetGetContextCount_v1_t), }) -gpu_thermal_settings_dtype = _get_gpu_thermal_settings_dtype_offsets() +event_set_get_context_count_v1_dtype = _get_event_set_get_context_count_v1_dtype_offsets() -cdef class GpuThermalSettings: - """Empty-initialize an instance of `nvmlGpuThermalSettings_t`. +cdef class EventSetGetContextCount_v1: + """Empty-initialize an instance of `nvmlEventSetGetContextCount_v1_t`. - .. seealso:: `nvmlGpuThermalSettings_t` + .. seealso:: `nvmlEventSetGetContextCount_v1_t` """ cdef: - nvmlGpuThermalSettings_t *_ptr + nvmlEventSetGetContextCount_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEventSetGetContextCount_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GpuThermalSettings") + raise MemoryError("Error allocating EventSetGetContextCount_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlGpuThermalSettings_t *ptr + cdef nvmlEventSetGetContextCount_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" + return f"<{__name__}.EventSetGetContextCount_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -18359,77 +18478,58 @@ cdef class GpuThermalSettings: return (self._ptr) def __eq__(self, other): - cdef GpuThermalSettings other_ - if not isinstance(other, GpuThermalSettings): + cdef EventSetGetContextCount_v1 other_ + if not isinstance(other, EventSetGetContextCount_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventSetGetContextCount_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventSetGetContextCount_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEventSetGetContextCount_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + raise MemoryError("Error allocating EventSetGetContextCount_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventSetGetContextCount_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable else: setattr(self, key, val) - @property - def sensor(self): - """_py_anon_pod0: """ - return _py_anon_pod0.from_ptr( - &(self._ptr[0].sensor), - 3, - readonly=self._readonly, - owner=self, - ) - - @sensor.setter - def sensor(self, val): - if self._readonly: - raise ValueError("This GpuThermalSettings instance is read-only") - cdef _py_anon_pod0 val_ = val - if len(val) != 3: - raise ValueError(f"Expected length { 3 } for field sensor, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) - @property def count(self): - """int: """ + """int: [out] Number of context records associated with the most recent event.""" return self._ptr[0].count @count.setter def count(self, val): if self._readonly: - raise ValueError("This GpuThermalSettings instance is read-only") + raise ValueError("This EventSetGetContextCount_v1 instance is read-only") self._ptr[0].count = val @staticmethod def from_buffer(buffer): - """Create an GpuThermalSettings instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + """Create an EventSetGetContextCount_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlEventSetGetContextCount_v1_t), EventSetGetContextCount_v1) @staticmethod def from_data(data): - """Create an GpuThermalSettings instance wrapping the given NumPy array. + """Create an EventSetGetContextCount_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `event_set_get_context_count_v1_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + return _cyb_from_data(data, "event_set_get_context_count_v1_dtype", event_set_get_context_count_v1_dtype, EventSetGetContextCount_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an GpuThermalSettings instance wrapping the given pointer. + """Create an EventSetGetContextCount_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -18438,66 +18538,68 @@ cdef class GpuThermalSettings: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) + cdef EventSetGetContextCount_v1 obj = EventSetGetContextCount_v1.__new__(EventSetGetContextCount_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEventSetGetContextCount_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating GpuThermalSettings") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + raise MemoryError("Error allocating EventSetGetContextCount_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventSetGetContextCount_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_clk_mon_status_dtype_offsets(): - cdef nvmlClkMonStatus_t pod +cdef _get_event_set_get_context_info_v1_dtype_offsets(): + cdef nvmlEventSetGetContextInfo_v1_t pod return _numpy.dtype({ - 'names': ['b_global_status', 'clk_mon_list_size', 'clk_mon_list'], - 'formats': [_numpy.uint32, _numpy.uint32, (clk_mon_fault_info_dtype, 32)], + 'names': ['index', 'nvml_gpu_operational_event_context_type', 'source_event_context_type', 'data_size', 'data_format_version'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint16], 'offsets': [ - (&(pod.bGlobalStatus)) - (&pod), - (&(pod.clkMonListSize)) - (&pod), - (&(pod.clkMonList)) - (&pod), + (&(pod.index)) - (&pod), + (&(pod.nvmlGpuOperationalEventContextType)) - (&pod), + (&(pod.sourceEventContextType)) - (&pod), + (&(pod.dataSize)) - (&pod), + (&(pod.dataFormatVersion)) - (&pod), ], - 'itemsize': sizeof(nvmlClkMonStatus_t), + 'itemsize': sizeof(nvmlEventSetGetContextInfo_v1_t), }) -clk_mon_status_dtype = _get_clk_mon_status_dtype_offsets() +event_set_get_context_info_v1_dtype = _get_event_set_get_context_info_v1_dtype_offsets() -cdef class ClkMonStatus: - """Empty-initialize an instance of `nvmlClkMonStatus_t`. +cdef class EventSetGetContextInfo_v1: + """Empty-initialize an instance of `nvmlEventSetGetContextInfo_v1_t`. - .. seealso:: `nvmlClkMonStatus_t` + .. seealso:: `nvmlEventSetGetContextInfo_v1_t` """ cdef: - nvmlClkMonStatus_t *_ptr + nvmlEventSetGetContextInfo_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEventSetGetContextInfo_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ClkMonStatus") + raise MemoryError("Error allocating EventSetGetContextInfo_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlClkMonStatus_t *ptr + cdef nvmlEventSetGetContextInfo_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" + return f"<{__name__}.EventSetGetContextInfo_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -18511,24 +18613,24 @@ cdef class ClkMonStatus: return (self._ptr) def __eq__(self, other): - cdef ClkMonStatus other_ - if not isinstance(other, ClkMonStatus): + cdef EventSetGetContextInfo_v1 other_ + if not isinstance(other, EventSetGetContextInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventSetGetContextInfo_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventSetGetContextInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEventSetGetContextInfo_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + raise MemoryError("Error allocating EventSetGetContextInfo_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventSetGetContextInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18536,55 +18638,77 @@ cdef class ClkMonStatus: setattr(self, key, val) @property - def clk_mon_list(self): - """ClkMonFaultInfo: """ - return ClkMonFaultInfo.from_ptr( - &(self._ptr[0].clkMonList), - self._ptr[0].clkMonListSize, - readonly=self._readonly, - owner=self, - ) + def index(self): + """int: [in] Zero-based context index.""" + return self._ptr[0].index - @clk_mon_list.setter - def clk_mon_list(self, val): + @index.setter + def index(self, val): if self._readonly: - raise ValueError("This ClkMonStatus instance is read-only") - cdef ClkMonFaultInfo val_ = val - if len(val) > 32: - raise ValueError(f"Expected length < 32 for field clk_mon_list, got {len(val)}") - self._ptr[0].clkMonListSize = len(val) - if len(val) == 0: - return - _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + raise ValueError("This EventSetGetContextInfo_v1 instance is read-only") + self._ptr[0].index = val @property - def b_global_status(self): - """int: """ - return self._ptr[0].bGlobalStatus + def nvml_gpu_operational_event_context_type(self): + """int: [out] `nvmlGpuOperationalEventContextType_t` value describing the NVML public interpretation of the context payload.""" + return self._ptr[0].nvmlGpuOperationalEventContextType - @b_global_status.setter - def b_global_status(self, val): + @nvml_gpu_operational_event_context_type.setter + def nvml_gpu_operational_event_context_type(self, val): if self._readonly: - raise ValueError("This ClkMonStatus instance is read-only") - self._ptr[0].bGlobalStatus = val + raise ValueError("This EventSetGetContextInfo_v1 instance is read-only") + self._ptr[0].nvmlGpuOperationalEventContextType = val + + @property + def source_event_context_type(self): + """int: [out] Source-defined context payload type identifier carried by the event.""" + return self._ptr[0].sourceEventContextType + + @source_event_context_type.setter + def source_event_context_type(self, val): + if self._readonly: + raise ValueError("This EventSetGetContextInfo_v1 instance is read-only") + self._ptr[0].sourceEventContextType = val + + @property + def data_size(self): + """int: [out] Context payload size in bytes, excluding alignment padding.""" + return self._ptr[0].dataSize + + @data_size.setter + def data_size(self, val): + if self._readonly: + raise ValueError("This EventSetGetContextInfo_v1 instance is read-only") + self._ptr[0].dataSize = val + + @property + def data_format_version(self): + """int: [out] Payload format version for `sourceEventContextType`.""" + return self._ptr[0].dataFormatVersion + + @data_format_version.setter + def data_format_version(self, val): + if self._readonly: + raise ValueError("This EventSetGetContextInfo_v1 instance is read-only") + self._ptr[0].dataFormatVersion = val @staticmethod def from_buffer(buffer): - """Create an ClkMonStatus instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + """Create an EventSetGetContextInfo_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlEventSetGetContextInfo_v1_t), EventSetGetContextInfo_v1) @staticmethod def from_data(data): - """Create an ClkMonStatus instance wrapping the given NumPy array. + """Create an EventSetGetContextInfo_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `event_set_get_context_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + return _cyb_from_data(data, "event_set_get_context_info_v1_dtype", event_set_get_context_info_v1_dtype, EventSetGetContextInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an ClkMonStatus instance wrapping the given pointer. + """Create an EventSetGetContextInfo_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -18593,69 +18717,65 @@ cdef class ClkMonStatus: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) + cdef EventSetGetContextInfo_v1 obj = EventSetGetContextInfo_v1.__new__(EventSetGetContextInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEventSetGetContextInfo_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating ClkMonStatus") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + raise MemoryError("Error allocating EventSetGetContextInfo_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventSetGetContextInfo_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_processes_utilization_info_v1_dtype_offsets(): - cdef nvmlProcessesUtilizationInfo_v1_t pod +cdef _get_event_set_get_gpu_operational_event_context_legacy_xid_v1_dtype_offsets(): + cdef nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t pod return _numpy.dtype({ - 'names': ['version', 'process_samples_count', 'last_seen_time_stamp', 'proc_util_array'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint64, _numpy.intp], + 'names': ['index', 'xid_code'], + 'formats': [_numpy.uint32, _numpy.uint32], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.processSamplesCount)) - (&pod), - (&(pod.lastSeenTimeStamp)) - (&pod), - (&(pod.procUtilArray)) - (&pod), + (&(pod.index)) - (&pod), + (&(pod.xidCode)) - (&pod), ], - 'itemsize': sizeof(nvmlProcessesUtilizationInfo_v1_t), + 'itemsize': sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t), }) -processes_utilization_info_v1_dtype = _get_processes_utilization_info_v1_dtype_offsets() +event_set_get_gpu_operational_event_context_legacy_xid_v1_dtype = _get_event_set_get_gpu_operational_event_context_legacy_xid_v1_dtype_offsets() -cdef class ProcessesUtilizationInfo_v1: - """Empty-initialize an instance of `nvmlProcessesUtilizationInfo_v1_t`. +cdef class EventSetGetGpuOperationalEventContextLegacyXid_v1: + """Empty-initialize an instance of `nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t`. - .. seealso:: `nvmlProcessesUtilizationInfo_v1_t` + .. seealso:: `nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t` """ cdef: - nvmlProcessesUtilizationInfo_v1_t *_ptr + nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t *_ptr object _owner bint _owned bint _readonly - dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") + raise MemoryError("Error allocating EventSetGetGpuOperationalEventContextLegacyXid_v1") self._owner = None self._owned = True self._readonly = False - self._refs = {} def __dealloc__(self): - cdef nvmlProcessesUtilizationInfo_v1_t *ptr + cdef nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" + return f"<{__name__}.EventSetGetGpuOperationalEventContextLegacyXid_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -18669,24 +18789,24 @@ cdef class ProcessesUtilizationInfo_v1: return (self._ptr) def __eq__(self, other): - cdef ProcessesUtilizationInfo_v1 other_ - if not isinstance(other, ProcessesUtilizationInfo_v1): + cdef EventSetGetGpuOperationalEventContextLegacyXid_v1 other_ + if not isinstance(other, EventSetGetGpuOperationalEventContextLegacyXid_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + raise MemoryError("Error allocating EventSetGetGpuOperationalEventContextLegacyXid_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18694,65 +18814,44 @@ cdef class ProcessesUtilizationInfo_v1: setattr(self, key, val) @property - def version(self): - """int: The version number of this struct.""" - return self._ptr[0].version - - @version.setter - def version(self, val): - if self._readonly: - raise ValueError("This ProcessesUtilizationInfo_v1 instance is read-only") - self._ptr[0].version = val - - @property - def last_seen_time_stamp(self): - """int: Return only samples with timestamp greater than lastSeenTimeStamp.""" - return self._ptr[0].lastSeenTimeStamp + def index(self): + """int: [in] Zero-based context index.""" + return self._ptr[0].index - @last_seen_time_stamp.setter - def last_seen_time_stamp(self, val): + @index.setter + def index(self, val): if self._readonly: - raise ValueError("This ProcessesUtilizationInfo_v1 instance is read-only") - self._ptr[0].lastSeenTimeStamp = val + raise ValueError("This EventSetGetGpuOperationalEventContextLegacyXid_v1 instance is read-only") + self._ptr[0].index = val @property - def proc_util_array(self): - """int: The array (allocated by caller) of the utilization of GPU SM, framebuffer, video encoder, video decoder, JPEG, and OFA.""" - if self._ptr[0].procUtilArray == NULL or self._ptr[0].processSamplesCount == 0: - return [] - return ProcessUtilizationInfo_v1.from_ptr( - (self._ptr[0].procUtilArray), - self._ptr[0].processSamplesCount, - owner=self, - readonly=self._readonly - ) + def xid_code(self): + """int: [out] Legacy Xid code carried in a GPU Operational Event context.""" + return self._ptr[0].xidCode - @proc_util_array.setter - def proc_util_array(self, val): + @xid_code.setter + def xid_code(self, val): if self._readonly: - raise ValueError("This ProcessesUtilizationInfo_v1 instance is read-only") - cdef ProcessUtilizationInfo_v1 arr = val - self._ptr[0].procUtilArray = (arr._get_ptr()) - self._ptr[0].processSamplesCount = len(arr) - self._refs["proc_util_array"] = arr + raise ValueError("This EventSetGetGpuOperationalEventContextLegacyXid_v1 instance is read-only") + self._ptr[0].xidCode = val @staticmethod def from_buffer(buffer): - """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + """Create an EventSetGetGpuOperationalEventContextLegacyXid_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t), EventSetGetGpuOperationalEventContextLegacyXid_v1) @staticmethod def from_data(data): - """Create an ProcessesUtilizationInfo_v1 instance wrapping the given NumPy array. + """Create an EventSetGetGpuOperationalEventContextLegacyXid_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `event_set_get_gpu_operational_event_context_legacy_xid_v1_dtype` holding the data. """ - return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "event_set_get_gpu_operational_event_context_legacy_xid_v1_dtype", event_set_get_gpu_operational_event_context_legacy_xid_v1_dtype, EventSetGetGpuOperationalEventContextLegacyXid_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an ProcessesUtilizationInfo_v1 instance wrapping the given pointer. + """Create an EventSetGetGpuOperationalEventContextLegacyXid_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -18761,66 +18860,65 @@ cdef class ProcessesUtilizationInfo_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) + cdef EventSetGetGpuOperationalEventContextLegacyXid_v1 obj = EventSetGetGpuOperationalEventContextLegacyXid_v1.__new__(EventSetGetGpuOperationalEventContextLegacyXid_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + raise MemoryError("Error allocating EventSetGetGpuOperationalEventContextLegacyXid_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly - obj._refs = {} return obj -cdef _get_gpu_dynamic_pstates_info_dtype_offsets(): - cdef nvmlGpuDynamicPstatesInfo_t pod +cdef _get_gpu_fabric_clique_v1_dtype_offsets(): + cdef nvmlGpuFabricClique_v1_t pod return _numpy.dtype({ - 'names': ['flags_', 'utilization'], - 'formats': [_numpy.uint32, (_py_anon_pod1_dtype, 8)], + 'names': ['type', 'id'], + 'formats': [_numpy.uint8, _numpy.uint32], 'offsets': [ - (&(pod.flags)) - (&pod), - (&(pod.utilization)) - (&pod), + (&(pod.type)) - (&pod), + (&(pod.id)) - (&pod), ], - 'itemsize': sizeof(nvmlGpuDynamicPstatesInfo_t), + 'itemsize': sizeof(nvmlGpuFabricClique_v1_t), }) -gpu_dynamic_pstates_info_dtype = _get_gpu_dynamic_pstates_info_dtype_offsets() +gpu_fabric_clique_v1_dtype = _get_gpu_fabric_clique_v1_dtype_offsets() -cdef class GpuDynamicPstatesInfo: - """Empty-initialize an instance of `nvmlGpuDynamicPstatesInfo_t`. +cdef class GpuFabricClique_v1: + """Empty-initialize an instance of `nvmlGpuFabricClique_v1_t`. - .. seealso:: `nvmlGpuDynamicPstatesInfo_t` + .. seealso:: `nvmlGpuFabricClique_v1_t` """ cdef: - nvmlGpuDynamicPstatesInfo_t *_ptr + nvmlGpuFabricClique_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricClique_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GpuDynamicPstatesInfo") + raise MemoryError("Error allocating GpuFabricClique_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlGpuDynamicPstatesInfo_t *ptr + cdef nvmlGpuFabricClique_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" + return f"<{__name__}.GpuFabricClique_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -18834,24 +18932,24 @@ cdef class GpuDynamicPstatesInfo: return (self._ptr) def __eq__(self, other): - cdef GpuDynamicPstatesInfo other_ - if not isinstance(other, GpuDynamicPstatesInfo): + cdef GpuFabricClique_v1 other_ + if not isinstance(other, GpuFabricClique_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricClique_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricClique_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricClique_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + raise MemoryError("Error allocating GpuFabricClique_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricClique_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -18859,52 +18957,44 @@ cdef class GpuDynamicPstatesInfo: setattr(self, key, val) @property - def utilization(self): - """_py_anon_pod1: """ - return _py_anon_pod1.from_ptr( - &(self._ptr[0].utilization), - 8, - readonly=self._readonly, - owner=self, - ) + def type(self): + """int: Clique type. See NVML_GPU_FABRIC_CLIQUE_TYPE_*.""" + return self._ptr[0].type - @utilization.setter - def utilization(self, val): + @type.setter + def type(self, val): if self._readonly: - raise ValueError("This GpuDynamicPstatesInfo instance is read-only") - cdef _py_anon_pod1 val_ = val - if len(val) != 8: - raise ValueError(f"Expected length { 8 } for field utilization, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) + raise ValueError("This GpuFabricClique_v1 instance is read-only") + self._ptr[0].type = val @property - def flags_(self): - """int: """ - return self._ptr[0].flags + def id(self): + """int: Clique ID assigned by the Fabric Manager.""" + return self._ptr[0].id - @flags_.setter - def flags_(self, val): + @id.setter + def id(self, val): if self._readonly: - raise ValueError("This GpuDynamicPstatesInfo instance is read-only") - self._ptr[0].flags = val + raise ValueError("This GpuFabricClique_v1 instance is read-only") + self._ptr[0].id = val @staticmethod def from_buffer(buffer): - """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + """Create an GpuFabricClique_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricClique_v1_t), GpuFabricClique_v1) @staticmethod def from_data(data): - """Create an GpuDynamicPstatesInfo instance wrapping the given NumPy array. + """Create an GpuFabricClique_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_clique_v1_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + return _cyb_from_data(data, "gpu_fabric_clique_v1_dtype", gpu_fabric_clique_v1_dtype, GpuFabricClique_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an GpuDynamicPstatesInfo instance wrapping the given pointer. + """Create an GpuFabricClique_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -18913,69 +19003,66 @@ cdef class GpuDynamicPstatesInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) + cdef GpuFabricClique_v1 obj = GpuFabricClique_v1.__new__(GpuFabricClique_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricClique_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating GpuDynamicPstatesInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + raise MemoryError("Error allocating GpuFabricClique_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricClique_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_vgpu_processes_utilization_info_v1_dtype_offsets(): - cdef nvmlVgpuProcessesUtilizationInfo_v1_t pod +cdef _get_gpu_operational_event_config_v1_dtype_offsets(): + cdef nvmlGpuOperationalEventConfig_v1_t pod return _numpy.dtype({ - 'names': ['version', 'vgpu_process_count', 'last_seen_time_stamp', 'vgpu_proc_util_array'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint64, _numpy.intp], + 'names': ['uuid', 'min_log_level', 'min_severity'], + 'formats': [(_numpy.int8, 96), _numpy.uint32, _numpy.uint32], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.vgpuProcessCount)) - (&pod), - (&(pod.lastSeenTimeStamp)) - (&pod), - (&(pod.vgpuProcUtilArray)) - (&pod), + (&(pod.uuid)) - (&pod), + (&(pod.minLogLevel)) - (&pod), + (&(pod.minSeverity)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), + 'itemsize': sizeof(nvmlGpuOperationalEventConfig_v1_t), }) -vgpu_processes_utilization_info_v1_dtype = _get_vgpu_processes_utilization_info_v1_dtype_offsets() +gpu_operational_event_config_v1_dtype = _get_gpu_operational_event_config_v1_dtype_offsets() -cdef class VgpuProcessesUtilizationInfo_v1: - """Empty-initialize an instance of `nvmlVgpuProcessesUtilizationInfo_v1_t`. +cdef class GpuOperationalEventConfig_v1: + """Empty-initialize an instance of `nvmlGpuOperationalEventConfig_v1_t`. - .. seealso:: `nvmlVgpuProcessesUtilizationInfo_v1_t` + .. seealso:: `nvmlGpuOperationalEventConfig_v1_t` """ cdef: - nvmlVgpuProcessesUtilizationInfo_v1_t *_ptr + nvmlGpuOperationalEventConfig_v1_t *_ptr object _owner bint _owned bint _readonly - dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuOperationalEventConfig_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") + raise MemoryError("Error allocating GpuOperationalEventConfig_v1") self._owner = None self._owned = True self._readonly = False - self._refs = {} def __dealloc__(self): - cdef nvmlVgpuProcessesUtilizationInfo_v1_t *ptr + cdef nvmlGpuOperationalEventConfig_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" + return f"<{__name__}.GpuOperationalEventConfig_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -18989,24 +19076,24 @@ cdef class VgpuProcessesUtilizationInfo_v1: return (self._ptr) def __eq__(self, other): - cdef VgpuProcessesUtilizationInfo_v1 other_ - if not isinstance(other, VgpuProcessesUtilizationInfo_v1): + cdef GpuOperationalEventConfig_v1 other_ + if not isinstance(other, GpuOperationalEventConfig_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuOperationalEventConfig_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuOperationalEventConfig_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGpuOperationalEventConfig_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + raise MemoryError("Error allocating GpuOperationalEventConfig_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuOperationalEventConfig_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19014,65 +19101,59 @@ cdef class VgpuProcessesUtilizationInfo_v1: setattr(self, key, val) @property - def version(self): - """int: The version number of this struct.""" - return self._ptr[0].version + def uuid(self): + """~_numpy.int8: (array of length 96).""" + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) - @version.setter - def version(self, val): + @uuid.setter + def uuid(self, val): if self._readonly: - raise ValueError("This VgpuProcessesUtilizationInfo_v1 instance is read-only") - self._ptr[0].version = val + raise ValueError("This GpuOperationalEventConfig_v1 instance is read-only") + cdef bytes buf = val.encode() + if len(buf) >= 96: + raise ValueError("String too long for field uuid, max length is 95") + cdef char *ptr = buf + _cyb_memcpy((self._ptr[0].uuid), ptr, 96) @property - def last_seen_time_stamp(self): - """int: Return only samples with timestamp greater than lastSeenTimeStamp.""" - return self._ptr[0].lastSeenTimeStamp + def min_log_level(self): + """int: """ + return self._ptr[0].minLogLevel - @last_seen_time_stamp.setter - def last_seen_time_stamp(self, val): + @min_log_level.setter + def min_log_level(self, val): if self._readonly: - raise ValueError("This VgpuProcessesUtilizationInfo_v1 instance is read-only") - self._ptr[0].lastSeenTimeStamp = val + raise ValueError("This GpuOperationalEventConfig_v1 instance is read-only") + self._ptr[0].minLogLevel = val @property - def vgpu_proc_util_array(self): - """int: The array (allocated by caller) in which utilization of processes running on vGPU instances are returned.""" - if self._ptr[0].vgpuProcUtilArray == NULL or self._ptr[0].vgpuProcessCount == 0: - return [] - return VgpuProcessUtilizationInfo_v1.from_ptr( - (self._ptr[0].vgpuProcUtilArray), - self._ptr[0].vgpuProcessCount, - owner=self, - readonly=self._readonly - ) + def min_severity(self): + """int: """ + return self._ptr[0].minSeverity - @vgpu_proc_util_array.setter - def vgpu_proc_util_array(self, val): + @min_severity.setter + def min_severity(self, val): if self._readonly: - raise ValueError("This VgpuProcessesUtilizationInfo_v1 instance is read-only") - cdef VgpuProcessUtilizationInfo_v1 arr = val - self._ptr[0].vgpuProcUtilArray = (arr._get_ptr()) - self._ptr[0].vgpuProcessCount = len(arr) - self._refs["vgpu_proc_util_array"] = arr + raise ValueError("This GpuOperationalEventConfig_v1 instance is read-only") + self._ptr[0].minSeverity = val @staticmethod def from_buffer(buffer): - """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + """Create an GpuOperationalEventConfig_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGpuOperationalEventConfig_v1_t), GpuOperationalEventConfig_v1) @staticmethod def from_data(data): - """Create an VgpuProcessesUtilizationInfo_v1 instance wrapping the given NumPy array. + """Create an GpuOperationalEventConfig_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `gpu_operational_event_config_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + return _cyb_from_data(data, "gpu_operational_event_config_v1_dtype", gpu_operational_event_config_v1_dtype, GpuOperationalEventConfig_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuProcessesUtilizationInfo_v1 instance wrapping the given pointer. + """Create an GpuOperationalEventConfig_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -19081,66 +19162,88 @@ cdef class VgpuProcessesUtilizationInfo_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) + cdef GpuOperationalEventConfig_v1 obj = GpuOperationalEventConfig_v1.__new__(GpuOperationalEventConfig_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGpuOperationalEventConfig_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + raise MemoryError("Error allocating GpuOperationalEventConfig_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuOperationalEventConfig_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly - obj._refs = {} return obj -cdef _get_vgpu_scheduler_params_dtype_offsets(): - cdef nvmlVgpuSchedulerParams_t pod +cdef _get_event_set_wait_v3_dtype_offsets(): + cdef nvmlEventSetWait_v3_t pod return _numpy.dtype({ - 'names': ['vgpu_sched_data_with_arr', 'vgpu_sched_data'], - 'formats': [_py_anon_pod2_dtype, _py_anon_pod3_dtype], + 'names': ['timeout_ms', 'data_type', 'uuid', 'source_module', 'event_type', 'event_data', 'group_cursor', 'instance_id', 'timestamp_usec', 'trace_id', 'gpu_instance_id', 'compute_instance_id', 'severity', 'category_id', 'module_event_code', 'scope', 'originator', 'module_instance', 'chiplet_id', 'log_level', 'attributes', 'group_cper_size', 'group_attributes', 'group_size', 'group_index'], + 'formats': [_numpy.uint32, _numpy.uint32, (_numpy.int8, 96), (_numpy.int8, 16), _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint64, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint8, _numpy.uint8], 'offsets': [ - (&(pod.vgpuSchedDataWithARR)) - (&pod), - (&(pod.vgpuSchedData)) - (&pod), + (&(pod.timeoutMs)) - (&pod), + (&(pod.dataType)) - (&pod), + (&(pod.uuid)) - (&pod), + (&(pod.sourceModule)) - (&pod), + (&(pod.eventType)) - (&pod), + (&(pod.eventData)) - (&pod), + (&(pod.groupCursor)) - (&pod), + (&(pod.instanceId)) - (&pod), + (&(pod.timestampUsec)) - (&pod), + (&(pod.traceId)) - (&pod), + (&(pod.gpuInstanceId)) - (&pod), + (&(pod.computeInstanceId)) - (&pod), + (&(pod.severity)) - (&pod), + (&(pod.categoryId)) - (&pod), + (&(pod.moduleEventCode)) - (&pod), + (&(pod.scope)) - (&pod), + (&(pod.originator)) - (&pod), + (&(pod.moduleInstance)) - (&pod), + (&(pod.chipletId)) - (&pod), + (&(pod.logLevel)) - (&pod), + (&(pod.attributes)) - (&pod), + (&(pod.groupCperSize)) - (&pod), + (&(pod.groupAttributes)) - (&pod), + (&(pod.groupSize)) - (&pod), + (&(pod.groupIndex)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuSchedulerParams_t), + 'itemsize': sizeof(nvmlEventSetWait_v3_t), }) -vgpu_scheduler_params_dtype = _get_vgpu_scheduler_params_dtype_offsets() +event_set_wait_v3_dtype = _get_event_set_wait_v3_dtype_offsets() -cdef class VgpuSchedulerParams: - """Empty-initialize an instance of `nvmlVgpuSchedulerParams_t`. +cdef class EventSetWait_v3: + """Empty-initialize an instance of `nvmlEventSetWait_v3_t`. - .. seealso:: `nvmlVgpuSchedulerParams_t` + .. seealso:: `nvmlEventSetWait_v3_t` """ cdef: - nvmlVgpuSchedulerParams_t *_ptr + nvmlEventSetWait_v3_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEventSetWait_v3_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerParams") + raise MemoryError("Error allocating EventSetWait_v3") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlVgpuSchedulerParams_t *ptr + cdef nvmlEventSetWait_v3_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" + return f"<{__name__}.EventSetWait_v3 object at {hex(id(self))}>" @property def ptr(self): @@ -19154,24 +19257,24 @@ cdef class VgpuSchedulerParams: return (self._ptr) def __eq__(self, other): - cdef VgpuSchedulerParams other_ - if not isinstance(other, VgpuSchedulerParams): + cdef EventSetWait_v3 other_ + if not isinstance(other, EventSetWait_v3): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEventSetWait_v3_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEventSetWait_v3_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEventSetWait_v3_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + raise MemoryError("Error allocating EventSetWait_v3") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEventSetWait_v3_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19179,207 +19282,305 @@ cdef class VgpuSchedulerParams: setattr(self, key, val) @property - def vgpu_sched_data_with_arr(self): - """_py_anon_pod2: """ - return _py_anon_pod2.from_ptr( - &(self._ptr[0].vgpuSchedDataWithARR), - readonly=self._readonly, - owner=self, - ) + def timeout_ms(self): + """int: [in] Maximum amount of time to wait, in milliseconds.""" + return self._ptr[0].timeoutMs - @vgpu_sched_data_with_arr.setter - def vgpu_sched_data_with_arr(self, val): + @timeout_ms.setter + def timeout_ms(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerParams instance is read-only") - cdef _py_anon_pod2 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].timeoutMs = val @property - def vgpu_sched_data(self): - """_py_anon_pod3: """ - return _py_anon_pod3.from_ptr( - &(self._ptr[0].vgpuSchedData), - readonly=self._readonly, - owner=self, - ) + def data_type(self): + """int: [out] `nvmlEventDataType_t` value indicating which event-data format is populated.""" + return self._ptr[0].dataType - @vgpu_sched_data.setter - def vgpu_sched_data(self, val): + @data_type.setter + def data_type(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerParams instance is read-only") - cdef _py_anon_pod3 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].dataType = val - @staticmethod - def from_buffer(buffer): - """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + @property + def uuid(self): + """~_numpy.int8: (array of length 96).[out] UUID for the GPU where the event occurred. Empty if unavailable.""" + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) - @staticmethod - def from_data(data): - """Create an VgpuSchedulerParams instance wrapping the given NumPy array. + @uuid.setter + def uuid(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + cdef bytes buf = val.encode() + if len(buf) >= 96: + raise ValueError("String too long for field uuid, max length is 95") + cdef char *ptr = buf + _cyb_memcpy((self._ptr[0].uuid), ptr, 96) - Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. - """ - return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + @property + def source_module(self): + """~_numpy.int8: (array of length 16).[out] Source module signature for structured events. Not guaranteed to be NULL-terminated. Empty for NVML event-bit events.""" + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].sourceModule) - @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerParams instance wrapping the given pointer. + @source_module.setter + def source_module(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + cdef bytes buf = val.encode() + if len(buf) >= 16: + raise ValueError("String too long for field source_module, max length is 15") + cdef char *ptr = buf + _cyb_memcpy((self._ptr[0].sourceModule), ptr, 16) - Args: - ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. - readonly (bool): whether the data is read-only (to the user). default is `False`. - """ - if ptr == 0: - raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly - return obj + @property + def event_type(self): + """int: [out] NVML event bit for `NVML_EVENT_DATA_TYPE_NVML_EVENT` events; `nvmlEventTypeNone` for structured events.""" + return self._ptr[0].eventType + @event_type.setter + def event_type(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].eventType = val -cdef _get_vgpu_scheduler_set_params_dtype_offsets(): - cdef nvmlVgpuSchedulerSetParams_t pod - return _numpy.dtype({ - 'names': ['vgpu_sched_data_with_arr', 'vgpu_sched_data'], - 'formats': [_py_anon_pod4_dtype, _py_anon_pod5_dtype], - 'offsets': [ - (&(pod.vgpuSchedDataWithARR)) - (&pod), - (&(pod.vgpuSchedData)) - (&pod), - ], - 'itemsize': sizeof(nvmlVgpuSchedulerSetParams_t), - }) + @property + def event_data(self): + """int: [out] Xid code for `nvmlEventTypeXidCriticalError`, or 0 when not applicable.""" + return self._ptr[0].eventData -vgpu_scheduler_set_params_dtype = _get_vgpu_scheduler_set_params_dtype_offsets() + @event_data.setter + def event_data(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].eventData = val -cdef class VgpuSchedulerSetParams: - """Empty-initialize an instance of `nvmlVgpuSchedulerSetParams_t`. + @property + def group_cursor(self): + """int: [out] Structured event group identifier. 0 for NVML event-bit events.""" + return self._ptr[0].groupCursor + @group_cursor.setter + def group_cursor(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].groupCursor = val - .. seealso:: `nvmlVgpuSchedulerSetParams_t` - """ - cdef: - nvmlVgpuSchedulerSetParams_t *_ptr - object _owner - bint _owned - bint _readonly + @property + def instance_id(self): + """int: [out] Structured event sequence identifier. 0 for NVML event-bit events.""" + return self._ptr[0].instanceId - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerSetParams") - self._owner = None - self._owned = True - self._readonly = False + @instance_id.setter + def instance_id(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].instanceId = val - def __dealloc__(self): - cdef nvmlVgpuSchedulerSetParams_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) + @property + def timestamp_usec(self): + """int: [out] Event timestamp in microseconds. 0 if unavailable.""" + return self._ptr[0].timestampUsec - def __repr__(self): - return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" + @timestamp_usec.setter + def timestamp_usec(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].timestampUsec = val @property - def ptr(self): - """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + def trace_id(self): + """int: [out] Structured event trace identifier. 0 for NVML event-bit events.""" + return self._ptr[0].traceId - cdef intptr_t _get_ptr(self): - return (self._ptr) + @trace_id.setter + def trace_id(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].traceId = val - def __int__(self): - return (self._ptr) + @property + def gpu_instance_id(self): + """int: [out] MIG GPU instance ID for NVML event-bit data, or `NVML_GPU_INSTANCE_ID_ANY` when not applicable.""" + return self._ptr[0].gpuInstanceId - def __eq__(self, other): - cdef VgpuSchedulerSetParams other_ - if not isinstance(other, VgpuSchedulerSetParams): - return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + @gpu_instance_id.setter + def gpu_instance_id(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].gpuInstanceId = val - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + @property + def compute_instance_id(self): + """int: [out] MIG compute instance ID for NVML event-bit data, or `NVML_COMPUTE_INSTANCE_ID_ANY` when not applicable.""" + return self._ptr[0].computeInstanceId - def __releasebuffer__(self, Py_buffer *buffer): - pass + @compute_instance_id.setter + def compute_instance_id(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].computeInstanceId = val - def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable - else: - setattr(self, key, val) + @property + def severity(self): + """int: [out] `nvmlOperationalEventSeverity_t` value for structured events. May contain newer severity values not named in this header. `NVML_OPERATIONAL_EVENT_SEVERITY_ALL` for NVML event-bit events.""" + return self._ptr[0].severity + + @severity.setter + def severity(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].severity = val @property - def vgpu_sched_data_with_arr(self): - """_py_anon_pod4: """ - return _py_anon_pod4.from_ptr( - &(self._ptr[0].vgpuSchedDataWithARR), - readonly=self._readonly, - owner=self, - ) + def category_id(self): + """int: [out] Source-defined structured event category identifier. 0 for NVML event-bit events.""" + return self._ptr[0].categoryId - @vgpu_sched_data_with_arr.setter - def vgpu_sched_data_with_arr(self, val): + @category_id.setter + def category_id(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerSetParams instance is read-only") - cdef _py_anon_pod4 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].categoryId = val @property - def vgpu_sched_data(self): - """_py_anon_pod5: """ - return _py_anon_pod5.from_ptr( - &(self._ptr[0].vgpuSchedData), - readonly=self._readonly, - owner=self, - ) + def module_event_code(self): + """int: [out] Source-module-defined event code. Interpret with `sourceModule`. 0 for NVML event-bit events.""" + return self._ptr[0].moduleEventCode - @vgpu_sched_data.setter - def vgpu_sched_data(self, val): + @module_event_code.setter + def module_event_code(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerSetParams instance is read-only") - cdef _py_anon_pod5 val_ = val - _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].moduleEventCode = val + + @property + def scope(self): + """int: [out] Structured event scope identifier. 0 for NVML event-bit events.""" + return self._ptr[0].scope + + @scope.setter + def scope(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].scope = val + + @property + def originator(self): + """int: [out] Structured event originator identifier. 0 for NVML event-bit events.""" + return self._ptr[0].originator + + @originator.setter + def originator(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].originator = val + + @property + def module_instance(self): + """int: [out] Structured event module instance identifier. 0 for NVML event-bit events.""" + return self._ptr[0].moduleInstance + + @module_instance.setter + def module_instance(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].moduleInstance = val + + @property + def chiplet_id(self): + """int: [out] Structured event chiplet identifier. 0 for NVML event-bit events.""" + return self._ptr[0].chipletId + + @chiplet_id.setter + def chiplet_id(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].chipletId = val + + @property + def log_level(self): + """int: [out] `nvmlGpuOperationalEventLogLevel_t` value for structured GPU Operational Events. May contain newer log-level values not named in this header. `NVML_GPU_OPERATIONAL_EVENT_LOG_LEVEL_ALL` for NVML event-bit events.""" + return self._ptr[0].logLevel + + @log_level.setter + def log_level(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].logLevel = val + + @property + def attributes(self): + """int: [out] Bitmask of `NVML_OPERATIONAL_EVENT_ATTR_*` values for structured events. May contain newer bits not named in this header. 0 for NVML event-bit events. May include `NVML_OPERATIONAL_EVENT_ATTR_OVERFLOW` if events or associated payloads were dropped.""" + return self._ptr[0].attributes + + @attributes.setter + def attributes(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].attributes = val + + @property + def group_cper_size(self): + """int: [out] Associated CPER record size in bytes. 0 when unavailable.""" + return self._ptr[0].groupCperSize + + @group_cper_size.setter + def group_cper_size(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].groupCperSize = val + + @property + def group_attributes(self): + """int: [out] Bitmask of `NVML_OPERATIONAL_EVENT_GROUP_ATTR_*` values for structured events. May contain newer bits not named in this header. 0 for NVML event-bit events.""" + return self._ptr[0].groupAttributes + + @group_attributes.setter + def group_attributes(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].groupAttributes = val + + @property + def group_size(self): + """int: [out] Total number of events in the structured event group. 0 for NVML event-bit events.""" + return self._ptr[0].groupSize + + @group_size.setter + def group_size(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].groupSize = val + + @property + def group_index(self): + """int: [out] Zero-based index within the structured event group. 0 for NVML event-bit events.""" + return self._ptr[0].groupIndex + + @group_index.setter + def group_index(self, val): + if self._readonly: + raise ValueError("This EventSetWait_v3 instance is read-only") + self._ptr[0].groupIndex = val @staticmethod def from_buffer(buffer): - """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + """Create an EventSetWait_v3 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlEventSetWait_v3_t), EventSetWait_v3) @staticmethod def from_data(data): - """Create an VgpuSchedulerSetParams instance wrapping the given NumPy array. + """Create an EventSetWait_v3 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `event_set_wait_v3_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + return _cyb_from_data(data, "event_set_wait_v3_dtype", event_set_wait_v3_dtype, EventSetWait_v3) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerSetParams instance wrapping the given pointer. + """Create an EventSetWait_v3 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -19388,66 +19589,66 @@ cdef class VgpuSchedulerSetParams: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) + cdef EventSetWait_v3 obj = EventSetWait_v3.__new__(EventSetWait_v3) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEventSetWait_v3_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerSetParams") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + raise MemoryError("Error allocating EventSetWait_v3") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEventSetWait_v3_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_vgpu_license_info_dtype_offsets(): - cdef nvmlVgpuLicenseInfo_t pod +cdef _get_nvlink_set_bw_mode_async_v1_dtype_offsets(): + cdef nvmlNvlinkSetBwModeAsync_v1_t pod return _numpy.dtype({ - 'names': ['is_licensed', 'license_expiry', 'current_state'], - 'formats': [_numpy.uint8, vgpu_license_expiry_dtype, _numpy.uint32], + 'names': ['b_set_best', 'bw_mode', 'async_poll_timeout_ms'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32], 'offsets': [ - (&(pod.isLicensed)) - (&pod), - (&(pod.licenseExpiry)) - (&pod), - (&(pod.currentState)) - (&pod), + (&(pod.bSetBest)) - (&pod), + (&(pod.bwMode)) - (&pod), + (&(pod.asyncPollTimeoutMs)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuLicenseInfo_t), + 'itemsize': sizeof(nvmlNvlinkSetBwModeAsync_v1_t), }) -vgpu_license_info_dtype = _get_vgpu_license_info_dtype_offsets() +nvlink_set_bw_mode_async_v1_dtype = _get_nvlink_set_bw_mode_async_v1_dtype_offsets() -cdef class VgpuLicenseInfo: - """Empty-initialize an instance of `nvmlVgpuLicenseInfo_t`. +cdef class NvlinkSetBwModeAsync_v1: + """Empty-initialize an instance of `nvmlNvlinkSetBwModeAsync_v1_t`. - .. seealso:: `nvmlVgpuLicenseInfo_t` + .. seealso:: `nvmlNvlinkSetBwModeAsync_v1_t` """ cdef: - nvmlVgpuLicenseInfo_t *_ptr + nvmlNvlinkSetBwModeAsync_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkSetBwModeAsync_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuLicenseInfo") + raise MemoryError("Error allocating NvlinkSetBwModeAsync_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlVgpuLicenseInfo_t *ptr + cdef nvmlNvlinkSetBwModeAsync_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" + return f"<{__name__}.NvlinkSetBwModeAsync_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -19461,24 +19662,24 @@ cdef class VgpuLicenseInfo: return (self._ptr) def __eq__(self, other): - cdef VgpuLicenseInfo other_ - if not isinstance(other, VgpuLicenseInfo): + cdef NvlinkSetBwModeAsync_v1 other_ + if not isinstance(other, NvlinkSetBwModeAsync_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkSetBwModeAsync_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkSetBwModeAsync_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwModeAsync_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + raise MemoryError("Error allocating NvlinkSetBwModeAsync_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkSetBwModeAsync_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19486,60 +19687,55 @@ cdef class VgpuLicenseInfo: setattr(self, key, val) @property - def license_expiry(self): - """VgpuLicenseExpiry: """ - return VgpuLicenseExpiry.from_ptr( - &(self._ptr[0].licenseExpiry), - readonly=self._readonly, - owner=self, - ) + def b_set_best(self): + """int: [in] - Set to the best available Bandwidth mode""" + return self._ptr[0].bSetBest - @license_expiry.setter - def license_expiry(self, val): + @b_set_best.setter + def b_set_best(self, val): if self._readonly: - raise ValueError("This VgpuLicenseInfo instance is read-only") - cdef VgpuLicenseExpiry val_ = val - _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + raise ValueError("This NvlinkSetBwModeAsync_v1 instance is read-only") + self._ptr[0].bSetBest = val @property - def is_licensed(self): - """int: """ - return self._ptr[0].isLicensed + def bw_mode(self): + """int: [in] - Requested Bandwidth mode to set. Values can be found from `nvmlDeviceGetNvlinkSupportedBwModes()`""" + return self._ptr[0].bwMode - @is_licensed.setter - def is_licensed(self, val): + @bw_mode.setter + def bw_mode(self, val): if self._readonly: - raise ValueError("This VgpuLicenseInfo instance is read-only") - self._ptr[0].isLicensed = val + raise ValueError("This NvlinkSetBwModeAsync_v1 instance is read-only") + self._ptr[0].bwMode = val @property - def current_state(self): - """int: """ - return self._ptr[0].currentState + def async_poll_timeout_ms(self): + """int: [out] - Time in ms to poll to validate bandwidth setting.""" + return self._ptr[0].asyncPollTimeoutMs - @current_state.setter - def current_state(self, val): + @async_poll_timeout_ms.setter + def async_poll_timeout_ms(self, val): if self._readonly: - raise ValueError("This VgpuLicenseInfo instance is read-only") - self._ptr[0].currentState = val + raise ValueError("This NvlinkSetBwModeAsync_v1 instance is read-only") + self._ptr[0].asyncPollTimeoutMs = val @staticmethod def from_buffer(buffer): - """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + """Create an NvlinkSetBwModeAsync_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkSetBwModeAsync_v1_t), NvlinkSetBwModeAsync_v1) @staticmethod def from_data(data): - """Create an VgpuLicenseInfo instance wrapping the given NumPy array. + """Create an NvlinkSetBwModeAsync_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `nvlink_set_bw_mode_async_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + return _cyb_from_data(data, "nvlink_set_bw_mode_async_v1_dtype", nvlink_set_bw_mode_async_v1_dtype, NvlinkSetBwModeAsync_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuLicenseInfo instance wrapping the given pointer. + """Create an NvlinkSetBwModeAsync_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -19548,65 +19744,64 @@ cdef class VgpuLicenseInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) + cdef NvlinkSetBwModeAsync_v1 obj = NvlinkSetBwModeAsync_v1.__new__(NvlinkSetBwModeAsync_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkSetBwModeAsync_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuLicenseInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + raise MemoryError("Error allocating NvlinkSetBwModeAsync_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkSetBwModeAsync_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_grid_licensable_feature_dtype_offsets(): - cdef nvmlGridLicensableFeature_t pod +cdef _get_nvlink_telemetry_sample_v1_dtype_offsets(): + cdef nvmlNvlinkTelemetrySample_v1_t pod return _numpy.dtype({ - 'names': ['feature_code', 'feature_state', 'license_info', 'product_name', 'feature_enabled', 'license_expiry'], - 'formats': [_numpy.int32, _numpy.uint32, (_numpy.int8, 128), (_numpy.int8, 128), _numpy.uint32, grid_license_expiry_dtype], + 'names': ['link_id', 'sample_type', 'sample_count', 'samples', 'nvml_return'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp, _numpy.int32], 'offsets': [ - (&(pod.featureCode)) - (&pod), - (&(pod.featureState)) - (&pod), - (&(pod.licenseInfo)) - (&pod), - (&(pod.productName)) - (&pod), - (&(pod.featureEnabled)) - (&pod), - (&(pod.licenseExpiry)) - (&pod), + (&(pod.linkId)) - (&pod), + (&(pod.sampleType)) - (&pod), + (&(pod.sampleCount)) - (&pod), + (&(pod.samples)) - (&pod), + (&(pod.nvmlReturn)) - (&pod), ], - 'itemsize': sizeof(nvmlGridLicensableFeature_t), + 'itemsize': sizeof(nvmlNvlinkTelemetrySample_v1_t), }) -grid_licensable_feature_dtype = _get_grid_licensable_feature_dtype_offsets() +nvlink_telemetry_sample_v1_dtype = _get_nvlink_telemetry_sample_v1_dtype_offsets() -cdef class GridLicensableFeature: - """Empty-initialize an array of `nvmlGridLicensableFeature_t`. - The resulting object is of length `size` and of dtype `grid_licensable_feature_dtype`. +cdef class NvlinkTelemetrySample_v1: + """Empty-initialize an array of `nvmlNvlinkTelemetrySample_v1_t`. + The resulting object is of length `size` and of dtype `nvlink_telemetry_sample_v1_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlGridLicensableFeature_t` + .. seealso:: `nvmlNvlinkTelemetrySample_v1_t` """ cdef: readonly object _data object _owner def __init__(self, size=1): - arr = _numpy.empty(size, dtype=grid_licensable_feature_dtype) + arr = _numpy.empty(size, dtype=nvlink_telemetry_sample_v1_dtype) self._data = arr.view(_numpy.recarray) - assert self._data.itemsize == sizeof(nvmlGridLicensableFeature_t), \ - f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlGridLicensableFeature_t) }" + assert self._data.itemsize == sizeof(nvmlNvlinkTelemetrySample_v1_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlNvlinkTelemetrySample_v1_t) }" def __repr__(self): if self._data.size > 1: - return f"<{__name__}.GridLicensableFeature_Array_{self._data.size} object at {hex(id(self))}>" + return f"<{__name__}.NvlinkTelemetrySample_v1_Array_{self._data.size} object at {hex(id(self))}>" else: - return f"<{__name__}.GridLicensableFeature object at {hex(id(self))}>" + return f"<{__name__}.NvlinkTelemetrySample_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -19627,7 +19822,7 @@ cdef class GridLicensableFeature: def __eq__(self, other): cdef object self_data = self._data - if (not isinstance(other, GridLicensableFeature)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + if (not isinstance(other, NvlinkTelemetrySample_v1)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False return bool((self_data == other._data).all()) @@ -19638,64 +19833,59 @@ cdef class GridLicensableFeature: _cyb_cpython.PyBuffer_Release(buffer) @property - def feature_code(self): - """Union[~_numpy.int32, int]: """ + def link_id(self): + """Union[~_numpy.uint32, int]: [in] LinkId""" if self._data.size == 1: - return int(self._data.feature_code[0]) - return self._data.feature_code + return int(self._data.link_id[0]) + return self._data.link_id - @feature_code.setter - def feature_code(self, val): - self._data.feature_code = val + @link_id.setter + def link_id(self, val): + self._data.link_id = val @property - def feature_state(self): - """Union[~_numpy.uint32, int]: """ + def sample_type(self): + """Union[~_numpy.uint32, int]: [in] Type of telemetry to sample, specified by `nvmlNvlinkTelemetrySampleType_t`""" if self._data.size == 1: - return int(self._data.feature_state[0]) - return self._data.feature_state + return int(self._data.sample_type[0]) + return self._data.sample_type - @feature_state.setter - def feature_state(self, val): - self._data.feature_state = val + @sample_type.setter + def sample_type(self, val): + self._data.sample_type = val @property - def license_info(self): - """~_numpy.int8: (array of length 128).""" - return self._data.license_info + def sample_count(self): + """Union[~_numpy.uint32, int]: [in,out]: Number of samples users need to allocate. If set to 0, will return max supported count of samples without touching the ``samples`` pointer.""" + if self._data.size == 1: + return int(self._data.sample_count[0]) + return self._data.sample_count - @license_info.setter - def license_info(self, val): - self._data.license_info = val + @sample_count.setter + def sample_count(self, val): + self._data.sample_count = val @property - def product_name(self): - """~_numpy.int8: (array of length 128).""" - return self._data.product_name + def samples(self): + """Union[~_numpy.intp, int]: [in,out]: Array of samples allocated by the user. Can be set to NULL when getting count""" + if self._data.size == 1: + return int(self._data.samples[0]) + return self._data.samples - @product_name.setter - def product_name(self, val): - self._data.product_name = val + @samples.setter + def samples(self, val): + self._data.samples = val @property - def feature_enabled(self): - """Union[~_numpy.uint32, int]: """ + def nvml_return(self): + """Union[~_numpy.int32, int]: [out]: Return code for retrieving this sample. This must be checked by the client before looking at any output values, as they are invalid if ``nvmlReturn != NVML_SUCCESS``.""" if self._data.size == 1: - return int(self._data.feature_enabled[0]) - return self._data.feature_enabled - - @feature_enabled.setter - def feature_enabled(self, val): - self._data.feature_enabled = val + return int(self._data.nvml_return[0]) + return self._data.nvml_return - @property - def license_expiry(self): - """grid_license_expiry_dtype: """ - return self._data.license_expiry - - @license_expiry.setter - def license_expiry(self, val): - self._data.license_expiry = val + @nvml_return.setter + def nvml_return(self, val): + self._data.nvml_return = val def __getitem__(self, key): cdef ssize_t key_ @@ -19707,10 +19897,10 @@ cdef class GridLicensableFeature: raise IndexError("index is out of bounds") if key_ < 0: key_ += size - return GridLicensableFeature.from_data(self._data[key_:key_+1]) + return NvlinkTelemetrySample_v1.from_data(self._data[key_:key_+1]) out = self._data[key] - if isinstance(out, _numpy.recarray) and out.dtype == grid_licensable_feature_dtype: - return GridLicensableFeature.from_data(out) + if isinstance(out, _numpy.recarray) and out.dtype == nvlink_telemetry_sample_v1_dtype: + return NvlinkTelemetrySample_v1.from_data(out) return out def __setitem__(self, key, val): @@ -19718,30 +19908,30 @@ cdef class GridLicensableFeature: @staticmethod def from_buffer(buffer): - """Create an GridLicensableFeature instance with the memory from the given buffer.""" - return GridLicensableFeature.from_data(_numpy.frombuffer(buffer, dtype=grid_licensable_feature_dtype)) + """Create an NvlinkTelemetrySample_v1 instance with the memory from the given buffer.""" + return NvlinkTelemetrySample_v1.from_data(_numpy.frombuffer(buffer, dtype=nvlink_telemetry_sample_v1_dtype)) @staticmethod def from_data(data): - """Create an GridLicensableFeature instance wrapping the given NumPy array. + """Create an NvlinkTelemetrySample_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a 1D array of dtype `grid_licensable_feature_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `nvlink_telemetry_sample_v1_dtype` holding the data. """ - cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) + cdef NvlinkTelemetrySample_v1 obj = NvlinkTelemetrySample_v1.__new__(NvlinkTelemetrySample_v1) if not isinstance(data, _numpy.ndarray): raise TypeError("data argument must be a NumPy ndarray") if data.ndim != 1: raise ValueError("data array must be 1D") - if data.dtype != grid_licensable_feature_dtype: - raise ValueError("data array must be of dtype grid_licensable_feature_dtype") + if data.dtype != nvlink_telemetry_sample_v1_dtype: + raise ValueError("data array must be of dtype nvlink_telemetry_sample_v1_dtype") obj._data = data.view(_numpy.recarray) return obj @staticmethod def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): - """Create an GridLicensableFeature instance wrapping the given pointer. + """Create an NvlinkTelemetrySample_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -19752,60 +19942,60 @@ cdef class GridLicensableFeature: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) + cdef NvlinkTelemetrySample_v1 obj = NvlinkTelemetrySample_v1.__new__(NvlinkTelemetrySample_v1) cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( - ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) - data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) + ptr, sizeof(nvmlNvlinkTelemetrySample_v1_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=nvlink_telemetry_sample_v1_dtype) obj._data = data.view(_numpy.recarray) obj._owner = owner return obj -cdef _get_unit_fan_speeds_dtype_offsets(): - cdef nvmlUnitFanSpeeds_t pod +cdef _get_ecc_bank_remapper_histogram_v1_dtype_offsets(): + cdef nvmlEccBankRemapperHistogram_v1_t pod return _numpy.dtype({ - 'names': ['fans', 'count'], - 'formats': [(unit_fan_info_dtype, 24), _numpy.uint32], + 'names': ['max_spare_group_count', 'no_spare_group_count'], + 'formats': [_numpy.uint32, _numpy.uint32], 'offsets': [ - (&(pod.fans)) - (&pod), - (&(pod.count)) - (&pod), + (&(pod.maxSpareGroupCount)) - (&pod), + (&(pod.noSpareGroupCount)) - (&pod), ], - 'itemsize': sizeof(nvmlUnitFanSpeeds_t), + 'itemsize': sizeof(nvmlEccBankRemapperHistogram_v1_t), }) -unit_fan_speeds_dtype = _get_unit_fan_speeds_dtype_offsets() +ecc_bank_remapper_histogram_v1_dtype = _get_ecc_bank_remapper_histogram_v1_dtype_offsets() -cdef class UnitFanSpeeds: - """Empty-initialize an instance of `nvmlUnitFanSpeeds_t`. +cdef class EccBankRemapperHistogram_v1: + """Empty-initialize an instance of `nvmlEccBankRemapperHistogram_v1_t`. - .. seealso:: `nvmlUnitFanSpeeds_t` + .. seealso:: `nvmlEccBankRemapperHistogram_v1_t` """ cdef: - nvmlUnitFanSpeeds_t *_ptr + nvmlEccBankRemapperHistogram_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlEccBankRemapperHistogram_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating UnitFanSpeeds") + raise MemoryError("Error allocating EccBankRemapperHistogram_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlUnitFanSpeeds_t *ptr + cdef nvmlEccBankRemapperHistogram_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" + return f"<{__name__}.EccBankRemapperHistogram_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -19819,24 +20009,24 @@ cdef class UnitFanSpeeds: return (self._ptr) def __eq__(self, other): - cdef UnitFanSpeeds other_ - if not isinstance(other, UnitFanSpeeds): + cdef EccBankRemapperHistogram_v1 other_ + if not isinstance(other, EccBankRemapperHistogram_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccBankRemapperHistogram_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccBankRemapperHistogram_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + self._ptr = _cyb_malloc(sizeof(nvmlEccBankRemapperHistogram_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + raise MemoryError("Error allocating EccBankRemapperHistogram_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccBankRemapperHistogram_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -19844,52 +20034,44 @@ cdef class UnitFanSpeeds: setattr(self, key, val) @property - def fans(self): - """UnitFanInfo: """ - return UnitFanInfo.from_ptr( - &(self._ptr[0].fans), - 24, - readonly=self._readonly, - owner=self, - ) + def max_spare_group_count(self): + """int: Number of groups that have maximum spare.""" + return self._ptr[0].maxSpareGroupCount - @fans.setter - def fans(self, val): + @max_spare_group_count.setter + def max_spare_group_count(self, val): if self._readonly: - raise ValueError("This UnitFanSpeeds instance is read-only") - cdef UnitFanInfo val_ = val - if len(val) != 24: - raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + raise ValueError("This EccBankRemapperHistogram_v1 instance is read-only") + self._ptr[0].maxSpareGroupCount = val @property - def count(self): - """int: """ - return self._ptr[0].count + def no_spare_group_count(self): + """int: Number of groups that have not spare.""" + return self._ptr[0].noSpareGroupCount - @count.setter - def count(self, val): + @no_spare_group_count.setter + def no_spare_group_count(self, val): if self._readonly: - raise ValueError("This UnitFanSpeeds instance is read-only") - self._ptr[0].count = val + raise ValueError("This EccBankRemapperHistogram_v1 instance is read-only") + self._ptr[0].noSpareGroupCount = val @staticmethod def from_buffer(buffer): - """Create an UnitFanSpeeds instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + """Create an EccBankRemapperHistogram_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlEccBankRemapperHistogram_v1_t), EccBankRemapperHistogram_v1) @staticmethod def from_data(data): - """Create an UnitFanSpeeds instance wrapping the given NumPy array. + """Create an EccBankRemapperHistogram_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `ecc_bank_remapper_histogram_v1_dtype` holding the data. """ - return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + return _cyb_from_data(data, "ecc_bank_remapper_histogram_v1_dtype", ecc_bank_remapper_histogram_v1_dtype, EccBankRemapperHistogram_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an UnitFanSpeeds instance wrapping the given pointer. + """Create an EccBankRemapperHistogram_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -19898,71 +20080,65 @@ cdef class UnitFanSpeeds: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) + cdef EccBankRemapperHistogram_v1 obj = EccBankRemapperHistogram_v1.__new__(EccBankRemapperHistogram_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlEccBankRemapperHistogram_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating UnitFanSpeeds") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + raise MemoryError("Error allocating EccBankRemapperHistogram_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccBankRemapperHistogram_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_vgpu_pgpu_metadata_dtype_offsets(): - cdef nvmlVgpuPgpuMetadata_t pod +cdef _get_excluded_device_info_dtype_offsets(): + cdef nvmlExcludedDeviceInfo_t pod return _numpy.dtype({ - 'names': ['version', 'revision', 'host_driver_version', 'pgpu_virtualization_caps', 'reserved', 'host_supported_vgpu_range', 'opaque_data_size', 'opaque_data'], - 'formats': [_numpy.uint32, _numpy.uint32, (_numpy.int8, 80), _numpy.uint32, (_numpy.uint32, 5), vgpu_version_dtype, _numpy.uint32, (_numpy.int8, 4)], + 'names': ['pci_info', 'uuid'], + 'formats': [pci_info_dtype, (_numpy.int8, 80)], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.revision)) - (&pod), - (&(pod.hostDriverVersion)) - (&pod), - (&(pod.pgpuVirtualizationCaps)) - (&pod), - (&(pod.reserved)) - (&pod), - (&(pod.hostSupportedVgpuRange)) - (&pod), - (&(pod.opaqueDataSize)) - (&pod), - (&(pod.opaqueData)) - (&pod), + (&(pod.pciInfo)) - (&pod), + (&(pod.uuid)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuPgpuMetadata_t), + 'itemsize': sizeof(nvmlExcludedDeviceInfo_t), }) -vgpu_pgpu_metadata_dtype = _get_vgpu_pgpu_metadata_dtype_offsets() +excluded_device_info_dtype = _get_excluded_device_info_dtype_offsets() -cdef class VgpuPgpuMetadata: - """Empty-initialize an instance of `nvmlVgpuPgpuMetadata_t`. +cdef class ExcludedDeviceInfo: + """Empty-initialize an instance of `nvmlExcludedDeviceInfo_t`. - .. seealso:: `nvmlVgpuPgpuMetadata_t` + .. seealso:: `nvmlExcludedDeviceInfo_t` """ cdef: - nvmlVgpuPgpuMetadata_t *_ptr + nvmlExcludedDeviceInfo_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuPgpuMetadata") + raise MemoryError("Error allocating ExcludedDeviceInfo") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlVgpuPgpuMetadata_t *ptr + cdef nvmlExcludedDeviceInfo_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" + return f"<{__name__}.ExcludedDeviceInfo object at {hex(id(self))}>" @property def ptr(self): @@ -19976,24 +20152,24 @@ cdef class VgpuPgpuMetadata: return (self._ptr) def __eq__(self, other): - cdef VgpuPgpuMetadata other_ - if not isinstance(other, VgpuPgpuMetadata): + cdef ExcludedDeviceInfo other_ + if not isinstance(other, ExcludedDeviceInfo): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlExcludedDeviceInfo_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlExcludedDeviceInfo_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + self._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + raise MemoryError("Error allocating ExcludedDeviceInfo") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlExcludedDeviceInfo_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20001,112 +20177,53 @@ cdef class VgpuPgpuMetadata: setattr(self, key, val) @property - def host_supported_vgpu_range(self): - """VgpuVersion: """ - return VgpuVersion.from_ptr( - &(self._ptr[0].hostSupportedVgpuRange), + def pci_info(self): + """PciInfo: """ + return PciInfo.from_ptr( + &(self._ptr[0].pciInfo), readonly=self._readonly, owner=self, ) - @host_supported_vgpu_range.setter - def host_supported_vgpu_range(self, val): - if self._readonly: - raise ValueError("This VgpuPgpuMetadata instance is read-only") - cdef VgpuVersion val_ = val - _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) - - @property - def version(self): - """int: """ - return self._ptr[0].version - - @version.setter - def version(self, val): - if self._readonly: - raise ValueError("This VgpuPgpuMetadata instance is read-only") - self._ptr[0].version = val - - @property - def revision(self): - """int: """ - return self._ptr[0].revision - - @revision.setter - def revision(self, val): + @pci_info.setter + def pci_info(self, val): if self._readonly: - raise ValueError("This VgpuPgpuMetadata instance is read-only") - self._ptr[0].revision = val + raise ValueError("This ExcludedDeviceInfo instance is read-only") + cdef PciInfo val_ = val + _cyb_memcpy(&(self._ptr[0].pciInfo), (val_._get_ptr()), sizeof(nvmlPciInfo_t) * 1) @property - def host_driver_version(self): + def uuid(self): """~_numpy.int8: (array of length 80).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].uuid) - @host_driver_version.setter - def host_driver_version(self, val): + @uuid.setter + def uuid(self, val): if self._readonly: - raise ValueError("This VgpuPgpuMetadata instance is read-only") + raise ValueError("This ExcludedDeviceInfo instance is read-only") cdef bytes buf = val.encode() if len(buf) >= 80: - raise ValueError("String too long for field host_driver_version, max length is 79") - cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) - - @property - def pgpu_virtualization_caps(self): - """int: """ - return self._ptr[0].pgpuVirtualizationCaps - - @pgpu_virtualization_caps.setter - def pgpu_virtualization_caps(self, val): - if self._readonly: - raise ValueError("This VgpuPgpuMetadata instance is read-only") - self._ptr[0].pgpuVirtualizationCaps = val - - @property - def opaque_data_size(self): - """int: """ - return self._ptr[0].opaqueDataSize - - @opaque_data_size.setter - def opaque_data_size(self, val): - if self._readonly: - raise ValueError("This VgpuPgpuMetadata instance is read-only") - self._ptr[0].opaqueDataSize = val - - @property - def opaque_data(self): - """~_numpy.int8: (array of length 4).""" - return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) - - @opaque_data.setter - def opaque_data(self, val): - if self._readonly: - raise ValueError("This VgpuPgpuMetadata instance is read-only") - cdef bytes buf = val.encode() - if len(buf) >= 4: - raise ValueError("String too long for field opaque_data, max length is 3") + raise ValueError("String too long for field uuid, max length is 79") cdef char *ptr = buf - _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + _cyb_memcpy((self._ptr[0].uuid), ptr, 80) @staticmethod def from_buffer(buffer): - """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + """Create an ExcludedDeviceInfo instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlExcludedDeviceInfo_t), ExcludedDeviceInfo) @staticmethod def from_data(data): - """Create an VgpuPgpuMetadata instance wrapping the given NumPy array. + """Create an ExcludedDeviceInfo instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `excluded_device_info_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + return _cyb_from_data(data, "excluded_device_info_dtype", excluded_device_info_dtype, ExcludedDeviceInfo) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuPgpuMetadata instance wrapping the given pointer. + """Create an ExcludedDeviceInfo instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -20115,67 +20232,69 @@ cdef class VgpuPgpuMetadata: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) + cdef ExcludedDeviceInfo obj = ExcludedDeviceInfo.__new__(ExcludedDeviceInfo) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlExcludedDeviceInfo_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuPgpuMetadata") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + raise MemoryError("Error allocating ExcludedDeviceInfo") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlExcludedDeviceInfo_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_gpu_instance_info_dtype_offsets(): - cdef nvmlGpuInstanceInfo_t pod +cdef _get_process_detail_list_v1_dtype_offsets(): + cdef nvmlProcessDetailList_v1_t pod return _numpy.dtype({ - 'names': ['device_', 'id', 'profile_id', 'placement'], - 'formats': [_numpy.intp, _numpy.uint32, _numpy.uint32, gpu_instance_placement_dtype], + 'names': ['version', 'mode', 'num_proc_array_entries', 'proc_array'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.intp], 'offsets': [ - (&(pod.device)) - (&pod), - (&(pod.id)) - (&pod), - (&(pod.profileId)) - (&pod), - (&(pod.placement)) - (&pod), + (&(pod.version)) - (&pod), + (&(pod.mode)) - (&pod), + (&(pod.numProcArrayEntries)) - (&pod), + (&(pod.procArray)) - (&pod), ], - 'itemsize': sizeof(nvmlGpuInstanceInfo_t), + 'itemsize': sizeof(nvmlProcessDetailList_v1_t), }) -gpu_instance_info_dtype = _get_gpu_instance_info_dtype_offsets() +process_detail_list_v1_dtype = _get_process_detail_list_v1_dtype_offsets() -cdef class GpuInstanceInfo: - """Empty-initialize an instance of `nvmlGpuInstanceInfo_t`. +cdef class ProcessDetailList_v1: + """Empty-initialize an instance of `nvmlProcessDetailList_v1_t`. - .. seealso:: `nvmlGpuInstanceInfo_t` + .. seealso:: `nvmlProcessDetailList_v1_t` """ cdef: - nvmlGpuInstanceInfo_t *_ptr + nvmlProcessDetailList_v1_t *_ptr object _owner bint _owned bint _readonly + dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GpuInstanceInfo") + raise MemoryError("Error allocating ProcessDetailList_v1") self._owner = None self._owned = True self._readonly = False + self._refs = {} def __dealloc__(self): - cdef nvmlGpuInstanceInfo_t *ptr + cdef nvmlProcessDetailList_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" + return f"<{__name__}.ProcessDetailList_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -20189,24 +20308,24 @@ cdef class GpuInstanceInfo: return (self._ptr) def __eq__(self, other): - cdef GpuInstanceInfo other_ - if not isinstance(other, GpuInstanceInfo): + cdef ProcessDetailList_v1 other_ + if not isinstance(other, ProcessDetailList_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessDetailList_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessDetailList_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + raise MemoryError("Error allocating ProcessDetailList_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessDetailList_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20214,72 +20333,65 @@ cdef class GpuInstanceInfo: setattr(self, key, val) @property - def placement(self): - """GpuInstancePlacement: """ - return GpuInstancePlacement.from_ptr( - &(self._ptr[0].placement), - 1, - readonly=self._readonly, - owner=self, - ) - - @placement.setter - def placement(self, val): - if self._readonly: - raise ValueError("This GpuInstanceInfo instance is read-only") - cdef GpuInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) - - @property - def device_(self): - """int: """ - return (self._ptr[0].device) + def version(self): + """int: Struct version, MUST be nvmlProcessDetailList_v1.""" + return self._ptr[0].version - @device_.setter - def device_(self, val): + @version.setter + def version(self, val): if self._readonly: - raise ValueError("This GpuInstanceInfo instance is read-only") - self._ptr[0].device = val + raise ValueError("This ProcessDetailList_v1 instance is read-only") + self._ptr[0].version = val @property - def id(self): - """int: """ - return self._ptr[0].id + def mode(self): + """int: Process mode, One of `nvmlProcessMode_t`.""" + return self._ptr[0].mode - @id.setter - def id(self, val): + @mode.setter + def mode(self, val): if self._readonly: - raise ValueError("This GpuInstanceInfo instance is read-only") - self._ptr[0].id = val + raise ValueError("This ProcessDetailList_v1 instance is read-only") + self._ptr[0].mode = val @property - def profile_id(self): - """int: """ - return self._ptr[0].profileId + def proc_array(self): + """int: Process array.""" + if self._ptr[0].procArray == NULL or self._ptr[0].numProcArrayEntries == 0: + return [] + return ProcessDetail_v1.from_ptr( + (self._ptr[0].procArray), + self._ptr[0].numProcArrayEntries, + owner=self, + readonly=self._readonly + ) - @profile_id.setter - def profile_id(self, val): + @proc_array.setter + def proc_array(self, val): if self._readonly: - raise ValueError("This GpuInstanceInfo instance is read-only") - self._ptr[0].profileId = val + raise ValueError("This ProcessDetailList_v1 instance is read-only") + cdef ProcessDetail_v1 arr = val + self._ptr[0].procArray = (arr._get_ptr()) + self._ptr[0].numProcArrayEntries = len(arr) + self._refs["proc_array"] = arr @staticmethod def from_buffer(buffer): - """Create an GpuInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + """Create an ProcessDetailList_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlProcessDetailList_v1_t), ProcessDetailList_v1) @staticmethod def from_data(data): - """Create an GpuInstanceInfo instance wrapping the given NumPy array. + """Create an ProcessDetailList_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `process_detail_list_v1_dtype` holding the data. """ - return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + return _cyb_from_data(data, "process_detail_list_v1_dtype", process_detail_list_v1_dtype, ProcessDetailList_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an GpuInstanceInfo instance wrapping the given pointer. + """Create an ProcessDetailList_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -20288,68 +20400,66 @@ cdef class GpuInstanceInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) + cdef ProcessDetailList_v1 obj = ProcessDetailList_v1.__new__(ProcessDetailList_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlProcessDetailList_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating GpuInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + raise MemoryError("Error allocating ProcessDetailList_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessDetailList_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly + obj._refs = {} return obj -cdef _get_compute_instance_info_dtype_offsets(): - cdef nvmlComputeInstanceInfo_t pod +cdef _get_bridge_chip_hierarchy_dtype_offsets(): + cdef nvmlBridgeChipHierarchy_t pod return _numpy.dtype({ - 'names': ['device_', 'gpu_instance', 'id', 'profile_id', 'placement'], - 'formats': [_numpy.intp, _numpy.intp, _numpy.uint32, _numpy.uint32, compute_instance_placement_dtype], + 'names': ['bridge_count', 'bridge_chip_info'], + 'formats': [_numpy.uint8, (bridge_chip_info_dtype, 128)], 'offsets': [ - (&(pod.device)) - (&pod), - (&(pod.gpuInstance)) - (&pod), - (&(pod.id)) - (&pod), - (&(pod.profileId)) - (&pod), - (&(pod.placement)) - (&pod), + (&(pod.bridgeCount)) - (&pod), + (&(pod.bridgeChipInfo)) - (&pod), ], - 'itemsize': sizeof(nvmlComputeInstanceInfo_t), + 'itemsize': sizeof(nvmlBridgeChipHierarchy_t), }) -compute_instance_info_dtype = _get_compute_instance_info_dtype_offsets() +bridge_chip_hierarchy_dtype = _get_bridge_chip_hierarchy_dtype_offsets() -cdef class ComputeInstanceInfo: - """Empty-initialize an instance of `nvmlComputeInstanceInfo_t`. +cdef class BridgeChipHierarchy: + """Empty-initialize an instance of `nvmlBridgeChipHierarchy_t`. - .. seealso:: `nvmlComputeInstanceInfo_t` + .. seealso:: `nvmlBridgeChipHierarchy_t` """ cdef: - nvmlComputeInstanceInfo_t *_ptr + nvmlBridgeChipHierarchy_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ComputeInstanceInfo") + raise MemoryError("Error allocating BridgeChipHierarchy") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlComputeInstanceInfo_t *ptr + cdef nvmlBridgeChipHierarchy_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" + return f"<{__name__}.BridgeChipHierarchy object at {hex(id(self))}>" @property def ptr(self): @@ -20363,24 +20473,24 @@ cdef class ComputeInstanceInfo: return (self._ptr) def __eq__(self, other): - cdef ComputeInstanceInfo other_ - if not isinstance(other, ComputeInstanceInfo): + cdef BridgeChipHierarchy other_ + if not isinstance(other, BridgeChipHierarchy): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlBridgeChipHierarchy_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlBridgeChipHierarchy_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if self._ptr == NULL: - raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + raise MemoryError("Error allocating BridgeChipHierarchy") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlBridgeChipHierarchy_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20388,83 +20498,44 @@ cdef class ComputeInstanceInfo: setattr(self, key, val) @property - def placement(self): - """ComputeInstancePlacement: """ - return ComputeInstancePlacement.from_ptr( - &(self._ptr[0].placement), - 1, + def bridge_chip_info(self): + """BridgeChipInfo: """ + return BridgeChipInfo.from_ptr( + &(self._ptr[0].bridgeChipInfo), + self._ptr[0].bridgeCount, readonly=self._readonly, owner=self, ) - @placement.setter - def placement(self, val): - if self._readonly: - raise ValueError("This ComputeInstanceInfo instance is read-only") - cdef ComputeInstancePlacement val_ = val - _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) - - @property - def device_(self): - """int: """ - return (self._ptr[0].device) - - @device_.setter - def device_(self, val): - if self._readonly: - raise ValueError("This ComputeInstanceInfo instance is read-only") - self._ptr[0].device = val - - @property - def gpu_instance(self): - """int: """ - return (self._ptr[0].gpuInstance) - - @gpu_instance.setter - def gpu_instance(self, val): - if self._readonly: - raise ValueError("This ComputeInstanceInfo instance is read-only") - self._ptr[0].gpuInstance = val - - @property - def id(self): - """int: """ - return self._ptr[0].id - - @id.setter - def id(self, val): - if self._readonly: - raise ValueError("This ComputeInstanceInfo instance is read-only") - self._ptr[0].id = val - - @property - def profile_id(self): - """int: """ - return self._ptr[0].profileId - - @profile_id.setter - def profile_id(self, val): + @bridge_chip_info.setter + def bridge_chip_info(self, val): if self._readonly: - raise ValueError("This ComputeInstanceInfo instance is read-only") - self._ptr[0].profileId = val + raise ValueError("This BridgeChipHierarchy instance is read-only") + cdef BridgeChipInfo val_ = val + if len(val) > 128: + raise ValueError(f"Expected length < 128 for field bridge_chip_info, got {len(val)}") + self._ptr[0].bridgeCount = len(val) + if len(val) == 0: + return + _cyb_memcpy(&(self._ptr[0].bridgeChipInfo), (val_._get_ptr()), sizeof(nvmlBridgeChipInfo_t) * self._ptr[0].bridgeCount) @staticmethod def from_buffer(buffer): - """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + """Create an BridgeChipHierarchy instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlBridgeChipHierarchy_t), BridgeChipHierarchy) @staticmethod def from_data(data): - """Create an ComputeInstanceInfo instance wrapping the given NumPy array. + """Create an BridgeChipHierarchy instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `bridge_chip_hierarchy_dtype` holding the data. """ - return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + return _cyb_from_data(data, "bridge_chip_hierarchy_dtype", bridge_chip_hierarchy_dtype, BridgeChipHierarchy) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an ComputeInstanceInfo instance wrapping the given pointer. + """Create an BridgeChipHierarchy instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -20473,222 +20544,5638 @@ cdef class ComputeInstanceInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) + cdef BridgeChipHierarchy obj = BridgeChipHierarchy.__new__(BridgeChipHierarchy) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlBridgeChipHierarchy_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating ComputeInstanceInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + raise MemoryError("Error allocating BridgeChipHierarchy") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlBridgeChipHierarchy_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_ecc_sram_unique_uncorrected_error_counts_v1_dtype_offsets(): - cdef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t pod +cdef _get_sample_dtype_offsets(): + cdef nvmlSample_t pod return _numpy.dtype({ - 'names': ['version', 'entry_count', 'entries'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.intp], + 'names': ['time_stamp', 'sample_value'], + 'formats': [_numpy.uint64, value_dtype], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.entryCount)) - (&pod), - (&(pod.entries)) - (&pod), + (&(pod.timeStamp)) - (&pod), + (&(pod.sampleValue)) - (&pod), ], - 'itemsize': sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), + 'itemsize': sizeof(nvmlSample_t), }) -ecc_sram_unique_uncorrected_error_counts_v1_dtype = _get_ecc_sram_unique_uncorrected_error_counts_v1_dtype_offsets() +sample_dtype = _get_sample_dtype_offsets() -cdef class EccSramUniqueUncorrectedErrorCounts_v1: - """Empty-initialize an instance of `nvmlEccSramUniqueUncorrectedErrorCounts_v1_t`. +cdef class Sample: + """Empty-initialize an array of `nvmlSample_t`. + The resulting object is of length `size` and of dtype `sample_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlEccSramUniqueUncorrectedErrorCounts_v1_t` + .. seealso:: `nvmlSample_t` """ cdef: - nvmlEccSramUniqueUncorrectedErrorCounts_v1_t *_ptr + readonly object _data object _owner - bint _owned - bint _readonly - dict _refs - - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - self._owner = None - self._owned = True - self._readonly = False - self._refs = {} - def __dealloc__(self): - cdef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=sample_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlSample_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlSample_t) }" def __repr__(self): - return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" + if self._data.size > 1: + return f"<{__name__}.Sample_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.Sample object at {hex(id(self))}>" @property def ptr(self): """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + return self._data.ctypes.data cdef intptr_t _get_ptr(self): - return (self._ptr) + return self._data.ctypes.data def __int__(self): - return (self._ptr) + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size def __eq__(self, other): - cdef EccSramUniqueUncorrectedErrorCounts_v1 other_ - if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): + cdef object self_data = self._data + if (not isinstance(other, Sample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + return bool((self_data == other._data).all()) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - pass - - def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable - else: - setattr(self, key, val) + _cyb_cpython.PyBuffer_Release(buffer) @property - def version(self): - """int: the API version number""" - return self._ptr[0].version + def time_stamp(self): + """Union[~_numpy.uint64, int]: """ + if self._data.size == 1: + return int(self._data.time_stamp[0]) + return self._data.time_stamp - @version.setter - def version(self, val): - if self._readonly: - raise ValueError("This EccSramUniqueUncorrectedErrorCounts_v1 instance is read-only") - self._ptr[0].version = val + @time_stamp.setter + def time_stamp(self, val): + self._data.time_stamp = val @property - def entries(self): - """int: pointer to caller-supplied buffer to return the SRAM unique uncorrected ECC error count entries""" - if self._ptr[0].entries == NULL or self._ptr[0].entryCount == 0: - return [] - return EccSramUniqueUncorrectedErrorEntry_v1.from_ptr( - (self._ptr[0].entries), - self._ptr[0].entryCount, - owner=self, - readonly=self._readonly - ) + def sample_value(self): + """value_dtype: """ + return self._data.sample_value - @entries.setter - def entries(self, val): - if self._readonly: - raise ValueError("This EccSramUniqueUncorrectedErrorCounts_v1 instance is read-only") - cdef EccSramUniqueUncorrectedErrorEntry_v1 arr = val - self._ptr[0].entries = (arr._get_ptr()) - self._ptr[0].entryCount = len(arr) - self._refs["entries"] = arr + @sample_value.setter + def sample_value(self, val): + self._data.sample_value = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return Sample.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == sample_dtype: + return Sample.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + """Create an Sample instance with the memory from the given buffer.""" + return Sample.from_data(_numpy.frombuffer(buffer, dtype=sample_dtype)) @staticmethod def from_data(data): - """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance wrapping the given NumPy array. + """Create an Sample instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `sample_dtype` holding the data. """ - return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + cdef Sample obj = Sample.__new__(Sample) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != sample_dtype: + raise ValueError("data array must be of dtype sample_dtype") + obj._data = data.view(_numpy.recarray) + + return obj @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance wrapping the given pointer. + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an Sample instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. + size (int): number of structs, default=1. readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly - obj._refs = {} + cdef Sample obj = Sample.__new__(Sample) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlSample_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=sample_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + return obj -cdef _get_nvlink_firmware_info_dtype_offsets(): - cdef nvmlNvlinkFirmwareInfo_t pod +cdef _get_vgpu_instance_utilization_sample_dtype_offsets(): + cdef nvmlVgpuInstanceUtilizationSample_t pod return _numpy.dtype({ - 'names': ['firmware_version', 'num_valid_entries'], - 'formats': [(nvlink_firmware_version_dtype, 100), _numpy.uint32], + 'names': ['vgpu_instance', 'time_stamp', 'sm_util', 'mem_util', 'enc_util', 'dec_util'], + 'formats': [_numpy.uint32, _numpy.uint64, value_dtype, value_dtype, value_dtype, value_dtype], 'offsets': [ - (&(pod.firmwareVersion)) - (&pod), - (&(pod.numValidEntries)) - (&pod), + (&(pod.vgpuInstance)) - (&pod), + (&(pod.timeStamp)) - (&pod), + (&(pod.smUtil)) - (&pod), + (&(pod.memUtil)) - (&pod), + (&(pod.encUtil)) - (&pod), + (&(pod.decUtil)) - (&pod), ], - 'itemsize': sizeof(nvmlNvlinkFirmwareInfo_t), + 'itemsize': sizeof(nvmlVgpuInstanceUtilizationSample_t), }) -nvlink_firmware_info_dtype = _get_nvlink_firmware_info_dtype_offsets() +vgpu_instance_utilization_sample_dtype = _get_vgpu_instance_utilization_sample_dtype_offsets() -cdef class NvlinkFirmwareInfo: - """Empty-initialize an instance of `nvmlNvlinkFirmwareInfo_t`. +cdef class VgpuInstanceUtilizationSample: + """Empty-initialize an array of `nvmlVgpuInstanceUtilizationSample_t`. + The resulting object is of length `size` and of dtype `vgpu_instance_utilization_sample_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlNvlinkFirmwareInfo_t` + .. seealso:: `nvmlVgpuInstanceUtilizationSample_t` """ cdef: - nvmlNvlinkFirmwareInfo_t *_ptr + readonly object _data object _owner - bint _owned - bint _readonly - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=vgpu_instance_utilization_sample_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlVgpuInstanceUtilizationSample_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlVgpuInstanceUtilizationSample_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.VgpuInstanceUtilizationSample_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.VgpuInstanceUtilizationSample object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, VgpuInstanceUtilizationSample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def vgpu_instance(self): + """Union[~_numpy.uint32, int]: """ + if self._data.size == 1: + return int(self._data.vgpu_instance[0]) + return self._data.vgpu_instance + + @vgpu_instance.setter + def vgpu_instance(self, val): + self._data.vgpu_instance = val + + @property + def time_stamp(self): + """Union[~_numpy.uint64, int]: """ + if self._data.size == 1: + return int(self._data.time_stamp[0]) + return self._data.time_stamp + + @time_stamp.setter + def time_stamp(self, val): + self._data.time_stamp = val + + @property + def sm_util(self): + """value_dtype: """ + return self._data.sm_util + + @sm_util.setter + def sm_util(self, val): + self._data.sm_util = val + + @property + def mem_util(self): + """value_dtype: """ + return self._data.mem_util + + @mem_util.setter + def mem_util(self, val): + self._data.mem_util = val + + @property + def enc_util(self): + """value_dtype: """ + return self._data.enc_util + + @enc_util.setter + def enc_util(self, val): + self._data.enc_util = val + + @property + def dec_util(self): + """value_dtype: """ + return self._data.dec_util + + @dec_util.setter + def dec_util(self, val): + self._data.dec_util = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return VgpuInstanceUtilizationSample.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == vgpu_instance_utilization_sample_dtype: + return VgpuInstanceUtilizationSample.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuInstanceUtilizationSample instance with the memory from the given buffer.""" + return VgpuInstanceUtilizationSample.from_data(_numpy.frombuffer(buffer, dtype=vgpu_instance_utilization_sample_dtype)) + + @staticmethod + def from_data(data): + """Create an VgpuInstanceUtilizationSample instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `vgpu_instance_utilization_sample_dtype` holding the data. + """ + cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != vgpu_instance_utilization_sample_dtype: + raise ValueError("data array must be of dtype vgpu_instance_utilization_sample_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an VgpuInstanceUtilizationSample instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuInstanceUtilizationSample obj = VgpuInstanceUtilizationSample.__new__(VgpuInstanceUtilizationSample) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlVgpuInstanceUtilizationSample_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_sample_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + +cdef _get_vgpu_instance_utilization_info_v1_dtype_offsets(): + cdef nvmlVgpuInstanceUtilizationInfo_v1_t pod + return _numpy.dtype({ + 'names': ['time_stamp', 'vgpu_instance', 'sm_util', 'mem_util', 'enc_util', 'dec_util', 'jpg_util', 'ofa_util'], + 'formats': [_numpy.uint64, _numpy.uint32, value_dtype, value_dtype, value_dtype, value_dtype, value_dtype, value_dtype], + 'offsets': [ + (&(pod.timeStamp)) - (&pod), + (&(pod.vgpuInstance)) - (&pod), + (&(pod.smUtil)) - (&pod), + (&(pod.memUtil)) - (&pod), + (&(pod.encUtil)) - (&pod), + (&(pod.decUtil)) - (&pod), + (&(pod.jpgUtil)) - (&pod), + (&(pod.ofaUtil)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t), + }) + +vgpu_instance_utilization_info_v1_dtype = _get_vgpu_instance_utilization_info_v1_dtype_offsets() + +cdef class VgpuInstanceUtilizationInfo_v1: + """Empty-initialize an array of `nvmlVgpuInstanceUtilizationInfo_v1_t`. + The resulting object is of length `size` and of dtype `vgpu_instance_utilization_info_v1_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `nvmlVgpuInstanceUtilizationInfo_v1_t` + """ + cdef: + readonly object _data + object _owner + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=vgpu_instance_utilization_info_v1_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.VgpuInstanceUtilizationInfo_v1_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.VgpuInstanceUtilizationInfo_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, VgpuInstanceUtilizationInfo_v1)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def time_stamp(self): + """Union[~_numpy.uint64, int]: CPU Timestamp in microseconds.""" + if self._data.size == 1: + return int(self._data.time_stamp[0]) + return self._data.time_stamp + + @time_stamp.setter + def time_stamp(self, val): + self._data.time_stamp = val + + @property + def vgpu_instance(self): + """Union[~_numpy.uint32, int]: vGPU Instance""" + if self._data.size == 1: + return int(self._data.vgpu_instance[0]) + return self._data.vgpu_instance + + @vgpu_instance.setter + def vgpu_instance(self, val): + self._data.vgpu_instance = val + + @property + def sm_util(self): + """value_dtype: SM (3D/Compute) Util Value.""" + return self._data.sm_util + + @sm_util.setter + def sm_util(self, val): + self._data.sm_util = val + + @property + def mem_util(self): + """value_dtype: Frame Buffer Memory Util Value.""" + return self._data.mem_util + + @mem_util.setter + def mem_util(self, val): + self._data.mem_util = val + + @property + def enc_util(self): + """value_dtype: Encoder Util Value.""" + return self._data.enc_util + + @enc_util.setter + def enc_util(self, val): + self._data.enc_util = val + + @property + def dec_util(self): + """value_dtype: Decoder Util Value.""" + return self._data.dec_util + + @dec_util.setter + def dec_util(self, val): + self._data.dec_util = val + + @property + def jpg_util(self): + """value_dtype: Jpeg Util Value.""" + return self._data.jpg_util + + @jpg_util.setter + def jpg_util(self, val): + self._data.jpg_util = val + + @property + def ofa_util(self): + """value_dtype: Ofa Util Value.""" + return self._data.ofa_util + + @ofa_util.setter + def ofa_util(self, val): + self._data.ofa_util = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return VgpuInstanceUtilizationInfo_v1.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == vgpu_instance_utilization_info_v1_dtype: + return VgpuInstanceUtilizationInfo_v1.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuInstanceUtilizationInfo_v1 instance with the memory from the given buffer.""" + return VgpuInstanceUtilizationInfo_v1.from_data(_numpy.frombuffer(buffer, dtype=vgpu_instance_utilization_info_v1_dtype)) + + @staticmethod + def from_data(data): + """Create an VgpuInstanceUtilizationInfo_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `vgpu_instance_utilization_info_v1_dtype` holding the data. + """ + cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != vgpu_instance_utilization_info_v1_dtype: + raise ValueError("data array must be of dtype vgpu_instance_utilization_info_v1_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an VgpuInstanceUtilizationInfo_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuInstanceUtilizationInfo_v1 obj = VgpuInstanceUtilizationInfo_v1.__new__(VgpuInstanceUtilizationInfo_v1) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlVgpuInstanceUtilizationInfo_v1_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=vgpu_instance_utilization_info_v1_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + +cdef _get_field_value_dtype_offsets(): + cdef nvmlFieldValue_t pod + return _numpy.dtype({ + 'names': ['field_id', 'scope_id', 'timestamp', 'latency_usec', 'value_type', 'nvml_return', 'value'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.int64, _numpy.int64, _numpy.int32, _numpy.int32, value_dtype], + 'offsets': [ + (&(pod.fieldId)) - (&pod), + (&(pod.scopeId)) - (&pod), + (&(pod.timestamp)) - (&pod), + (&(pod.latencyUsec)) - (&pod), + (&(pod.valueType)) - (&pod), + (&(pod.nvmlReturn)) - (&pod), + (&(pod.value)) - (&pod), + ], + 'itemsize': sizeof(nvmlFieldValue_t), + }) + +field_value_dtype = _get_field_value_dtype_offsets() + +cdef class FieldValue: + """Empty-initialize an array of `nvmlFieldValue_t`. + The resulting object is of length `size` and of dtype `field_value_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `nvmlFieldValue_t` + """ + cdef: + readonly object _data + object _owner + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=field_value_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlFieldValue_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlFieldValue_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.FieldValue_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.FieldValue object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, FieldValue)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def field_id(self): + """Union[~_numpy.uint32, int]: """ + if self._data.size == 1: + return int(self._data.field_id[0]) + return self._data.field_id + + @field_id.setter + def field_id(self, val): + self._data.field_id = val + + @property + def scope_id(self): + """Union[~_numpy.uint32, int]: """ + if self._data.size == 1: + return int(self._data.scope_id[0]) + return self._data.scope_id + + @scope_id.setter + def scope_id(self, val): + self._data.scope_id = val + + @property + def timestamp(self): + """Union[~_numpy.int64, int]: """ + if self._data.size == 1: + return int(self._data.timestamp[0]) + return self._data.timestamp + + @timestamp.setter + def timestamp(self, val): + self._data.timestamp = val + + @property + def latency_usec(self): + """Union[~_numpy.int64, int]: """ + if self._data.size == 1: + return int(self._data.latency_usec[0]) + return self._data.latency_usec + + @latency_usec.setter + def latency_usec(self, val): + self._data.latency_usec = val + + @property + def value_type(self): + """Union[~_numpy.int32, int]: """ + if self._data.size == 1: + return int(self._data.value_type[0]) + return self._data.value_type + + @value_type.setter + def value_type(self, val): + self._data.value_type = val + + @property + def nvml_return(self): + """Union[~_numpy.int32, int]: """ + if self._data.size == 1: + return int(self._data.nvml_return[0]) + return self._data.nvml_return + + @nvml_return.setter + def nvml_return(self, val): + self._data.nvml_return = val + + @property + def value(self): + """value_dtype: """ + return self._data.value + + @value.setter + def value(self, val): + self._data.value = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return FieldValue.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == field_value_dtype: + return FieldValue.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an FieldValue instance with the memory from the given buffer.""" + return FieldValue.from_data(_numpy.frombuffer(buffer, dtype=field_value_dtype)) + + @staticmethod + def from_data(data): + """Create an FieldValue instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `field_value_dtype` holding the data. + """ + cdef FieldValue obj = FieldValue.__new__(FieldValue) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != field_value_dtype: + raise ValueError("data array must be of dtype field_value_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an FieldValue instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef FieldValue obj = FieldValue.__new__(FieldValue) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlFieldValue_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=field_value_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + +cdef _get_prm_counter_value_v1_dtype_offsets(): + cdef nvmlPRMCounterValue_v1_t pod + return _numpy.dtype({ + 'names': ['status', 'output_type', 'output_value'], + 'formats': [_numpy.int32, _numpy.int32, value_dtype], + 'offsets': [ + (&(pod.status)) - (&pod), + (&(pod.outputType)) - (&pod), + (&(pod.outputValue)) - (&pod), + ], + 'itemsize': sizeof(nvmlPRMCounterValue_v1_t), + }) + +prm_counter_value_v1_dtype = _get_prm_counter_value_v1_dtype_offsets() + +cdef class PRMCounterValue_v1: + """Empty-initialize an instance of `nvmlPRMCounterValue_v1_t`. + + + .. seealso:: `nvmlPRMCounterValue_v1_t` + """ + cdef: + nvmlPRMCounterValue_v1_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlPRMCounterValue_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating PRMCounterValue_v1") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlPRMCounterValue_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.PRMCounterValue_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef PRMCounterValue_v1 other_ + if not isinstance(other, PRMCounterValue_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPRMCounterValue_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPRMCounterValue_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating PRMCounterValue_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPRMCounterValue_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def output_value(self): + """Value: Output value.""" + return Value.from_ptr( + &(self._ptr[0].outputValue), + readonly=self._readonly, + owner=self, + ) + + @output_value.setter + def output_value(self, val): + if self._readonly: + raise ValueError("This PRMCounterValue_v1 instance is read-only") + cdef Value val_ = val + _cyb_memcpy(&(self._ptr[0].outputValue), (val_._get_ptr()), sizeof(nvmlValue_t) * 1) + + @property + def status(self): + """int: Status of the PRM counter read.""" + return (self._ptr[0].status) + + @status.setter + def status(self, val): + if self._readonly: + raise ValueError("This PRMCounterValue_v1 instance is read-only") + self._ptr[0].status = val + + @property + def output_type(self): + """int: Output value type.""" + return (self._ptr[0].outputType) + + @output_type.setter + def output_type(self, val): + if self._readonly: + raise ValueError("This PRMCounterValue_v1 instance is read-only") + self._ptr[0].outputType = val + + @staticmethod + def from_buffer(buffer): + """Create an PRMCounterValue_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlPRMCounterValue_v1_t), PRMCounterValue_v1) + + @staticmethod + def from_data(data): + """Create an PRMCounterValue_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `prm_counter_value_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "prm_counter_value_v1_dtype", prm_counter_value_v1_dtype, PRMCounterValue_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an PRMCounterValue_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef PRMCounterValue_v1 obj = PRMCounterValue_v1.__new__(PRMCounterValue_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlPRMCounterValue_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating PRMCounterValue_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPRMCounterValue_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_gpu_thermal_settings_dtype_offsets(): + cdef nvmlGpuThermalSettings_t pod + return _numpy.dtype({ + 'names': ['count', 'sensor'], + 'formats': [_numpy.uint32, (_py_anon_pod0_dtype, 3)], + 'offsets': [ + (&(pod.count)) - (&pod), + (&(pod.sensor)) - (&pod), + ], + 'itemsize': sizeof(nvmlGpuThermalSettings_t), + }) + +gpu_thermal_settings_dtype = _get_gpu_thermal_settings_dtype_offsets() + +cdef class GpuThermalSettings: + """Empty-initialize an instance of `nvmlGpuThermalSettings_t`. + + + .. seealso:: `nvmlGpuThermalSettings_t` + """ + cdef: + nvmlGpuThermalSettings_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuThermalSettings_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuThermalSettings") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlGpuThermalSettings_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.GpuThermalSettings object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef GpuThermalSettings other_ + if not isinstance(other, GpuThermalSettings): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuThermalSettings_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuThermalSettings_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuThermalSettings") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuThermalSettings_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def sensor(self): + """_py_anon_pod0: """ + return _py_anon_pod0.from_ptr( + &(self._ptr[0].sensor), + 3, + readonly=self._readonly, + owner=self, + ) + + @sensor.setter + def sensor(self, val): + if self._readonly: + raise ValueError("This GpuThermalSettings instance is read-only") + cdef _py_anon_pod0 val_ = val + if len(val) != 3: + raise ValueError(f"Expected length { 3 } for field sensor, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].sensor), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod0) * 3) + + @property + def count(self): + """int: """ + return self._ptr[0].count + + @count.setter + def count(self, val): + if self._readonly: + raise ValueError("This GpuThermalSettings instance is read-only") + self._ptr[0].count = val + + @staticmethod + def from_buffer(buffer): + """Create an GpuThermalSettings instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGpuThermalSettings_t), GpuThermalSettings) + + @staticmethod + def from_data(data): + """Create an GpuThermalSettings instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `gpu_thermal_settings_dtype` holding the data. + """ + return _cyb_from_data(data, "gpu_thermal_settings_dtype", gpu_thermal_settings_dtype, GpuThermalSettings) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an GpuThermalSettings instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef GpuThermalSettings obj = GpuThermalSettings.__new__(GpuThermalSettings) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlGpuThermalSettings_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating GpuThermalSettings") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuThermalSettings_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_clk_mon_status_dtype_offsets(): + cdef nvmlClkMonStatus_t pod + return _numpy.dtype({ + 'names': ['b_global_status', 'clk_mon_list_size', 'clk_mon_list'], + 'formats': [_numpy.uint32, _numpy.uint32, (clk_mon_fault_info_dtype, 32)], + 'offsets': [ + (&(pod.bGlobalStatus)) - (&pod), + (&(pod.clkMonListSize)) - (&pod), + (&(pod.clkMonList)) - (&pod), + ], + 'itemsize': sizeof(nvmlClkMonStatus_t), + }) + +clk_mon_status_dtype = _get_clk_mon_status_dtype_offsets() + +cdef class ClkMonStatus: + """Empty-initialize an instance of `nvmlClkMonStatus_t`. + + + .. seealso:: `nvmlClkMonStatus_t` + """ + cdef: + nvmlClkMonStatus_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlClkMonStatus_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ClkMonStatus") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlClkMonStatus_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.ClkMonStatus object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef ClkMonStatus other_ + if not isinstance(other, ClkMonStatus): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlClkMonStatus_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlClkMonStatus_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ClkMonStatus") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlClkMonStatus_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def clk_mon_list(self): + """ClkMonFaultInfo: """ + return ClkMonFaultInfo.from_ptr( + &(self._ptr[0].clkMonList), + self._ptr[0].clkMonListSize, + readonly=self._readonly, + owner=self, + ) + + @clk_mon_list.setter + def clk_mon_list(self, val): + if self._readonly: + raise ValueError("This ClkMonStatus instance is read-only") + cdef ClkMonFaultInfo val_ = val + if len(val) > 32: + raise ValueError(f"Expected length < 32 for field clk_mon_list, got {len(val)}") + self._ptr[0].clkMonListSize = len(val) + if len(val) == 0: + return + _cyb_memcpy(&(self._ptr[0].clkMonList), (val_._get_ptr()), sizeof(nvmlClkMonFaultInfo_t) * self._ptr[0].clkMonListSize) + + @property + def b_global_status(self): + """int: """ + return self._ptr[0].bGlobalStatus + + @b_global_status.setter + def b_global_status(self, val): + if self._readonly: + raise ValueError("This ClkMonStatus instance is read-only") + self._ptr[0].bGlobalStatus = val + + @staticmethod + def from_buffer(buffer): + """Create an ClkMonStatus instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlClkMonStatus_t), ClkMonStatus) + + @staticmethod + def from_data(data): + """Create an ClkMonStatus instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `clk_mon_status_dtype` holding the data. + """ + return _cyb_from_data(data, "clk_mon_status_dtype", clk_mon_status_dtype, ClkMonStatus) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an ClkMonStatus instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef ClkMonStatus obj = ClkMonStatus.__new__(ClkMonStatus) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlClkMonStatus_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating ClkMonStatus") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlClkMonStatus_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_processes_utilization_info_v1_dtype_offsets(): + cdef nvmlProcessesUtilizationInfo_v1_t pod + return _numpy.dtype({ + 'names': ['version', 'process_samples_count', 'last_seen_time_stamp', 'proc_util_array'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint64, _numpy.intp], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.processSamplesCount)) - (&pod), + (&(pod.lastSeenTimeStamp)) - (&pod), + (&(pod.procUtilArray)) - (&pod), + ], + 'itemsize': sizeof(nvmlProcessesUtilizationInfo_v1_t), + }) + +processes_utilization_info_v1_dtype = _get_processes_utilization_info_v1_dtype_offsets() + +cdef class ProcessesUtilizationInfo_v1: + """Empty-initialize an instance of `nvmlProcessesUtilizationInfo_v1_t`. + + + .. seealso:: `nvmlProcessesUtilizationInfo_v1_t` + """ + cdef: + nvmlProcessesUtilizationInfo_v1_t *_ptr + object _owner + bint _owned + bint _readonly + dict _refs + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") + self._owner = None + self._owned = True + self._readonly = False + self._refs = {} + + def __dealloc__(self): + cdef nvmlProcessesUtilizationInfo_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.ProcessesUtilizationInfo_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef ProcessesUtilizationInfo_v1 other_ + if not isinstance(other, ProcessesUtilizationInfo_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlProcessesUtilizationInfo_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def version(self): + """int: The version number of this struct.""" + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This ProcessesUtilizationInfo_v1 instance is read-only") + self._ptr[0].version = val + + @property + def last_seen_time_stamp(self): + """int: Return only samples with timestamp greater than lastSeenTimeStamp.""" + return self._ptr[0].lastSeenTimeStamp + + @last_seen_time_stamp.setter + def last_seen_time_stamp(self, val): + if self._readonly: + raise ValueError("This ProcessesUtilizationInfo_v1 instance is read-only") + self._ptr[0].lastSeenTimeStamp = val + + @property + def proc_util_array(self): + """int: The array (allocated by caller) of the utilization of GPU SM, framebuffer, video encoder, video decoder, JPEG, and OFA.""" + if self._ptr[0].procUtilArray == NULL or self._ptr[0].processSamplesCount == 0: + return [] + return ProcessUtilizationInfo_v1.from_ptr( + (self._ptr[0].procUtilArray), + self._ptr[0].processSamplesCount, + owner=self, + readonly=self._readonly + ) + + @proc_util_array.setter + def proc_util_array(self, val): + if self._readonly: + raise ValueError("This ProcessesUtilizationInfo_v1 instance is read-only") + cdef ProcessUtilizationInfo_v1 arr = val + self._ptr[0].procUtilArray = (arr._get_ptr()) + self._ptr[0].processSamplesCount = len(arr) + self._refs["proc_util_array"] = arr + + @staticmethod + def from_buffer(buffer): + """Create an ProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlProcessesUtilizationInfo_v1_t), ProcessesUtilizationInfo_v1) + + @staticmethod + def from_data(data): + """Create an ProcessesUtilizationInfo_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `processes_utilization_info_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "processes_utilization_info_v1_dtype", processes_utilization_info_v1_dtype, ProcessesUtilizationInfo_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an ProcessesUtilizationInfo_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef ProcessesUtilizationInfo_v1 obj = ProcessesUtilizationInfo_v1.__new__(ProcessesUtilizationInfo_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlProcessesUtilizationInfo_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating ProcessesUtilizationInfo_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlProcessesUtilizationInfo_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + obj._refs = {} + return obj + + +cdef _get_gpu_dynamic_pstates_info_dtype_offsets(): + cdef nvmlGpuDynamicPstatesInfo_t pod + return _numpy.dtype({ + 'names': ['flags_', 'utilization'], + 'formats': [_numpy.uint32, (_py_anon_pod1_dtype, 8)], + 'offsets': [ + (&(pod.flags)) - (&pod), + (&(pod.utilization)) - (&pod), + ], + 'itemsize': sizeof(nvmlGpuDynamicPstatesInfo_t), + }) + +gpu_dynamic_pstates_info_dtype = _get_gpu_dynamic_pstates_info_dtype_offsets() + +cdef class GpuDynamicPstatesInfo: + """Empty-initialize an instance of `nvmlGpuDynamicPstatesInfo_t`. + + + .. seealso:: `nvmlGpuDynamicPstatesInfo_t` + """ + cdef: + nvmlGpuDynamicPstatesInfo_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuDynamicPstatesInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuDynamicPstatesInfo") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlGpuDynamicPstatesInfo_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.GpuDynamicPstatesInfo object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef GpuDynamicPstatesInfo other_ + if not isinstance(other, GpuDynamicPstatesInfo): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuDynamicPstatesInfo_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuDynamicPstatesInfo_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuDynamicPstatesInfo") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuDynamicPstatesInfo_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def utilization(self): + """_py_anon_pod1: """ + return _py_anon_pod1.from_ptr( + &(self._ptr[0].utilization), + 8, + readonly=self._readonly, + owner=self, + ) + + @utilization.setter + def utilization(self, val): + if self._readonly: + raise ValueError("This GpuDynamicPstatesInfo instance is read-only") + cdef _py_anon_pod1 val_ = val + if len(val) != 8: + raise ValueError(f"Expected length { 8 } for field utilization, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].utilization), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod1) * 8) + + @property + def flags_(self): + """int: """ + return self._ptr[0].flags + + @flags_.setter + def flags_(self, val): + if self._readonly: + raise ValueError("This GpuDynamicPstatesInfo instance is read-only") + self._ptr[0].flags = val + + @staticmethod + def from_buffer(buffer): + """Create an GpuDynamicPstatesInfo instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGpuDynamicPstatesInfo_t), GpuDynamicPstatesInfo) + + @staticmethod + def from_data(data): + """Create an GpuDynamicPstatesInfo instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `gpu_dynamic_pstates_info_dtype` holding the data. + """ + return _cyb_from_data(data, "gpu_dynamic_pstates_info_dtype", gpu_dynamic_pstates_info_dtype, GpuDynamicPstatesInfo) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an GpuDynamicPstatesInfo instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef GpuDynamicPstatesInfo obj = GpuDynamicPstatesInfo.__new__(GpuDynamicPstatesInfo) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlGpuDynamicPstatesInfo_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating GpuDynamicPstatesInfo") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuDynamicPstatesInfo_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_processes_utilization_info_v1_dtype_offsets(): + cdef nvmlVgpuProcessesUtilizationInfo_v1_t pod + return _numpy.dtype({ + 'names': ['version', 'vgpu_process_count', 'last_seen_time_stamp', 'vgpu_proc_util_array'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint64, _numpy.intp], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.vgpuProcessCount)) - (&pod), + (&(pod.lastSeenTimeStamp)) - (&pod), + (&(pod.vgpuProcUtilArray)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), + }) + +vgpu_processes_utilization_info_v1_dtype = _get_vgpu_processes_utilization_info_v1_dtype_offsets() + +cdef class VgpuProcessesUtilizationInfo_v1: + """Empty-initialize an instance of `nvmlVgpuProcessesUtilizationInfo_v1_t`. + + + .. seealso:: `nvmlVgpuProcessesUtilizationInfo_v1_t` + """ + cdef: + nvmlVgpuProcessesUtilizationInfo_v1_t *_ptr + object _owner + bint _owned + bint _readonly + dict _refs + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") + self._owner = None + self._owned = True + self._readonly = False + self._refs = {} + + def __dealloc__(self): + cdef nvmlVgpuProcessesUtilizationInfo_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuProcessesUtilizationInfo_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuProcessesUtilizationInfo_v1 other_ + if not isinstance(other, VgpuProcessesUtilizationInfo_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def version(self): + """int: The version number of this struct.""" + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This VgpuProcessesUtilizationInfo_v1 instance is read-only") + self._ptr[0].version = val + + @property + def last_seen_time_stamp(self): + """int: Return only samples with timestamp greater than lastSeenTimeStamp.""" + return self._ptr[0].lastSeenTimeStamp + + @last_seen_time_stamp.setter + def last_seen_time_stamp(self, val): + if self._readonly: + raise ValueError("This VgpuProcessesUtilizationInfo_v1 instance is read-only") + self._ptr[0].lastSeenTimeStamp = val + + @property + def vgpu_proc_util_array(self): + """int: The array (allocated by caller) in which utilization of processes running on vGPU instances are returned.""" + if self._ptr[0].vgpuProcUtilArray == NULL or self._ptr[0].vgpuProcessCount == 0: + return [] + return VgpuProcessUtilizationInfo_v1.from_ptr( + (self._ptr[0].vgpuProcUtilArray), + self._ptr[0].vgpuProcessCount, + owner=self, + readonly=self._readonly + ) + + @vgpu_proc_util_array.setter + def vgpu_proc_util_array(self, val): + if self._readonly: + raise ValueError("This VgpuProcessesUtilizationInfo_v1 instance is read-only") + cdef VgpuProcessUtilizationInfo_v1 arr = val + self._ptr[0].vgpuProcUtilArray = (arr._get_ptr()) + self._ptr[0].vgpuProcessCount = len(arr) + self._refs["vgpu_proc_util_array"] = arr + + @staticmethod + def from_buffer(buffer): + """Create an VgpuProcessesUtilizationInfo_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t), VgpuProcessesUtilizationInfo_v1) + + @staticmethod + def from_data(data): + """Create an VgpuProcessesUtilizationInfo_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_processes_utilization_info_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_processes_utilization_info_v1_dtype", vgpu_processes_utilization_info_v1_dtype, VgpuProcessesUtilizationInfo_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuProcessesUtilizationInfo_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuProcessesUtilizationInfo_v1 obj = VgpuProcessesUtilizationInfo_v1.__new__(VgpuProcessesUtilizationInfo_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuProcessesUtilizationInfo_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuProcessesUtilizationInfo_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + obj._refs = {} + return obj + + +cdef _get_vgpu_scheduler_params_dtype_offsets(): + cdef nvmlVgpuSchedulerParams_t pod + return _numpy.dtype({ + 'names': ['vgpu_sched_data_with_arr', 'vgpu_sched_data'], + 'formats': [_py_anon_pod2_dtype, _py_anon_pod3_dtype], + 'offsets': [ + (&(pod.vgpuSchedDataWithARR)) - (&pod), + (&(pod.vgpuSchedData)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerParams_t), + }) + +vgpu_scheduler_params_dtype = _get_vgpu_scheduler_params_dtype_offsets() + +cdef class VgpuSchedulerParams: + """Empty-initialize an instance of `nvmlVgpuSchedulerParams_t`. + + + .. seealso:: `nvmlVgpuSchedulerParams_t` + """ + cdef: + nvmlVgpuSchedulerParams_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerParams_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerParams") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerParams_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerParams object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerParams other_ + if not isinstance(other, VgpuSchedulerParams): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerParams_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerParams_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerParams") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerParams_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def vgpu_sched_data_with_arr(self): + """_py_anon_pod2: """ + return _py_anon_pod2.from_ptr( + &(self._ptr[0].vgpuSchedDataWithARR), + readonly=self._readonly, + owner=self, + ) + + @vgpu_sched_data_with_arr.setter + def vgpu_sched_data_with_arr(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerParams instance is read-only") + cdef _py_anon_pod2 val_ = val + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod2) * 1) + + @property + def vgpu_sched_data(self): + """_py_anon_pod3: """ + return _py_anon_pod3.from_ptr( + &(self._ptr[0].vgpuSchedData), + readonly=self._readonly, + owner=self, + ) + + @vgpu_sched_data.setter + def vgpu_sched_data(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerParams instance is read-only") + cdef _py_anon_pod3 val_ = val + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod3) * 1) + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerParams instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerParams_t), VgpuSchedulerParams) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerParams instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_params_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_scheduler_params_dtype", vgpu_scheduler_params_dtype, VgpuSchedulerParams) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuSchedulerParams instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerParams obj = VgpuSchedulerParams.__new__(VgpuSchedulerParams) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerParams_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerParams") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerParams_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_scheduler_set_params_dtype_offsets(): + cdef nvmlVgpuSchedulerSetParams_t pod + return _numpy.dtype({ + 'names': ['vgpu_sched_data_with_arr', 'vgpu_sched_data'], + 'formats': [_py_anon_pod4_dtype, _py_anon_pod5_dtype], + 'offsets': [ + (&(pod.vgpuSchedDataWithARR)) - (&pod), + (&(pod.vgpuSchedData)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerSetParams_t), + }) + +vgpu_scheduler_set_params_dtype = _get_vgpu_scheduler_set_params_dtype_offsets() + +cdef class VgpuSchedulerSetParams: + """Empty-initialize an instance of `nvmlVgpuSchedulerSetParams_t`. + + + .. seealso:: `nvmlVgpuSchedulerSetParams_t` + """ + cdef: + nvmlVgpuSchedulerSetParams_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerSetParams_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerSetParams") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerSetParams_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerSetParams object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerSetParams other_ + if not isinstance(other, VgpuSchedulerSetParams): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerSetParams_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerSetParams_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerSetParams") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerSetParams_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def vgpu_sched_data_with_arr(self): + """_py_anon_pod4: """ + return _py_anon_pod4.from_ptr( + &(self._ptr[0].vgpuSchedDataWithARR), + readonly=self._readonly, + owner=self, + ) + + @vgpu_sched_data_with_arr.setter + def vgpu_sched_data_with_arr(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerSetParams instance is read-only") + cdef _py_anon_pod4 val_ = val + _cyb_memcpy(&(self._ptr[0].vgpuSchedDataWithARR), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod4) * 1) + + @property + def vgpu_sched_data(self): + """_py_anon_pod5: """ + return _py_anon_pod5.from_ptr( + &(self._ptr[0].vgpuSchedData), + readonly=self._readonly, + owner=self, + ) + + @vgpu_sched_data.setter + def vgpu_sched_data(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerSetParams instance is read-only") + cdef _py_anon_pod5 val_ = val + _cyb_memcpy(&(self._ptr[0].vgpuSchedData), (val_._get_ptr()), sizeof(cuda_bindings_nvml__anon_pod5) * 1) + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerSetParams instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerSetParams_t), VgpuSchedulerSetParams) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerSetParams instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_set_params_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_scheduler_set_params_dtype", vgpu_scheduler_set_params_dtype, VgpuSchedulerSetParams) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuSchedulerSetParams instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerSetParams obj = VgpuSchedulerSetParams.__new__(VgpuSchedulerSetParams) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerSetParams_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerSetParams") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerSetParams_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_license_info_dtype_offsets(): + cdef nvmlVgpuLicenseInfo_t pod + return _numpy.dtype({ + 'names': ['is_licensed', 'license_expiry', 'current_state'], + 'formats': [_numpy.uint8, vgpu_license_expiry_dtype, _numpy.uint32], + 'offsets': [ + (&(pod.isLicensed)) - (&pod), + (&(pod.licenseExpiry)) - (&pod), + (&(pod.currentState)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuLicenseInfo_t), + }) + +vgpu_license_info_dtype = _get_vgpu_license_info_dtype_offsets() + +cdef class VgpuLicenseInfo: + """Empty-initialize an instance of `nvmlVgpuLicenseInfo_t`. + + + .. seealso:: `nvmlVgpuLicenseInfo_t` + """ + cdef: + nvmlVgpuLicenseInfo_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuLicenseInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuLicenseInfo") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuLicenseInfo_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuLicenseInfo object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuLicenseInfo other_ + if not isinstance(other, VgpuLicenseInfo): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuLicenseInfo_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuLicenseInfo_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuLicenseInfo") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuLicenseInfo_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def license_expiry(self): + """VgpuLicenseExpiry: """ + return VgpuLicenseExpiry.from_ptr( + &(self._ptr[0].licenseExpiry), + readonly=self._readonly, + owner=self, + ) + + @license_expiry.setter + def license_expiry(self, val): + if self._readonly: + raise ValueError("This VgpuLicenseInfo instance is read-only") + cdef VgpuLicenseExpiry val_ = val + _cyb_memcpy(&(self._ptr[0].licenseExpiry), (val_._get_ptr()), sizeof(nvmlVgpuLicenseExpiry_t) * 1) + + @property + def is_licensed(self): + """int: """ + return self._ptr[0].isLicensed + + @is_licensed.setter + def is_licensed(self, val): + if self._readonly: + raise ValueError("This VgpuLicenseInfo instance is read-only") + self._ptr[0].isLicensed = val + + @property + def current_state(self): + """int: """ + return self._ptr[0].currentState + + @current_state.setter + def current_state(self, val): + if self._readonly: + raise ValueError("This VgpuLicenseInfo instance is read-only") + self._ptr[0].currentState = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuLicenseInfo instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuLicenseInfo_t), VgpuLicenseInfo) + + @staticmethod + def from_data(data): + """Create an VgpuLicenseInfo instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_license_info_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_license_info_dtype", vgpu_license_info_dtype, VgpuLicenseInfo) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuLicenseInfo instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuLicenseInfo obj = VgpuLicenseInfo.__new__(VgpuLicenseInfo) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuLicenseInfo_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuLicenseInfo") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuLicenseInfo_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_grid_licensable_feature_dtype_offsets(): + cdef nvmlGridLicensableFeature_t pod + return _numpy.dtype({ + 'names': ['feature_code', 'feature_state', 'license_info', 'product_name', 'feature_enabled', 'license_expiry'], + 'formats': [_numpy.int32, _numpy.uint32, (_numpy.int8, 128), (_numpy.int8, 128), _numpy.uint32, grid_license_expiry_dtype], + 'offsets': [ + (&(pod.featureCode)) - (&pod), + (&(pod.featureState)) - (&pod), + (&(pod.licenseInfo)) - (&pod), + (&(pod.productName)) - (&pod), + (&(pod.featureEnabled)) - (&pod), + (&(pod.licenseExpiry)) - (&pod), + ], + 'itemsize': sizeof(nvmlGridLicensableFeature_t), + }) + +grid_licensable_feature_dtype = _get_grid_licensable_feature_dtype_offsets() + +cdef class GridLicensableFeature: + """Empty-initialize an array of `nvmlGridLicensableFeature_t`. + The resulting object is of length `size` and of dtype `grid_licensable_feature_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `nvmlGridLicensableFeature_t` + """ + cdef: + readonly object _data + object _owner + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=grid_licensable_feature_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlGridLicensableFeature_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlGridLicensableFeature_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.GridLicensableFeature_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.GridLicensableFeature object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, GridLicensableFeature)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def feature_code(self): + """Union[~_numpy.int32, int]: """ + if self._data.size == 1: + return int(self._data.feature_code[0]) + return self._data.feature_code + + @feature_code.setter + def feature_code(self, val): + self._data.feature_code = val + + @property + def feature_state(self): + """Union[~_numpy.uint32, int]: """ + if self._data.size == 1: + return int(self._data.feature_state[0]) + return self._data.feature_state + + @feature_state.setter + def feature_state(self, val): + self._data.feature_state = val + + @property + def license_info(self): + """~_numpy.int8: (array of length 128).""" + return self._data.license_info + + @license_info.setter + def license_info(self, val): + self._data.license_info = val + + @property + def product_name(self): + """~_numpy.int8: (array of length 128).""" + return self._data.product_name + + @product_name.setter + def product_name(self, val): + self._data.product_name = val + + @property + def feature_enabled(self): + """Union[~_numpy.uint32, int]: """ + if self._data.size == 1: + return int(self._data.feature_enabled[0]) + return self._data.feature_enabled + + @feature_enabled.setter + def feature_enabled(self, val): + self._data.feature_enabled = val + + @property + def license_expiry(self): + """grid_license_expiry_dtype: """ + return self._data.license_expiry + + @license_expiry.setter + def license_expiry(self, val): + self._data.license_expiry = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return GridLicensableFeature.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == grid_licensable_feature_dtype: + return GridLicensableFeature.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an GridLicensableFeature instance with the memory from the given buffer.""" + return GridLicensableFeature.from_data(_numpy.frombuffer(buffer, dtype=grid_licensable_feature_dtype)) + + @staticmethod + def from_data(data): + """Create an GridLicensableFeature instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `grid_licensable_feature_dtype` holding the data. + """ + cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != grid_licensable_feature_dtype: + raise ValueError("data array must be of dtype grid_licensable_feature_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an GridLicensableFeature instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef GridLicensableFeature obj = GridLicensableFeature.__new__(GridLicensableFeature) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlGridLicensableFeature_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=grid_licensable_feature_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + +cdef _get_unit_fan_speeds_dtype_offsets(): + cdef nvmlUnitFanSpeeds_t pod + return _numpy.dtype({ + 'names': ['fans', 'count'], + 'formats': [(unit_fan_info_dtype, 24), _numpy.uint32], + 'offsets': [ + (&(pod.fans)) - (&pod), + (&(pod.count)) - (&pod), + ], + 'itemsize': sizeof(nvmlUnitFanSpeeds_t), + }) + +unit_fan_speeds_dtype = _get_unit_fan_speeds_dtype_offsets() + +cdef class UnitFanSpeeds: + """Empty-initialize an instance of `nvmlUnitFanSpeeds_t`. + + + .. seealso:: `nvmlUnitFanSpeeds_t` + """ + cdef: + nvmlUnitFanSpeeds_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlUnitFanSpeeds_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating UnitFanSpeeds") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlUnitFanSpeeds_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.UnitFanSpeeds object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef UnitFanSpeeds other_ + if not isinstance(other, UnitFanSpeeds): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlUnitFanSpeeds_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlUnitFanSpeeds_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating UnitFanSpeeds") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlUnitFanSpeeds_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def fans(self): + """UnitFanInfo: """ + return UnitFanInfo.from_ptr( + &(self._ptr[0].fans), + 24, + readonly=self._readonly, + owner=self, + ) + + @fans.setter + def fans(self, val): + if self._readonly: + raise ValueError("This UnitFanSpeeds instance is read-only") + cdef UnitFanInfo val_ = val + if len(val) != 24: + raise ValueError(f"Expected length { 24 } for field fans, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].fans), (val_._get_ptr()), sizeof(nvmlUnitFanInfo_t) * 24) + + @property + def count(self): + """int: """ + return self._ptr[0].count + + @count.setter + def count(self, val): + if self._readonly: + raise ValueError("This UnitFanSpeeds instance is read-only") + self._ptr[0].count = val + + @staticmethod + def from_buffer(buffer): + """Create an UnitFanSpeeds instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlUnitFanSpeeds_t), UnitFanSpeeds) + + @staticmethod + def from_data(data): + """Create an UnitFanSpeeds instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `unit_fan_speeds_dtype` holding the data. + """ + return _cyb_from_data(data, "unit_fan_speeds_dtype", unit_fan_speeds_dtype, UnitFanSpeeds) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an UnitFanSpeeds instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef UnitFanSpeeds obj = UnitFanSpeeds.__new__(UnitFanSpeeds) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlUnitFanSpeeds_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating UnitFanSpeeds") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlUnitFanSpeeds_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_pgpu_metadata_dtype_offsets(): + cdef nvmlVgpuPgpuMetadata_t pod + return _numpy.dtype({ + 'names': ['version', 'revision', 'host_driver_version', 'pgpu_virtualization_caps', 'reserved', 'host_supported_vgpu_range', 'opaque_data_size', 'opaque_data'], + 'formats': [_numpy.uint32, _numpy.uint32, (_numpy.int8, 80), _numpy.uint32, (_numpy.uint32, 5), vgpu_version_dtype, _numpy.uint32, (_numpy.int8, 4)], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.revision)) - (&pod), + (&(pod.hostDriverVersion)) - (&pod), + (&(pod.pgpuVirtualizationCaps)) - (&pod), + (&(pod.reserved)) - (&pod), + (&(pod.hostSupportedVgpuRange)) - (&pod), + (&(pod.opaqueDataSize)) - (&pod), + (&(pod.opaqueData)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuPgpuMetadata_t), + }) + +vgpu_pgpu_metadata_dtype = _get_vgpu_pgpu_metadata_dtype_offsets() + +cdef class VgpuPgpuMetadata: + """Empty-initialize an instance of `nvmlVgpuPgpuMetadata_t`. + + + .. seealso:: `nvmlVgpuPgpuMetadata_t` + """ + cdef: + nvmlVgpuPgpuMetadata_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuPgpuMetadata_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuPgpuMetadata") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuPgpuMetadata_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuPgpuMetadata object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuPgpuMetadata other_ + if not isinstance(other, VgpuPgpuMetadata): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuPgpuMetadata_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuPgpuMetadata_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuPgpuMetadata") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuPgpuMetadata_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def host_supported_vgpu_range(self): + """VgpuVersion: """ + return VgpuVersion.from_ptr( + &(self._ptr[0].hostSupportedVgpuRange), + readonly=self._readonly, + owner=self, + ) + + @host_supported_vgpu_range.setter + def host_supported_vgpu_range(self, val): + if self._readonly: + raise ValueError("This VgpuPgpuMetadata instance is read-only") + cdef VgpuVersion val_ = val + _cyb_memcpy(&(self._ptr[0].hostSupportedVgpuRange), (val_._get_ptr()), sizeof(nvmlVgpuVersion_t) * 1) + + @property + def version(self): + """int: """ + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This VgpuPgpuMetadata instance is read-only") + self._ptr[0].version = val + + @property + def revision(self): + """int: """ + return self._ptr[0].revision + + @revision.setter + def revision(self, val): + if self._readonly: + raise ValueError("This VgpuPgpuMetadata instance is read-only") + self._ptr[0].revision = val + + @property + def host_driver_version(self): + """~_numpy.int8: (array of length 80).""" + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].hostDriverVersion) + + @host_driver_version.setter + def host_driver_version(self, val): + if self._readonly: + raise ValueError("This VgpuPgpuMetadata instance is read-only") + cdef bytes buf = val.encode() + if len(buf) >= 80: + raise ValueError("String too long for field host_driver_version, max length is 79") + cdef char *ptr = buf + _cyb_memcpy((self._ptr[0].hostDriverVersion), ptr, 80) + + @property + def pgpu_virtualization_caps(self): + """int: """ + return self._ptr[0].pgpuVirtualizationCaps + + @pgpu_virtualization_caps.setter + def pgpu_virtualization_caps(self, val): + if self._readonly: + raise ValueError("This VgpuPgpuMetadata instance is read-only") + self._ptr[0].pgpuVirtualizationCaps = val + + @property + def opaque_data_size(self): + """int: """ + return self._ptr[0].opaqueDataSize + + @opaque_data_size.setter + def opaque_data_size(self, val): + if self._readonly: + raise ValueError("This VgpuPgpuMetadata instance is read-only") + self._ptr[0].opaqueDataSize = val + + @property + def opaque_data(self): + """~_numpy.int8: (array of length 4).""" + return _cyb_cpython.PyUnicode_FromString(self._ptr[0].opaqueData) + + @opaque_data.setter + def opaque_data(self, val): + if self._readonly: + raise ValueError("This VgpuPgpuMetadata instance is read-only") + cdef bytes buf = val.encode() + if len(buf) >= 4: + raise ValueError("String too long for field opaque_data, max length is 3") + cdef char *ptr = buf + _cyb_memcpy((self._ptr[0].opaqueData), ptr, 4) + + @staticmethod + def from_buffer(buffer): + """Create an VgpuPgpuMetadata instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuPgpuMetadata_t), VgpuPgpuMetadata) + + @staticmethod + def from_data(data): + """Create an VgpuPgpuMetadata instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_pgpu_metadata_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_pgpu_metadata_dtype", vgpu_pgpu_metadata_dtype, VgpuPgpuMetadata) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuPgpuMetadata instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuPgpuMetadata obj = VgpuPgpuMetadata.__new__(VgpuPgpuMetadata) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuPgpuMetadata_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuPgpuMetadata") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuPgpuMetadata_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_gpu_instance_info_dtype_offsets(): + cdef nvmlGpuInstanceInfo_t pod + return _numpy.dtype({ + 'names': ['device_', 'id', 'profile_id', 'placement'], + 'formats': [_numpy.intp, _numpy.uint32, _numpy.uint32, gpu_instance_placement_dtype], + 'offsets': [ + (&(pod.device)) - (&pod), + (&(pod.id)) - (&pod), + (&(pod.profileId)) - (&pod), + (&(pod.placement)) - (&pod), + ], + 'itemsize': sizeof(nvmlGpuInstanceInfo_t), + }) + +gpu_instance_info_dtype = _get_gpu_instance_info_dtype_offsets() + +cdef class GpuInstanceInfo: + """Empty-initialize an instance of `nvmlGpuInstanceInfo_t`. + + + .. seealso:: `nvmlGpuInstanceInfo_t` + """ + cdef: + nvmlGpuInstanceInfo_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuInstanceInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuInstanceInfo") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlGpuInstanceInfo_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.GpuInstanceInfo object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef GpuInstanceInfo other_ + if not isinstance(other, GpuInstanceInfo): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuInstanceInfo_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuInstanceInfo_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuInstanceInfo") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuInstanceInfo_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def placement(self): + """GpuInstancePlacement: """ + return GpuInstancePlacement.from_ptr( + &(self._ptr[0].placement), + 1, + readonly=self._readonly, + owner=self, + ) + + @placement.setter + def placement(self, val): + if self._readonly: + raise ValueError("This GpuInstanceInfo instance is read-only") + cdef GpuInstancePlacement val_ = val + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlGpuInstancePlacement_t) * 1) + + @property + def device_(self): + """int: """ + return (self._ptr[0].device) + + @device_.setter + def device_(self, val): + if self._readonly: + raise ValueError("This GpuInstanceInfo instance is read-only") + self._ptr[0].device = val + + @property + def id(self): + """int: """ + return self._ptr[0].id + + @id.setter + def id(self, val): + if self._readonly: + raise ValueError("This GpuInstanceInfo instance is read-only") + self._ptr[0].id = val + + @property + def profile_id(self): + """int: """ + return self._ptr[0].profileId + + @profile_id.setter + def profile_id(self, val): + if self._readonly: + raise ValueError("This GpuInstanceInfo instance is read-only") + self._ptr[0].profileId = val + + @staticmethod + def from_buffer(buffer): + """Create an GpuInstanceInfo instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGpuInstanceInfo_t), GpuInstanceInfo) + + @staticmethod + def from_data(data): + """Create an GpuInstanceInfo instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `gpu_instance_info_dtype` holding the data. + """ + return _cyb_from_data(data, "gpu_instance_info_dtype", gpu_instance_info_dtype, GpuInstanceInfo) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an GpuInstanceInfo instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef GpuInstanceInfo obj = GpuInstanceInfo.__new__(GpuInstanceInfo) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlGpuInstanceInfo_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating GpuInstanceInfo") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuInstanceInfo_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_compute_instance_info_dtype_offsets(): + cdef nvmlComputeInstanceInfo_t pod + return _numpy.dtype({ + 'names': ['device_', 'gpu_instance', 'id', 'profile_id', 'placement'], + 'formats': [_numpy.intp, _numpy.intp, _numpy.uint32, _numpy.uint32, compute_instance_placement_dtype], + 'offsets': [ + (&(pod.device)) - (&pod), + (&(pod.gpuInstance)) - (&pod), + (&(pod.id)) - (&pod), + (&(pod.profileId)) - (&pod), + (&(pod.placement)) - (&pod), + ], + 'itemsize': sizeof(nvmlComputeInstanceInfo_t), + }) + +compute_instance_info_dtype = _get_compute_instance_info_dtype_offsets() + +cdef class ComputeInstanceInfo: + """Empty-initialize an instance of `nvmlComputeInstanceInfo_t`. + + + .. seealso:: `nvmlComputeInstanceInfo_t` + """ + cdef: + nvmlComputeInstanceInfo_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlComputeInstanceInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ComputeInstanceInfo") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlComputeInstanceInfo_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.ComputeInstanceInfo object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef ComputeInstanceInfo other_ + if not isinstance(other, ComputeInstanceInfo): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlComputeInstanceInfo_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlComputeInstanceInfo_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating ComputeInstanceInfo") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlComputeInstanceInfo_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def placement(self): + """ComputeInstancePlacement: """ + return ComputeInstancePlacement.from_ptr( + &(self._ptr[0].placement), + 1, + readonly=self._readonly, + owner=self, + ) + + @placement.setter + def placement(self, val): + if self._readonly: + raise ValueError("This ComputeInstanceInfo instance is read-only") + cdef ComputeInstancePlacement val_ = val + _cyb_memcpy(&(self._ptr[0].placement), (val_._get_ptr()), sizeof(nvmlComputeInstancePlacement_t) * 1) + + @property + def device_(self): + """int: """ + return (self._ptr[0].device) + + @device_.setter + def device_(self, val): + if self._readonly: + raise ValueError("This ComputeInstanceInfo instance is read-only") + self._ptr[0].device = val + + @property + def gpu_instance(self): + """int: """ + return (self._ptr[0].gpuInstance) + + @gpu_instance.setter + def gpu_instance(self, val): + if self._readonly: + raise ValueError("This ComputeInstanceInfo instance is read-only") + self._ptr[0].gpuInstance = val + + @property + def id(self): + """int: """ + return self._ptr[0].id + + @id.setter + def id(self, val): + if self._readonly: + raise ValueError("This ComputeInstanceInfo instance is read-only") + self._ptr[0].id = val + + @property + def profile_id(self): + """int: """ + return self._ptr[0].profileId + + @profile_id.setter + def profile_id(self, val): + if self._readonly: + raise ValueError("This ComputeInstanceInfo instance is read-only") + self._ptr[0].profileId = val + + @staticmethod + def from_buffer(buffer): + """Create an ComputeInstanceInfo instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlComputeInstanceInfo_t), ComputeInstanceInfo) + + @staticmethod + def from_data(data): + """Create an ComputeInstanceInfo instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `compute_instance_info_dtype` holding the data. + """ + return _cyb_from_data(data, "compute_instance_info_dtype", compute_instance_info_dtype, ComputeInstanceInfo) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an ComputeInstanceInfo instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef ComputeInstanceInfo obj = ComputeInstanceInfo.__new__(ComputeInstanceInfo) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlComputeInstanceInfo_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating ComputeInstanceInfo") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlComputeInstanceInfo_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_ecc_sram_unique_uncorrected_error_counts_v1_dtype_offsets(): + cdef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t pod + return _numpy.dtype({ + 'names': ['version', 'entry_count', 'entries'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.intp], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.entryCount)) - (&pod), + (&(pod.entries)) - (&pod), + ], + 'itemsize': sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), + }) + +ecc_sram_unique_uncorrected_error_counts_v1_dtype = _get_ecc_sram_unique_uncorrected_error_counts_v1_dtype_offsets() + +cdef class EccSramUniqueUncorrectedErrorCounts_v1: + """Empty-initialize an instance of `nvmlEccSramUniqueUncorrectedErrorCounts_v1_t`. + + + .. seealso:: `nvmlEccSramUniqueUncorrectedErrorCounts_v1_t` + """ + cdef: + nvmlEccSramUniqueUncorrectedErrorCounts_v1_t *_ptr + object _owner + bint _owned + bint _readonly + dict _refs + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") + self._owner = None + self._owned = True + self._readonly = False + self._refs = {} + + def __dealloc__(self): + cdef nvmlEccSramUniqueUncorrectedErrorCounts_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.EccSramUniqueUncorrectedErrorCounts_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef EccSramUniqueUncorrectedErrorCounts_v1 other_ + if not isinstance(other, EccSramUniqueUncorrectedErrorCounts_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def version(self): + """int: the API version number""" + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This EccSramUniqueUncorrectedErrorCounts_v1 instance is read-only") + self._ptr[0].version = val + + @property + def entries(self): + """int: pointer to caller-supplied buffer to return the SRAM unique uncorrected ECC error count entries""" + if self._ptr[0].entries == NULL or self._ptr[0].entryCount == 0: + return [] + return EccSramUniqueUncorrectedErrorEntry_v1.from_ptr( + (self._ptr[0].entries), + self._ptr[0].entryCount, + owner=self, + readonly=self._readonly + ) + + @entries.setter + def entries(self, val): + if self._readonly: + raise ValueError("This EccSramUniqueUncorrectedErrorCounts_v1 instance is read-only") + cdef EccSramUniqueUncorrectedErrorEntry_v1 arr = val + self._ptr[0].entries = (arr._get_ptr()) + self._ptr[0].entryCount = len(arr) + self._refs["entries"] = arr + + @staticmethod + def from_buffer(buffer): + """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t), EccSramUniqueUncorrectedErrorCounts_v1) + + @staticmethod + def from_data(data): + """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `ecc_sram_unique_uncorrected_error_counts_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "ecc_sram_unique_uncorrected_error_counts_v1_dtype", ecc_sram_unique_uncorrected_error_counts_v1_dtype, EccSramUniqueUncorrectedErrorCounts_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an EccSramUniqueUncorrectedErrorCounts_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef EccSramUniqueUncorrectedErrorCounts_v1 obj = EccSramUniqueUncorrectedErrorCounts_v1.__new__(EccSramUniqueUncorrectedErrorCounts_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating EccSramUniqueUncorrectedErrorCounts_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccSramUniqueUncorrectedErrorCounts_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + obj._refs = {} + return obj + + +cdef _get_nvlink_firmware_info_dtype_offsets(): + cdef nvmlNvlinkFirmwareInfo_t pod + return _numpy.dtype({ + 'names': ['firmware_version', 'num_valid_entries'], + 'formats': [(nvlink_firmware_version_dtype, 100), _numpy.uint32], + 'offsets': [ + (&(pod.firmwareVersion)) - (&pod), + (&(pod.numValidEntries)) - (&pod), + ], + 'itemsize': sizeof(nvmlNvlinkFirmwareInfo_t), + }) + +nvlink_firmware_info_dtype = _get_nvlink_firmware_info_dtype_offsets() + +cdef class NvlinkFirmwareInfo: + """Empty-initialize an instance of `nvmlNvlinkFirmwareInfo_t`. + + + .. seealso:: `nvmlNvlinkFirmwareInfo_t` + """ + cdef: + nvmlNvlinkFirmwareInfo_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkFirmwareInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating NvlinkFirmwareInfo") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlNvlinkFirmwareInfo_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef NvlinkFirmwareInfo other_ + if not isinstance(other, NvlinkFirmwareInfo): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating NvlinkFirmwareInfo") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def firmware_version(self): + """NvlinkFirmwareVersion: OUT - NVLINK firmware version.""" + return NvlinkFirmwareVersion.from_ptr( + &(self._ptr[0].firmwareVersion), + 100, + readonly=self._readonly, + owner=self, + ) + + @firmware_version.setter + def firmware_version(self, val): + if self._readonly: + raise ValueError("This NvlinkFirmwareInfo instance is read-only") + cdef NvlinkFirmwareVersion val_ = val + if len(val) != 100: + raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + + @property + def num_valid_entries(self): + """int: OUT - Number of valid firmware entries.""" + return self._ptr[0].numValidEntries + + @num_valid_entries.setter + def num_valid_entries(self, val): + if self._readonly: + raise ValueError("This NvlinkFirmwareInfo instance is read-only") + self._ptr[0].numValidEntries = val + + @staticmethod + def from_buffer(buffer): + """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + + @staticmethod + def from_data(data): + """Create an NvlinkFirmwareInfo instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. + """ + return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an NvlinkFirmwareInfo instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating NvlinkFirmwareInfo") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_scheduler_log_info_v2_dtype_offsets(): + cdef nvmlVgpuSchedulerLogInfo_v2_t pod + return _numpy.dtype({ + 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'timeslice', 'entries_count', 'log_entries'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (vgpu_scheduler_log_entry_v2_dtype, 200)], + 'offsets': [ + (&(pod.engineId)) - (&pod), + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.avgFactor)) - (&pod), + (&(pod.timeslice)) - (&pod), + (&(pod.entriesCount)) - (&pod), + (&(pod.logEntries)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerLogInfo_v2_t), + }) + +vgpu_scheduler_log_info_v2_dtype = _get_vgpu_scheduler_log_info_v2_dtype_offsets() + +cdef class VgpuSchedulerLogInfo_v2: + """Empty-initialize an instance of `nvmlVgpuSchedulerLogInfo_v2_t`. + + + .. seealso:: `nvmlVgpuSchedulerLogInfo_v2_t` + """ + cdef: + nvmlVgpuSchedulerLogInfo_v2_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerLogInfo_v2_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerLogInfo_v2 other_ + if not isinstance(other, VgpuSchedulerLogInfo_v2): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def log_entries(self): + """VgpuSchedulerLogEntry_v2: OUT: Structure to store the state and logs of a software runlist.""" + return VgpuSchedulerLogEntry_v2.from_ptr( + &(self._ptr[0].logEntries), + 200, + readonly=self._readonly, + owner=self, + ) + + @log_entries.setter + def log_entries(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + cdef VgpuSchedulerLogEntry_v2 val_ = val + if len(val) != 200: + raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + + @property + def engine_id(self): + """int: IN: Engine whose software runlist log entries are fetched. One of One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" + return self._ptr[0].engineId + + @engine_id.setter + def engine_id(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].engineId = val + + @property + def scheduler_policy(self): + """int: OUT: Scheduler policy.""" + return self._ptr[0].schedulerPolicy + + @scheduler_policy.setter + def scheduler_policy(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def avg_factor(self): + """int: OUT: Average factor in compensating the timeslice for Adaptive Round Robin mode. 0 when there is no active scheduling.""" + return self._ptr[0].avgFactor + + @avg_factor.setter + def avg_factor(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].avgFactor = val + + @property + def timeslice(self): + """int: OUT: The timeslice in ns for each software run list as configured, or the default value otherwise. 0 when there is no active scheduling.""" + return self._ptr[0].timeslice + + @timeslice.setter + def timeslice(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].timeslice = val + + @property + def entries_count(self): + """int: OUT: Count of log entries fetched.""" + return self._ptr[0].entriesCount + + @entries_count.setter + def entries_count(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + self._ptr[0].entriesCount = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerLogInfo_v2 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuSchedulerLogInfo_v2 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_get_cper_v1_dtype_offsets(): + cdef nvmlGetCPER_v1_t pod + return _numpy.dtype({ + 'names': ['cursor', 'buffer', 'buffer_size'], + 'formats': [cper_cursor_v1_dtype, _numpy.intp, _numpy.uint32], + 'offsets': [ + (&(pod.cursor)) - (&pod), + (&(pod.buffer)) - (&pod), + (&(pod.bufferSize)) - (&pod), + ], + 'itemsize': sizeof(nvmlGetCPER_v1_t), + }) + +get_cper_v1_dtype = _get_get_cper_v1_dtype_offsets() + +cdef class GetCPER_v1: + """Empty-initialize an instance of `nvmlGetCPER_v1_t`. + + + .. seealso:: `nvmlGetCPER_v1_t` + """ + cdef: + nvmlGetCPER_v1_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlGetCPER_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GetCPER_v1") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlGetCPER_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.GetCPER_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef GetCPER_v1 other_ + if not isinstance(other, GetCPER_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGetCPER_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGetCPER_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlGetCPER_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GetCPER_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGetCPER_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def cursor(self): + """CPERCursor_v1: [IN/OUT] Query parameters and cursor. See `nvmlCPERCursor_v1_t`""" + return CPERCursor_v1.from_ptr( + &(self._ptr[0].cursor), + readonly=self._readonly, + owner=self, + ) + + @cursor.setter + def cursor(self, val): + if self._readonly: + raise ValueError("This GetCPER_v1 instance is read-only") + cdef CPERCursor_v1 val_ = val + _cyb_memcpy(&(self._ptr[0].cursor), (val_._get_ptr()), sizeof(nvmlCPERCursor_v1_t) * 1) + + @property + def buffer(self): + """str: [OUT] Buffer to be filled (allocated by client). May be NULL for size query.""" + return (self._ptr[0].buffer) + + @buffer.setter + def buffer(self, val): + if self._readonly: + raise ValueError("This GetCPER_v1 instance is read-only") + self._ptr[0].buffer = val + + @property + def buffer_size(self): + """int: [IN/OUT] Size of `buffer`. Set to 0 with `buffer` NULL to query required size. On return, set to required or used size; 0 means no (more) records.""" + return self._ptr[0].bufferSize + + @buffer_size.setter + def buffer_size(self, val): + if self._readonly: + raise ValueError("This GetCPER_v1 instance is read-only") + self._ptr[0].bufferSize = val + + @staticmethod + def from_buffer(buffer): + """Create an GetCPER_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGetCPER_v1_t), GetCPER_v1) + + @staticmethod + def from_data(data): + """Create an GetCPER_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `get_cper_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "get_cper_v1_dtype", get_cper_v1_dtype, GetCPER_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an GetCPER_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef GetCPER_v1 obj = GetCPER_v1.__new__(GetCPER_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlGetCPER_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating GetCPER_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGetCPER_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_core_rail_metrics_dtype_offsets(): + cdef nvmlCoreRailMetrics_t pod + return _numpy.dtype({ + 'names': ['rails'], + 'formats': [(rail_metrics_dtype, 2)], + 'offsets': [ + (&(pod.rails)) - (&pod), + ], + 'itemsize': sizeof(nvmlCoreRailMetrics_t), + }) + +core_rail_metrics_dtype = _get_core_rail_metrics_dtype_offsets() + +cdef class CoreRailMetrics: + """Empty-initialize an array of `nvmlCoreRailMetrics_t`. + The resulting object is of length `size` and of dtype `core_rail_metrics_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `nvmlCoreRailMetrics_t` + """ + cdef: + readonly object _data + object _owner + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=core_rail_metrics_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlCoreRailMetrics_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlCoreRailMetrics_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.CoreRailMetrics_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.CoreRailMetrics object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, CoreRailMetrics)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def rails(self): + """rail_metrics_dtype: (array of length 2).Array of core rail metrics.""" + return self._data.rails + + @rails.setter + def rails(self, val): + self._data.rails = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return CoreRailMetrics.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == core_rail_metrics_dtype: + return CoreRailMetrics.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an CoreRailMetrics instance with the memory from the given buffer.""" + return CoreRailMetrics.from_data(_numpy.frombuffer(buffer, dtype=core_rail_metrics_dtype)) + + @staticmethod + def from_data(data): + """Create an CoreRailMetrics instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `core_rail_metrics_dtype` holding the data. + """ + cdef CoreRailMetrics obj = CoreRailMetrics.__new__(CoreRailMetrics) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != core_rail_metrics_dtype: + raise ValueError("data array must be of dtype core_rail_metrics_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an CoreRailMetrics instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef CoreRailMetrics obj = CoreRailMetrics.__new__(CoreRailMetrics) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlCoreRailMetrics_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=core_rail_metrics_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + +cdef _get_pwr_model_metrics_pfpp1x_dtype_offsets(): + cdef nvmlPwrModelMetricsPfpp1x_t pod + return _numpy.dtype({ + 'names': ['num_vf_points', 'estimated_metrics', 'b_valid', 'max_perf_per_watt_point', 'fmax_at_vmax_point', 'tgp_headroomm_w'], + 'formats': [_numpy.uint8, (pwr_model_metrics_sample_pfpp1x_dtype, 32), _numpy.uint8, pwr_model_operating_point_pfpp1x_dtype, pwr_model_operating_point_pfpp1x_dtype, _numpy.uint32], + 'offsets': [ + (&(pod.numVfPoints)) - (&pod), + (&(pod.estimatedMetrics)) - (&pod), + (&(pod.bValid)) - (&pod), + (&(pod.maxPerfPerWattPoint)) - (&pod), + (&(pod.fmaxAtVmaxPoint)) - (&pod), + (&(pod.tgpHeadroommW)) - (&pod), + ], + 'itemsize': sizeof(nvmlPwrModelMetricsPfpp1x_t), + }) + +pwr_model_metrics_pfpp1x_dtype = _get_pwr_model_metrics_pfpp1x_dtype_offsets() + +cdef class PwrModelMetricsPfpp1x: + """Empty-initialize an array of `nvmlPwrModelMetricsPfpp1x_t`. + The resulting object is of length `size` and of dtype `pwr_model_metrics_pfpp1x_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `nvmlPwrModelMetricsPfpp1x_t` + """ + cdef: + readonly object _data + object _owner + readonly tuple _estimated_metrics + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=pwr_model_metrics_pfpp1x_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPwrModelMetricsPfpp1x_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPwrModelMetricsPfpp1x_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.PwrModelMetricsPfpp1x_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.PwrModelMetricsPfpp1x object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, PwrModelMetricsPfpp1x)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def estimated_metrics(self): + """PwrModelMetricsSamplePfpp1x: Array of estimated metrics for different operating points.""" + if self._data.size == 1: + return self._estimated_metrics[0] + return self._estimated_metrics + + @property + def b_valid(self): + """Union[~_numpy.uint8, int]: Validity flag: non-zero if metrics are valid.""" + if self._data.size == 1: + return int(self._data.b_valid[0]) + return self._data.b_valid + + @b_valid.setter + def b_valid(self, val): + self._data.b_valid = val + + @property + def max_perf_per_watt_point(self): + """pwr_model_operating_point_pfpp1x_dtype: Operating point with maximum performance per watt.""" + return self._data.max_perf_per_watt_point + + @max_perf_per_watt_point.setter + def max_perf_per_watt_point(self, val): + self._data.max_perf_per_watt_point = val + + @property + def fmax_at_vmax_point(self): + """pwr_model_operating_point_pfpp1x_dtype: Operating point at maximum frequency and voltage.""" + return self._data.fmax_at_vmax_point + + @fmax_at_vmax_point.setter + def fmax_at_vmax_point(self, val): + self._data.fmax_at_vmax_point = val + + @property + def tgp_headroomm_w(self): + """Union[~_numpy.uint32, int]: TGP headroom in milliwatts.""" + if self._data.size == 1: + return int(self._data.tgp_headroomm_w[0]) + return self._data.tgp_headroomm_w + + @tgp_headroomm_w.setter + def tgp_headroomm_w(self, val): + self._data.tgp_headroomm_w = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PwrModelMetricsPfpp1x.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == pwr_model_metrics_pfpp1x_dtype: + return PwrModelMetricsPfpp1x.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an PwrModelMetricsPfpp1x instance with the memory from the given buffer.""" + return PwrModelMetricsPfpp1x.from_data(_numpy.frombuffer(buffer, dtype=pwr_model_metrics_pfpp1x_dtype)) + + @staticmethod + def from_data(data): + """Create an PwrModelMetricsPfpp1x instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `pwr_model_metrics_pfpp1x_dtype` holding the data. + """ + cdef PwrModelMetricsPfpp1x obj = PwrModelMetricsPfpp1x.__new__(PwrModelMetricsPfpp1x) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != pwr_model_metrics_pfpp1x_dtype: + raise ValueError("data array must be of dtype pwr_model_metrics_pfpp1x_dtype") + obj._data = data.view(_numpy.recarray) + + estimatedMetrics_list = list() + for i in range(obj._data.size): + addr = obj._data.estimatedMetrics[i].__array_interface__['data'][0] + n = int(obj._data.num_vf_points[i]) + estimatedMetrics_obj = PwrModelMetricsSamplePfpp1x.from_ptr(addr, n, owner=obj, readonly=False) + estimatedMetrics_list.append(estimatedMetrics_obj) + obj._estimatedMetrics = tuple(estimatedMetrics_list) + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PwrModelMetricsPfpp1x instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef PwrModelMetricsPfpp1x obj = PwrModelMetricsPfpp1x.__new__(PwrModelMetricsPfpp1x) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPwrModelMetricsPfpp1x_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=pwr_model_metrics_pfpp1x_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + estimatedMetrics_list = list() + for i in range(obj._data.size): + addr = obj._data.estimatedMetrics[i].__array_interface__['data'][0] + n = int(obj._data.num_vf_points[i]) + estimatedMetrics_obj = PwrModelMetricsSamplePfpp1x.from_ptr(addr, n, owner=obj, readonly=readonly) + estimatedMetrics_list.append(estimatedMetrics_obj) + obj._estimatedMetrics = tuple(estimatedMetrics_list) + return obj + + +cdef _get_gpu_fabric_info_v4_dtype_offsets(): + cdef nvmlGpuFabricInfo_v4_t pod + return _numpy.dtype({ + 'names': ['cluster_uuid', 'status', 'cliques', 'num_cliques', 'state', 'health_mask', 'health_summary'], + 'formats': [(_numpy.uint8, 16), _numpy.int32, (gpu_fabric_clique_v1_dtype, 64), _numpy.uint32, _numpy.uint8, _numpy.uint32, _numpy.uint8], + 'offsets': [ + (&(pod.clusterUuid)) - (&pod), + (&(pod.status)) - (&pod), + (&(pod.cliques)) - (&pod), + (&(pod.numCliques)) - (&pod), + (&(pod.state)) - (&pod), + (&(pod.healthMask)) - (&pod), + (&(pod.healthSummary)) - (&pod), + ], + 'itemsize': sizeof(nvmlGpuFabricInfo_v4_t), + }) + +gpu_fabric_info_v4_dtype = _get_gpu_fabric_info_v4_dtype_offsets() + +cdef class GpuFabricInfo_v4: + """Empty-initialize an instance of `nvmlGpuFabricInfo_v4_t`. + + + .. seealso:: `nvmlGpuFabricInfo_v4_t` + """ + cdef: + nvmlGpuFabricInfo_v4_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlGpuFabricInfo_v4_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuFabricInfo_v4") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlGpuFabricInfo_v4_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.GpuFabricInfo_v4 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef GpuFabricInfo_v4 other_ + if not isinstance(other, GpuFabricInfo_v4): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGpuFabricInfo_v4_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGpuFabricInfo_v4_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v4_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating GpuFabricInfo_v4") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGpuFabricInfo_v4_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def cliques(self): + """GpuFabricClique_v1: Clique entries, sorted by ascending type then ascending id.""" + return GpuFabricClique_v1.from_ptr( + &(self._ptr[0].cliques), + readonly=self._readonly, + owner=self, + ) + + @cliques.setter + def cliques(self, val): + if self._readonly: + raise ValueError("This GpuFabricInfo_v4 instance is read-only") + cdef GpuFabricClique_v1 val_ = val + if len(val) != 64: + raise ValueError(f"Expected length { 64 } for field cliques, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].cliques), (val_._get_ptr()), sizeof(nvmlGpuFabricClique_v1_t) * 64) + + @property + def cluster_uuid(self): + """~_numpy.uint8: (array of length 16).Uuid of the cluster to which this GPU belongs.""" + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c", allocate_buffer=False) + arr.data = (&(self._ptr[0].clusterUuid)) + return _numpy.asarray(arr) + + @cluster_uuid.setter + def cluster_uuid(self, val): + if self._readonly: + raise ValueError("This GpuFabricInfo_v4 instance is read-only") + if len(val) != 16: + raise ValueError(f"Expected length { 16 } for field cluster_uuid, got {len(val)}") + cdef _cyb_view.array arr = _cyb_view.array(shape=(16,), itemsize=sizeof(unsigned char), format="B", mode="c") + arr[:] = _numpy.asarray(val, dtype=_numpy.uint8) + _cyb_memcpy((&(self._ptr[0].clusterUuid)), (arr.data), sizeof(unsigned char) * len(val)) + + @property + def status(self): + """int: Probe Error status, if any. Must be checked only if state returns "complete".""" + return (self._ptr[0].status) + + @status.setter + def status(self, val): + if self._readonly: + raise ValueError("This GpuFabricInfo_v4 instance is read-only") + self._ptr[0].status = val + + @property + def num_cliques(self): + """int: Number of valid entries in cliques[].""" + return self._ptr[0].numCliques + + @num_cliques.setter + def num_cliques(self, val): + if self._readonly: + raise ValueError("This GpuFabricInfo_v4 instance is read-only") + self._ptr[0].numCliques = val + + @property + def state(self): + """int: Current Probe State. See NVML_GPU_FABRIC_STATE_*.""" + return (self._ptr[0].state) + + @state.setter + def state(self, val): + if self._readonly: + raise ValueError("This GpuFabricInfo_v4 instance is read-only") + self._ptr[0].state = val + + @property + def health_mask(self): + """int: GPU Fabric health Status Mask. See NVML_GPU_FABRIC_HEALTH_MASK_*.""" + return self._ptr[0].healthMask + + @health_mask.setter + def health_mask(self, val): + if self._readonly: + raise ValueError("This GpuFabricInfo_v4 instance is read-only") + self._ptr[0].healthMask = val + + @property + def health_summary(self): + """int: GPU Fabric health summary. See NVML_GPU_FABRIC_HEALTH_SUMMARY_*.""" + return self._ptr[0].healthSummary + + @health_summary.setter + def health_summary(self, val): + if self._readonly: + raise ValueError("This GpuFabricInfo_v4 instance is read-only") + self._ptr[0].healthSummary = val + + @staticmethod + def from_buffer(buffer): + """Create an GpuFabricInfo_v4 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGpuFabricInfo_v4_t), GpuFabricInfo_v4) + + @staticmethod + def from_data(data): + """Create an GpuFabricInfo_v4 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `gpu_fabric_info_v4_dtype` holding the data. + """ + return _cyb_from_data(data, "gpu_fabric_info_v4_dtype", gpu_fabric_info_v4_dtype, GpuFabricInfo_v4) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an GpuFabricInfo_v4 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef GpuFabricInfo_v4 obj = GpuFabricInfo_v4.__new__(GpuFabricInfo_v4) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlGpuFabricInfo_v4_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating GpuFabricInfo_v4") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGpuFabricInfo_v4_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_nvlink_telemetry_samples_v1_dtype_offsets(): + cdef nvmlNvlinkTelemetrySamples_v1_t pod + return _numpy.dtype({ + 'names': ['telemetry_count', 'telemetry_samples'], + 'formats': [_numpy.uint32, _numpy.intp], + 'offsets': [ + (&(pod.telemetryCount)) - (&pod), + (&(pod.telemetrySamples)) - (&pod), + ], + 'itemsize': sizeof(nvmlNvlinkTelemetrySamples_v1_t), + }) + +nvlink_telemetry_samples_v1_dtype = _get_nvlink_telemetry_samples_v1_dtype_offsets() + +cdef class NvlinkTelemetrySamples_v1: + """Empty-initialize an instance of `nvmlNvlinkTelemetrySamples_v1_t`. + + + .. seealso:: `nvmlNvlinkTelemetrySamples_v1_t` + """ + cdef: + nvmlNvlinkTelemetrySamples_v1_t *_ptr + object _owner + bint _owned + bint _readonly + dict _refs + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlNvlinkTelemetrySamples_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating NvlinkTelemetrySamples_v1") + self._owner = None + self._owned = True + self._readonly = False + self._refs = {} + + def __dealloc__(self): + cdef nvmlNvlinkTelemetrySamples_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.NvlinkTelemetrySamples_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef NvlinkTelemetrySamples_v1 other_ + if not isinstance(other, NvlinkTelemetrySamples_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkTelemetrySamples_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkTelemetrySamples_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlNvlinkTelemetrySamples_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating NvlinkTelemetrySamples_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkTelemetrySamples_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def telemetry_samples(self): + """int: [in,out] Caller-allocated array of `telemetryCount` request slots""" + if self._ptr[0].telemetrySamples == NULL or self._ptr[0].telemetryCount == 0: + return [] + return NvlinkTelemetrySample_v1.from_ptr( + (self._ptr[0].telemetrySamples), + self._ptr[0].telemetryCount, + owner=self, + readonly=self._readonly + ) + + @telemetry_samples.setter + def telemetry_samples(self, val): + if self._readonly: + raise ValueError("This NvlinkTelemetrySamples_v1 instance is read-only") + cdef NvlinkTelemetrySample_v1 arr = val + self._ptr[0].telemetrySamples = (arr._get_ptr()) + self._ptr[0].telemetryCount = len(arr) + self._refs["telemetry_samples"] = arr + + @staticmethod + def from_buffer(buffer): + """Create an NvlinkTelemetrySamples_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkTelemetrySamples_v1_t), NvlinkTelemetrySamples_v1) + + @staticmethod + def from_data(data): + """Create an NvlinkTelemetrySamples_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `nvlink_telemetry_samples_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "nvlink_telemetry_samples_v1_dtype", nvlink_telemetry_samples_v1_dtype, NvlinkTelemetrySamples_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an NvlinkTelemetrySamples_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef NvlinkTelemetrySamples_v1 obj = NvlinkTelemetrySamples_v1.__new__(NvlinkTelemetrySamples_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkTelemetrySamples_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating NvlinkTelemetrySamples_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkTelemetrySamples_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + obj._refs = {} + return obj + + +cdef _get_ecc_bank_remapper_status_v1_dtype_offsets(): + cdef nvmlEccBankRemapperStatus_v1_t pod + return _numpy.dtype({ + 'names': ['active_remappings', 'inactive_remappings', 'b_pending', 'histogram'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, ecc_bank_remapper_histogram_v1_dtype], + 'offsets': [ + (&(pod.activeRemappings)) - (&pod), + (&(pod.inactiveRemappings)) - (&pod), + (&(pod.bPending)) - (&pod), + (&(pod.histogram)) - (&pod), + ], + 'itemsize': sizeof(nvmlEccBankRemapperStatus_v1_t), + }) + +ecc_bank_remapper_status_v1_dtype = _get_ecc_bank_remapper_status_v1_dtype_offsets() + +cdef class EccBankRemapperStatus_v1: + """Empty-initialize an instance of `nvmlEccBankRemapperStatus_v1_t`. + + + .. seealso:: `nvmlEccBankRemapperStatus_v1_t` + """ + cdef: + nvmlEccBankRemapperStatus_v1_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlEccBankRemapperStatus_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating EccBankRemapperStatus_v1") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlEccBankRemapperStatus_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.EccBankRemapperStatus_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef EccBankRemapperStatus_v1 other_ + if not isinstance(other, EccBankRemapperStatus_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlEccBankRemapperStatus_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlEccBankRemapperStatus_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlEccBankRemapperStatus_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating EccBankRemapperStatus_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlEccBankRemapperStatus_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def histogram(self): + """EccBankRemapperHistogram_v1: Bank remapper histogram.""" + return EccBankRemapperHistogram_v1.from_ptr( + &(self._ptr[0].histogram), + readonly=self._readonly, + owner=self, + ) + + @histogram.setter + def histogram(self, val): + if self._readonly: + raise ValueError("This EccBankRemapperStatus_v1 instance is read-only") + cdef EccBankRemapperHistogram_v1 val_ = val + _cyb_memcpy(&(self._ptr[0].histogram), (val_._get_ptr()), sizeof(nvmlEccBankRemapperHistogram_v1_t) * 1) + + @property + def active_remappings(self): + """int: Number of active remappings.""" + return self._ptr[0].activeRemappings + + @active_remappings.setter + def active_remappings(self, val): + if self._readonly: + raise ValueError("This EccBankRemapperStatus_v1 instance is read-only") + self._ptr[0].activeRemappings = val + + @property + def inactive_remappings(self): + """int: Number of inactive remappings.""" + return self._ptr[0].inactiveRemappings + + @inactive_remappings.setter + def inactive_remappings(self, val): + if self._readonly: + raise ValueError("This EccBankRemapperStatus_v1 instance is read-only") + self._ptr[0].inactiveRemappings = val + + @property + def b_pending(self): + """int: Whether there exists any pending bank remapping. 0 for no pending remapping, 1 for pending remapping.""" + return self._ptr[0].bPending + + @b_pending.setter + def b_pending(self, val): + if self._readonly: + raise ValueError("This EccBankRemapperStatus_v1 instance is read-only") + self._ptr[0].bPending = val + + @staticmethod + def from_buffer(buffer): + """Create an EccBankRemapperStatus_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlEccBankRemapperStatus_v1_t), EccBankRemapperStatus_v1) + + @staticmethod + def from_data(data): + """Create an EccBankRemapperStatus_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `ecc_bank_remapper_status_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "ecc_bank_remapper_status_v1_dtype", ecc_bank_remapper_status_v1_dtype, EccBankRemapperStatus_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an EccBankRemapperStatus_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef EccBankRemapperStatus_v1 obj = EccBankRemapperStatus_v1.__new__(EccBankRemapperStatus_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlEccBankRemapperStatus_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating EccBankRemapperStatus_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlEccBankRemapperStatus_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_instances_utilization_info_v1_dtype_offsets(): + cdef nvmlVgpuInstancesUtilizationInfo_v1_t pod + return _numpy.dtype({ + 'names': ['version', 'sample_val_type', 'vgpu_instance_count', 'last_seen_time_stamp', 'vgpu_util_array'], + 'formats': [_numpy.uint32, _numpy.int32, _numpy.uint32, _numpy.uint64, _numpy.intp], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.sampleValType)) - (&pod), + (&(pod.vgpuInstanceCount)) - (&pod), + (&(pod.lastSeenTimeStamp)) - (&pod), + (&(pod.vgpuUtilArray)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), + }) + +vgpu_instances_utilization_info_v1_dtype = _get_vgpu_instances_utilization_info_v1_dtype_offsets() + +cdef class VgpuInstancesUtilizationInfo_v1: + """Empty-initialize an instance of `nvmlVgpuInstancesUtilizationInfo_v1_t`. + + + .. seealso:: `nvmlVgpuInstancesUtilizationInfo_v1_t` + """ + cdef: + nvmlVgpuInstancesUtilizationInfo_v1_t *_ptr + object _owner + bint _owned + bint _readonly + dict _refs + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") + self._owner = None + self._owned = True + self._readonly = False + self._refs = {} + + def __dealloc__(self): + cdef nvmlVgpuInstancesUtilizationInfo_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuInstancesUtilizationInfo_v1 other_ + if not isinstance(other, VgpuInstancesUtilizationInfo_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def version(self): + """int: The version number of this struct.""" + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") + self._ptr[0].version = val + + @property + def sample_val_type(self): + """int: Hold the type of returned sample values.""" + return (self._ptr[0].sampleValType) + + @sample_val_type.setter + def sample_val_type(self, val): + if self._readonly: + raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") + self._ptr[0].sampleValType = val + + @property + def last_seen_time_stamp(self): + """int: Return only samples with timestamp greater than lastSeenTimeStamp.""" + return self._ptr[0].lastSeenTimeStamp + + @last_seen_time_stamp.setter + def last_seen_time_stamp(self, val): + if self._readonly: + raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") + self._ptr[0].lastSeenTimeStamp = val + + @property + def vgpu_util_array(self): + """int: The array (allocated by caller) in which vGPU utilization are returned.""" + if self._ptr[0].vgpuUtilArray == NULL or self._ptr[0].vgpuInstanceCount == 0: + return [] + return VgpuInstanceUtilizationInfo_v1.from_ptr( + (self._ptr[0].vgpuUtilArray), + self._ptr[0].vgpuInstanceCount, + owner=self, + readonly=self._readonly + ) + + @vgpu_util_array.setter + def vgpu_util_array(self, val): + if self._readonly: + raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") + cdef VgpuInstanceUtilizationInfo_v1 arr = val + self._ptr[0].vgpuUtilArray = (arr._get_ptr()) + self._ptr[0].vgpuInstanceCount = len(arr) + self._refs["vgpu_util_array"] = arr + + @staticmethod + def from_buffer(buffer): + """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + + @staticmethod + def from_data(data): + """Create an VgpuInstancesUtilizationInfo_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuInstancesUtilizationInfo_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + obj._refs = {} + return obj + + +cdef _get_prm_counter_v1_dtype_offsets(): + cdef nvmlPRMCounter_v1_t pod + return _numpy.dtype({ + 'names': ['counter_id', 'in_data', 'counter_value'], + 'formats': [_numpy.uint32, prm_counter_input_v1_dtype, prm_counter_value_v1_dtype], + 'offsets': [ + (&(pod.counterId)) - (&pod), + (&(pod.inData)) - (&pod), + (&(pod.counterValue)) - (&pod), + ], + 'itemsize': sizeof(nvmlPRMCounter_v1_t), + }) + +prm_counter_v1_dtype = _get_prm_counter_v1_dtype_offsets() + +cdef class PRMCounter_v1: + """Empty-initialize an array of `nvmlPRMCounter_v1_t`. + The resulting object is of length `size` and of dtype `prm_counter_v1_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `nvmlPRMCounter_v1_t` + """ + cdef: + readonly object _data + object _owner + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=prm_counter_v1_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPRMCounter_v1_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPRMCounter_v1_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.PRMCounter_v1_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.PRMCounter_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data + + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, PRMCounter_v1)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def counter_id(self): + """Union[~_numpy.uint32, int]: Counter ID, one of `nvmlPRMCounterId_t`.""" + if self._data.size == 1: + return int(self._data.counter_id[0]) + return self._data.counter_id + + @counter_id.setter + def counter_id(self, val): + self._data.counter_id = val + + @property + def in_data(self): + """prm_counter_input_v1_dtype: PRM input values.""" + return self._data.in_data + + @in_data.setter + def in_data(self, val): + self._data.in_data = val + + @property + def counter_value(self): + """prm_counter_value_v1_dtype: Counter value.""" + return self._data.counter_value + + @counter_value.setter + def counter_value(self, val): + self._data.counter_value = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PRMCounter_v1.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == prm_counter_v1_dtype: + return PRMCounter_v1.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an PRMCounter_v1 instance with the memory from the given buffer.""" + return PRMCounter_v1.from_data(_numpy.frombuffer(buffer, dtype=prm_counter_v1_dtype)) + + @staticmethod + def from_data(data): + """Create an PRMCounter_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `prm_counter_v1_dtype` holding the data. + """ + cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != prm_counter_v1_dtype: + raise ValueError("data array must be of dtype prm_counter_v1_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PRMCounter_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + +cdef _get_vgpu_scheduler_log_dtype_offsets(): + cdef nvmlVgpuSchedulerLog_t pod + return _numpy.dtype({ + 'names': ['engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params', 'entries_count', 'log_entries'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype, _numpy.uint32, (vgpu_scheduler_log_entry_dtype, 200)], + 'offsets': [ + (&(pod.engineId)) - (&pod), + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.arrMode)) - (&pod), + (&(pod.schedulerParams)) - (&pod), + (&(pod.entriesCount)) - (&pod), + (&(pod.logEntries)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerLog_t), + }) + +vgpu_scheduler_log_dtype = _get_vgpu_scheduler_log_dtype_offsets() + +cdef class VgpuSchedulerLog: + """Empty-initialize an instance of `nvmlVgpuSchedulerLog_t`. + + + .. seealso:: `nvmlVgpuSchedulerLog_t` + """ + cdef: + nvmlVgpuSchedulerLog_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerLog") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerLog_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerLog other_ + if not isinstance(other, VgpuSchedulerLog): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerLog") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def scheduler_params(self): + """VgpuSchedulerParams: """ + return VgpuSchedulerParams.from_ptr( + &(self._ptr[0].schedulerParams), + readonly=self._readonly, + owner=self, + ) + + @scheduler_params.setter + def scheduler_params(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLog instance is read-only") + cdef VgpuSchedulerParams val_ = val + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + + @property + def log_entries(self): + """VgpuSchedulerLogEntry: """ + return VgpuSchedulerLogEntry.from_ptr( + &(self._ptr[0].logEntries), + 200, + readonly=self._readonly, + owner=self, + ) + + @log_entries.setter + def log_entries(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLog instance is read-only") + cdef VgpuSchedulerLogEntry val_ = val + if len(val) != 200: + raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + + @property + def engine_id(self): + """int: """ + return self._ptr[0].engineId + + @engine_id.setter + def engine_id(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLog instance is read-only") + self._ptr[0].engineId = val + + @property + def scheduler_policy(self): + """int: """ + return self._ptr[0].schedulerPolicy + + @scheduler_policy.setter + def scheduler_policy(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLog instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def arr_mode(self): + """int: """ + return self._ptr[0].arrMode + + @arr_mode.setter + def arr_mode(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLog instance is read-only") + self._ptr[0].arrMode = val + + @property + def entries_count(self): + """int: """ + return self._ptr[0].entriesCount + + @entries_count.setter + def entries_count(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLog instance is read-only") + self._ptr[0].entriesCount = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerLog instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuSchedulerLog instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerLog") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_scheduler_get_state_dtype_offsets(): + cdef nvmlVgpuSchedulerGetState_t pod + return _numpy.dtype({ + 'names': ['scheduler_policy', 'arr_mode', 'scheduler_params'], + 'formats': [_numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype], + 'offsets': [ + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.arrMode)) - (&pod), + (&(pod.schedulerParams)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerGetState_t), + }) + +vgpu_scheduler_get_state_dtype = _get_vgpu_scheduler_get_state_dtype_offsets() + +cdef class VgpuSchedulerGetState: + """Empty-initialize an instance of `nvmlVgpuSchedulerGetState_t`. + + + .. seealso:: `nvmlVgpuSchedulerGetState_t` + """ + cdef: + nvmlVgpuSchedulerGetState_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerGetState") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerGetState_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerGetState other_ + if not isinstance(other, VgpuSchedulerGetState): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerGetState") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def scheduler_params(self): + """VgpuSchedulerParams: """ + return VgpuSchedulerParams.from_ptr( + &(self._ptr[0].schedulerParams), + readonly=self._readonly, + owner=self, + ) + + @scheduler_params.setter + def scheduler_params(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerGetState instance is read-only") + cdef VgpuSchedulerParams val_ = val + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + + @property + def scheduler_policy(self): + """int: """ + return self._ptr[0].schedulerPolicy + + @scheduler_policy.setter + def scheduler_policy(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerGetState instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def arr_mode(self): + """int: """ + return self._ptr[0].arrMode + + @arr_mode.setter + def arr_mode(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerGetState instance is read-only") + self._ptr[0].arrMode = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerGetState instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuSchedulerGetState instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerGetState") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_scheduler_state_info_v1_dtype_offsets(): + cdef nvmlVgpuSchedulerStateInfo_v1_t pod + return _numpy.dtype({ + 'names': ['version', 'engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.engineId)) - (&pod), + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.arrMode)) - (&pod), + (&(pod.schedulerParams)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerStateInfo_v1_t), + }) + +vgpu_scheduler_state_info_v1_dtype = _get_vgpu_scheduler_state_info_v1_dtype_offsets() + +cdef class VgpuSchedulerStateInfo_v1: + """Empty-initialize an instance of `nvmlVgpuSchedulerStateInfo_v1_t`. + + + .. seealso:: `nvmlVgpuSchedulerStateInfo_v1_t` + """ + cdef: + nvmlVgpuSchedulerStateInfo_v1_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") + self._owner = None + self._owned = True + self._readonly = False + + def __dealloc__(self): + cdef nvmlVgpuSchedulerStateInfo_v1_t *ptr + if self._owned and self._ptr != NULL: + ptr = self._ptr + self._ptr = NULL + _cyb_free(ptr) + + def __repr__(self): + return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" + + @property + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return (self._ptr) + + cdef intptr_t _get_ptr(self): + return (self._ptr) + + def __int__(self): + return (self._ptr) + + def __eq__(self, other): + cdef VgpuSchedulerStateInfo_v1 other_ + if not isinstance(other, VgpuSchedulerStateInfo_v1): + return False + other_ = other + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + + def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + + def __releasebuffer__(self, Py_buffer *buffer): + pass + + def __setitem__(self, key, val): + if key == 0 and isinstance(val, _numpy.ndarray): + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + if self._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + self._owner = None + self._owned = True + self._readonly = not val.flags.writeable + else: + setattr(self, key, val) + + @property + def scheduler_params(self): + """VgpuSchedulerParams: OUT: vGPU Scheduler Parameters.""" + return VgpuSchedulerParams.from_ptr( + &(self._ptr[0].schedulerParams), + readonly=self._readonly, + owner=self, + ) + + @scheduler_params.setter + def scheduler_params(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") + cdef VgpuSchedulerParams val_ = val + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + + @property + def version(self): + """int: IN: The version number of this struct.""" + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") + self._ptr[0].version = val + + @property + def engine_id(self): + """int: IN: Engine whose software scheduler state info is fetched. One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" + return self._ptr[0].engineId + + @engine_id.setter + def engine_id(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") + self._ptr[0].engineId = val + + @property + def scheduler_policy(self): + """int: OUT: Scheduler policy.""" + return self._ptr[0].schedulerPolicy + + @scheduler_policy.setter + def scheduler_policy(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def arr_mode(self): + """int: OUT: Adaptive Round Robin scheduler mode. One of the NVML_VGPU_SCHEDULER_ARR_*.""" + return self._ptr[0].arrMode + + @arr_mode.setter + def arr_mode(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") + self._ptr[0].arrMode = val + + @staticmethod + def from_buffer(buffer): + """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + + @staticmethod + def from_data(data): + """Create an VgpuSchedulerStateInfo_v1 instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. + """ + return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + + @staticmethod + def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): + """Create an VgpuSchedulerStateInfo_v1 instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + owner (object): The Python object that owns the pointer. If not provided, data will be copied. + readonly (bool): whether the data is read-only (to the user). default is `False`. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) + if owner is None: + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + if obj._ptr == NULL: + raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) + obj._owner = None + obj._owned = True + else: + obj._ptr = ptr + obj._owner = owner + obj._owned = False + obj._readonly = readonly + return obj + + +cdef _get_vgpu_scheduler_log_info_v1_dtype_offsets(): + cdef nvmlVgpuSchedulerLogInfo_v1_t pod + return _numpy.dtype({ + 'names': ['version', 'engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params', 'entries_count', 'log_entries'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype, _numpy.uint32, (vgpu_scheduler_log_entry_dtype, 200)], + 'offsets': [ + (&(pod.version)) - (&pod), + (&(pod.engineId)) - (&pod), + (&(pod.schedulerPolicy)) - (&pod), + (&(pod.arrMode)) - (&pod), + (&(pod.schedulerParams)) - (&pod), + (&(pod.entriesCount)) - (&pod), + (&(pod.logEntries)) - (&pod), + ], + 'itemsize': sizeof(nvmlVgpuSchedulerLogInfo_v1_t), + }) + +vgpu_scheduler_log_info_v1_dtype = _get_vgpu_scheduler_log_info_v1_dtype_offsets() + +cdef class VgpuSchedulerLogInfo_v1: + """Empty-initialize an instance of `nvmlVgpuSchedulerLogInfo_v1_t`. + + + .. seealso:: `nvmlVgpuSchedulerLogInfo_v1_t` + """ + cdef: + nvmlVgpuSchedulerLogInfo_v1_t *_ptr + object _owner + bint _owned + bint _readonly + + def __init__(self): + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating NvlinkFirmwareInfo") + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlNvlinkFirmwareInfo_t *ptr + cdef nvmlVgpuSchedulerLogInfo_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.NvlinkFirmwareInfo object at {hex(id(self))}>" + return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -20702,24 +26189,24 @@ cdef class NvlinkFirmwareInfo: return (self._ptr) def __eq__(self, other): - cdef NvlinkFirmwareInfo other_ - if not isinstance(other, NvlinkFirmwareInfo): + cdef VgpuSchedulerLogInfo_v1 other_ + if not isinstance(other, VgpuSchedulerLogInfo_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvlinkFirmwareInfo_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvlinkFirmwareInfo_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvlinkFirmwareInfo_t)) + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20727,52 +26214,112 @@ cdef class NvlinkFirmwareInfo: setattr(self, key, val) @property - def firmware_version(self): - """NvlinkFirmwareVersion: OUT - NVLINK firmware version.""" - return NvlinkFirmwareVersion.from_ptr( - &(self._ptr[0].firmwareVersion), - 100, + def scheduler_params(self): + """VgpuSchedulerParams: OUT: vGPU Scheduler Parameters.""" + return VgpuSchedulerParams.from_ptr( + &(self._ptr[0].schedulerParams), readonly=self._readonly, owner=self, ) - @firmware_version.setter - def firmware_version(self, val): + @scheduler_params.setter + def scheduler_params(self, val): if self._readonly: - raise ValueError("This NvlinkFirmwareInfo instance is read-only") - cdef NvlinkFirmwareVersion val_ = val - if len(val) != 100: - raise ValueError(f"Expected length { 100 } for field firmware_version, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].firmwareVersion), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareVersion_t) * 100) + raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") + cdef VgpuSchedulerParams val_ = val + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) @property - def num_valid_entries(self): - """int: OUT - Number of valid firmware entries.""" - return self._ptr[0].numValidEntries + def log_entries(self): + """VgpuSchedulerLogEntry: OUT: Structure to store the state and logs of a software runlist.""" + return VgpuSchedulerLogEntry.from_ptr( + &(self._ptr[0].logEntries), + 200, + readonly=self._readonly, + owner=self, + ) - @num_valid_entries.setter - def num_valid_entries(self, val): + @log_entries.setter + def log_entries(self, val): if self._readonly: - raise ValueError("This NvlinkFirmwareInfo instance is read-only") - self._ptr[0].numValidEntries = val + raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") + cdef VgpuSchedulerLogEntry val_ = val + if len(val) != 200: + raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") + _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + + @property + def version(self): + """int: IN: The version number of this struct.""" + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") + self._ptr[0].version = val + + @property + def engine_id(self): + """int: IN: Engine whose software runlist log entries are fetched. One of One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" + return self._ptr[0].engineId + + @engine_id.setter + def engine_id(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") + self._ptr[0].engineId = val + + @property + def scheduler_policy(self): + """int: OUT: Scheduler policy.""" + return self._ptr[0].schedulerPolicy + + @scheduler_policy.setter + def scheduler_policy(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") + self._ptr[0].schedulerPolicy = val + + @property + def arr_mode(self): + """int: OUT: Adaptive Round Robin scheduler mode. One of the NVML_VGPU_SCHEDULER_ARR_*.""" + return self._ptr[0].arrMode + + @arr_mode.setter + def arr_mode(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") + self._ptr[0].arrMode = val + + @property + def entries_count(self): + """int: OUT: Count of log entries fetched.""" + return self._ptr[0].entriesCount + + @entries_count.setter + def entries_count(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") + self._ptr[0].entriesCount = val @staticmethod def from_buffer(buffer): - """Create an NvlinkFirmwareInfo instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvlinkFirmwareInfo_t), NvlinkFirmwareInfo) + """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) @staticmethod def from_data(data): - """Create an NvlinkFirmwareInfo instance wrapping the given NumPy array. + """Create an VgpuSchedulerLogInfo_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `nvlink_firmware_info_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nvlink_firmware_info_dtype", nvlink_firmware_info_dtype, NvlinkFirmwareInfo) + return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an NvlinkFirmwareInfo instance wrapping the given pointer. + """Create an VgpuSchedulerLogInfo_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -20781,69 +26328,68 @@ cdef class NvlinkFirmwareInfo: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef NvlinkFirmwareInfo obj = NvlinkFirmwareInfo.__new__(NvlinkFirmwareInfo) + cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvlinkFirmwareInfo_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating NvlinkFirmwareInfo") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvlinkFirmwareInfo_t)) + raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_vgpu_scheduler_log_info_v2_dtype_offsets(): - cdef nvmlVgpuSchedulerLogInfo_v2_t pod +cdef _get_vgpu_scheduler_state_v1_dtype_offsets(): + cdef nvmlVgpuSchedulerState_v1_t pod return _numpy.dtype({ - 'names': ['engine_id', 'scheduler_policy', 'avg_factor', 'timeslice', 'entries_count', 'log_entries'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, (vgpu_scheduler_log_entry_v2_dtype, 200)], + 'names': ['version', 'engine_id', 'scheduler_policy', 'enable_arr_mode', 'scheduler_params'], + 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_set_params_dtype], 'offsets': [ + (&(pod.version)) - (&pod), (&(pod.engineId)) - (&pod), (&(pod.schedulerPolicy)) - (&pod), - (&(pod.avgFactor)) - (&pod), - (&(pod.timeslice)) - (&pod), - (&(pod.entriesCount)) - (&pod), - (&(pod.logEntries)) - (&pod), + (&(pod.enableARRMode)) - (&pod), + (&(pod.schedulerParams)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuSchedulerLogInfo_v2_t), + 'itemsize': sizeof(nvmlVgpuSchedulerState_v1_t), }) -vgpu_scheduler_log_info_v2_dtype = _get_vgpu_scheduler_log_info_v2_dtype_offsets() +vgpu_scheduler_state_v1_dtype = _get_vgpu_scheduler_state_v1_dtype_offsets() -cdef class VgpuSchedulerLogInfo_v2: - """Empty-initialize an instance of `nvmlVgpuSchedulerLogInfo_v2_t`. +cdef class VgpuSchedulerState_v1: + """Empty-initialize an instance of `nvmlVgpuSchedulerState_v1_t`. - .. seealso:: `nvmlVgpuSchedulerLogInfo_v2_t` + .. seealso:: `nvmlVgpuSchedulerState_v1_t` """ cdef: - nvmlVgpuSchedulerLogInfo_v2_t *_ptr + nvmlVgpuSchedulerState_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") + raise MemoryError("Error allocating VgpuSchedulerState_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlVgpuSchedulerLogInfo_v2_t *ptr + cdef nvmlVgpuSchedulerState_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.VgpuSchedulerLogInfo_v2 object at {hex(id(self))}>" + return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -20857,24 +26403,24 @@ cdef class VgpuSchedulerLogInfo_v2: return (self._ptr) def __eq__(self, other): - cdef VgpuSchedulerLogInfo_v2 other_ - if not isinstance(other, VgpuSchedulerLogInfo_v2): + cdef VgpuSchedulerState_v1 other_ + if not isinstance(other, VgpuSchedulerState_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + raise MemoryError("Error allocating VgpuSchedulerState_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -20882,96 +26428,82 @@ cdef class VgpuSchedulerLogInfo_v2: setattr(self, key, val) @property - def log_entries(self): - """VgpuSchedulerLogEntry_v2: OUT: Structure to store the state and logs of a software runlist.""" - return VgpuSchedulerLogEntry_v2.from_ptr( - &(self._ptr[0].logEntries), - 200, + def scheduler_params(self): + """VgpuSchedulerSetParams: IN: vGPU Scheduler Parameters.""" + return VgpuSchedulerSetParams.from_ptr( + &(self._ptr[0].schedulerParams), readonly=self._readonly, owner=self, ) - @log_entries.setter - def log_entries(self, val): + @scheduler_params.setter + def scheduler_params(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") - cdef VgpuSchedulerLogEntry_v2 val_ = val - if len(val) != 200: - raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_v2_t) * 200) + raise ValueError("This VgpuSchedulerState_v1 instance is read-only") + cdef VgpuSchedulerSetParams val_ = val + _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) + + @property + def version(self): + """int: IN: The version number of this struct.""" + return self._ptr[0].version + + @version.setter + def version(self, val): + if self._readonly: + raise ValueError("This VgpuSchedulerState_v1 instance is read-only") + self._ptr[0].version = val @property def engine_id(self): - """int: IN: Engine whose software runlist log entries are fetched. One of One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" + """int: IN: One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" return self._ptr[0].engineId @engine_id.setter def engine_id(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + raise ValueError("This VgpuSchedulerState_v1 instance is read-only") self._ptr[0].engineId = val @property def scheduler_policy(self): - """int: OUT: Scheduler policy.""" + """int: IN: Scheduler policy.""" return self._ptr[0].schedulerPolicy @scheduler_policy.setter def scheduler_policy(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") + raise ValueError("This VgpuSchedulerState_v1 instance is read-only") self._ptr[0].schedulerPolicy = val @property - def avg_factor(self): - """int: OUT: Average factor in compensating the timeslice for Adaptive Round Robin mode. 0 when there is no active scheduling.""" - return self._ptr[0].avgFactor - - @avg_factor.setter - def avg_factor(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") - self._ptr[0].avgFactor = val - - @property - def timeslice(self): - """int: OUT: The timeslice in ns for each software run list as configured, or the default value otherwise. 0 when there is no active scheduling.""" - return self._ptr[0].timeslice - - @timeslice.setter - def timeslice(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") - self._ptr[0].timeslice = val - - @property - def entries_count(self): - """int: OUT: Count of log entries fetched.""" - return self._ptr[0].entriesCount + def enable_arr_mode(self): + """int: IN: Adaptive Round Robin scheduler.""" + return self._ptr[0].enableARRMode - @entries_count.setter - def entries_count(self, val): + @enable_arr_mode.setter + def enable_arr_mode(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v2 instance is read-only") - self._ptr[0].entriesCount = val + raise ValueError("This VgpuSchedulerState_v1 instance is read-only") + self._ptr[0].enableARRMode = val @staticmethod def from_buffer(buffer): - """Create an VgpuSchedulerLogInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v2_t), VgpuSchedulerLogInfo_v2) + """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) @staticmethod def from_data(data): - """Create an VgpuSchedulerLogInfo_v2 instance wrapping the given NumPy array. + """Create an VgpuSchedulerState_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v2_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v2_dtype", vgpu_scheduler_log_info_v2_dtype, VgpuSchedulerLogInfo_v2) + return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerLogInfo_v2 instance wrapping the given pointer. + """Create an VgpuSchedulerState_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -20980,66 +26512,66 @@ cdef class VgpuSchedulerLogInfo_v2: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerLogInfo_v2 obj = VgpuSchedulerLogInfo_v2.__new__(VgpuSchedulerLogInfo_v2) + cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLogInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v2_t)) + raise MemoryError("Error allocating VgpuSchedulerState_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_get_cper_v1_dtype_offsets(): - cdef nvmlGetCPER_v1_t pod +cdef _get_grid_licensable_features_dtype_offsets(): + cdef nvmlGridLicensableFeatures_t pod return _numpy.dtype({ - 'names': ['cursor', 'buffer', 'buffer_size'], - 'formats': [cper_cursor_v1_dtype, _numpy.intp, _numpy.uint32], + 'names': ['is_grid_license_supported', 'licensable_features_count', 'grid_licensable_features'], + 'formats': [_numpy.int32, _numpy.uint32, (grid_licensable_feature_dtype, 3)], 'offsets': [ - (&(pod.cursor)) - (&pod), - (&(pod.buffer)) - (&pod), - (&(pod.bufferSize)) - (&pod), + (&(pod.isGridLicenseSupported)) - (&pod), + (&(pod.licensableFeaturesCount)) - (&pod), + (&(pod.gridLicensableFeatures)) - (&pod), ], - 'itemsize': sizeof(nvmlGetCPER_v1_t), + 'itemsize': sizeof(nvmlGridLicensableFeatures_t), }) -get_cper_v1_dtype = _get_get_cper_v1_dtype_offsets() +grid_licensable_features_dtype = _get_grid_licensable_features_dtype_offsets() -cdef class GetCPER_v1: - """Empty-initialize an instance of `nvmlGetCPER_v1_t`. +cdef class GridLicensableFeatures: + """Empty-initialize an instance of `nvmlGridLicensableFeatures_t`. - .. seealso:: `nvmlGetCPER_v1_t` + .. seealso:: `nvmlGridLicensableFeatures_t` """ cdef: - nvmlGetCPER_v1_t *_ptr + nvmlGridLicensableFeatures_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGetCPER_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GetCPER_v1") + raise MemoryError("Error allocating GridLicensableFeatures") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlGetCPER_v1_t *ptr + cdef nvmlGridLicensableFeatures_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.GetCPER_v1 object at {hex(id(self))}>" + return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" @property def ptr(self): @@ -21053,24 +26585,24 @@ cdef class GetCPER_v1: return (self._ptr) def __eq__(self, other): - cdef GetCPER_v1 other_ - if not isinstance(other, GetCPER_v1): + cdef GridLicensableFeatures other_ + if not isinstance(other, GridLicensableFeatures): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGetCPER_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGetCPER_v1_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGetCPER_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if self._ptr == NULL: - raise MemoryError("Error allocating GetCPER_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGetCPER_v1_t)) + raise MemoryError("Error allocating GridLicensableFeatures") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -21078,60 +26610,55 @@ cdef class GetCPER_v1: setattr(self, key, val) @property - def cursor(self): - """CPERCursor_v1: [IN/OUT] Query parameters and cursor. See `nvmlCPERCursor_v1_t`""" - return CPERCursor_v1.from_ptr( - &(self._ptr[0].cursor), + def grid_licensable_features(self): + """GridLicensableFeature: """ + return GridLicensableFeature.from_ptr( + &(self._ptr[0].gridLicensableFeatures), + self._ptr[0].licensableFeaturesCount, readonly=self._readonly, owner=self, ) - @cursor.setter - def cursor(self, val): - if self._readonly: - raise ValueError("This GetCPER_v1 instance is read-only") - cdef CPERCursor_v1 val_ = val - _cyb_memcpy(&(self._ptr[0].cursor), (val_._get_ptr()), sizeof(nvmlCPERCursor_v1_t) * 1) - - @property - def buffer(self): - """str: [OUT] Buffer to be filled (allocated by client). May be NULL for size query.""" - return (self._ptr[0].buffer) - - @buffer.setter - def buffer(self, val): + @grid_licensable_features.setter + def grid_licensable_features(self, val): if self._readonly: - raise ValueError("This GetCPER_v1 instance is read-only") - self._ptr[0].buffer = val + raise ValueError("This GridLicensableFeatures instance is read-only") + cdef GridLicensableFeature val_ = val + if len(val) > 3: + raise ValueError(f"Expected length < 3 for field grid_licensable_features, got {len(val)}") + self._ptr[0].licensableFeaturesCount = len(val) + if len(val) == 0: + return + _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) @property - def buffer_size(self): - """int: [IN/OUT] Size of `buffer`. Set to 0 with `buffer` NULL to query required size. On return, set to required or used size; 0 means no (more) records.""" - return self._ptr[0].bufferSize + def is_grid_license_supported(self): + """int: """ + return self._ptr[0].isGridLicenseSupported - @buffer_size.setter - def buffer_size(self, val): + @is_grid_license_supported.setter + def is_grid_license_supported(self, val): if self._readonly: - raise ValueError("This GetCPER_v1 instance is read-only") - self._ptr[0].bufferSize = val + raise ValueError("This GridLicensableFeatures instance is read-only") + self._ptr[0].isGridLicenseSupported = val @staticmethod def from_buffer(buffer): - """Create an GetCPER_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGetCPER_v1_t), GetCPER_v1) + """Create an GridLicensableFeatures instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) @staticmethod def from_data(data): - """Create an GetCPER_v1 instance wrapping the given NumPy array. + """Create an GridLicensableFeatures instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `get_cper_v1_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. """ - return _cyb_from_data(data, "get_cper_v1_dtype", get_cper_v1_dtype, GetCPER_v1) + return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an GetCPER_v1 instance wrapping the given pointer. + """Create an GridLicensableFeatures instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -21140,70 +26667,66 @@ cdef class GetCPER_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef GetCPER_v1 obj = GetCPER_v1.__new__(GetCPER_v1) + cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGetCPER_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating GetCPER_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGetCPER_v1_t)) + raise MemoryError("Error allocating GridLicensableFeatures") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_vgpu_instances_utilization_info_v1_dtype_offsets(): - cdef nvmlVgpuInstancesUtilizationInfo_v1_t pod +cdef _get_nv_link_info_v2_dtype_offsets(): + cdef nvmlNvLinkInfo_v2_t pod return _numpy.dtype({ - 'names': ['version', 'sample_val_type', 'vgpu_instance_count', 'last_seen_time_stamp', 'vgpu_util_array'], - 'formats': [_numpy.uint32, _numpy.int32, _numpy.uint32, _numpy.uint64, _numpy.intp], + 'names': ['version', 'is_nvle_enabled', 'firmware_info'], + 'formats': [_numpy.uint32, _numpy.uint32, nvlink_firmware_info_dtype], 'offsets': [ (&(pod.version)) - (&pod), - (&(pod.sampleValType)) - (&pod), - (&(pod.vgpuInstanceCount)) - (&pod), - (&(pod.lastSeenTimeStamp)) - (&pod), - (&(pod.vgpuUtilArray)) - (&pod), + (&(pod.isNvleEnabled)) - (&pod), + (&(pod.firmwareInfo)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), + 'itemsize': sizeof(nvmlNvLinkInfo_v2_t), }) -vgpu_instances_utilization_info_v1_dtype = _get_vgpu_instances_utilization_info_v1_dtype_offsets() +nv_link_info_v2_dtype = _get_nv_link_info_v2_dtype_offsets() -cdef class VgpuInstancesUtilizationInfo_v1: - """Empty-initialize an instance of `nvmlVgpuInstancesUtilizationInfo_v1_t`. +cdef class NvLinkInfo_v2: + """Empty-initialize an instance of `nvmlNvLinkInfo_v2_t`. - .. seealso:: `nvmlVgpuInstancesUtilizationInfo_v1_t` + .. seealso:: `nvmlNvLinkInfo_v2_t` """ cdef: - nvmlVgpuInstancesUtilizationInfo_v1_t *_ptr + nvmlNvLinkInfo_v2_t *_ptr object _owner bint _owned bint _readonly - dict _refs def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") + raise MemoryError("Error allocating NvLinkInfo_v2") self._owner = None self._owned = True self._readonly = False - self._refs = {} def __dealloc__(self): - cdef nvmlVgpuInstancesUtilizationInfo_v1_t *ptr + cdef nvmlNvLinkInfo_v2_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.VgpuInstancesUtilizationInfo_v1 object at {hex(id(self))}>" + return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" @property def ptr(self): @@ -21217,101 +26740,85 @@ cdef class VgpuInstancesUtilizationInfo_v1: return (self._ptr) def __eq__(self, other): - cdef VgpuInstancesUtilizationInfo_v1 other_ - if not isinstance(other, VgpuInstancesUtilizationInfo_v1): + cdef NvLinkInfo_v2 other_ + if not isinstance(other, NvLinkInfo_v2): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + raise MemoryError("Error allocating NvLinkInfo_v2") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable else: setattr(self, key, val) + @property + def firmware_info(self): + """NvlinkFirmwareInfo: OUT - NVLINK Firmware info.""" + return NvlinkFirmwareInfo.from_ptr( + &(self._ptr[0].firmwareInfo), + readonly=self._readonly, + owner=self, + ) + + @firmware_info.setter + def firmware_info(self, val): + if self._readonly: + raise ValueError("This NvLinkInfo_v2 instance is read-only") + cdef NvlinkFirmwareInfo val_ = val + _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) + @property def version(self): - """int: The version number of this struct.""" + """int: IN - the API version number.""" return self._ptr[0].version @version.setter def version(self, val): if self._readonly: - raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") + raise ValueError("This NvLinkInfo_v2 instance is read-only") self._ptr[0].version = val @property - def sample_val_type(self): - """int: Hold the type of returned sample values.""" - return (self._ptr[0].sampleValType) - - @sample_val_type.setter - def sample_val_type(self, val): - if self._readonly: - raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") - self._ptr[0].sampleValType = val - - @property - def last_seen_time_stamp(self): - """int: Return only samples with timestamp greater than lastSeenTimeStamp.""" - return self._ptr[0].lastSeenTimeStamp - - @last_seen_time_stamp.setter - def last_seen_time_stamp(self, val): - if self._readonly: - raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") - self._ptr[0].lastSeenTimeStamp = val - - @property - def vgpu_util_array(self): - """int: The array (allocated by caller) in which vGPU utilization are returned.""" - if self._ptr[0].vgpuUtilArray == NULL or self._ptr[0].vgpuInstanceCount == 0: - return [] - return VgpuInstanceUtilizationInfo_v1.from_ptr( - (self._ptr[0].vgpuUtilArray), - self._ptr[0].vgpuInstanceCount, - owner=self, - readonly=self._readonly - ) + def is_nvle_enabled(self): + """int: OUT - NVLINK encryption enablement.""" + return self._ptr[0].isNvleEnabled - @vgpu_util_array.setter - def vgpu_util_array(self, val): + @is_nvle_enabled.setter + def is_nvle_enabled(self, val): if self._readonly: - raise ValueError("This VgpuInstancesUtilizationInfo_v1 instance is read-only") - cdef VgpuInstanceUtilizationInfo_v1 arr = val - self._ptr[0].vgpuUtilArray = (arr._get_ptr()) - self._ptr[0].vgpuInstanceCount = len(arr) - self._refs["vgpu_util_array"] = arr + raise ValueError("This NvLinkInfo_v2 instance is read-only") + self._ptr[0].isNvleEnabled = val @staticmethod def from_buffer(buffer): - """Create an VgpuInstancesUtilizationInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t), VgpuInstancesUtilizationInfo_v1) + """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) @staticmethod def from_data(data): - """Create an VgpuInstancesUtilizationInfo_v1 instance wrapping the given NumPy array. + """Create an NvLinkInfo_v2 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_instances_utilization_info_v1_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_instances_utilization_info_v1_dtype", vgpu_instances_utilization_info_v1_dtype, VgpuInstancesUtilizationInfo_v1) + return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuInstancesUtilizationInfo_v1 instance wrapping the given pointer. + """Create an NvLinkInfo_v2 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -21320,63 +26827,64 @@ cdef class VgpuInstancesUtilizationInfo_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuInstancesUtilizationInfo_v1 obj = VgpuInstancesUtilizationInfo_v1.__new__(VgpuInstancesUtilizationInfo_v1) + cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuInstancesUtilizationInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuInstancesUtilizationInfo_v1_t)) + raise MemoryError("Error allocating NvLinkInfo_v2") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly - obj._refs = {} return obj -cdef _get_prm_counter_v1_dtype_offsets(): - cdef nvmlPRMCounter_v1_t pod +cdef _get_pwr_model_metrics_dlppm1x_dtype_offsets(): + cdef nvmlPwrModelMetricsDlppm1x_t pod return _numpy.dtype({ - 'names': ['counter_id', 'in_data', 'counter_value'], - 'formats': [_numpy.uint32, prm_counter_input_v1_dtype, prm_counter_value_v1_dtype], + 'names': ['b_valid', 'core_rail', 'fb_rail', 'tgp_pwr_tuple', 'perf_metrics'], + 'formats': [_numpy.uint8, core_rail_metrics_dtype, rail_metrics_dtype, pmgr_pwr_tuple_dtype, pwr_model_metrics_dlppm1x_perf_dtype], 'offsets': [ - (&(pod.counterId)) - (&pod), - (&(pod.inData)) - (&pod), - (&(pod.counterValue)) - (&pod), + (&(pod.bValid)) - (&pod), + (&(pod.coreRail)) - (&pod), + (&(pod.fbRail)) - (&pod), + (&(pod.tgpPwrTuple)) - (&pod), + (&(pod.perfMetrics)) - (&pod), ], - 'itemsize': sizeof(nvmlPRMCounter_v1_t), + 'itemsize': sizeof(nvmlPwrModelMetricsDlppm1x_t), }) -prm_counter_v1_dtype = _get_prm_counter_v1_dtype_offsets() +pwr_model_metrics_dlppm1x_dtype = _get_pwr_model_metrics_dlppm1x_dtype_offsets() -cdef class PRMCounter_v1: - """Empty-initialize an array of `nvmlPRMCounter_v1_t`. - The resulting object is of length `size` and of dtype `prm_counter_v1_dtype`. +cdef class PwrModelMetricsDlppm1x: + """Empty-initialize an array of `nvmlPwrModelMetricsDlppm1x_t`. + The resulting object is of length `size` and of dtype `pwr_model_metrics_dlppm1x_dtype`. If default-constructed, the instance represents a single struct. Args: size (int): number of structs, default=1. - .. seealso:: `nvmlPRMCounter_v1_t` + .. seealso:: `nvmlPwrModelMetricsDlppm1x_t` """ cdef: readonly object _data object _owner def __init__(self, size=1): - arr = _numpy.empty(size, dtype=prm_counter_v1_dtype) + arr = _numpy.empty(size, dtype=pwr_model_metrics_dlppm1x_dtype) self._data = arr.view(_numpy.recarray) - assert self._data.itemsize == sizeof(nvmlPRMCounter_v1_t), \ - f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPRMCounter_v1_t) }" + assert self._data.itemsize == sizeof(nvmlPwrModelMetricsDlppm1x_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPwrModelMetricsDlppm1x_t) }" def __repr__(self): if self._data.size > 1: - return f"<{__name__}.PRMCounter_v1_Array_{self._data.size} object at {hex(id(self))}>" + return f"<{__name__}.PwrModelMetricsDlppm1x_Array_{self._data.size} object at {hex(id(self))}>" else: - return f"<{__name__}.PRMCounter_v1 object at {hex(id(self))}>" + return f"<{__name__}.PwrModelMetricsDlppm1x object at {hex(id(self))}>" @property def ptr(self): @@ -21397,7 +26905,7 @@ cdef class PRMCounter_v1: def __eq__(self, other): cdef object self_data = self._data - if (not isinstance(other, PRMCounter_v1)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + if (not isinstance(other, PwrModelMetricsDlppm1x)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False return bool((self_data == other._data).all()) @@ -21408,33 +26916,51 @@ cdef class PRMCounter_v1: _cyb_cpython.PyBuffer_Release(buffer) @property - def counter_id(self): - """Union[~_numpy.uint32, int]: Counter ID, one of `nvmlPRMCounterId_t`.""" + def b_valid(self): + """Union[~_numpy.uint8, int]: Validity flag: non-zero if metrics are valid.""" if self._data.size == 1: - return int(self._data.counter_id[0]) - return self._data.counter_id + return int(self._data.b_valid[0]) + return self._data.b_valid - @counter_id.setter - def counter_id(self, val): - self._data.counter_id = val + @b_valid.setter + def b_valid(self, val): + self._data.b_valid = val @property - def in_data(self): - """prm_counter_input_v1_dtype: PRM input values.""" - return self._data.in_data + def core_rail(self): + """core_rail_metrics_dtype: Core rail metrics.""" + return self._data.core_rail - @in_data.setter - def in_data(self, val): - self._data.in_data = val + @core_rail.setter + def core_rail(self, val): + self._data.core_rail = val @property - def counter_value(self): - """prm_counter_value_v1_dtype: Counter value.""" - return self._data.counter_value + def fb_rail(self): + """rail_metrics_dtype: Fb rail metrics.""" + return self._data.fb_rail - @counter_value.setter - def counter_value(self, val): - self._data.counter_value = val + @fb_rail.setter + def fb_rail(self, val): + self._data.fb_rail = val + + @property + def tgp_pwr_tuple(self): + """pmgr_pwr_tuple_dtype: Total Graphics Power (TGP) in milliwatts.""" + return self._data.tgp_pwr_tuple + + @tgp_pwr_tuple.setter + def tgp_pwr_tuple(self, val): + self._data.tgp_pwr_tuple = val + + @property + def perf_metrics(self): + """pwr_model_metrics_dlppm1x_perf_dtype: Performance metrics.""" + return self._data.perf_metrics + + @perf_metrics.setter + def perf_metrics(self, val): + self._data.perf_metrics = val def __getitem__(self, key): cdef ssize_t key_ @@ -21446,10 +26972,10 @@ cdef class PRMCounter_v1: raise IndexError("index is out of bounds") if key_ < 0: key_ += size - return PRMCounter_v1.from_data(self._data[key_:key_+1]) + return PwrModelMetricsDlppm1x.from_data(self._data[key_:key_+1]) out = self._data[key] - if isinstance(out, _numpy.recarray) and out.dtype == prm_counter_v1_dtype: - return PRMCounter_v1.from_data(out) + if isinstance(out, _numpy.recarray) and out.dtype == pwr_model_metrics_dlppm1x_dtype: + return PwrModelMetricsDlppm1x.from_data(out) return out def __setitem__(self, key, val): @@ -21457,30 +26983,30 @@ cdef class PRMCounter_v1: @staticmethod def from_buffer(buffer): - """Create an PRMCounter_v1 instance with the memory from the given buffer.""" - return PRMCounter_v1.from_data(_numpy.frombuffer(buffer, dtype=prm_counter_v1_dtype)) + """Create an PwrModelMetricsDlppm1x instance with the memory from the given buffer.""" + return PwrModelMetricsDlppm1x.from_data(_numpy.frombuffer(buffer, dtype=pwr_model_metrics_dlppm1x_dtype)) @staticmethod def from_data(data): - """Create an PRMCounter_v1 instance wrapping the given NumPy array. + """Create an PwrModelMetricsDlppm1x instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a 1D array of dtype `prm_counter_v1_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `pwr_model_metrics_dlppm1x_dtype` holding the data. """ - cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) + cdef PwrModelMetricsDlppm1x obj = PwrModelMetricsDlppm1x.__new__(PwrModelMetricsDlppm1x) if not isinstance(data, _numpy.ndarray): raise TypeError("data argument must be a NumPy ndarray") if data.ndim != 1: raise ValueError("data array must be 1D") - if data.dtype != prm_counter_v1_dtype: - raise ValueError("data array must be of dtype prm_counter_v1_dtype") + if data.dtype != pwr_model_metrics_dlppm1x_dtype: + raise ValueError("data array must be of dtype pwr_model_metrics_dlppm1x_dtype") obj._data = data.view(_numpy.recarray) return obj @staticmethod def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): - """Create an PRMCounter_v1 instance wrapping the given pointer. + """Create an PwrModelMetricsDlppm1x instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -21491,827 +27017,698 @@ cdef class PRMCounter_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef PRMCounter_v1 obj = PRMCounter_v1.__new__(PRMCounter_v1) + cdef PwrModelMetricsDlppm1x obj = PwrModelMetricsDlppm1x.__new__(PwrModelMetricsDlppm1x) cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( - ptr, sizeof(nvmlPRMCounter_v1_t) * size, flag) - data = _numpy.ndarray(size, buffer=buf, dtype=prm_counter_v1_dtype) + ptr, sizeof(nvmlPwrModelMetricsDlppm1x_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=pwr_model_metrics_dlppm1x_dtype) obj._data = data.view(_numpy.recarray) obj._owner = owner return obj -cdef _get_vgpu_scheduler_log_dtype_offsets(): - cdef nvmlVgpuSchedulerLog_t pod +cdef _get_perf_metrics_pfpp1x_sample_dtype_offsets(): + cdef nvmlPerfMetricsPfpp1xSample_t pod return _numpy.dtype({ - 'names': ['engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params', 'entries_count', 'log_entries'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype, _numpy.uint32, (vgpu_scheduler_log_entry_dtype, 200)], + 'names': ['estimated_metrics'], + 'formats': [pwr_model_metrics_pfpp1x_dtype], 'offsets': [ - (&(pod.engineId)) - (&pod), - (&(pod.schedulerPolicy)) - (&pod), - (&(pod.arrMode)) - (&pod), - (&(pod.schedulerParams)) - (&pod), - (&(pod.entriesCount)) - (&pod), - (&(pod.logEntries)) - (&pod), + (&(pod.estimatedMetrics)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuSchedulerLog_t), + 'itemsize': sizeof(nvmlPerfMetricsPfpp1xSample_t), }) -vgpu_scheduler_log_dtype = _get_vgpu_scheduler_log_dtype_offsets() +perf_metrics_pfpp1x_sample_dtype = _get_perf_metrics_pfpp1x_sample_dtype_offsets() -cdef class VgpuSchedulerLog: - """Empty-initialize an instance of `nvmlVgpuSchedulerLog_t`. +cdef class PerfMetricsPfpp1xSample: + """Empty-initialize an array of `nvmlPerfMetricsPfpp1xSample_t`. + The resulting object is of length `size` and of dtype `perf_metrics_pfpp1x_sample_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuSchedulerLog_t` + .. seealso:: `nvmlPerfMetricsPfpp1xSample_t` """ cdef: - nvmlVgpuSchedulerLog_t *_ptr - object _owner - bint _owned - bint _readonly - - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLog_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLog") - self._owner = None - self._owned = True - self._readonly = False - - def __dealloc__(self): - cdef nvmlVgpuSchedulerLog_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) - - def __repr__(self): - return f"<{__name__}.VgpuSchedulerLog object at {hex(id(self))}>" - - @property - def ptr(self): - """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) - - cdef intptr_t _get_ptr(self): - return (self._ptr) - - def __int__(self): - return (self._ptr) - - def __eq__(self, other): - cdef VgpuSchedulerLog other_ - if not isinstance(other, VgpuSchedulerLog): - return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLog_t)) == 0) - - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLog_t), self._readonly) - - def __releasebuffer__(self, Py_buffer *buffer): - pass - - def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLog_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable - else: - setattr(self, key, val) + readonly object _data + object _owner - @property - def scheduler_params(self): - """VgpuSchedulerParams: """ - return VgpuSchedulerParams.from_ptr( - &(self._ptr[0].schedulerParams), - readonly=self._readonly, - owner=self, - ) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=perf_metrics_pfpp1x_sample_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPerfMetricsPfpp1xSample_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPerfMetricsPfpp1xSample_t) }" - @scheduler_params.setter - def scheduler_params(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLog instance is read-only") - cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.PerfMetricsPfpp1xSample_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.PerfMetricsPfpp1xSample object at {hex(id(self))}>" @property - def log_entries(self): - """VgpuSchedulerLogEntry: """ - return VgpuSchedulerLogEntry.from_ptr( - &(self._ptr[0].logEntries), - 200, - readonly=self._readonly, - owner=self, - ) + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data - @log_entries.setter - def log_entries(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLog instance is read-only") - cdef VgpuSchedulerLogEntry val_ = val - if len(val) != 200: - raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data - @property - def engine_id(self): - """int: """ - return self._ptr[0].engineId + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data - @engine_id.setter - def engine_id(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLog instance is read-only") - self._ptr[0].engineId = val + def __len__(self): + return self._data.size - @property - def scheduler_policy(self): - """int: """ - return self._ptr[0].schedulerPolicy + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, PerfMetricsPfpp1xSample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) - @scheduler_policy.setter - def scheduler_policy(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLog instance is read-only") - self._ptr[0].schedulerPolicy = val + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) @property - def arr_mode(self): - """int: """ - return self._ptr[0].arrMode + def estimated_metrics(self): + """pwr_model_metrics_pfpp1x_dtype: Estimated metrics from the PFPP 1x controller.""" + return self._data.estimated_metrics - @arr_mode.setter - def arr_mode(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLog instance is read-only") - self._ptr[0].arrMode = val + @estimated_metrics.setter + def estimated_metrics(self, val): + self._data.estimated_metrics = val - @property - def entries_count(self): - """int: """ - return self._ptr[0].entriesCount + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PerfMetricsPfpp1xSample.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == perf_metrics_pfpp1x_sample_dtype: + return PerfMetricsPfpp1xSample.from_data(out) + return out - @entries_count.setter - def entries_count(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLog instance is read-only") - self._ptr[0].entriesCount = val + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an VgpuSchedulerLog instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLog_t), VgpuSchedulerLog) + """Create an PerfMetricsPfpp1xSample instance with the memory from the given buffer.""" + return PerfMetricsPfpp1xSample.from_data(_numpy.frombuffer(buffer, dtype=perf_metrics_pfpp1x_sample_dtype)) @staticmethod def from_data(data): - """Create an VgpuSchedulerLog instance wrapping the given NumPy array. + """Create an PerfMetricsPfpp1xSample instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `perf_metrics_pfpp1x_sample_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_dtype", vgpu_scheduler_log_dtype, VgpuSchedulerLog) + cdef PerfMetricsPfpp1xSample obj = PerfMetricsPfpp1xSample.__new__(PerfMetricsPfpp1xSample) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != perf_metrics_pfpp1x_sample_dtype: + raise ValueError("data array must be of dtype perf_metrics_pfpp1x_sample_dtype") + obj._data = data.view(_numpy.recarray) + + return obj @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerLog instance wrapping the given pointer. + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PerfMetricsPfpp1xSample instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. + size (int): number of structs, default=1. readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerLog obj = VgpuSchedulerLog.__new__(VgpuSchedulerLog) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLog_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLog") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLog_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly + cdef PerfMetricsPfpp1xSample obj = PerfMetricsPfpp1xSample.__new__(PerfMetricsPfpp1xSample) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPerfMetricsPfpp1xSample_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=perf_metrics_pfpp1x_sample_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + return obj -cdef _get_vgpu_scheduler_get_state_dtype_offsets(): - cdef nvmlVgpuSchedulerGetState_t pod +cdef _get_pwr_model_metrics_dlppm1x_dramclk_estimates_dtype_offsets(): + cdef nvmlPwrModelMetricsDlppm1xDramclkEstimates_t pod return _numpy.dtype({ - 'names': ['scheduler_policy', 'arr_mode', 'scheduler_params'], - 'formats': [_numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype], + 'names': ['estimated_metrics', 'num_estimated_metrics'], + 'formats': [(pwr_model_metrics_dlppm1x_dtype, 8), _numpy.uint8], 'offsets': [ - (&(pod.schedulerPolicy)) - (&pod), - (&(pod.arrMode)) - (&pod), - (&(pod.schedulerParams)) - (&pod), + (&(pod.estimatedMetrics)) - (&pod), + (&(pod.numEstimatedMetrics)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuSchedulerGetState_t), + 'itemsize': sizeof(nvmlPwrModelMetricsDlppm1xDramclkEstimates_t), }) -vgpu_scheduler_get_state_dtype = _get_vgpu_scheduler_get_state_dtype_offsets() +pwr_model_metrics_dlppm1x_dramclk_estimates_dtype = _get_pwr_model_metrics_dlppm1x_dramclk_estimates_dtype_offsets() -cdef class VgpuSchedulerGetState: - """Empty-initialize an instance of `nvmlVgpuSchedulerGetState_t`. +cdef class PwrModelMetricsDlppm1xDramclkEstimates: + """Empty-initialize an array of `nvmlPwrModelMetricsDlppm1xDramclkEstimates_t`. + The resulting object is of length `size` and of dtype `pwr_model_metrics_dlppm1x_dramclk_estimates_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuSchedulerGetState_t` + .. seealso:: `nvmlPwrModelMetricsDlppm1xDramclkEstimates_t` """ cdef: - nvmlVgpuSchedulerGetState_t *_ptr + readonly object _data object _owner - bint _owned - bint _readonly - - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerGetState_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerGetState") - self._owner = None - self._owned = True - self._readonly = False + readonly tuple _estimated_metrics - def __dealloc__(self): - cdef nvmlVgpuSchedulerGetState_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=pwr_model_metrics_dlppm1x_dramclk_estimates_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPwrModelMetricsDlppm1xDramclkEstimates_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPwrModelMetricsDlppm1xDramclkEstimates_t) }" def __repr__(self): - return f"<{__name__}.VgpuSchedulerGetState object at {hex(id(self))}>" + if self._data.size > 1: + return f"<{__name__}.PwrModelMetricsDlppm1xDramclkEstimates_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.PwrModelMetricsDlppm1xDramclkEstimates object at {hex(id(self))}>" @property def ptr(self): """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + return self._data.ctypes.data cdef intptr_t _get_ptr(self): - return (self._ptr) + return self._data.ctypes.data def __int__(self): - return (self._ptr) + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size def __eq__(self, other): - cdef VgpuSchedulerGetState other_ - if not isinstance(other, VgpuSchedulerGetState): + cdef object self_data = self._data + if (not isinstance(other, PwrModelMetricsDlppm1xDramclkEstimates)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerGetState_t)) == 0) + return bool((self_data == other._data).all()) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerGetState_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - pass - - def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerGetState_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable - else: - setattr(self, key, val) - - @property - def scheduler_params(self): - """VgpuSchedulerParams: """ - return VgpuSchedulerParams.from_ptr( - &(self._ptr[0].schedulerParams), - readonly=self._readonly, - owner=self, - ) - - @scheduler_params.setter - def scheduler_params(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerGetState instance is read-only") - cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + _cyb_cpython.PyBuffer_Release(buffer) @property - def scheduler_policy(self): - """int: """ - return self._ptr[0].schedulerPolicy - - @scheduler_policy.setter - def scheduler_policy(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerGetState instance is read-only") - self._ptr[0].schedulerPolicy = val + def estimated_metrics(self): + """PwrModelMetricsDlppm1x: Array of estimated metrics for each inference loop.""" + if self._data.size == 1: + return self._estimated_metrics[0] + return self._estimated_metrics - @property - def arr_mode(self): - """int: """ - return self._ptr[0].arrMode + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PwrModelMetricsDlppm1xDramclkEstimates.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == pwr_model_metrics_dlppm1x_dramclk_estimates_dtype: + return PwrModelMetricsDlppm1xDramclkEstimates.from_data(out) + return out - @arr_mode.setter - def arr_mode(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerGetState instance is read-only") - self._ptr[0].arrMode = val + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an VgpuSchedulerGetState instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerGetState_t), VgpuSchedulerGetState) + """Create an PwrModelMetricsDlppm1xDramclkEstimates instance with the memory from the given buffer.""" + return PwrModelMetricsDlppm1xDramclkEstimates.from_data(_numpy.frombuffer(buffer, dtype=pwr_model_metrics_dlppm1x_dramclk_estimates_dtype)) @staticmethod def from_data(data): - """Create an VgpuSchedulerGetState instance wrapping the given NumPy array. + """Create an PwrModelMetricsDlppm1xDramclkEstimates instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_get_state_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `pwr_model_metrics_dlppm1x_dramclk_estimates_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_get_state_dtype", vgpu_scheduler_get_state_dtype, VgpuSchedulerGetState) + cdef PwrModelMetricsDlppm1xDramclkEstimates obj = PwrModelMetricsDlppm1xDramclkEstimates.__new__(PwrModelMetricsDlppm1xDramclkEstimates) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != pwr_model_metrics_dlppm1x_dramclk_estimates_dtype: + raise ValueError("data array must be of dtype pwr_model_metrics_dlppm1x_dramclk_estimates_dtype") + obj._data = data.view(_numpy.recarray) + + estimatedMetrics_list = list() + for i in range(obj._data.size): + addr = obj._data.estimatedMetrics[i].__array_interface__['data'][0] + n = int(obj._data.num_estimated_metrics[i]) + estimatedMetrics_obj = PwrModelMetricsDlppm1x.from_ptr(addr, n, owner=obj, readonly=False) + estimatedMetrics_list.append(estimatedMetrics_obj) + obj._estimatedMetrics = tuple(estimatedMetrics_list) + return obj @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerGetState instance wrapping the given pointer. + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PwrModelMetricsDlppm1xDramclkEstimates instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. + size (int): number of structs, default=1. readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerGetState obj = VgpuSchedulerGetState.__new__(VgpuSchedulerGetState) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerGetState_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerGetState") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerGetState_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly + cdef PwrModelMetricsDlppm1xDramclkEstimates obj = PwrModelMetricsDlppm1xDramclkEstimates.__new__(PwrModelMetricsDlppm1xDramclkEstimates) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPwrModelMetricsDlppm1xDramclkEstimates_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=pwr_model_metrics_dlppm1x_dramclk_estimates_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + estimatedMetrics_list = list() + for i in range(obj._data.size): + addr = obj._data.estimatedMetrics[i].__array_interface__['data'][0] + n = int(obj._data.num_estimated_metrics[i]) + estimatedMetrics_obj = PwrModelMetricsDlppm1x.from_ptr(addr, n, owner=obj, readonly=readonly) + estimatedMetrics_list.append(estimatedMetrics_obj) + obj._estimatedMetrics = tuple(estimatedMetrics_list) return obj -cdef _get_vgpu_scheduler_state_info_v1_dtype_offsets(): - cdef nvmlVgpuSchedulerStateInfo_v1_t pod +cdef _get_observed_metrics_dtype_offsets(): + cdef nvmlObservedMetrics_t pod return _numpy.dtype({ - 'names': ['version', 'engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype], + 'names': ['initial_dramclk_est', 'b_valid', 'core_rail', 'fb_rail', 'tgp_pwr_tuple', 'perf_metrics'], + 'formats': [(pwr_model_metrics_dlppm1x_dramclk_estimates_dtype, 3), _numpy.uint8, core_rail_metrics_dtype, rail_metrics_dtype, pmgr_pwr_tuple_dtype, pwr_model_metrics_dlppm1x_perf_dtype], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.engineId)) - (&pod), - (&(pod.schedulerPolicy)) - (&pod), - (&(pod.arrMode)) - (&pod), - (&(pod.schedulerParams)) - (&pod), + (&(pod.initialDramclkEst)) - (&pod), + (&(pod.bValid)) - (&pod), + (&(pod.coreRail)) - (&pod), + (&(pod.fbRail)) - (&pod), + (&(pod.tgpPwrTuple)) - (&pod), + (&(pod.perfMetrics)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuSchedulerStateInfo_v1_t), + 'itemsize': sizeof(nvmlObservedMetrics_t), }) -vgpu_scheduler_state_info_v1_dtype = _get_vgpu_scheduler_state_info_v1_dtype_offsets() +observed_metrics_dtype = _get_observed_metrics_dtype_offsets() -cdef class VgpuSchedulerStateInfo_v1: - """Empty-initialize an instance of `nvmlVgpuSchedulerStateInfo_v1_t`. +cdef class ObservedMetrics: + """Empty-initialize an array of `nvmlObservedMetrics_t`. + The resulting object is of length `size` and of dtype `observed_metrics_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlVgpuSchedulerStateInfo_v1_t` + .. seealso:: `nvmlObservedMetrics_t` """ cdef: - nvmlVgpuSchedulerStateInfo_v1_t *_ptr + readonly object _data object _owner - bint _owned - bint _readonly - - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - self._owner = None - self._owned = True - self._readonly = False - def __dealloc__(self): - cdef nvmlVgpuSchedulerStateInfo_v1_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=observed_metrics_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlObservedMetrics_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlObservedMetrics_t) }" def __repr__(self): - return f"<{__name__}.VgpuSchedulerStateInfo_v1 object at {hex(id(self))}>" + if self._data.size > 1: + return f"<{__name__}.ObservedMetrics_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.ObservedMetrics object at {hex(id(self))}>" @property def ptr(self): """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + return self._data.ctypes.data cdef intptr_t _get_ptr(self): - return (self._ptr) + return self._data.ctypes.data def __int__(self): - return (self._ptr) + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size def __eq__(self, other): - cdef VgpuSchedulerStateInfo_v1 other_ - if not isinstance(other, VgpuSchedulerStateInfo_v1): + cdef object self_data = self._data + if (not isinstance(other, ObservedMetrics)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) == 0) + return bool((self_data == other._data).all()) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - pass + _cyb_cpython.PyBuffer_Release(buffer) - def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable - else: - setattr(self, key, val) + @property + def initial_dramclk_est(self): + """pwr_model_metrics_dlppm1x_dramclk_estimates_dtype: (array of length 3).Initial DRAMCLK estimates for different scenarios.""" + return self._data.initial_dramclk_est + + @initial_dramclk_est.setter + def initial_dramclk_est(self, val): + self._data.initial_dramclk_est = val @property - def scheduler_params(self): - """VgpuSchedulerParams: OUT: vGPU Scheduler Parameters.""" - return VgpuSchedulerParams.from_ptr( - &(self._ptr[0].schedulerParams), - readonly=self._readonly, - owner=self, - ) + def b_valid(self): + """Union[~_numpy.uint8, int]: Validity flag: non-zero if observed metrics are valid.""" + if self._data.size == 1: + return int(self._data.b_valid[0]) + return self._data.b_valid - @scheduler_params.setter - def scheduler_params(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") - cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) + @b_valid.setter + def b_valid(self, val): + self._data.b_valid = val @property - def version(self): - """int: IN: The version number of this struct.""" - return self._ptr[0].version + def core_rail(self): + """core_rail_metrics_dtype: Observed core rail metrics.""" + return self._data.core_rail - @version.setter - def version(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") - self._ptr[0].version = val + @core_rail.setter + def core_rail(self, val): + self._data.core_rail = val @property - def engine_id(self): - """int: IN: Engine whose software scheduler state info is fetched. One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" - return self._ptr[0].engineId + def fb_rail(self): + """rail_metrics_dtype: Observed fb rail metrics.""" + return self._data.fb_rail - @engine_id.setter - def engine_id(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") - self._ptr[0].engineId = val + @fb_rail.setter + def fb_rail(self, val): + self._data.fb_rail = val @property - def scheduler_policy(self): - """int: OUT: Scheduler policy.""" - return self._ptr[0].schedulerPolicy + def tgp_pwr_tuple(self): + """pmgr_pwr_tuple_dtype: Observed Total Graphics Power (TGP) in milliwatts.""" + return self._data.tgp_pwr_tuple - @scheduler_policy.setter - def scheduler_policy(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") - self._ptr[0].schedulerPolicy = val + @tgp_pwr_tuple.setter + def tgp_pwr_tuple(self, val): + self._data.tgp_pwr_tuple = val @property - def arr_mode(self): - """int: OUT: Adaptive Round Robin scheduler mode. One of the NVML_VGPU_SCHEDULER_ARR_*.""" - return self._ptr[0].arrMode + def perf_metrics(self): + """pwr_model_metrics_dlppm1x_perf_dtype: Observed performance metrics.""" + return self._data.perf_metrics - @arr_mode.setter - def arr_mode(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerStateInfo_v1 instance is read-only") - self._ptr[0].arrMode = val + @perf_metrics.setter + def perf_metrics(self, val): + self._data.perf_metrics = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return ObservedMetrics.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == observed_metrics_dtype: + return ObservedMetrics.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an VgpuSchedulerStateInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerStateInfo_v1_t), VgpuSchedulerStateInfo_v1) + """Create an ObservedMetrics instance with the memory from the given buffer.""" + return ObservedMetrics.from_data(_numpy.frombuffer(buffer, dtype=observed_metrics_dtype)) @staticmethod def from_data(data): - """Create an VgpuSchedulerStateInfo_v1 instance wrapping the given NumPy array. + """Create an ObservedMetrics instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_info_v1_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `observed_metrics_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_info_v1_dtype", vgpu_scheduler_state_info_v1_dtype, VgpuSchedulerStateInfo_v1) + cdef ObservedMetrics obj = ObservedMetrics.__new__(ObservedMetrics) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != observed_metrics_dtype: + raise ValueError("data array must be of dtype observed_metrics_dtype") + obj._data = data.view(_numpy.recarray) + + return obj @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerStateInfo_v1 instance wrapping the given pointer. + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an ObservedMetrics instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. + size (int): number of structs, default=1. readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerStateInfo_v1 obj = VgpuSchedulerStateInfo_v1.__new__(VgpuSchedulerStateInfo_v1) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerStateInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerStateInfo_v1_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly + cdef ObservedMetrics obj = ObservedMetrics.__new__(ObservedMetrics) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlObservedMetrics_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=observed_metrics_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + return obj -cdef _get_vgpu_scheduler_log_info_v1_dtype_offsets(): - cdef nvmlVgpuSchedulerLogInfo_v1_t pod +cdef _get_perf_metrics_dlppc2x_sample_dtype_offsets(): + cdef nvmlPerfMetricsDlppc2xSample_t pod return _numpy.dtype({ - 'names': ['version', 'engine_id', 'scheduler_policy', 'arr_mode', 'scheduler_params', 'entries_count', 'log_entries'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_params_dtype, _numpy.uint32, (vgpu_scheduler_log_entry_dtype, 200)], + 'names': ['observed_metrics'], + 'formats': [observed_metrics_dtype], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.engineId)) - (&pod), - (&(pod.schedulerPolicy)) - (&pod), - (&(pod.arrMode)) - (&pod), - (&(pod.schedulerParams)) - (&pod), - (&(pod.entriesCount)) - (&pod), - (&(pod.logEntries)) - (&pod), + (&(pod.observedMetrics)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuSchedulerLogInfo_v1_t), + 'itemsize': sizeof(nvmlPerfMetricsDlppc2xSample_t), }) -vgpu_scheduler_log_info_v1_dtype = _get_vgpu_scheduler_log_info_v1_dtype_offsets() - -cdef class VgpuSchedulerLogInfo_v1: - """Empty-initialize an instance of `nvmlVgpuSchedulerLogInfo_v1_t`. - +perf_metrics_dlppc2x_sample_dtype = _get_perf_metrics_dlppc2x_sample_dtype_offsets() - .. seealso:: `nvmlVgpuSchedulerLogInfo_v1_t` - """ - cdef: - nvmlVgpuSchedulerLogInfo_v1_t *_ptr - object _owner - bint _owned - bint _readonly +cdef class PerfMetricsDlppc2xSample: + """Empty-initialize an array of `nvmlPerfMetricsDlppc2xSample_t`. + The resulting object is of length `size` and of dtype `perf_metrics_dlppc2x_sample_dtype`. + If default-constructed, the instance represents a single struct. - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - self._owner = None - self._owned = True - self._readonly = False + Args: + size (int): number of structs, default=1. - def __dealloc__(self): - cdef nvmlVgpuSchedulerLogInfo_v1_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) + .. seealso:: `nvmlPerfMetricsDlppc2xSample_t` + """ + cdef: + readonly object _data + object _owner + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=perf_metrics_dlppc2x_sample_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPerfMetricsDlppc2xSample_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPerfMetricsDlppc2xSample_t) }" def __repr__(self): - return f"<{__name__}.VgpuSchedulerLogInfo_v1 object at {hex(id(self))}>" + if self._data.size > 1: + return f"<{__name__}.PerfMetricsDlppc2xSample_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.PerfMetricsDlppc2xSample object at {hex(id(self))}>" @property def ptr(self): """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + return self._data.ctypes.data cdef intptr_t _get_ptr(self): - return (self._ptr) + return self._data.ctypes.data def __int__(self): - return (self._ptr) + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size def __eq__(self, other): - cdef VgpuSchedulerLogInfo_v1 other_ - if not isinstance(other, VgpuSchedulerLogInfo_v1): + cdef object self_data = self._data + if (not isinstance(other, PerfMetricsDlppc2xSample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) == 0) + return bool((self_data == other._data).all()) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - pass - - def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable - else: - setattr(self, key, val) - - @property - def scheduler_params(self): - """VgpuSchedulerParams: OUT: vGPU Scheduler Parameters.""" - return VgpuSchedulerParams.from_ptr( - &(self._ptr[0].schedulerParams), - readonly=self._readonly, - owner=self, - ) - - @scheduler_params.setter - def scheduler_params(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") - cdef VgpuSchedulerParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerParams_t) * 1) - - @property - def log_entries(self): - """VgpuSchedulerLogEntry: OUT: Structure to store the state and logs of a software runlist.""" - return VgpuSchedulerLogEntry.from_ptr( - &(self._ptr[0].logEntries), - 200, - readonly=self._readonly, - owner=self, - ) - - @log_entries.setter - def log_entries(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") - cdef VgpuSchedulerLogEntry val_ = val - if len(val) != 200: - raise ValueError(f"Expected length { 200 } for field log_entries, got {len(val)}") - _cyb_memcpy(&(self._ptr[0].logEntries), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerLogEntry_t) * 200) - - @property - def version(self): - """int: IN: The version number of this struct.""" - return self._ptr[0].version - - @version.setter - def version(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") - self._ptr[0].version = val - - @property - def engine_id(self): - """int: IN: Engine whose software runlist log entries are fetched. One of One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" - return self._ptr[0].engineId - - @engine_id.setter - def engine_id(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") - self._ptr[0].engineId = val - - @property - def scheduler_policy(self): - """int: OUT: Scheduler policy.""" - return self._ptr[0].schedulerPolicy - - @scheduler_policy.setter - def scheduler_policy(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") - self._ptr[0].schedulerPolicy = val + _cyb_cpython.PyBuffer_Release(buffer) @property - def arr_mode(self): - """int: OUT: Adaptive Round Robin scheduler mode. One of the NVML_VGPU_SCHEDULER_ARR_*.""" - return self._ptr[0].arrMode + def observed_metrics(self): + """observed_metrics_dtype: Observed metrics from the DLPPC 2x controller.""" + return self._data.observed_metrics - @arr_mode.setter - def arr_mode(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") - self._ptr[0].arrMode = val + @observed_metrics.setter + def observed_metrics(self, val): + self._data.observed_metrics = val - @property - def entries_count(self): - """int: OUT: Count of log entries fetched.""" - return self._ptr[0].entriesCount + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PerfMetricsDlppc2xSample.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == perf_metrics_dlppc2x_sample_dtype: + return PerfMetricsDlppc2xSample.from_data(out) + return out - @entries_count.setter - def entries_count(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerLogInfo_v1 instance is read-only") - self._ptr[0].entriesCount = val + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an VgpuSchedulerLogInfo_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerLogInfo_v1_t), VgpuSchedulerLogInfo_v1) + """Create an PerfMetricsDlppc2xSample instance with the memory from the given buffer.""" + return PerfMetricsDlppc2xSample.from_data(_numpy.frombuffer(buffer, dtype=perf_metrics_dlppc2x_sample_dtype)) @staticmethod def from_data(data): - """Create an VgpuSchedulerLogInfo_v1 instance wrapping the given NumPy array. + """Create an PerfMetricsDlppc2xSample instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_log_info_v1_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `perf_metrics_dlppc2x_sample_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_log_info_v1_dtype", vgpu_scheduler_log_info_v1_dtype, VgpuSchedulerLogInfo_v1) + cdef PerfMetricsDlppc2xSample obj = PerfMetricsDlppc2xSample.__new__(PerfMetricsDlppc2xSample) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != perf_metrics_dlppc2x_sample_dtype: + raise ValueError("data array must be of dtype perf_metrics_dlppc2x_sample_dtype") + obj._data = data.view(_numpy.recarray) + + return obj @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerLogInfo_v1 instance wrapping the given pointer. + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PerfMetricsDlppc2xSample instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. + size (int): number of structs, default=1. readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerLogInfo_v1 obj = VgpuSchedulerLogInfo_v1.__new__(VgpuSchedulerLogInfo_v1) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerLogInfo_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerLogInfo_v1_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly + cdef PerfMetricsDlppc2xSample obj = PerfMetricsDlppc2xSample.__new__(PerfMetricsDlppc2xSample) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPerfMetricsDlppc2xSample_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=perf_metrics_dlppc2x_sample_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + return obj -cdef _get_vgpu_scheduler_state_v1_dtype_offsets(): - cdef nvmlVgpuSchedulerState_v1_t pod +cdef _get__py_anon_pod8_dtype_offsets(): + cdef cuda_bindings_nvml__anon_pod8 pod return _numpy.dtype({ - 'names': ['version', 'engine_id', 'scheduler_policy', 'enable_arr_mode', 'scheduler_params'], - 'formats': [_numpy.uint32, _numpy.uint32, _numpy.uint32, _numpy.uint32, vgpu_scheduler_set_params_dtype], + 'names': ['dlppc2x', 'pfpp1x'], + 'formats': [perf_metrics_dlppc2x_sample_dtype, perf_metrics_pfpp1x_sample_dtype], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.engineId)) - (&pod), - (&(pod.schedulerPolicy)) - (&pod), - (&(pod.enableARRMode)) - (&pod), - (&(pod.schedulerParams)) - (&pod), + (&(pod.dlppc2x)) - (&pod), + (&(pod.pfpp1x)) - (&pod), ], - 'itemsize': sizeof(nvmlVgpuSchedulerState_v1_t), + 'itemsize': sizeof(cuda_bindings_nvml__anon_pod8), }) -vgpu_scheduler_state_v1_dtype = _get_vgpu_scheduler_state_v1_dtype_offsets() +_py_anon_pod8_dtype = _get__py_anon_pod8_dtype_offsets() -cdef class VgpuSchedulerState_v1: - """Empty-initialize an instance of `nvmlVgpuSchedulerState_v1_t`. +cdef class _py_anon_pod8: + """Empty-initialize an instance of `cuda_bindings_nvml__anon_pod8`. - .. seealso:: `nvmlVgpuSchedulerState_v1_t` + .. seealso:: `cuda_bindings_nvml__anon_pod8` """ cdef: - nvmlVgpuSchedulerState_v1_t *_ptr + cuda_bindings_nvml__anon_pod8 *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_calloc(1, sizeof(cuda_bindings_nvml__anon_pod8)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerState_v1") + raise MemoryError("Error allocating _py_anon_pod8") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlVgpuSchedulerState_v1_t *ptr + cdef cuda_bindings_nvml__anon_pod8 *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.VgpuSchedulerState_v1 object at {hex(id(self))}>" + return f"<{__name__}._py_anon_pod8 object at {hex(id(self))}>" @property def ptr(self): @@ -22325,24 +27722,24 @@ cdef class VgpuSchedulerState_v1: return (self._ptr) def __eq__(self, other): - cdef VgpuSchedulerState_v1 other_ - if not isinstance(other, VgpuSchedulerState_v1): + cdef _py_anon_pod8 other_ + if not isinstance(other, _py_anon_pod8): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlVgpuSchedulerState_v1_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(cuda_bindings_nvml__anon_pod8)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlVgpuSchedulerState_v1_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(cuda_bindings_nvml__anon_pod8), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + self._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod8)) if self._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlVgpuSchedulerState_v1_t)) + raise MemoryError("Error allocating _py_anon_pod8") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(cuda_bindings_nvml__anon_pod8)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -22350,82 +27747,56 @@ cdef class VgpuSchedulerState_v1: setattr(self, key, val) @property - def scheduler_params(self): - """VgpuSchedulerSetParams: IN: vGPU Scheduler Parameters.""" - return VgpuSchedulerSetParams.from_ptr( - &(self._ptr[0].schedulerParams), + def dlppc2x(self): + """PerfMetricsDlppc2xSample: """ + return PerfMetricsDlppc2xSample.from_ptr( + &(self._ptr[0].dlppc2x), + 1, readonly=self._readonly, - owner=self, - ) - - @scheduler_params.setter - def scheduler_params(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerState_v1 instance is read-only") - cdef VgpuSchedulerSetParams val_ = val - _cyb_memcpy(&(self._ptr[0].schedulerParams), (val_._get_ptr()), sizeof(nvmlVgpuSchedulerSetParams_t) * 1) - - @property - def version(self): - """int: IN: The version number of this struct.""" - return self._ptr[0].version - - @version.setter - def version(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerState_v1 instance is read-only") - self._ptr[0].version = val - - @property - def engine_id(self): - """int: IN: One of NVML_VGPU_SCHEDULER_ENGINE_TYPE_*.""" - return self._ptr[0].engineId - - @engine_id.setter - def engine_id(self, val): - if self._readonly: - raise ValueError("This VgpuSchedulerState_v1 instance is read-only") - self._ptr[0].engineId = val - - @property - def scheduler_policy(self): - """int: IN: Scheduler policy.""" - return self._ptr[0].schedulerPolicy + owner=self, + ) - @scheduler_policy.setter - def scheduler_policy(self, val): + @dlppc2x.setter + def dlppc2x(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerState_v1 instance is read-only") - self._ptr[0].schedulerPolicy = val + raise ValueError("This _py_anon_pod8 instance is read-only") + cdef PerfMetricsDlppc2xSample val_ = val + _cyb_memcpy(&(self._ptr[0].dlppc2x), (val_._get_ptr()), sizeof(nvmlPerfMetricsDlppc2xSample_t) * 1) @property - def enable_arr_mode(self): - """int: IN: Adaptive Round Robin scheduler.""" - return self._ptr[0].enableARRMode + def pfpp1x(self): + """PerfMetricsPfpp1xSample: """ + return PerfMetricsPfpp1xSample.from_ptr( + &(self._ptr[0].pfpp1x), + 1, + readonly=self._readonly, + owner=self, + ) - @enable_arr_mode.setter - def enable_arr_mode(self, val): + @pfpp1x.setter + def pfpp1x(self, val): if self._readonly: - raise ValueError("This VgpuSchedulerState_v1 instance is read-only") - self._ptr[0].enableARRMode = val + raise ValueError("This _py_anon_pod8 instance is read-only") + cdef PerfMetricsPfpp1xSample val_ = val + _cyb_memcpy(&(self._ptr[0].pfpp1x), (val_._get_ptr()), sizeof(nvmlPerfMetricsPfpp1xSample_t) * 1) @staticmethod def from_buffer(buffer): - """Create an VgpuSchedulerState_v1 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlVgpuSchedulerState_v1_t), VgpuSchedulerState_v1) + """Create an _py_anon_pod8 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(cuda_bindings_nvml__anon_pod8), _py_anon_pod8) @staticmethod def from_data(data): - """Create an VgpuSchedulerState_v1 instance wrapping the given NumPy array. + """Create an _py_anon_pod8 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `vgpu_scheduler_state_v1_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `_py_anon_pod8_dtype` holding the data. """ - return _cyb_from_data(data, "vgpu_scheduler_state_v1_dtype", vgpu_scheduler_state_v1_dtype, VgpuSchedulerState_v1) + return _cyb_from_data(data, "_py_anon_pod8_dtype", _py_anon_pod8_dtype, _py_anon_pod8) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an VgpuSchedulerState_v1 instance wrapping the given pointer. + """Create an _py_anon_pod8 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -22434,221 +27805,377 @@ cdef class VgpuSchedulerState_v1: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef VgpuSchedulerState_v1 obj = VgpuSchedulerState_v1.__new__(VgpuSchedulerState_v1) + cdef _py_anon_pod8 obj = _py_anon_pod8.__new__(_py_anon_pod8) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlVgpuSchedulerState_v1_t)) + obj._ptr = _cyb_malloc(sizeof(cuda_bindings_nvml__anon_pod8)) if obj._ptr == NULL: - raise MemoryError("Error allocating VgpuSchedulerState_v1") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlVgpuSchedulerState_v1_t)) + raise MemoryError("Error allocating _py_anon_pod8") + _cyb_memcpy((obj._ptr), ptr, sizeof(cuda_bindings_nvml__anon_pod8)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly return obj -cdef _get_grid_licensable_features_dtype_offsets(): - cdef nvmlGridLicensableFeatures_t pod +cdef _get_perf_metric_controller_sample_dtype_offsets(): + cdef nvmlPerfMetricControllerSample_t pod return _numpy.dtype({ - 'names': ['is_grid_license_supported', 'licensable_features_count', 'grid_licensable_features'], - 'formats': [_numpy.int32, _numpy.uint32, (grid_licensable_feature_dtype, 3)], + 'names': ['controller_type', 'data_'], + 'formats': [_numpy.uint32, _py_anon_pod8_dtype], 'offsets': [ - (&(pod.isGridLicenseSupported)) - (&pod), - (&(pod.licensableFeaturesCount)) - (&pod), - (&(pod.gridLicensableFeatures)) - (&pod), + (&(pod.controllerType)) - (&pod), + (&(pod.data)) - (&pod), ], - 'itemsize': sizeof(nvmlGridLicensableFeatures_t), + 'itemsize': sizeof(nvmlPerfMetricControllerSample_t), }) -grid_licensable_features_dtype = _get_grid_licensable_features_dtype_offsets() +perf_metric_controller_sample_dtype = _get_perf_metric_controller_sample_dtype_offsets() -cdef class GridLicensableFeatures: - """Empty-initialize an instance of `nvmlGridLicensableFeatures_t`. +cdef class PerfMetricControllerSample: + """Empty-initialize an array of `nvmlPerfMetricControllerSample_t`. + The resulting object is of length `size` and of dtype `perf_metric_controller_sample_dtype`. + If default-constructed, the instance represents a single struct. + Args: + size (int): number of structs, default=1. - .. seealso:: `nvmlGridLicensableFeatures_t` + .. seealso:: `nvmlPerfMetricControllerSample_t` """ cdef: - nvmlGridLicensableFeatures_t *_ptr + readonly object _data object _owner - bint _owned - bint _readonly - - def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlGridLicensableFeatures_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating GridLicensableFeatures") - self._owner = None - self._owned = True - self._readonly = False - def __dealloc__(self): - cdef nvmlGridLicensableFeatures_t *ptr - if self._owned and self._ptr != NULL: - ptr = self._ptr - self._ptr = NULL - _cyb_free(ptr) + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=perf_metric_controller_sample_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPerfMetricControllerSample_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPerfMetricControllerSample_t) }" def __repr__(self): - return f"<{__name__}.GridLicensableFeatures object at {hex(id(self))}>" + if self._data.size > 1: + return f"<{__name__}.PerfMetricControllerSample_Array_{self._data.size} object at {hex(id(self))}>" + else: + return f"<{__name__}.PerfMetricControllerSample object at {hex(id(self))}>" @property def ptr(self): """Get the pointer address to the data as Python :class:`int`.""" - return (self._ptr) + return self._data.ctypes.data cdef intptr_t _get_ptr(self): - return (self._ptr) + return self._data.ctypes.data def __int__(self): - return (self._ptr) + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size def __eq__(self, other): - cdef GridLicensableFeatures other_ - if not isinstance(other, GridLicensableFeatures): + cdef object self_data = self._data + if (not isinstance(other, PerfMetricControllerSample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: return False - other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlGridLicensableFeatures_t)) == 0) + return bool((self_data == other._data).all()) - def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlGridLicensableFeatures_t), self._readonly) + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) def __releasebuffer__(self, Py_buffer *buffer): - pass + _cyb_cpython.PyBuffer_Release(buffer) + + @property + def controller_type(self): + """Union[~_numpy.uint32, int]: Controller type: NVML_PERF_METRICS_CONTROLLER_TYPE_DLPPC_2X or NVML_PERF_METRICS_CONTROLLER_TYPE_PFPP_1X.""" + if self._data.size == 1: + return int(self._data.controller_type[0]) + return self._data.controller_type + + @controller_type.setter + def controller_type(self, val): + self._data.controller_type = val + + @property + def data_(self): + """_py_anon_pod8_dtype: Union containing controller-specific data.""" + return self._data.data_ + + @data_.setter + def data_(self, val): + self._data.data_ = val + + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PerfMetricControllerSample.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == perf_metric_controller_sample_dtype: + return PerfMetricControllerSample.from_data(out) + return out def __setitem__(self, key, val): - if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) - if self._ptr == NULL: - raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlGridLicensableFeatures_t)) - self._owner = None - self._owned = True - self._readonly = not val.flags.writeable + self._data[key] = val + + @staticmethod + def from_buffer(buffer): + """Create an PerfMetricControllerSample instance with the memory from the given buffer.""" + return PerfMetricControllerSample.from_data(_numpy.frombuffer(buffer, dtype=perf_metric_controller_sample_dtype)) + + @staticmethod + def from_data(data): + """Create an PerfMetricControllerSample instance wrapping the given NumPy array. + + Args: + data (_numpy.ndarray): a 1D array of dtype `perf_metric_controller_sample_dtype` holding the data. + """ + cdef PerfMetricControllerSample obj = PerfMetricControllerSample.__new__(PerfMetricControllerSample) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != perf_metric_controller_sample_dtype: + raise ValueError("data array must be of dtype perf_metric_controller_sample_dtype") + obj._data = data.view(_numpy.recarray) + + return obj + + @staticmethod + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PerfMetricControllerSample instance wrapping the given pointer. + + Args: + ptr (intptr_t): pointer address as Python :class:`int` to the data. + size (int): number of structs, default=1. + readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. + """ + if ptr == 0: + raise ValueError("ptr must not be null (0)") + cdef PerfMetricControllerSample obj = PerfMetricControllerSample.__new__(PerfMetricControllerSample) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPerfMetricControllerSample_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=perf_metric_controller_sample_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + return obj + + +cdef _get_perf_metrics_sample_dtype_offsets(): + cdef nvmlPerfMetricsSample_t pod + return _numpy.dtype({ + 'names': ['num_controller_data', 'controller_data'], + 'formats': [_numpy.uint8, (perf_metric_controller_sample_dtype, 4)], + 'offsets': [ + (&(pod.numControllerData)) - (&pod), + (&(pod.controllerData)) - (&pod), + ], + 'itemsize': sizeof(nvmlPerfMetricsSample_t), + }) + +perf_metrics_sample_dtype = _get_perf_metrics_sample_dtype_offsets() + +cdef class PerfMetricsSample: + """Empty-initialize an array of `nvmlPerfMetricsSample_t`. + The resulting object is of length `size` and of dtype `perf_metrics_sample_dtype`. + If default-constructed, the instance represents a single struct. + + Args: + size (int): number of structs, default=1. + + .. seealso:: `nvmlPerfMetricsSample_t` + """ + cdef: + readonly object _data + object _owner + readonly tuple _controller_data + + def __init__(self, size=1): + arr = _numpy.empty(size, dtype=perf_metrics_sample_dtype) + self._data = arr.view(_numpy.recarray) + assert self._data.itemsize == sizeof(nvmlPerfMetricsSample_t), \ + f"itemsize {self._data.itemsize} mismatches struct size { sizeof(nvmlPerfMetricsSample_t) }" + + def __repr__(self): + if self._data.size > 1: + return f"<{__name__}.PerfMetricsSample_Array_{self._data.size} object at {hex(id(self))}>" else: - setattr(self, key, val) + return f"<{__name__}.PerfMetricsSample object at {hex(id(self))}>" @property - def grid_licensable_features(self): - """GridLicensableFeature: """ - return GridLicensableFeature.from_ptr( - &(self._ptr[0].gridLicensableFeatures), - self._ptr[0].licensableFeaturesCount, - readonly=self._readonly, - owner=self, - ) + def ptr(self): + """Get the pointer address to the data as Python :class:`int`.""" + return self._data.ctypes.data - @grid_licensable_features.setter - def grid_licensable_features(self, val): - if self._readonly: - raise ValueError("This GridLicensableFeatures instance is read-only") - cdef GridLicensableFeature val_ = val - if len(val) > 3: - raise ValueError(f"Expected length < 3 for field grid_licensable_features, got {len(val)}") - self._ptr[0].licensableFeaturesCount = len(val) - if len(val) == 0: - return - _cyb_memcpy(&(self._ptr[0].gridLicensableFeatures), (val_._get_ptr()), sizeof(nvmlGridLicensableFeature_t) * self._ptr[0].licensableFeaturesCount) + cdef intptr_t _get_ptr(self): + return self._data.ctypes.data + + def __int__(self): + if self._data.size > 1: + raise TypeError("int() argument must be a bytes-like object of size 1. " + "To get the pointer address of an array, use .ptr") + return self._data.ctypes.data + + def __len__(self): + return self._data.size + + def __eq__(self, other): + cdef object self_data = self._data + if (not isinstance(other, PerfMetricsSample)) or self_data.size != other._data.size or self_data.dtype != other._data.dtype: + return False + return bool((self_data == other._data).all()) + + def __getbuffer__(self, Py_buffer *buffer, int flags): + _cyb_cpython.PyObject_GetBuffer(self._data, buffer, flags) + + def __releasebuffer__(self, Py_buffer *buffer): + _cyb_cpython.PyBuffer_Release(buffer) @property - def is_grid_license_supported(self): - """int: """ - return self._ptr[0].isGridLicenseSupported + def controller_data(self): + """PerfMetricControllerSample: Array of controller samples.""" + if self._data.size == 1: + return self._controller_data[0] + return self._controller_data - @is_grid_license_supported.setter - def is_grid_license_supported(self, val): - if self._readonly: - raise ValueError("This GridLicensableFeatures instance is read-only") - self._ptr[0].isGridLicenseSupported = val + def __getitem__(self, key): + cdef ssize_t key_ + cdef ssize_t size + if isinstance(key, int): + key_ = key + size = self._data.size + if key_ >= size or key_ <= -(size+1): + raise IndexError("index is out of bounds") + if key_ < 0: + key_ += size + return PerfMetricsSample.from_data(self._data[key_:key_+1]) + out = self._data[key] + if isinstance(out, _numpy.recarray) and out.dtype == perf_metrics_sample_dtype: + return PerfMetricsSample.from_data(out) + return out + + def __setitem__(self, key, val): + self._data[key] = val @staticmethod def from_buffer(buffer): - """Create an GridLicensableFeatures instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlGridLicensableFeatures_t), GridLicensableFeatures) + """Create an PerfMetricsSample instance with the memory from the given buffer.""" + return PerfMetricsSample.from_data(_numpy.frombuffer(buffer, dtype=perf_metrics_sample_dtype)) @staticmethod def from_data(data): - """Create an GridLicensableFeatures instance wrapping the given NumPy array. + """Create an PerfMetricsSample instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `grid_licensable_features_dtype` holding the data. + data (_numpy.ndarray): a 1D array of dtype `perf_metrics_sample_dtype` holding the data. """ - return _cyb_from_data(data, "grid_licensable_features_dtype", grid_licensable_features_dtype, GridLicensableFeatures) + cdef PerfMetricsSample obj = PerfMetricsSample.__new__(PerfMetricsSample) + if not isinstance(data, _numpy.ndarray): + raise TypeError("data argument must be a NumPy ndarray") + if data.ndim != 1: + raise ValueError("data array must be 1D") + if data.dtype != perf_metrics_sample_dtype: + raise ValueError("data array must be of dtype perf_metrics_sample_dtype") + obj._data = data.view(_numpy.recarray) + + controllerData_list = list() + for i in range(obj._data.size): + addr = obj._data.controllerData[i].__array_interface__['data'][0] + n = int(obj._data.num_controller_data[i]) + controllerData_obj = PerfMetricControllerSample.from_ptr(addr, n, owner=obj, readonly=False) + controllerData_list.append(controllerData_obj) + obj._controllerData = tuple(controllerData_list) + return obj @staticmethod - def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an GridLicensableFeatures instance wrapping the given pointer. + def from_ptr(intptr_t ptr, size_t size=1, bint readonly=False, object owner=None): + """Create an PerfMetricsSample instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. - owner (object): The Python object that owns the pointer. If not provided, data will be copied. + size (int): number of structs, default=1. readonly (bool): whether the data is read-only (to the user). default is `False`. + owner (object): object that owns the memory at *ptr*. A strong reference is + kept so the backing storage outlives this wrapper. """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef GridLicensableFeatures obj = GridLicensableFeatures.__new__(GridLicensableFeatures) - if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlGridLicensableFeatures_t)) - if obj._ptr == NULL: - raise MemoryError("Error allocating GridLicensableFeatures") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlGridLicensableFeatures_t)) - obj._owner = None - obj._owned = True - else: - obj._ptr = ptr - obj._owner = owner - obj._owned = False - obj._readonly = readonly + cdef PerfMetricsSample obj = PerfMetricsSample.__new__(PerfMetricsSample) + cdef flag = _cyb_cpython_buffer.PyBUF_READ if readonly else _cyb_cpython_buffer.PyBUF_WRITE + cdef object buf = _cyb_cpython_memoryview.PyMemoryView_FromMemory( + ptr, sizeof(nvmlPerfMetricsSample_t) * size, flag) + data = _numpy.ndarray(size, buffer=buf, dtype=perf_metrics_sample_dtype) + obj._data = data.view(_numpy.recarray) + obj._owner = owner + + controllerData_list = list() + for i in range(obj._data.size): + addr = obj._data.controllerData[i].__array_interface__['data'][0] + n = int(obj._data.num_controller_data[i]) + controllerData_obj = PerfMetricControllerSample.from_ptr(addr, n, owner=obj, readonly=readonly) + controllerData_list.append(controllerData_obj) + obj._controllerData = tuple(controllerData_list) return obj -cdef _get_nv_link_info_v2_dtype_offsets(): - cdef nvmlNvLinkInfo_v2_t pod +cdef _get_perf_metrics_samples_v1_dtype_offsets(): + cdef nvmlPerfMetricsSamples_v1_t pod return _numpy.dtype({ - 'names': ['version', 'is_nvle_enabled', 'firmware_info'], - 'formats': [_numpy.uint32, _numpy.uint32, nvlink_firmware_info_dtype], + 'names': ['num_samples', 'samples'], + 'formats': [_numpy.uint32, (perf_metrics_sample_dtype, 13)], 'offsets': [ - (&(pod.version)) - (&pod), - (&(pod.isNvleEnabled)) - (&pod), - (&(pod.firmwareInfo)) - (&pod), + (&(pod.numSamples)) - (&pod), + (&(pod.samples)) - (&pod), ], - 'itemsize': sizeof(nvmlNvLinkInfo_v2_t), + 'itemsize': sizeof(nvmlPerfMetricsSamples_v1_t), }) -nv_link_info_v2_dtype = _get_nv_link_info_v2_dtype_offsets() +perf_metrics_samples_v1_dtype = _get_perf_metrics_samples_v1_dtype_offsets() -cdef class NvLinkInfo_v2: - """Empty-initialize an instance of `nvmlNvLinkInfo_v2_t`. +cdef class PerfMetricsSamples_v1: + """Empty-initialize an instance of `nvmlPerfMetricsSamples_v1_t`. - .. seealso:: `nvmlNvLinkInfo_v2_t` + .. seealso:: `nvmlPerfMetricsSamples_v1_t` """ cdef: - nvmlNvLinkInfo_v2_t *_ptr + nvmlPerfMetricsSamples_v1_t *_ptr object _owner bint _owned bint _readonly def __init__(self): - self._ptr = _cyb_calloc(1, sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_calloc(1, sizeof(nvmlPerfMetricsSamples_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating NvLinkInfo_v2") + raise MemoryError("Error allocating PerfMetricsSamples_v1") self._owner = None self._owned = True self._readonly = False def __dealloc__(self): - cdef nvmlNvLinkInfo_v2_t *ptr + cdef nvmlPerfMetricsSamples_v1_t *ptr if self._owned and self._ptr != NULL: ptr = self._ptr self._ptr = NULL _cyb_free(ptr) def __repr__(self): - return f"<{__name__}.NvLinkInfo_v2 object at {hex(id(self))}>" + return f"<{__name__}.PerfMetricsSamples_v1 object at {hex(id(self))}>" @property def ptr(self): @@ -22662,24 +28189,24 @@ cdef class NvLinkInfo_v2: return (self._ptr) def __eq__(self, other): - cdef NvLinkInfo_v2 other_ - if not isinstance(other, NvLinkInfo_v2): + cdef PerfMetricsSamples_v1 other_ + if not isinstance(other, PerfMetricsSamples_v1): return False other_ = other - return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlNvLinkInfo_v2_t)) == 0) + return (_cyb_memcmp((self._ptr), (other_._ptr), sizeof(nvmlPerfMetricsSamples_v1_t)) == 0) def __getbuffer__(self, _cyb_cpython.Py_buffer *buffer, int flags): - _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlNvLinkInfo_v2_t), self._readonly) + _cyb___getbuffer(self, buffer, self._ptr, sizeof(nvmlPerfMetricsSamples_v1_t), self._readonly) def __releasebuffer__(self, Py_buffer *buffer): pass def __setitem__(self, key, val): if key == 0 and isinstance(val, _numpy.ndarray): - self._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + self._ptr = _cyb_malloc(sizeof(nvmlPerfMetricsSamples_v1_t)) if self._ptr == NULL: - raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlNvLinkInfo_v2_t)) + raise MemoryError("Error allocating PerfMetricsSamples_v1") + _cyb_memcpy(self._ptr, val.ctypes.data, sizeof(nvmlPerfMetricsSamples_v1_t)) self._owner = None self._owned = True self._readonly = not val.flags.writeable @@ -22687,60 +28214,44 @@ cdef class NvLinkInfo_v2: setattr(self, key, val) @property - def firmware_info(self): - """NvlinkFirmwareInfo: OUT - NVLINK Firmware info.""" - return NvlinkFirmwareInfo.from_ptr( - &(self._ptr[0].firmwareInfo), + def samples(self): + """PerfMetricsSample: Array of performance metrics samples.""" + return PerfMetricsSample.from_ptr( + &(self._ptr[0].samples), + self._ptr[0].numSamples, readonly=self._readonly, owner=self, ) - @firmware_info.setter - def firmware_info(self, val): - if self._readonly: - raise ValueError("This NvLinkInfo_v2 instance is read-only") - cdef NvlinkFirmwareInfo val_ = val - _cyb_memcpy(&(self._ptr[0].firmwareInfo), (val_._get_ptr()), sizeof(nvmlNvlinkFirmwareInfo_t) * 1) - - @property - def version(self): - """int: IN - the API version number.""" - return self._ptr[0].version - - @version.setter - def version(self, val): - if self._readonly: - raise ValueError("This NvLinkInfo_v2 instance is read-only") - self._ptr[0].version = val - - @property - def is_nvle_enabled(self): - """int: OUT - NVLINK encryption enablement.""" - return self._ptr[0].isNvleEnabled - - @is_nvle_enabled.setter - def is_nvle_enabled(self, val): + @samples.setter + def samples(self, val): if self._readonly: - raise ValueError("This NvLinkInfo_v2 instance is read-only") - self._ptr[0].isNvleEnabled = val + raise ValueError("This PerfMetricsSamples_v1 instance is read-only") + cdef PerfMetricsSample val_ = val + if len(val) > 13: + raise ValueError(f"Expected length < 13 for field samples, got {len(val)}") + self._ptr[0].numSamples = len(val) + if len(val) == 0: + return + _cyb_memcpy(&(self._ptr[0].samples), (val_._get_ptr()), sizeof(nvmlPerfMetricsSample_t) * self._ptr[0].numSamples) @staticmethod def from_buffer(buffer): - """Create an NvLinkInfo_v2 instance with the memory from the given buffer.""" - return _cyb_from_buffer(buffer, sizeof(nvmlNvLinkInfo_v2_t), NvLinkInfo_v2) + """Create an PerfMetricsSamples_v1 instance with the memory from the given buffer.""" + return _cyb_from_buffer(buffer, sizeof(nvmlPerfMetricsSamples_v1_t), PerfMetricsSamples_v1) @staticmethod def from_data(data): - """Create an NvLinkInfo_v2 instance wrapping the given NumPy array. + """Create an PerfMetricsSamples_v1 instance wrapping the given NumPy array. Args: - data (_numpy.ndarray): a single-element array of dtype `nv_link_info_v2_dtype` holding the data. + data (_numpy.ndarray): a single-element array of dtype `perf_metrics_samples_v1_dtype` holding the data. """ - return _cyb_from_data(data, "nv_link_info_v2_dtype", nv_link_info_v2_dtype, NvLinkInfo_v2) + return _cyb_from_data(data, "perf_metrics_samples_v1_dtype", perf_metrics_samples_v1_dtype, PerfMetricsSamples_v1) @staticmethod def from_ptr(intptr_t ptr, bint readonly=False, object owner=None): - """Create an NvLinkInfo_v2 instance wrapping the given pointer. + """Create an PerfMetricsSamples_v1 instance wrapping the given pointer. Args: ptr (intptr_t): pointer address as Python :class:`int` to the data. @@ -22749,16 +28260,16 @@ cdef class NvLinkInfo_v2: """ if ptr == 0: raise ValueError("ptr must not be null (0)") - cdef NvLinkInfo_v2 obj = NvLinkInfo_v2.__new__(NvLinkInfo_v2) + cdef PerfMetricsSamples_v1 obj = PerfMetricsSamples_v1.__new__(PerfMetricsSamples_v1) if owner is None: - obj._ptr = _cyb_malloc(sizeof(nvmlNvLinkInfo_v2_t)) + obj._ptr = _cyb_malloc(sizeof(nvmlPerfMetricsSamples_v1_t)) if obj._ptr == NULL: - raise MemoryError("Error allocating NvLinkInfo_v2") - _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlNvLinkInfo_v2_t)) + raise MemoryError("Error allocating PerfMetricsSamples_v1") + _cyb_memcpy((obj._ptr), ptr, sizeof(nvmlPerfMetricsSamples_v1_t)) obj._owner = None obj._owned = True else: - obj._ptr = ptr + obj._ptr = ptr obj._owner = owner obj._owned = False obj._readonly = readonly @@ -22766,7 +28277,7 @@ cdef class NvLinkInfo_v2: cpdef init_v2(): - """Initialize NVML, but don't initialize any GPUs yet. + """Initialize the NVML Library lazily, without allocating any device state. .. seealso:: `nvmlInit_v2` """ @@ -22776,10 +28287,11 @@ cpdef init_v2(): cpdef init_with_flags(unsigned int flags): - """nvmlInitWithFlags is a variant of ``nvmlInit()``, that allows passing a set of boolean values modifying the behaviour of ``nvmlInit()``. Other than the "flags" parameter it is completely similar to ``nvmlInit_v2``. + """Initialize the NVML Library lazily, without allocating any device state, with additional init flags. Args: - flags (unsigned int): behaviour modifier flags. + flags (unsigned int): NVML_INIT_FLAG_* flags that can modify + NVML Init behavior. .. seealso:: `nvmlInitWithFlags` """ @@ -22789,7 +28301,7 @@ cpdef init_with_flags(unsigned int flags): cpdef shutdown(): - """Shut down NVML by releasing all GPU resources previously allocated with :func:`init_v2`. + """Shut down and cleanup NVML Library state. .. seealso:: `nvmlShutdown` """ @@ -28321,6 +33833,214 @@ cpdef object device_get_remapped_rows_v2(intptr_t device): return info_py +cpdef device_set_adaptive_tgp_mode_v1(intptr_t device, int mode): + """Request to enable or disable Adaptive TGP Mode for a GPU. + + Args: + device (intptr_t): The identifier of the target device. + mode (EnableState): NVML_FEATURE_ENABLED or + NVML_FEATURE_DISABLED. + + .. seealso:: `nvmlDeviceSetAdaptiveTgpMode_v1` + """ + with nogil: + __status__ = nvmlDeviceSetAdaptiveTgpMode_v1(device, <_EnableState>mode) + check_status(__status__) + + +cpdef object device_get_adaptive_tgp_mode_info_v1(intptr_t device): + """Retrieves Adaptive TGP Mode state and telemetry for a GPU. + + Args: + device (intptr_t): The identifier of the target device. + + Returns: + nvmlAdaptiveTgpModeInfo_v1_t: Reference in which to return the + Adaptive TGP Mode information. + + .. seealso:: `nvmlDeviceGetAdaptiveTgpModeInfo_v1` + """ + cdef AdaptiveTgpModeInfo_v1 info_py = AdaptiveTgpModeInfo_v1() + cdef nvmlAdaptiveTgpModeInfo_v1_t *info = (info_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceGetAdaptiveTgpModeInfo_v1(device, info) + check_status(__status__) + return info_py + + +cpdef device_set_memory_limits_v1(intptr_t device, intptr_t limits): + """Set the memory limits of the device for the cgroup partition. + + Args: + device (intptr_t): The identifier of the target device. + limits (intptr_t): A pointer to ``nvmlSetMemoryLimits_v1_t`` + where the limits can be set. + + .. seealso:: `nvmlDeviceSetMemoryLimits_v1` + """ + with nogil: + __status__ = nvmlDeviceSetMemoryLimits_v1(device, limits) + check_status(__status__) + + +cpdef object device_get_memory_limits_v1(intptr_t device): + """Get the memory limits of the device for the cgroup partition. + + Args: + device (intptr_t): The identifier of the target device. + + Returns: + nvmlGetMemoryLimits_v1_t: A pointer to + ``nvmlGetMemoryLimits_v1_t``. + + .. seealso:: `nvmlDeviceGetMemoryLimits_v1` + """ + cdef GetMemoryLimits_v1 limits_py = GetMemoryLimits_v1() + cdef nvmlGetMemoryLimits_v1_t *limits = (limits_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceGetMemoryLimits_v1(device, limits) + check_status(__status__) + return limits_py + + +cpdef object device_get_gpu_fabric_info_v4(intptr_t device): + """Retrieves GPU fabric information including per-type clique assignments. + + Args: + device (intptr_t): The identifier of the target device. + + Returns: + nvmlGpuFabricInfo_v4_t: Information about GPU fabric state + including per-type cliques. + + .. seealso:: `nvmlDeviceGetGpuFabricInfo_v4` + """ + cdef GpuFabricInfo_v4 gpu_fabric_info_py = GpuFabricInfo_v4() + cdef nvmlGpuFabricInfo_v4_t *gpu_fabric_info = (gpu_fabric_info_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceGetGpuFabricInfo_v4(device, gpu_fabric_info) + check_status(__status__) + return gpu_fabric_info_py + + +cpdef object device_perf_metrics_get_samples_v1(intptr_t device): + """Get Performance Metric samples. + + Args: + device (intptr_t): The identifier of the target device. + + Returns: + nvmlPerfMetricsSamples_v1_t: Reference to + ``nvmlPerfMetricsSamples_v1_t``. + + .. seealso:: `nvmlDevicePerfMetricsGetSamples_v1` + """ + cdef PerfMetricsSamples_v1 samples_py = PerfMetricsSamples_v1() + cdef nvmlPerfMetricsSamples_v1_t *samples = (samples_py._get_ptr()) + with nogil: + __status__ = nvmlDevicePerfMetricsGetSamples_v1(device, samples) + check_status(__status__) + return samples_py + + +cpdef object device_set_nvlink_bw_mode_async_v1(intptr_t device): + """Set the NvLink Reduced Bandwidth Mode asynchronously for the device. Polling should be done by checking for ``NVML_GPU_FABRIC_STATE_COMPLETED`` from :func:`device_get_gpu_fabric_info_v`. + + Args: + device (intptr_t): The identifier of the target device. + + Returns: + nvmlNvlinkSetBwModeAsync_v1_t: Reference to + ``nvmlNvlinkSetBwModeAsync_v1_t``. + + .. seealso:: `nvmlDeviceSetNvlinkBwModeAsync_v1` + """ + cdef NvlinkSetBwModeAsync_v1 set_bw_mode_async_py = NvlinkSetBwModeAsync_v1() + cdef nvmlNvlinkSetBwModeAsync_v1_t *set_bw_mode_async = (set_bw_mode_async_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceSetNvlinkBwModeAsync_v1(device, set_bw_mode_async) + check_status(__status__) + return set_bw_mode_async_py + + +cpdef object device_get_nv_link_telemetry_samples_v1(intptr_t device): + """Retrieve a batch of historical NVLink per-link telemetry samples. + + Args: + device (intptr_t): The device handle of the GPU to retrieve + samples for. + + Returns: + nvmlNvlinkTelemetrySamples_v1_t: Request/response batch (see + ``nvmlNvlinkTelemetrySamples_v1_t``). + + .. seealso:: `nvmlDeviceGetNvLinkTelemetrySamples_v1` + """ + cdef NvlinkTelemetrySamples_v1 samples_py = NvlinkTelemetrySamples_v1() + cdef nvmlNvlinkTelemetrySamples_v1_t *samples = (samples_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceGetNvLinkTelemetrySamples_v1(device, samples) + check_status(__status__) + return samples_py + + +cpdef event_set_register_gpu_operational_events_v1(intptr_t event_set, intptr_t config): + """Adds a GPU Operational Event subscription to an event set. + + Args: + event_set (intptr_t): Event set created by + ``nvmlEventSetCreate``. + config (intptr_t): GPU Operational Event subscription + configuration. + + .. seealso:: `nvmlEventSetRegisterGpuOperationalEvents_v1` + """ + with nogil: + __status__ = nvmlEventSetRegisterGpuOperationalEvents_v1(event_set, config) + check_status(__status__) + + +cpdef object event_set_get_context_count_v1(intptr_t set): + """Gets the number of context records for the most recent event returned by ``nvmlEventSetWait_v3`` on this event set. + + Args: + set (intptr_t): Event set previously used with + ``nvmlEventSetWait_v3``. + + Returns: + nvmlEventSetGetContextCount_v1_t: Parameters in which to + return the number of context records. + + .. seealso:: `nvmlEventSetGetContextCount_v1` + """ + cdef EventSetGetContextCount_v1 params_py = EventSetGetContextCount_v1() + cdef nvmlEventSetGetContextCount_v1_t *params = (params_py._get_ptr()) + with nogil: + __status__ = nvmlEventSetGetContextCount_v1(set, params) + check_status(__status__) + return params_py + + +cpdef object device_get_bank_remapper_status_v1(intptr_t device): + """Get bank remapper status. + + Args: + device (intptr_t): The identifier of the target device. + + Returns: + nvmlEccBankRemapperStatus_v1_t: Reference to + ``nvmlEccBankRemapperStatus_t``. + + .. seealso:: `nvmlDeviceGetBankRemapperStatus_v1` + """ + cdef EccBankRemapperStatus_v1 p_bank_remapper_status_py = EccBankRemapperStatus_v1() + cdef nvmlEccBankRemapperStatus_v1_t *p_bank_remapper_status = (p_bank_remapper_status_py._get_ptr()) + with nogil: + __status__ = nvmlDeviceGetBankRemapperStatus_v1(device, p_bank_remapper_status) + check_status(__status__) + return p_bank_remapper_status_py + + cpdef object system_get_topology_gpu_set(unsigned int cpuNumber): """Retrieve the set of GPUs that have a CPU affinity with the given CPU number @@ -30004,4 +35724,112 @@ cpdef str vgpu_type_get_name(unsigned int vgpu_type_id): return cpython.PyUnicode_FromStringAndSize(vgpu_type_name, size[0]) +cpdef object event_set_wait_v3(intptr_t set, unsigned int timeout_ms): + """Wait for events of the specified type to occur for any device in the set, + returning a structured event record. + + For Turing™ or newer fully supported devices. + + For Linux only. + + Args: + set (EventSet): Handle to the event set. + timeout_ms (unsigned int): Maximum time to wait, in milliseconds. + + Returns: + EventSetWait_v3: Structured event data record. + + .. seealso:: `nvmlEventSetWait_v3` + """ + cdef EventSetWait_v3 params = EventSetWait_v3() + cdef nvmlEventSetWait_v3_t *ptr = params._get_ptr() + ptr.timeoutMs = timeout_ms + with nogil: + __status__ = nvmlEventSetWait_v3(set, ptr) + check_status(__status__) + return params + + +cpdef object event_set_get_context_info_v1(intptr_t set, unsigned int index): + """Retrieve context metadata for a context record from the most recent event + returned by :func:`event_set_wait_v3`. + + For Turing™ or newer fully supported devices. + + For Linux only. + + Args: + set (EventSet): Handle to the event set. + index (unsigned int): Zero-based index of the context record. + + Returns: + EventSetGetContextInfo_v1: Context metadata record. + + .. seealso:: `nvmlEventSetGetContextInfo_v1` + """ + cdef EventSetGetContextInfo_v1 params = EventSetGetContextInfo_v1() + cdef nvmlEventSetGetContextInfo_v1_t *ptr = params._get_ptr() + ptr.index = index + with nogil: + __status__ = nvmlEventSetGetContextInfo_v1(set, ptr) + check_status(__status__) + return params + + +cpdef object event_set_get_gpu_operational_event_context_legacy_xid_v1(intptr_t set, unsigned int index): + """Retrieve the decoded legacy-Xid context data for a context record from the + most recent event returned by :func:`event_set_wait_v3`. + + For Turing™ or newer fully supported devices. + + For Linux only. + + Args: + set (EventSet): Handle to the event set. + index (unsigned int): Zero-based index of the context record. + + Returns: + EventSetGetGpuOperationalEventContextLegacyXid_v1: Decoded Xid context record. + + .. seealso:: `nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1` + """ + cdef EventSetGetGpuOperationalEventContextLegacyXid_v1 params = EventSetGetGpuOperationalEventContextLegacyXid_v1() + cdef nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1_t *ptr = params._get_ptr() + ptr.index = index + with nogil: + __status__ = nvmlEventSetGetGpuOperationalEventContextLegacyXid_v1(set, ptr) + check_status(__status__) + return params + + +cpdef bytes event_set_get_context_data_v1(intptr_t set, unsigned int index): + """Copies the raw payload for a context record from the most recent event returned by + :func:`event_set_wait_v3`. + + For Turing™ or newer fully supported devices. + + For Linux only. + + Args: + set (EventSet): Handle to the event set. + index (unsigned int): Zero-based index of the context record to retrieve. + + Returns: + bytes: The context payload as a bytes object. + + .. seealso:: `nvmlEventSetGetContextData_v1` + """ + cdef nvmlEventSetGetContextData_v1_t params + params.index = index + params.data = NULL + params.dataSize = 0 + with nogil: + __status__ = nvmlEventSetGetContextData_v1(set, ¶ms) + check_status_size(__status__) + cdef bytes data = bytes(params.dataSize) + params.data = data + with nogil: + __status__ = nvmlEventSetGetContextData_v1(set, ¶ms) + check_status(__status__) + return data del _cyb_FastEnum diff --git a/cuda_bindings/cuda/bindings/nvrtc.pxd b/cuda_bindings/cuda/bindings/nvrtc.pxd index 9952530ae9c..2e7ca2b505a 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pxd +++ b/cuda_bindings/cuda/bindings/nvrtc.pxd @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ee485e830fdb8037d58a70b73a413f3ce362819576fd86e91d55ce14ba3f9149 +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ba23f6c3908c2fa6496002f8def30ec166cec8643e4de22c1741040b2c4b2965 cimport cuda.bindings.cynvrtc as cynvrtc include "_lib/utils.pxd" diff --git a/cuda_bindings/cuda/bindings/nvrtc.pyx b/cuda_bindings/cuda/bindings/nvrtc.pyx index ed656c9cd58..a44c48b935d 100644 --- a/cuda_bindings/cuda/bindings/nvrtc.pyx +++ b/cuda_bindings/cuda/bindings/nvrtc.pyx @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=9c30b7a3d79561c6721e7df7b758eaee6afdd2763d9692ff638815abb64417e0 +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=014131536ed098f8c76a069b25d8ff44edd3f2554ae23b127e1b686ae2d6a69d from typing import Any, Optional import cython import ctypes diff --git a/cuda_bindings/cuda/bindings/nvvm.pxd b/cuda_bindings/cuda/bindings/nvvm.pxd index ddff245c4ae..9e78ece8069 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pxd +++ b/cuda_bindings/cuda/bindings/nvvm.pxd @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8fba6eefce0839acab8433ec432e9759b576665fc20b6d977953041f18c0e1d2 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=ee88a87ab53668207e31e3b38c1593a3cd3724e02300ebea7574aafb509bb3b6 diff --git a/cuda_bindings/cuda/bindings/nvvm.pyx b/cuda_bindings/cuda/bindings/nvvm.pyx index b6e8a13f1cb..cff0b446a52 100644 --- a/cuda_bindings/cuda/bindings/nvvm.pyx +++ b/cuda_bindings/cuda/bindings/nvvm.pyx @@ -2,8 +2,8 @@ # # SPDX-License-Identifier: Apache-2.0 # -# This code was automatically generated across versions from 12.0.1 to 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=a82258bb2654bea18f6bce657324bdbbee8b8b0b30d2a0021e792ba5f95fa9a4 +# This code was automatically generated across versions from 12.0.1 to 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=37902d13a165dba391225d644f9ee67747150ede2f719ea5e0870618f6db50ec # <<<< PREAMBLE CONTENT >>>> diff --git a/cuda_bindings/cuda/bindings/runtime.pxd b/cuda_bindings/cuda/bindings/runtime.pxd index 39e2d129890..3665c0a1eba 100644 --- a/cuda_bindings/cuda/bindings/runtime.pxd +++ b/cuda_bindings/cuda/bindings/runtime.pxd @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=033835aa1fcce7bcd75db8c655b92a6415a74fe0734819cda666ebf038bc1bce +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=7449c15b6137a39e8e9c26a3aee810954cead6b88b7c8a768abb9a2bc5875913 cimport cuda.bindings.cyruntime as cyruntime include "_lib/utils.pxd" @@ -891,6 +891,10 @@ cdef class cudaHostNodeParamsV2: The synchronization mode to use for the host task + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -905,6 +909,9 @@ cdef class cudaHostNodeParamsV2: cdef _HelperInputVoidPtr _cyuserData + cdef cudaExecutionContext_t _ctx + + cdef class anon_struct1: """ Attributes @@ -1171,12 +1178,16 @@ cdef class cudaPointerAttributes: pointer if an invalid pointer has been passed to CUDA. + localityDomainOrdinal : int + + + Methods ------- getPtr() Get memory address of class instance """ - cdef cyruntime.cudaPointerAttributes _pvt_val + cdef cyruntime.cudaPointerAttributes* _val_ptr cdef cyruntime.cudaPointerAttributes* _pvt_ptr cdef _HelperInputVoidPtr _cydevicePointer @@ -1239,7 +1250,11 @@ cdef class cudaFuncAttributes: maxDynamicSharedSizeBytes : int The maximum size in bytes of dynamic shared memory per block for this function. Any launch must have a dynamic shared memory size - smaller than this value. + smaller than this value. This attribute is ignored if the + sharedMemoryMode function or launch attribute is set. This + attribute cannot be used to access oversized shared memory. + Oversized shared memory can only be accessed by setting the shared + memory mode. See cudaFuncSetAttribute preferredShmemCarveout : int @@ -1248,7 +1263,7 @@ cdef class cudaFuncAttributes: preference, in percent of the maximum shared memory. Refer to cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, and the driver can choose a different ratio if required to execute - the function. See cudaFuncSetAttribute + the function. See cudaFuncSetAttribute clusterDimMustBeSet : int @@ -1261,7 +1276,7 @@ cdef class cudaFuncAttributes: either all be 0 or all be positive. The validity of the cluster dimensions is otherwise checked at launch time. If the value is set during compile time, it cannot be set at runtime. Setting it at - runtime should return cudaErrorNotPermitted. See + runtime should return cudaErrorNotPermitted. See cudaFuncSetAttribute @@ -1274,7 +1289,8 @@ cdef class cudaFuncAttributes: clusterSchedulingPolicyPreference : int - The block scheduling policy of a function. See cudaFuncSetAttribute + The block scheduling policy of a function. See + cudaFuncSetAttribute nonPortableClusterSizeAllowed : int @@ -1289,7 +1305,7 @@ cdef class cudaFuncAttributes: than the target compute capability. The portable cluster size for sm_90 is 8 blocks per cluster. This value may increase for future compute capabilities. The specific hardware unit may support - higher cluster sizes that’s not guaranteed to be portable. See + higher cluster sizes that’s not guaranteed to be portable. See cudaFuncSetAttribute @@ -1299,6 +1315,11 @@ cdef class cudaFuncAttributes: the value. + sharedMemoryMode : cudaSharedMemoryMode + This controls a kernel's use of non-portable or oversized shared + memory configurations. See cudaFuncSetAttribute + + Methods ------- getPtr() @@ -1307,6 +1328,26 @@ cdef class cudaFuncAttributes: cdef cyruntime.cudaFuncAttributes _pvt_val cdef cyruntime.cudaFuncAttributes* _pvt_ptr +cdef class anon_struct6: + """ + Attributes + ---------- + + deviceId : bytes + + + + localityDomainId : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + cdef cyruntime.cudaMemLocation* _pvt_ptr + cdef class cudaMemLocation: """ Specifies a memory location. To specify a gpu, set type = @@ -1327,6 +1368,11 @@ cdef class cudaMemLocation: cudaMemLocationType::cudaMemLocationTypeHostNuma. + localized : anon_struct6 + Identifier for + cudaMemLocationType::cudaMemLocationTypeDeviceLocalityDomain. + + Methods ------- getPtr() @@ -1335,6 +1381,9 @@ cdef class cudaMemLocation: cdef cyruntime.cudaMemLocation* _val_ptr cdef cyruntime.cudaMemLocation* _pvt_ptr + cdef anon_struct6 _localized + + cdef class cudaMemAccessDesc: """ Memory access descriptor @@ -1613,7 +1662,7 @@ cdef class cudaOffset3D: cdef cyruntime.cudaOffset3D _pvt_val cdef cyruntime.cudaOffset3D* _pvt_ptr -cdef class anon_struct6: +cdef class anon_struct7: """ Attributes ---------- @@ -1647,7 +1696,7 @@ cdef class anon_struct6: cdef cudaMemLocation _locHint -cdef class anon_struct7: +cdef class anon_struct8: """ Attributes ---------- @@ -1673,16 +1722,16 @@ cdef class anon_struct7: cdef cudaOffset3D _offset -cdef class anon_union2: +cdef class anon_union3: """ Attributes ---------- - ptr : anon_struct6 + ptr : anon_struct7 - array : anon_struct7 + array : anon_struct8 @@ -1693,10 +1742,10 @@ cdef class anon_union2: """ cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr - cdef anon_struct6 _ptr + cdef anon_struct7 _ptr - cdef anon_struct7 _array + cdef anon_struct8 _array cdef class cudaMemcpy3DOperand: @@ -1710,7 +1759,7 @@ cdef class cudaMemcpy3DOperand: - op : anon_union2 + op : anon_union3 @@ -1722,7 +1771,7 @@ cdef class cudaMemcpy3DOperand: cdef cyruntime.cudaMemcpy3DOperand* _val_ptr cdef cyruntime.cudaMemcpy3DOperand* _pvt_ptr - cdef anon_union2 _op + cdef anon_union3 _op cdef class cudaMemcpy3DBatchOp: @@ -2228,7 +2277,7 @@ cdef class cudaMemFabricHandle_st: cdef cyruntime.cudaMemFabricHandle_st _pvt_val cdef cyruntime.cudaMemFabricHandle_st* _pvt_ptr -cdef class anon_struct8: +cdef class anon_struct9: """ Attributes ---------- @@ -2254,7 +2303,7 @@ cdef class anon_struct8: cdef _HelperInputVoidPtr _cyname -cdef class anon_union3: +cdef class anon_union4: """ Attributes ---------- @@ -2263,7 +2312,7 @@ cdef class anon_union3: - win32 : anon_struct8 + win32 : anon_struct9 @@ -2278,7 +2327,7 @@ cdef class anon_union3: """ cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr - cdef anon_struct8 _win32 + cdef anon_struct9 _win32 cdef _HelperInputVoidPtr _cynvSciBufObject @@ -2295,7 +2344,7 @@ cdef class cudaExternalMemoryHandleDesc: Type of the handle - handle : anon_union3 + handle : anon_union4 @@ -2315,7 +2364,7 @@ cdef class cudaExternalMemoryHandleDesc: cdef cyruntime.cudaExternalMemoryHandleDesc* _val_ptr cdef cyruntime.cudaExternalMemoryHandleDesc* _pvt_ptr - cdef anon_union3 _handle + cdef anon_union4 _handle cdef class cudaExternalMemoryBufferDesc: @@ -2388,7 +2437,7 @@ cdef class cudaExternalMemoryMipmappedArrayDesc: cdef cudaExtent _extent -cdef class anon_struct9: +cdef class anon_struct10: """ Attributes ---------- @@ -2414,7 +2463,7 @@ cdef class anon_struct9: cdef _HelperInputVoidPtr _cyname -cdef class anon_union4: +cdef class anon_union5: """ Attributes ---------- @@ -2423,7 +2472,7 @@ cdef class anon_union4: - win32 : anon_struct9 + win32 : anon_struct10 @@ -2438,7 +2487,7 @@ cdef class anon_union4: """ cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr - cdef anon_struct9 _win32 + cdef anon_struct10 _win32 cdef _HelperInputVoidPtr _cynvSciSyncObj @@ -2455,7 +2504,7 @@ cdef class cudaExternalSemaphoreHandleDesc: Type of the handle - handle : anon_union4 + handle : anon_union5 @@ -2471,10 +2520,10 @@ cdef class cudaExternalSemaphoreHandleDesc: cdef cyruntime.cudaExternalSemaphoreHandleDesc* _val_ptr cdef cyruntime.cudaExternalSemaphoreHandleDesc* _pvt_ptr - cdef anon_union4 _handle + cdef anon_union5 _handle -cdef class anon_struct10: +cdef class anon_struct11: """ Attributes ---------- @@ -2490,7 +2539,7 @@ cdef class anon_struct10: """ cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr -cdef class anon_union5: +cdef class anon_union6: """ Attributes ---------- @@ -2509,7 +2558,7 @@ cdef class anon_union5: cdef _HelperInputVoidPtr _cyfence -cdef class anon_struct11: +cdef class anon_struct12: """ Attributes ---------- @@ -2525,20 +2574,20 @@ cdef class anon_struct11: """ cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr -cdef class anon_struct12: +cdef class anon_struct13: """ Attributes ---------- - fence : anon_struct10 + fence : anon_struct11 - nvSciSync : anon_union5 + nvSciSync : anon_union6 - keyedMutex : anon_struct11 + keyedMutex : anon_struct12 @@ -2549,13 +2598,13 @@ cdef class anon_struct12: """ cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr - cdef anon_struct10 _fence + cdef anon_struct11 _fence - cdef anon_union5 _nvSciSync + cdef anon_union6 _nvSciSync - cdef anon_struct11 _keyedMutex + cdef anon_struct12 _keyedMutex cdef class cudaExternalSemaphoreSignalParams: @@ -2565,7 +2614,7 @@ cdef class cudaExternalSemaphoreSignalParams: Attributes ---------- - params : anon_struct12 + params : anon_struct13 @@ -2588,10 +2637,10 @@ cdef class cudaExternalSemaphoreSignalParams: cdef cyruntime.cudaExternalSemaphoreSignalParams _pvt_val cdef cyruntime.cudaExternalSemaphoreSignalParams* _pvt_ptr - cdef anon_struct12 _params + cdef anon_struct13 _params -cdef class anon_struct13: +cdef class anon_struct14: """ Attributes ---------- @@ -2607,7 +2656,7 @@ cdef class anon_struct13: """ cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr -cdef class anon_union6: +cdef class anon_union7: """ Attributes ---------- @@ -2626,7 +2675,7 @@ cdef class anon_union6: cdef _HelperInputVoidPtr _cyfence -cdef class anon_struct14: +cdef class anon_struct15: """ Attributes ---------- @@ -2646,20 +2695,20 @@ cdef class anon_struct14: """ cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr -cdef class anon_struct15: +cdef class anon_struct16: """ Attributes ---------- - fence : anon_struct13 + fence : anon_struct14 - nvSciSync : anon_union6 + nvSciSync : anon_union7 - keyedMutex : anon_struct14 + keyedMutex : anon_struct15 @@ -2670,13 +2719,13 @@ cdef class anon_struct15: """ cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr - cdef anon_struct13 _fence + cdef anon_struct14 _fence - cdef anon_union6 _nvSciSync + cdef anon_union7 _nvSciSync - cdef anon_struct14 _keyedMutex + cdef anon_struct15 _keyedMutex cdef class cudaExternalSemaphoreWaitParams: @@ -2686,7 +2735,7 @@ cdef class cudaExternalSemaphoreWaitParams: Attributes ---------- - params : anon_struct15 + params : anon_struct16 @@ -2709,7 +2758,7 @@ cdef class cudaExternalSemaphoreWaitParams: cdef cyruntime.cudaExternalSemaphoreWaitParams _pvt_val cdef cyruntime.cudaExternalSemaphoreWaitParams* _pvt_ptr - cdef anon_struct15 _params + cdef anon_struct16 _params cdef class cudaDevSmResource: @@ -2741,6 +2790,11 @@ cdef class cudaDevSmResource: cudaDevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceConstraintTypeLocalityDomainId is set in flags + + Methods ------- getPtr() @@ -2814,6 +2868,11 @@ cdef class cudaDevSmResourceGroupParams_st: this this group is created. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceGroupLocalityDomainId is set in flags + + Methods ------- getPtr() @@ -3112,6 +3171,10 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: paramsArray. + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -3128,6 +3191,9 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: cdef cyruntime.cudaExternalSemaphoreSignalParams* _paramsArray + cdef cudaExecutionContext_t _ctx + + cdef class cudaExternalSemaphoreWaitNodeParams: """ External semaphore wait node parameters @@ -3184,6 +3250,10 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: paramsArray. + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -3200,6 +3270,9 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: cdef cyruntime.cudaExternalSemaphoreWaitParams* _paramsArray + cdef cudaExecutionContext_t _ctx + + cdef class cudaConditionalNodeParams: """ CUDA conditional node parameters @@ -3230,7 +3303,7 @@ cdef class cudaConditionalNodeParams: empty nodes, child graphs, memsets, memcopies, and conditionals. This applies recursively to child graphs and conditional bodies. - All kernels, including kernels in nested conditionals or child - graphs at any level, must belong to the same CUDA context. + graphs at any level, must belong to the same device context. These graphs may be populated using graph node creation APIs or cudaStreamBeginCaptureToGraph. cudaGraphCondTypeIf: phGraph_out[0] is executed when the condition is non-zero. If `size` == 2, @@ -3304,6 +3377,10 @@ cdef class cudaEventRecordNodeParams: The event to record when the node executes + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -3315,6 +3392,9 @@ cdef class cudaEventRecordNodeParams: cdef cudaEvent_t _event + cdef cudaExecutionContext_t _ctx + + cdef class cudaEventWaitNodeParams: """ Event wait node parameters @@ -3558,7 +3638,7 @@ cdef class cudaGraphExecUpdateResultInfo_st: cdef cudaGraphNode_t _errorFromNode -cdef class anon_struct16: +cdef class anon_struct17: """ Attributes ---------- @@ -3585,7 +3665,7 @@ cdef class anon_struct16: cdef _HelperInputVoidPtr _cypValue -cdef class anon_union10: +cdef class anon_union11: """ Attributes ---------- @@ -3594,7 +3674,7 @@ cdef class anon_union10: - param : anon_struct16 + param : anon_struct17 @@ -3612,7 +3692,7 @@ cdef class anon_union10: cdef dim3 _gridDim - cdef anon_struct16 _param + cdef anon_struct17 _param cdef class cudaGraphKernelNodeUpdate: @@ -3632,7 +3712,7 @@ cdef class cudaGraphKernelNodeUpdate: interpreted - updateData : anon_union10 + updateData : anon_union11 Update data to apply. Which field is used depends on field's value @@ -3647,7 +3727,7 @@ cdef class cudaGraphKernelNodeUpdate: cdef cudaGraphDeviceNode_t _node - cdef anon_union10 _updateData + cdef anon_union11 _updateData cdef class cudaLaunchMemSyncDomainMap_st: @@ -3679,7 +3759,7 @@ cdef class cudaLaunchMemSyncDomainMap_st: cdef cyruntime.cudaLaunchMemSyncDomainMap_st _pvt_val cdef cyruntime.cudaLaunchMemSyncDomainMap_st* _pvt_ptr -cdef class anon_struct17: +cdef class anon_struct18: """ Attributes ---------- @@ -3703,7 +3783,7 @@ cdef class anon_struct17: """ cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr -cdef class anon_struct18: +cdef class anon_struct19: """ Attributes ---------- @@ -3730,7 +3810,7 @@ cdef class anon_struct18: cdef cudaEvent_t _event -cdef class anon_struct19: +cdef class anon_struct20: """ Attributes ---------- @@ -3754,7 +3834,7 @@ cdef class anon_struct19: """ cdef cyruntime.cudaLaunchAttributeValue* _pvt_ptr -cdef class anon_struct20: +cdef class anon_struct21: """ Attributes ---------- @@ -3777,7 +3857,7 @@ cdef class anon_struct20: cdef cudaEvent_t _event -cdef class anon_struct21: +cdef class anon_struct22: """ Attributes ---------- @@ -3825,7 +3905,7 @@ cdef class cudaLaunchAttributeValue: cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct17 + clusterDim : anon_struct18 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -3846,7 +3926,7 @@ cdef class cudaLaunchAttributeValue: cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct18 + programmaticEvent : anon_struct19 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see @@ -3870,7 +3950,7 @@ cdef class cudaLaunchAttributeValue: cudaLaunchMemSyncDomain. - preferredClusterDim : anon_struct19 + preferredClusterDim : anon_struct20 Value of launch attribute cudaLaunchAttributePreferredClusterDimension that represents the desired preferred cluster dimensions for the kernel. Opaque type @@ -3885,7 +3965,7 @@ cdef class cudaLaunchAttributeValue: cudaLaunchAttributeValue::clusterDim. - launchCompletionEvent : anon_struct20 + launchCompletionEvent : anon_struct21 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record @@ -3893,7 +3973,7 @@ cdef class cudaLaunchAttributeValue: cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct21 + deviceUpdatableKernelNode : anon_struct22 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting @@ -3933,22 +4013,22 @@ cdef class cudaLaunchAttributeValue: cdef cudaAccessPolicyWindow _accessPolicyWindow - cdef anon_struct17 _clusterDim + cdef anon_struct18 _clusterDim - cdef anon_struct18 _programmaticEvent + cdef anon_struct19 _programmaticEvent cdef cudaLaunchMemSyncDomainMap _memSyncDomainMap - cdef anon_struct19 _preferredClusterDim + cdef anon_struct20 _preferredClusterDim - cdef anon_struct20 _launchCompletionEvent + cdef anon_struct21 _launchCompletionEvent - cdef anon_struct21 _deviceUpdatableKernelNode + cdef anon_struct22 _deviceUpdatableKernelNode cdef class cudaLaunchAttribute_st: @@ -3977,7 +4057,7 @@ cdef class cudaLaunchAttribute_st: cdef cudaLaunchAttributeValue _val -cdef class anon_struct22: +cdef class anon_struct23: """ Attributes ---------- @@ -3993,12 +4073,12 @@ cdef class anon_struct22: """ cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr -cdef class anon_union11: +cdef class anon_union12: """ Attributes ---------- - overBudget : anon_struct22 + overBudget : anon_struct23 @@ -4009,7 +4089,7 @@ cdef class anon_union11: """ cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr - cdef anon_struct22 _overBudget + cdef anon_struct23 _overBudget cdef class cudaAsyncNotificationInfo: @@ -4023,7 +4103,7 @@ cdef class cudaAsyncNotificationInfo: The type of notification being sent - info : anon_union11 + info : anon_union12 Information about the notification. `typename` must be checked in order to interpret this field. @@ -4036,7 +4116,7 @@ cdef class cudaAsyncNotificationInfo: cdef cyruntime.cudaAsyncNotificationInfo* _val_ptr cdef cyruntime.cudaAsyncNotificationInfo* _pvt_ptr - cdef anon_union11 _info + cdef anon_union12 _info cdef class cudaTextureDesc: @@ -4179,7 +4259,7 @@ cdef class cudaEglPlaneDesc_st: cdef cudaChannelFormatDesc _channelDesc -cdef class anon_union12: +cdef class anon_union13: """ Attributes ---------- @@ -4213,7 +4293,7 @@ cdef class cudaEglFrame_st: Attributes ---------- - frame : anon_union12 + frame : anon_union13 @@ -4241,7 +4321,7 @@ cdef class cudaEglFrame_st: cdef cyruntime.cudaEglFrame_st* _val_ptr cdef cyruntime.cudaEglFrame_st* _pvt_ptr - cdef anon_union12 _frame + cdef anon_union13 _frame cdef class CUuuid(CUuuid_st): @@ -4333,6 +4413,11 @@ cdef class cudaDevSmResourceGroupParams(cudaDevSmResourceGroupParams_st): this this group is created. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceGroupLocalityDomainId is set in flags + + Methods ------- getPtr() @@ -4561,7 +4646,7 @@ cdef class cudaAsyncNotificationInfo_t(cudaAsyncNotificationInfo): The type of notification being sent - info : anon_union11 + info : anon_union12 Information about the notification. `typename` must be checked in order to interpret this field. @@ -4598,7 +4683,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct17 + clusterDim : anon_struct18 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -4619,7 +4704,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct18 + programmaticEvent : anon_struct19 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see @@ -4643,7 +4728,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): cudaLaunchMemSyncDomain. - preferredClusterDim : anon_struct19 + preferredClusterDim : anon_struct20 Value of launch attribute cudaLaunchAttributePreferredClusterDimension that represents the desired preferred cluster dimensions for the kernel. Opaque type @@ -4658,7 +4743,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): cudaLaunchAttributeValue::clusterDim. - launchCompletionEvent : anon_struct20 + launchCompletionEvent : anon_struct21 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record @@ -4666,7 +4751,7 @@ cdef class cudaStreamAttrValue(cudaLaunchAttributeValue): cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct21 + deviceUpdatableKernelNode : anon_struct22 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting @@ -4727,7 +4812,7 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct17 + clusterDim : anon_struct18 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -4748,7 +4833,7 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct18 + programmaticEvent : anon_struct19 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see @@ -4772,7 +4857,7 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): cudaLaunchMemSyncDomain. - preferredClusterDim : anon_struct19 + preferredClusterDim : anon_struct20 Value of launch attribute cudaLaunchAttributePreferredClusterDimension that represents the desired preferred cluster dimensions for the kernel. Opaque type @@ -4787,7 +4872,7 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): cudaLaunchAttributeValue::clusterDim. - launchCompletionEvent : anon_struct20 + launchCompletionEvent : anon_struct21 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record @@ -4795,7 +4880,7 @@ cdef class cudaKernelNodeAttrValue(cudaLaunchAttributeValue): cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct21 + deviceUpdatableKernelNode : anon_struct22 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting @@ -4884,7 +4969,7 @@ cdef class cudaEglFrame(cudaEglFrame_st): Attributes ---------- - frame : anon_union12 + frame : anon_union13 diff --git a/cuda_bindings/cuda/bindings/runtime.pyx b/cuda_bindings/cuda/bindings/runtime.pyx index a2292efad7a..4546ed78f45 100644 --- a/cuda_bindings/cuda/bindings/runtime.pyx +++ b/cuda_bindings/cuda/bindings/runtime.pyx @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# This code was automatically generated with version 13.3.0. Do not modify it directly. -# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=979e766bb067947f8d255ab5e8d2439b946aed85f2d19a209eb4136a1ceda20b +# This code was automatically generated with version 13.4.1. Do not modify it directly. +# CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=144b063e6665a8eda3633307d63f7bd708b343d3f3be6f61e0f39b5890fcc76e from typing import Any, Optional import cython import ctypes @@ -925,6 +925,12 @@ class cudaError_t(_FastEnum): ) + cudaErrorInsufficientLoaderVersion = ( + cyruntime.cudaError.cudaErrorInsufficientLoaderVersion, + 'This indicates that loader version is insufficient for Fatbin\n' + ) + + cudaErrorInvalidSource = ( cyruntime.cudaError.cudaErrorInvalidSource, 'This indicates that the device kernel source is invalid.\n' @@ -1421,6 +1427,15 @@ class cudaError_t(_FastEnum): ) + cudaErrorFabricNotReady = ( + cyruntime.cudaError.cudaErrorFabricNotReady, + 'This error indicates GPU fabric is not ready within the bounded wait while\n' + 'the fabric manager probe is still in progress. Applications may retry after\n' + 'a delay; for the initialization wait budget, see environment variables such\n' + 'as CUDA_FABRIC_INIT_TIMEOUT_MS.\n' + ) + + cudaErrorUnknown = ( cyruntime.cudaError.cudaErrorUnknown, 'This indicates that an unknown internal error has occurred.\n' @@ -1456,6 +1471,21 @@ class cudaSharedMemoryMode(_FastEnum): 'up to :py:obj:`~.cudaDevAttrMaxSharedMemoryPerBlockOptin`\n' ) + + cudaSharedMemoryModeAllowOversizedSharedMemory = ( + cyruntime.cudaSharedMemoryMode.cudaSharedMemoryModeAllowOversizedSharedMemory, + 'Specifies that oversized shared memory configurations may be used (with the\n' + 'limitation of only 8kB L1 cache)\n' + ) + + + cudaSharedMemoryModePreferOversizedSharedMemory = ( + cyruntime.cudaSharedMemoryMode.cudaSharedMemoryModePreferOversizedSharedMemory, + 'Specifies that oversized shared memory configurations may be used (with the\n' + 'limitation of only 8kB L1 cache), and prefer an oversized shared memory\n' + 'configuration\n' + ) + class cudaGraphDependencyType(_FastEnum): """ Type annotations that can be applied to graph edges as part of @@ -1922,6 +1952,8 @@ class cudaDataType(_FastEnum): CUDA_R_4F_E2M1 = cyruntime.cudaDataType_t.CUDA_R_4F_E2M1 + CUDA_R_8F_UE5M3 = cyruntime.cudaDataType_t.CUDA_R_8F_UE5M3 + class cudaEmulationStrategy(_FastEnum): """ Enum for specifying how to leverage floating-point emulation @@ -3292,6 +3324,8 @@ class cudaClusterSchedulingPolicy(_FastEnum): 'allow the hardware to load-balance the blocks in a cluster to the SMs\n' ) + cudaClusterSchedulingPolicyRubinDsmemLocality = cyruntime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyRubinDsmemLocality + class cudaStreamUpdateCaptureDependenciesFlags(_FastEnum): """ Flags for :py:obj:`~.cudaStreamUpdateCaptureDependencies` @@ -3737,6 +3771,13 @@ class cudaFuncAttribute(_FastEnum): 'Required cluster scheduling policy preference\n' ) + + cudaFuncAttributeSharedMemoryMode = ( + cyruntime.cudaFuncAttribute.cudaFuncAttributeSharedMemoryMode, + "Setting that controls a kernel's use of non-portable or oversized shared\n" + 'memory configurations\n' + ) + cudaFuncAttributeMax = cyruntime.cudaFuncAttribute.cudaFuncAttributeMax class cudaFuncCache(_FastEnum): @@ -3884,6 +3925,12 @@ class cudaLimit(_FastEnum): 'A size in bytes for L2 persisting lines cache size\n' ) + + cudaLimitPerBlockMemorySize = ( + cyruntime.cudaLimit.cudaLimitPerBlockMemorySize, + 'Per-block memory size\n' + ) + class cudaMemoryAdvise(_FastEnum): """ CUDA Memory Advise values @@ -4860,11 +4907,30 @@ class cudaDeviceAttr(_FastEnum): ) + cudaDevAttrLocalityDomainCount = ( + cyruntime.cudaDeviceAttr.cudaDevAttrLocalityDomainCount, + 'Number of locality domains\n' + ) + + + cudaDevAttrOversizedSharedMemoryPerBlock = ( + cyruntime.cudaDeviceAttr.cudaDevAttrOversizedSharedMemoryPerBlock, + 'The maximum oversized shared memory per block. This value may vary by chip.\n' + 'See :py:obj:`~.cudaFuncSetAttribute`\n' + ) + + cudaDevAttrCigStreamsSupported = ( cyruntime.cudaDeviceAttr.cudaDevAttrCigStreamsSupported, 'Device supports CIG streams\n' ) + + cudaDevAttrLocalityDomainMultiprocessorCount = ( + cyruntime.cudaDeviceAttr.cudaDevAttrLocalityDomainMultiprocessorCount, + 'Number of multiprocessors on each locality domain\n' + ) + cudaDevAttrMax = cyruntime.cudaDeviceAttr.cudaDevAttrMax class cudaMemPoolAttr(_FastEnum): @@ -4986,6 +5052,14 @@ class cudaMemPoolAttr(_FastEnum): 'enabled\n' ) + + cudaMemPoolAttrLocalityDomainId = ( + cyruntime.cudaMemPoolAttr.cudaMemPoolAttrLocalityDomainId, + '(value type = int) The locality domain id for the mempool, if the mempool\n' + 'is localized to a locality domain. A value of -1 indicates that the mempool\n' + 'is not localized to a locality domain.\n' + ) + class cudaMemLocationType(_FastEnum): """ Specifies the type of location @@ -5032,6 +5106,12 @@ class cudaMemLocationType(_FastEnum): 'cudaInvalidDeviceId\n' ) + + cudaMemLocationTypeDeviceLocalityDomain = ( + cyruntime.cudaMemLocationType.cudaMemLocationTypeDeviceLocalityDomain, + 'Location is a portion of device memory, specified by the locality domain ID\n' + ) + class cudaMemAccessFlags(_FastEnum): """ Specifies the memory protection flags for mapping. @@ -5439,8 +5519,22 @@ class cudaDevSmResourceGroup_flags(_FastEnum): cudaDevSmResourceGroupBackfill = ( cyruntime.cudaDevSmResourceGroup_flags.cudaDevSmResourceGroupBackfill, - 'Lets smCount be a non-multiple of minCoscheduledCount, filling the\n' - 'difference with other SMs.\n' + 'Treats constraints as a hint, ignoring them if necessary to reach the\n' + 'requested smCount. Lets smCount be a non-multiple of coscheduledSmCount,\n' + 'filling the difference between SM count and already assigned co-scheduled\n' + 'groupings with other SMs. When used with\n' + 'cudaDevSmResourceGroupLocalityDomainId, backfill fills up to the requested\n' + 'smCount using the target locality domain first, then SMs not attributed to\n' + 'any locality domain, then SMs from other locality domains. If no SMs can be\n' + 'found in the requested locality domain,\n' + 'cudaErrorInvalidResourceConfiguration is returned.\n' + ) + + + cudaDevSmResourceGroupLocalityDomainId = ( + cyruntime.cudaDevSmResourceGroup_flags.cudaDevSmResourceGroupLocalityDomainId, + 'The SMs must be located on a specific locality domain, specified by\n' + 'localityDomainId\n' ) class cudaDevSmResourceSplitByCount_flags(_FastEnum): @@ -9422,6 +9516,10 @@ cdef class cudaHostNodeParamsV2: The synchronization mode to use for the host task + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -9437,6 +9535,9 @@ cdef class cudaHostNodeParamsV2: self._fn = cudaHostFn_t(_ptr=&self._pvt_ptr[0].fn) + + self._ctx = cudaExecutionContext_t(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): pass def getPtr(self): @@ -9462,6 +9563,12 @@ cdef class cudaHostNodeParamsV2: except ValueError: str_list += ['syncMode : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) else: return '' @@ -9500,6 +9607,23 @@ cdef class cudaHostNodeParamsV2: self._pvt_ptr[0].syncMode = syncMode + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cyruntime.cudaExecutionContext_t cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (cudaExecutionContext_t,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(cudaExecutionContext_t(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + cdef class anon_struct1: """ Attributes @@ -10247,6 +10371,10 @@ cdef class cudaPointerAttributes: pointer if an invalid pointer has been passed to CUDA. + localityDomainOrdinal : int + + + Methods ------- getPtr() @@ -10254,13 +10382,15 @@ cdef class cudaPointerAttributes: """ def __cinit__(self, void_ptr _ptr = 0): if _ptr == 0: - self._pvt_ptr = &self._pvt_val + self._val_ptr = calloc(1, sizeof(cyruntime.cudaPointerAttributes)) + self._pvt_ptr = self._val_ptr else: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass def __dealloc__(self): - pass + if self._val_ptr is not NULL: + free(self._val_ptr) def getPtr(self): return self._pvt_ptr def __repr__(self): @@ -10290,6 +10420,12 @@ cdef class cudaPointerAttributes: except ValueError: str_list += ['hostPointer : '] + + try: + str_list += ['localityDomainOrdinal : ' + str(self.localityDomainOrdinal)] + except ValueError: + str_list += ['localityDomainOrdinal : '] + return '\n'.join(str_list) else: return '' @@ -10328,6 +10464,14 @@ cdef class cudaPointerAttributes: self._pvt_ptr[0].hostPointer = self._cyhostPointer.cptr + @property + def localityDomainOrdinal(self): + return self._pvt_ptr[0].localityDomainOrdinal + @localityDomainOrdinal.setter + def localityDomainOrdinal(self, int localityDomainOrdinal): + self._pvt_ptr[0].localityDomainOrdinal = localityDomainOrdinal + + cdef class cudaFuncAttributes: """ CUDA function attributes @@ -10382,7 +10526,11 @@ cdef class cudaFuncAttributes: maxDynamicSharedSizeBytes : int The maximum size in bytes of dynamic shared memory per block for this function. Any launch must have a dynamic shared memory size - smaller than this value. + smaller than this value. This attribute is ignored if the + sharedMemoryMode function or launch attribute is set. This + attribute cannot be used to access oversized shared memory. + Oversized shared memory can only be accessed by setting the shared + memory mode. See cudaFuncSetAttribute preferredShmemCarveout : int @@ -10391,7 +10539,7 @@ cdef class cudaFuncAttributes: preference, in percent of the maximum shared memory. Refer to cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only a hint, and the driver can choose a different ratio if required to execute - the function. See cudaFuncSetAttribute + the function. See cudaFuncSetAttribute clusterDimMustBeSet : int @@ -10404,7 +10552,7 @@ cdef class cudaFuncAttributes: either all be 0 or all be positive. The validity of the cluster dimensions is otherwise checked at launch time. If the value is set during compile time, it cannot be set at runtime. Setting it at - runtime should return cudaErrorNotPermitted. See + runtime should return cudaErrorNotPermitted. See cudaFuncSetAttribute @@ -10417,7 +10565,8 @@ cdef class cudaFuncAttributes: clusterSchedulingPolicyPreference : int - The block scheduling policy of a function. See cudaFuncSetAttribute + The block scheduling policy of a function. See + cudaFuncSetAttribute nonPortableClusterSizeAllowed : int @@ -10432,7 +10581,7 @@ cdef class cudaFuncAttributes: than the target compute capability. The portable cluster size for sm_90 is 8 blocks per cluster. This value may increase for future compute capabilities. The specific hardware unit may support - higher cluster sizes that’s not guaranteed to be portable. See + higher cluster sizes that’s not guaranteed to be portable. See cudaFuncSetAttribute @@ -10442,6 +10591,11 @@ cdef class cudaFuncAttributes: the value. + sharedMemoryMode : cudaSharedMemoryMode + This controls a kernel's use of non-portable or oversized shared + memory configurations. See cudaFuncSetAttribute + + Methods ------- getPtr() @@ -10563,6 +10717,12 @@ cdef class cudaFuncAttributes: except ValueError: str_list += ['deviceNodeUpdateStatus : '] + + try: + str_list += ['sharedMemoryMode : ' + str(self.sharedMemoryMode)] + except ValueError: + str_list += ['sharedMemoryMode : '] + return '\n'.join(str_list) else: return '' @@ -10703,6 +10863,76 @@ cdef class cudaFuncAttributes: self._pvt_ptr[0].deviceNodeUpdateStatus = deviceNodeUpdateStatus + @property + def sharedMemoryMode(self): + return cudaSharedMemoryMode(self._pvt_ptr[0].sharedMemoryMode) + @sharedMemoryMode.setter + def sharedMemoryMode(self, sharedMemoryMode not None : cudaSharedMemoryMode): + self._pvt_ptr[0].sharedMemoryMode = int(sharedMemoryMode) + + +cdef class anon_struct6: + """ + Attributes + ---------- + + deviceId : bytes + + + + localityDomainId : bytes + + + + Methods + ------- + getPtr() + Get memory address of class instance + """ + def __cinit__(self, void_ptr _ptr): + self._pvt_ptr = _ptr + + def __init__(self, void_ptr _ptr): + pass + def __dealloc__(self): + pass + def getPtr(self): + return &self._pvt_ptr[0].localized + def __repr__(self): + if self._pvt_ptr is not NULL: + str_list = [] + + try: + str_list += ['deviceId : ' + str(self.deviceId)] + except ValueError: + str_list += ['deviceId : '] + + + try: + str_list += ['localityDomainId : ' + str(self.localityDomainId)] + except ValueError: + str_list += ['localityDomainId : '] + + return '\n'.join(str_list) + else: + return '' + + @property + def deviceId(self): + return self._pvt_ptr[0].localized.deviceId + @deviceId.setter + def deviceId(self, unsigned char deviceId): + self._pvt_ptr[0].localized.deviceId = deviceId + + + @property + def localityDomainId(self): + return self._pvt_ptr[0].localized.localityDomainId + @localityDomainId.setter + def localityDomainId(self, unsigned char localityDomainId): + self._pvt_ptr[0].localized.localityDomainId = localityDomainId + + cdef class cudaMemLocation: """ Specifies a memory location. To specify a gpu, set type = @@ -10723,6 +10953,11 @@ cdef class cudaMemLocation: cudaMemLocationType::cudaMemLocationTypeHostNuma. + localized : anon_struct6 + Identifier for + cudaMemLocationType::cudaMemLocationTypeDeviceLocalityDomain. + + Methods ------- getPtr() @@ -10736,6 +10971,9 @@ cdef class cudaMemLocation: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass + + self._localized = anon_struct6(_ptr=self._pvt_ptr) + def __dealloc__(self): if self._val_ptr is not NULL: free(self._val_ptr) @@ -10756,6 +10994,12 @@ cdef class cudaMemLocation: except ValueError: str_list += ['id : '] + + try: + str_list += ['localized :\n' + '\n'.join([' ' + line for line in str(self.localized).splitlines()])] + except ValueError: + str_list += ['localized : '] + return '\n'.join(str_list) else: return '' @@ -10776,6 +11020,14 @@ cdef class cudaMemLocation: self._pvt_ptr[0].id = id + @property + def localized(self): + return self._localized + @localized.setter + def localized(self, localized not None : anon_struct6): + string.memcpy(&self._pvt_ptr[0].localized, localized.getPtr(), sizeof(self._pvt_ptr[0].localized)) + + cdef class cudaMemAccessDesc: """ Memory access descriptor @@ -11583,7 +11835,7 @@ cdef class cudaOffset3D: self._pvt_ptr[0].z = z -cdef class anon_struct6: +cdef class anon_struct7: """ Attributes ---------- @@ -11685,7 +11937,7 @@ cdef class anon_struct6: string.memcpy(&self._pvt_ptr[0].op.ptr.locHint, locHint.getPtr(), sizeof(self._pvt_ptr[0].op.ptr.locHint)) -cdef class anon_struct7: +cdef class anon_struct8: """ Attributes ---------- @@ -11762,16 +12014,16 @@ cdef class anon_struct7: string.memcpy(&self._pvt_ptr[0].op.array.offset, offset.getPtr(), sizeof(self._pvt_ptr[0].op.array.offset)) -cdef class anon_union2: +cdef class anon_union3: """ Attributes ---------- - ptr : anon_struct6 + ptr : anon_struct7 - array : anon_struct7 + array : anon_struct8 @@ -11786,10 +12038,10 @@ cdef class anon_union2: def __init__(self, void_ptr _ptr): pass - self._ptr = anon_struct6(_ptr=self._pvt_ptr) + self._ptr = anon_struct7(_ptr=self._pvt_ptr) - self._array = anon_struct7(_ptr=self._pvt_ptr) + self._array = anon_struct8(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -11818,7 +12070,7 @@ cdef class anon_union2: def ptr(self): return self._ptr @ptr.setter - def ptr(self, ptr not None : anon_struct6): + def ptr(self, ptr not None : anon_struct7): string.memcpy(&self._pvt_ptr[0].op.ptr, ptr.getPtr(), sizeof(self._pvt_ptr[0].op.ptr)) @@ -11826,7 +12078,7 @@ cdef class anon_union2: def array(self): return self._array @array.setter - def array(self, array not None : anon_struct7): + def array(self, array not None : anon_struct8): string.memcpy(&self._pvt_ptr[0].op.array, array.getPtr(), sizeof(self._pvt_ptr[0].op.array)) @@ -11841,7 +12093,7 @@ cdef class cudaMemcpy3DOperand: - op : anon_union2 + op : anon_union3 @@ -11859,7 +12111,7 @@ cdef class cudaMemcpy3DOperand: def __init__(self, void_ptr _ptr = 0): pass - self._op = anon_union2(_ptr=self._pvt_ptr) + self._op = anon_union3(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -11897,7 +12149,7 @@ cdef class cudaMemcpy3DOperand: def op(self): return self._op @op.setter - def op(self, op not None : anon_union2): + def op(self, op not None : anon_union3): string.memcpy(&self._pvt_ptr[0].op, op.getPtr(), sizeof(self._pvt_ptr[0].op)) @@ -13878,7 +14130,7 @@ cdef class cudaMemFabricHandle_st: else: return '' -cdef class anon_struct8: +cdef class anon_struct9: """ Attributes ---------- @@ -13942,7 +14194,7 @@ cdef class anon_struct8: self._pvt_ptr[0].handle.win32.name = self._cyname.cptr -cdef class anon_union3: +cdef class anon_union4: """ Attributes ---------- @@ -13951,7 +14203,7 @@ cdef class anon_union3: - win32 : anon_struct8 + win32 : anon_struct9 @@ -13970,7 +14222,7 @@ cdef class anon_union3: def __init__(self, void_ptr _ptr): pass - self._win32 = anon_struct8(_ptr=self._pvt_ptr) + self._win32 = anon_struct9(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -14013,7 +14265,7 @@ cdef class anon_union3: def win32(self): return self._win32 @win32.setter - def win32(self, win32 not None : anon_struct8): + def win32(self, win32 not None : anon_struct9): string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) @@ -14037,7 +14289,7 @@ cdef class cudaExternalMemoryHandleDesc: Type of the handle - handle : anon_union3 + handle : anon_union4 @@ -14063,7 +14315,7 @@ cdef class cudaExternalMemoryHandleDesc: def __init__(self, void_ptr _ptr = 0): pass - self._handle = anon_union3(_ptr=self._pvt_ptr) + self._handle = anon_union4(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -14113,7 +14365,7 @@ cdef class cudaExternalMemoryHandleDesc: def handle(self): return self._handle @handle.setter - def handle(self, handle not None : anon_union3): + def handle(self, handle not None : anon_union4): string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) @@ -14345,7 +14597,7 @@ cdef class cudaExternalMemoryMipmappedArrayDesc: self._pvt_ptr[0].numLevels = numLevels -cdef class anon_struct9: +cdef class anon_struct10: """ Attributes ---------- @@ -14409,7 +14661,7 @@ cdef class anon_struct9: self._pvt_ptr[0].handle.win32.name = self._cyname.cptr -cdef class anon_union4: +cdef class anon_union5: """ Attributes ---------- @@ -14418,7 +14670,7 @@ cdef class anon_union4: - win32 : anon_struct9 + win32 : anon_struct10 @@ -14437,7 +14689,7 @@ cdef class anon_union4: def __init__(self, void_ptr _ptr): pass - self._win32 = anon_struct9(_ptr=self._pvt_ptr) + self._win32 = anon_struct10(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -14480,7 +14732,7 @@ cdef class anon_union4: def win32(self): return self._win32 @win32.setter - def win32(self, win32 not None : anon_struct9): + def win32(self, win32 not None : anon_struct10): string.memcpy(&self._pvt_ptr[0].handle.win32, win32.getPtr(), sizeof(self._pvt_ptr[0].handle.win32)) @@ -14504,7 +14756,7 @@ cdef class cudaExternalSemaphoreHandleDesc: Type of the handle - handle : anon_union4 + handle : anon_union5 @@ -14526,7 +14778,7 @@ cdef class cudaExternalSemaphoreHandleDesc: def __init__(self, void_ptr _ptr = 0): pass - self._handle = anon_union4(_ptr=self._pvt_ptr) + self._handle = anon_union5(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -14570,7 +14822,7 @@ cdef class cudaExternalSemaphoreHandleDesc: def handle(self): return self._handle @handle.setter - def handle(self, handle not None : anon_union4): + def handle(self, handle not None : anon_union5): string.memcpy(&self._pvt_ptr[0].handle, handle.getPtr(), sizeof(self._pvt_ptr[0].handle)) @@ -14582,7 +14834,7 @@ cdef class cudaExternalSemaphoreHandleDesc: self._pvt_ptr[0].flags = flags -cdef class anon_struct10: +cdef class anon_struct11: """ Attributes ---------- @@ -14626,7 +14878,7 @@ cdef class anon_struct10: self._pvt_ptr[0].params.fence.value = value -cdef class anon_union5: +cdef class anon_union6: """ Attributes ---------- @@ -14671,7 +14923,7 @@ cdef class anon_union5: self._pvt_ptr[0].params.nvSciSync.fence = self._cyfence.cptr -cdef class anon_struct11: +cdef class anon_struct12: """ Attributes ---------- @@ -14715,20 +14967,20 @@ cdef class anon_struct11: self._pvt_ptr[0].params.keyedMutex.key = key -cdef class anon_struct12: +cdef class anon_struct13: """ Attributes ---------- - fence : anon_struct10 + fence : anon_struct11 - nvSciSync : anon_union5 + nvSciSync : anon_union6 - keyedMutex : anon_struct11 + keyedMutex : anon_struct12 @@ -14743,13 +14995,13 @@ cdef class anon_struct12: def __init__(self, void_ptr _ptr): pass - self._fence = anon_struct10(_ptr=self._pvt_ptr) + self._fence = anon_struct11(_ptr=self._pvt_ptr) - self._nvSciSync = anon_union5(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union6(_ptr=self._pvt_ptr) - self._keyedMutex = anon_struct11(_ptr=self._pvt_ptr) + self._keyedMutex = anon_struct12(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -14784,7 +15036,7 @@ cdef class anon_struct12: def fence(self): return self._fence @fence.setter - def fence(self, fence not None : anon_struct10): + def fence(self, fence not None : anon_struct11): string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) @@ -14792,7 +15044,7 @@ cdef class anon_struct12: def nvSciSync(self): return self._nvSciSync @nvSciSync.setter - def nvSciSync(self, nvSciSync not None : anon_union5): + def nvSciSync(self, nvSciSync not None : anon_union6): string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) @@ -14800,7 +15052,7 @@ cdef class anon_struct12: def keyedMutex(self): return self._keyedMutex @keyedMutex.setter - def keyedMutex(self, keyedMutex not None : anon_struct11): + def keyedMutex(self, keyedMutex not None : anon_struct12): string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) @@ -14811,7 +15063,7 @@ cdef class cudaExternalSemaphoreSignalParams: Attributes ---------- - params : anon_struct12 + params : anon_struct13 @@ -14839,7 +15091,7 @@ cdef class cudaExternalSemaphoreSignalParams: def __init__(self, void_ptr _ptr = 0): pass - self._params = anon_struct12(_ptr=self._pvt_ptr) + self._params = anon_struct13(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -14868,7 +15120,7 @@ cdef class cudaExternalSemaphoreSignalParams: def params(self): return self._params @params.setter - def params(self, params not None : anon_struct12): + def params(self, params not None : anon_struct13): string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) @@ -14880,7 +15132,7 @@ cdef class cudaExternalSemaphoreSignalParams: self._pvt_ptr[0].flags = flags -cdef class anon_struct13: +cdef class anon_struct14: """ Attributes ---------- @@ -14924,7 +15176,7 @@ cdef class anon_struct13: self._pvt_ptr[0].params.fence.value = value -cdef class anon_union6: +cdef class anon_union7: """ Attributes ---------- @@ -14969,7 +15221,7 @@ cdef class anon_union6: self._pvt_ptr[0].params.nvSciSync.fence = self._cyfence.cptr -cdef class anon_struct14: +cdef class anon_struct15: """ Attributes ---------- @@ -15031,20 +15283,20 @@ cdef class anon_struct14: self._pvt_ptr[0].params.keyedMutex.timeoutMs = timeoutMs -cdef class anon_struct15: +cdef class anon_struct16: """ Attributes ---------- - fence : anon_struct13 + fence : anon_struct14 - nvSciSync : anon_union6 + nvSciSync : anon_union7 - keyedMutex : anon_struct14 + keyedMutex : anon_struct15 @@ -15059,13 +15311,13 @@ cdef class anon_struct15: def __init__(self, void_ptr _ptr): pass - self._fence = anon_struct13(_ptr=self._pvt_ptr) + self._fence = anon_struct14(_ptr=self._pvt_ptr) - self._nvSciSync = anon_union6(_ptr=self._pvt_ptr) + self._nvSciSync = anon_union7(_ptr=self._pvt_ptr) - self._keyedMutex = anon_struct14(_ptr=self._pvt_ptr) + self._keyedMutex = anon_struct15(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -15100,7 +15352,7 @@ cdef class anon_struct15: def fence(self): return self._fence @fence.setter - def fence(self, fence not None : anon_struct13): + def fence(self, fence not None : anon_struct14): string.memcpy(&self._pvt_ptr[0].params.fence, fence.getPtr(), sizeof(self._pvt_ptr[0].params.fence)) @@ -15108,7 +15360,7 @@ cdef class anon_struct15: def nvSciSync(self): return self._nvSciSync @nvSciSync.setter - def nvSciSync(self, nvSciSync not None : anon_union6): + def nvSciSync(self, nvSciSync not None : anon_union7): string.memcpy(&self._pvt_ptr[0].params.nvSciSync, nvSciSync.getPtr(), sizeof(self._pvt_ptr[0].params.nvSciSync)) @@ -15116,7 +15368,7 @@ cdef class anon_struct15: def keyedMutex(self): return self._keyedMutex @keyedMutex.setter - def keyedMutex(self, keyedMutex not None : anon_struct14): + def keyedMutex(self, keyedMutex not None : anon_struct15): string.memcpy(&self._pvt_ptr[0].params.keyedMutex, keyedMutex.getPtr(), sizeof(self._pvt_ptr[0].params.keyedMutex)) @@ -15127,7 +15379,7 @@ cdef class cudaExternalSemaphoreWaitParams: Attributes ---------- - params : anon_struct15 + params : anon_struct16 @@ -15155,7 +15407,7 @@ cdef class cudaExternalSemaphoreWaitParams: def __init__(self, void_ptr _ptr = 0): pass - self._params = anon_struct15(_ptr=self._pvt_ptr) + self._params = anon_struct16(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -15184,7 +15436,7 @@ cdef class cudaExternalSemaphoreWaitParams: def params(self): return self._params @params.setter - def params(self, params not None : anon_struct15): + def params(self, params not None : anon_struct16): string.memcpy(&self._pvt_ptr[0].params, params.getPtr(), sizeof(self._pvt_ptr[0].params)) @@ -15225,6 +15477,11 @@ cdef class cudaDevSmResource: cudaDevSmResourceGroup_flags. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceConstraintTypeLocalityDomainId is set in flags + + Methods ------- getPtr() @@ -15268,6 +15525,12 @@ cdef class cudaDevSmResource: except ValueError: str_list += ['flags : '] + + try: + str_list += ['localityDomainId : ' + str(self.localityDomainId)] + except ValueError: + str_list += ['localityDomainId : '] + return '\n'.join(str_list) else: return '' @@ -15304,6 +15567,14 @@ cdef class cudaDevSmResource: self._pvt_ptr[0].flags = flags + @property + def localityDomainId(self): + return self._pvt_ptr[0].localityDomainId + @localityDomainId.setter + def localityDomainId(self, unsigned int localityDomainId): + self._pvt_ptr[0].localityDomainId = localityDomainId + + cdef class cudaDevWorkqueueConfigResource: """ Data for workqueue configuration related resources @@ -15442,6 +15713,11 @@ cdef class cudaDevSmResourceGroupParams_st: this this group is created. + localityDomainId : unsigned int + Locality domain that the SM must be located on. Only valid if + cudaDevSmResourceGroupLocalityDomainId is set in flags + + Methods ------- getPtr() @@ -15485,6 +15761,12 @@ cdef class cudaDevSmResourceGroupParams_st: except ValueError: str_list += ['flags : '] + + try: + str_list += ['localityDomainId : ' + str(self.localityDomainId)] + except ValueError: + str_list += ['localityDomainId : '] + return '\n'.join(str_list) else: return '' @@ -15521,6 +15803,14 @@ cdef class cudaDevSmResourceGroupParams_st: self._pvt_ptr[0].flags = flags + @property + def localityDomainId(self): + return self._pvt_ptr[0].localityDomainId + @localityDomainId.setter + def localityDomainId(self, unsigned int localityDomainId): + self._pvt_ptr[0].localityDomainId = localityDomainId + + cdef class cudaDevResource_st: """ A tagged union describing different resources identified by the @@ -16400,6 +16690,10 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: paramsArray. + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -16412,6 +16706,9 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass + + self._ctx = cudaExecutionContext_t(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): pass @@ -16447,6 +16744,12 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: except ValueError: str_list += ['numExtSems : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) else: return '' @@ -16516,6 +16819,23 @@ cdef class cudaExternalSemaphoreSignalNodeParamsV2: self._pvt_ptr[0].numExtSems = numExtSems + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cyruntime.cudaExecutionContext_t cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (cudaExecutionContext_t,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(cudaExecutionContext_t(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + cdef class cudaExternalSemaphoreWaitNodeParams: """ External semaphore wait node parameters @@ -16672,6 +16992,10 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: paramsArray. + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -16684,6 +17008,9 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: self._pvt_ptr = _ptr def __init__(self, void_ptr _ptr = 0): pass + + self._ctx = cudaExecutionContext_t(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): pass @@ -16719,6 +17046,12 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: except ValueError: str_list += ['numExtSems : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) else: return '' @@ -16788,6 +17121,23 @@ cdef class cudaExternalSemaphoreWaitNodeParamsV2: self._pvt_ptr[0].numExtSems = numExtSems + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cyruntime.cudaExecutionContext_t cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (cudaExecutionContext_t,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(cudaExecutionContext_t(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + cdef class cudaConditionalNodeParams: """ CUDA conditional node parameters @@ -16818,7 +17168,7 @@ cdef class cudaConditionalNodeParams: empty nodes, child graphs, memsets, memcopies, and conditionals. This applies recursively to child graphs and conditional bodies. - All kernels, including kernels in nested conditionals or child - graphs at any level, must belong to the same CUDA context. + graphs at any level, must belong to the same device context. These graphs may be populated using graph node creation APIs or cudaStreamBeginCaptureToGraph. cudaGraphCondTypeIf: phGraph_out[0] is executed when the condition is non-zero. If `size` == 2, @@ -17042,6 +17392,10 @@ cdef class cudaEventRecordNodeParams: The event to record when the node executes + ctx : cudaExecutionContext_t + CUDA Execution Context + + Methods ------- getPtr() @@ -17057,6 +17411,9 @@ cdef class cudaEventRecordNodeParams: self._event = cudaEvent_t(_ptr=&self._pvt_ptr[0].event) + + self._ctx = cudaExecutionContext_t(_ptr=&self._pvt_ptr[0].ctx) + def __dealloc__(self): pass def getPtr(self): @@ -17070,6 +17427,12 @@ cdef class cudaEventRecordNodeParams: except ValueError: str_list += ['event : '] + + try: + str_list += ['ctx : ' + str(self.ctx)] + except ValueError: + str_list += ['ctx : '] + return '\n'.join(str_list) else: return '' @@ -17091,6 +17454,23 @@ cdef class cudaEventRecordNodeParams: self._event._pvt_ptr[0] = cyevent + @property + def ctx(self): + return self._ctx + @ctx.setter + def ctx(self, ctx): + cdef cyruntime.cudaExecutionContext_t cyctx + if ctx is None: + cyctx = 0 + elif isinstance(ctx, (cudaExecutionContext_t,)): + pctx = int(ctx) + cyctx = pctx + else: + pctx = int(cudaExecutionContext_t(ctx)) + cyctx = pctx + self._ctx._pvt_ptr[0] = cyctx + + cdef class cudaEventWaitNodeParams: """ Event wait node parameters @@ -17792,7 +18172,7 @@ cdef class cudaGraphExecUpdateResultInfo_st: self._errorFromNode._pvt_ptr[0] = cyerrorFromNode -cdef class anon_struct16: +cdef class anon_struct17: """ Attributes ---------- @@ -17873,7 +18253,7 @@ cdef class anon_struct16: self._pvt_ptr[0].updateData.param.size = size -cdef class anon_union10: +cdef class anon_union11: """ Attributes ---------- @@ -17882,7 +18262,7 @@ cdef class anon_union10: - param : anon_struct16 + param : anon_struct17 @@ -17904,7 +18284,7 @@ cdef class anon_union10: self._gridDim = dim3(_ptr=&self._pvt_ptr[0].updateData.gridDim) - self._param = anon_struct16(_ptr=self._pvt_ptr) + self._param = anon_struct17(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -17947,7 +18327,7 @@ cdef class anon_union10: def param(self): return self._param @param.setter - def param(self, param not None : anon_struct16): + def param(self, param not None : anon_struct17): string.memcpy(&self._pvt_ptr[0].updateData.param, param.getPtr(), sizeof(self._pvt_ptr[0].updateData.param)) @@ -17976,7 +18356,7 @@ cdef class cudaGraphKernelNodeUpdate: interpreted - updateData : anon_union10 + updateData : anon_union11 Update data to apply. Which field is used depends on field's value @@ -17997,7 +18377,7 @@ cdef class cudaGraphKernelNodeUpdate: self._node = cudaGraphDeviceNode_t(_ptr=&self._pvt_ptr[0].node) - self._updateData = anon_union10(_ptr=self._pvt_ptr) + self._updateData = anon_union11(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -18058,7 +18438,7 @@ cdef class cudaGraphKernelNodeUpdate: def updateData(self): return self._updateData @updateData.setter - def updateData(self, updateData not None : anon_union10): + def updateData(self, updateData not None : anon_union11): string.memcpy(&self._pvt_ptr[0].updateData, updateData.getPtr(), sizeof(self._pvt_ptr[0].updateData)) @@ -18134,7 +18514,7 @@ cdef class cudaLaunchMemSyncDomainMap_st: self._pvt_ptr[0].remote = remote -cdef class anon_struct17: +cdef class anon_struct18: """ Attributes ---------- @@ -18214,7 +18594,7 @@ cdef class anon_struct17: self._pvt_ptr[0].clusterDim.z = z -cdef class anon_struct18: +cdef class anon_struct19: """ Attributes ---------- @@ -18306,7 +18686,7 @@ cdef class anon_struct18: self._pvt_ptr[0].programmaticEvent.triggerAtBlockStart = triggerAtBlockStart -cdef class anon_struct19: +cdef class anon_struct20: """ Attributes ---------- @@ -18386,7 +18766,7 @@ cdef class anon_struct19: self._pvt_ptr[0].preferredClusterDim.z = z -cdef class anon_struct20: +cdef class anon_struct21: """ Attributes ---------- @@ -18460,7 +18840,7 @@ cdef class anon_struct20: self._pvt_ptr[0].launchCompletionEvent.flags = flags -cdef class anon_struct21: +cdef class anon_struct22: """ Attributes ---------- @@ -18559,7 +18939,7 @@ cdef class cudaLaunchAttributeValue: cudaSynchronizationPolicy for work queued up in this stream. - clusterDim : anon_struct17 + clusterDim : anon_struct18 Value of launch attribute cudaLaunchAttributeClusterDimension that represents the desired cluster dimensions for the kernel. Opaque type with the following fields: - `x` - The X dimension of the @@ -18580,7 +18960,7 @@ cdef class cudaLaunchAttributeValue: cudaLaunchAttributeProgrammaticStreamSerialization. - programmaticEvent : anon_struct18 + programmaticEvent : anon_struct19 Value of launch attribute cudaLaunchAttributeProgrammaticEvent with the following fields: - `cudaEvent_t` event - Event to fire when all blocks trigger it. - `int` flags; - Event record flags, see @@ -18604,7 +18984,7 @@ cdef class cudaLaunchAttributeValue: cudaLaunchMemSyncDomain. - preferredClusterDim : anon_struct19 + preferredClusterDim : anon_struct20 Value of launch attribute cudaLaunchAttributePreferredClusterDimension that represents the desired preferred cluster dimensions for the kernel. Opaque type @@ -18619,7 +18999,7 @@ cdef class cudaLaunchAttributeValue: cudaLaunchAttributeValue::clusterDim. - launchCompletionEvent : anon_struct20 + launchCompletionEvent : anon_struct21 Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent with the following fields: - `cudaEvent_t` event - Event to fire when the last block launches. - `int` flags - Event record @@ -18627,7 +19007,7 @@ cdef class cudaLaunchAttributeValue: cudaEventRecordExternal. - deviceUpdatableKernelNode : anon_struct21 + deviceUpdatableKernelNode : anon_struct22 Value of launch attribute cudaLaunchAttributeDeviceUpdatableKernelNode with the following fields: - `int` deviceUpdatable - Whether or not the resulting @@ -18672,22 +19052,22 @@ cdef class cudaLaunchAttributeValue: self._accessPolicyWindow = cudaAccessPolicyWindow(_ptr=&self._pvt_ptr[0].accessPolicyWindow) - self._clusterDim = anon_struct17(_ptr=self._pvt_ptr) + self._clusterDim = anon_struct18(_ptr=self._pvt_ptr) - self._programmaticEvent = anon_struct18(_ptr=self._pvt_ptr) + self._programmaticEvent = anon_struct19(_ptr=self._pvt_ptr) self._memSyncDomainMap = cudaLaunchMemSyncDomainMap(_ptr=&self._pvt_ptr[0].memSyncDomainMap) - self._preferredClusterDim = anon_struct19(_ptr=self._pvt_ptr) + self._preferredClusterDim = anon_struct20(_ptr=self._pvt_ptr) - self._launchCompletionEvent = anon_struct20(_ptr=self._pvt_ptr) + self._launchCompletionEvent = anon_struct21(_ptr=self._pvt_ptr) - self._deviceUpdatableKernelNode = anon_struct21(_ptr=self._pvt_ptr) + self._deviceUpdatableKernelNode = anon_struct22(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -18855,7 +19235,7 @@ cdef class cudaLaunchAttributeValue: def clusterDim(self): return self._clusterDim @clusterDim.setter - def clusterDim(self, clusterDim not None : anon_struct17): + def clusterDim(self, clusterDim not None : anon_struct18): string.memcpy(&self._pvt_ptr[0].clusterDim, clusterDim.getPtr(), sizeof(self._pvt_ptr[0].clusterDim)) @@ -18879,7 +19259,7 @@ cdef class cudaLaunchAttributeValue: def programmaticEvent(self): return self._programmaticEvent @programmaticEvent.setter - def programmaticEvent(self, programmaticEvent not None : anon_struct18): + def programmaticEvent(self, programmaticEvent not None : anon_struct19): string.memcpy(&self._pvt_ptr[0].programmaticEvent, programmaticEvent.getPtr(), sizeof(self._pvt_ptr[0].programmaticEvent)) @@ -18911,7 +19291,7 @@ cdef class cudaLaunchAttributeValue: def preferredClusterDim(self): return self._preferredClusterDim @preferredClusterDim.setter - def preferredClusterDim(self, preferredClusterDim not None : anon_struct19): + def preferredClusterDim(self, preferredClusterDim not None : anon_struct20): string.memcpy(&self._pvt_ptr[0].preferredClusterDim, preferredClusterDim.getPtr(), sizeof(self._pvt_ptr[0].preferredClusterDim)) @@ -18919,7 +19299,7 @@ cdef class cudaLaunchAttributeValue: def launchCompletionEvent(self): return self._launchCompletionEvent @launchCompletionEvent.setter - def launchCompletionEvent(self, launchCompletionEvent not None : anon_struct20): + def launchCompletionEvent(self, launchCompletionEvent not None : anon_struct21): string.memcpy(&self._pvt_ptr[0].launchCompletionEvent, launchCompletionEvent.getPtr(), sizeof(self._pvt_ptr[0].launchCompletionEvent)) @@ -18927,7 +19307,7 @@ cdef class cudaLaunchAttributeValue: def deviceUpdatableKernelNode(self): return self._deviceUpdatableKernelNode @deviceUpdatableKernelNode.setter - def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct21): + def deviceUpdatableKernelNode(self, deviceUpdatableKernelNode not None : anon_struct22): string.memcpy(&self._pvt_ptr[0].deviceUpdatableKernelNode, deviceUpdatableKernelNode.getPtr(), sizeof(self._pvt_ptr[0].deviceUpdatableKernelNode)) @@ -19032,7 +19412,7 @@ cdef class cudaLaunchAttribute_st: string.memcpy(&self._pvt_ptr[0].val, val.getPtr(), sizeof(self._pvt_ptr[0].val)) -cdef class anon_struct22: +cdef class anon_struct23: """ Attributes ---------- @@ -19076,12 +19456,12 @@ cdef class anon_struct22: self._pvt_ptr[0].info.overBudget.bytesOverBudget = bytesOverBudget -cdef class anon_union11: +cdef class anon_union12: """ Attributes ---------- - overBudget : anon_struct22 + overBudget : anon_struct23 @@ -19096,7 +19476,7 @@ cdef class anon_union11: def __init__(self, void_ptr _ptr): pass - self._overBudget = anon_struct22(_ptr=self._pvt_ptr) + self._overBudget = anon_struct23(_ptr=self._pvt_ptr) def __dealloc__(self): pass @@ -19119,7 +19499,7 @@ cdef class anon_union11: def overBudget(self): return self._overBudget @overBudget.setter - def overBudget(self, overBudget not None : anon_struct22): + def overBudget(self, overBudget not None : anon_struct23): string.memcpy(&self._pvt_ptr[0].info.overBudget, overBudget.getPtr(), sizeof(self._pvt_ptr[0].info.overBudget)) @@ -19134,7 +19514,7 @@ cdef class cudaAsyncNotificationInfo: The type of notification being sent - info : anon_union11 + info : anon_union12 Information about the notification. `typename` must be checked in order to interpret this field. @@ -19153,7 +19533,7 @@ cdef class cudaAsyncNotificationInfo: def __init__(self, void_ptr _ptr = 0): pass - self._info = anon_union11(_ptr=self._pvt_ptr) + self._info = anon_union12(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -19191,7 +19571,7 @@ cdef class cudaAsyncNotificationInfo: def info(self): return self._info @info.setter - def info(self, info not None : anon_union11): + def info(self, info not None : anon_union12): string.memcpy(&self._pvt_ptr[0].info, info.getPtr(), sizeof(self._pvt_ptr[0].info)) @@ -19681,7 +20061,7 @@ cdef class cudaEglPlaneDesc_st: string.memcpy(&self._pvt_ptr[0].channelDesc, channelDesc.getPtr(), sizeof(self._pvt_ptr[0].channelDesc)) -cdef class anon_union12: +cdef class anon_union13: """ Attributes ---------- @@ -19769,7 +20149,7 @@ cdef class cudaEglFrame_st: Attributes ---------- - frame : anon_union12 + frame : anon_union13 @@ -19803,7 +20183,7 @@ cdef class cudaEglFrame_st: def __init__(self, void_ptr _ptr = 0): pass - self._frame = anon_union12(_ptr=self._pvt_ptr) + self._frame = anon_union13(_ptr=self._pvt_ptr) def __dealloc__(self): if self._val_ptr is not NULL: @@ -19851,7 +20231,7 @@ cdef class cudaEglFrame_st: def frame(self): return self._frame @frame.setter - def frame(self, frame not None : anon_union12): + def frame(self, frame not None : anon_union13): string.memcpy(&self._pvt_ptr[0].frame, frame.getPtr(), sizeof(self._pvt_ptr[0].frame)) @@ -24878,7 +25258,7 @@ def cudaLaunchHostFunc(stream, fn, userData): Parameters ---------- - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` Stream to enqueue function call in fn : :py:obj:`~.cudaHostFn_t` The function to call once preceding stream operations are complete @@ -24974,7 +25354,7 @@ def cudaLaunchHostFunc_v2(stream, fn, userData, unsigned int syncMode): Parameters ---------- - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` Stream to enqueue function call in fn : :py:obj:`~.cudaHostFn_t` The function to call once preceding stream operations are complete @@ -27516,7 +27896,7 @@ def cudaMemcpyBatchAsync(dsts : Optional[tuple[Any] | list[Any]], srcs : Optiona attrsIdxs[numAttrs-1] through count - 1. numAttrs : size_t Size of `attrs` and `attrsIdxs` arrays. - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` The stream to enqueue the operations in. Must not be legacy NULL stream. @@ -27661,7 +28041,7 @@ def cudaMemcpy3DBatchAsync(size_t numOps, opList : Optional[tuple[cudaMemcpy3DBa Array of size `numOps` containing the actual memcpy operations. flags : unsigned long long Flags for future use, must be zero now. - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` The stream to enqueue the operations in. Must not be default NULL stream. @@ -27707,7 +28087,7 @@ def cudaMemcpyWithAttributesAsync(dst, src, size_t size, attr : Optional[cudaMem Performs asynchronous memory copy operation where `dst` and `src` are the destination and source pointers respectively. `size` specifies the number of bytes to copy. `attr` specifies the attributes for the copy - and `hStream` specifies the stream to enqueue the operation in. + and `stream` specifies the stream to enqueue the operation in. For more information regarding the attributes, please refer to :py:obj:`~.cudaMemcpyAttributes` and it's usage desciption @@ -27723,7 +28103,7 @@ def cudaMemcpyWithAttributesAsync(dst, src, size_t size, attr : Optional[cudaMem Number of bytes to copy attr : :py:obj:`~.cudaMemcpyAttributes` Attributes for the copy - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` Stream to enqueue the operation in Returns @@ -27761,7 +28141,7 @@ def cudaMemcpy3DWithAttributesAsync(op : Optional[cudaMemcpy3DBatchOp], unsigned Performs 3D asynchronous memory copy with the specified attributes. Performs the copy operation specified in `op`. `flags` specifies the - flags for the copy and `hStream` specifies the stream to enqueue the + flags for the copy and `stream` specifies the stream to enqueue the operation in. For more information regarding the operation, please refer to @@ -27774,7 +28154,7 @@ def cudaMemcpy3DWithAttributesAsync(op : Optional[cudaMemcpy3DBatchOp], unsigned Operation to perform flags : unsigned long long Flags for the copy, must be zero now. - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` Stream to enqueue the operation in Returns @@ -28387,7 +28767,9 @@ def cudaMemPrefetchAsync(devPtr, size_t count, location not None : cudaMemLocati :py:obj:`~.cudaMemLocation.type` is etiher :py:obj:`~.cudaMemLocationTypeHost` OR :py:obj:`~.cudaMemLocationTypeHostNumaCurrent`, - :py:obj:`~.cudaMemLocation.id` will be ignored. + :py:obj:`~.cudaMemLocation.id` will be ignored. Prefetching to + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain` locations is not + supported. The start address and end address of the memory range will be rounded down and rounded up respectively to be aligned to CPU page size before @@ -28449,7 +28831,7 @@ def cudaMemPrefetchAsync(devPtr, size_t count, location not None : cudaMemLocati Returns ------- cudaError_t - :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorNotSupported` See Also -------- @@ -28527,7 +28909,7 @@ def cudaMemPrefetchBatchAsync(dptrs : Optional[tuple[Any] | list[Any]], sizes : Size of `prefetchLocs` and `prefetchLocIdxs` arrays. flags : unsigned long long Flags reserved for future use. Must be zero. - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` The stream to enqueue the operations in. Must not be legacy NULL stream. @@ -28617,7 +28999,7 @@ def cudaMemDiscardBatchAsync(dptrs : Optional[tuple[Any] | list[Any]], sizes : t Size of `dptrs` and `sizes` arrays. flags : unsigned long long Flags reserved for future use. Must be zero. - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` The stream to enqueue the operations in. Must not be legacy NULL stream. @@ -28712,7 +29094,7 @@ def cudaMemDiscardAndPrefetchBatchAsync(dptrs : Optional[tuple[Any] | list[Any]] Size of `prefetchLocs` and `prefetchLocIdxs` arrays. flags : unsigned long long Flags reserved for future use. Must be zero. - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` The stream to enqueue the operations in. Must not be legacy NULL stream. @@ -28761,6 +29143,80 @@ def cudaMemDiscardAndPrefetchBatchAsync(dptrs : Optional[tuple[Any] | list[Any]] free(cyprefetchLocs) return (_cudaError_t(err),) +@cython.embedsignature(True) +def cudaMemGetLocationInfo(devPtr, size_t size, size_t summaryGranularity, size_t samplingGranularity, location_out : Optional[cudaMemLocation]): + """ Gets location information for a memory address range. + + Retrieves memory location information for the specified address range + starting at `ptr` with size `size`. The API determines the most common + location by sampling memory at intervals defined by + `samplingGranularity` within the whole interval. + + The location information is returned in the `location_out` array, with + one entry per summary region. The total number of locations returned + will be ceil(size/summaryGranularity). The user is expected to allocate + the `location_out` array with sufficient memory. + + For example, with an address range of 1GB, a `summaryGranularity` of + 128MB, and a `samplingGranularity` of 2MB, the function will: + + - Divide the 1GB range into 8 summary regions of 128MB each + + - Within each 128MB region, sample every 2MB to determine the most + common location. If there is a tie a random winner is chosen. + + - Populate the `location_out` array with 8 entries, one for each 128MB + region `summaryGranularity` should be less than or equal to `size` + and greater than 0. `samplingGranularity` should be less than or + equal to `summaryGranularity`. If the `samplingGranularity` is set to + 0 it is set to a system dependent default value. In all other cases, + the call returns :py:obj:`~.cudaErrorInvalidValue`. + + When the memory is not resident on any processor, the call returns + :py:obj:`~.cudaSuccess` and the returned location type for that + interval is :py:obj:`~.cudaMemLocationTypeNone`. + + The memory range must refer to one of the following: + + - Managed memory allocated via :py:obj:`~.cudaMallocManaged`, via + :py:obj:`~.cudaMallocFromPoolAsync` from a managed memory pool or + declared via managed variables. + + - System-allocated pageable memory that is not registered via + :py:obj:`~.cudaHostRegister`. If the memory range does not refer to + one of the above, the call returns :py:obj:`~.cudaErrorInvalidValue`. + + All devices on the system must have non-zero value for the device + attribute :py:obj:`~.cudaDevAttrConcurrentManagedAccess`. If not, this + call returns :py:obj:`~.cudaErrorNotSupported`. + + Parameters + ---------- + ptr : Any + Starting address of the memory range to query + size : size_t + Size in bytes of the memory range to query + summaryGranularity : size_t + Granularity in bytes at which to summarize location information + samplingGranularity : size_t + Granularity in bytes at which to sample memory within each summary + region + location_out : :py:obj:`~.cudaMemLocation` + Array to store location information, one entry per summary region + + Returns + ------- + cudaError_t + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` + """ + cdef _HelperInputVoidPtrStruct cydevPtrHelper + cdef void* cydevPtr = _helper_input_void_ptr(devPtr, &cydevPtrHelper) + cdef cyruntime.cudaMemLocation* cylocation_out_ptr = location_out._pvt_ptr if location_out is not None else NULL + with nogil: + err = cyruntime.cudaMemGetLocationInfo(cydevPtr, size, summaryGranularity, samplingGranularity, cylocation_out_ptr) + _helper_input_void_ptr_free(&cydevPtrHelper) + return (_cudaError_t(err),) + @cython.embedsignature(True) def cudaMemAdvise(devPtr, size_t count, advice not None : cudaMemoryAdvise, location not None : cudaMemLocation): """ Advise about the usage of a given memory range. @@ -28942,7 +29398,7 @@ def cudaMemAdvise(devPtr, size_t count, advice not None : cudaMemoryAdvise, loca Returns ------- cudaError_t - :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice` + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorInvalidDevice`, :py:obj:`~.cudaErrorNotSupported` See Also -------- @@ -29795,6 +30251,11 @@ def cudaMemPoolGetAttribute(memPool, attr not None : cudaMemPoolAttr): the importing process or pools imported via fabric handles across nodes this will be cudaMemlocataionTypeInvisible. + - :py:obj:`~.cudaMemPoolAttrLocalityDomainId`: (value type = int) The + locality domain id for the mempool, if the mempool is localized to a + locality domain. A value of -1 indicates that the mempool is not + localized to a locality domain. + - :py:obj:`~.cudaMemPoolAttrMaxPoolSize`: (value type = cuuint64_t) Maximum size of the pool in bytes, this value may be higher than what was initially passed to cuMemPoolCreate due to alignment @@ -29857,7 +30318,7 @@ def cudaMemPoolSetAccess(memPool, descList : Optional[tuple[cudaMemAccessDesc] | Returns ------- cudaError_t - :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` See Also -------- @@ -29955,9 +30416,19 @@ def cudaMemPoolCreate(poolProps : Optional[cudaMemPoolProps]): ID of the host memory node. Specifying :py:obj:`~.cudaMemLocationTypeHostNumaCurrent` as the :py:obj:`~.cudaMemPoolProps.cudaMemLocation.type` will result in - :py:obj:`~.cudaErrorInvalidValue`. By default, the pool's memory will - be accessible from the device it is allocated on. In the case of pools - created with :py:obj:`~.cudaMemLocationTypeHostNuma` or + :py:obj:`~.cudaErrorInvalidValue`. To create a memory pool targeting a + specific device locality domain, applications must set + :py:obj:`~.cudaMemPoolProps.cudaMemLocation.type` to + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain`, + :py:obj:`~.cudaMemPoolProps.cudaMemLocation.localized`.deviceId must + specify the device ID, and + :py:obj:`~.cudaMemPoolProps.cudaMemLocation.localized`.localityDomainId + must specify the locality domain ID. The locality domain ID must be a + valid locality domain ID for the specified device. See also + :py:obj:`~.cudaDeviceGetAttribute` with the attribute + :py:obj:`~.cudaDevAttrLocalityDomainCount`. By default, the pool's + memory will be accessible from the device it is allocated on. In the + case of pools created with :py:obj:`~.cudaMemLocationTypeHostNuma` or :py:obj:`~.cudaMemLocationTypeHost`, their default accessibility will be from the host CPU. Applications can control the maximum size of the pool by specifying a non-zero value for @@ -30077,14 +30548,17 @@ def cudaMemGetDefaultMemPool(location : Optional[cudaMemLocation], typename not The memory location can be of one of :py:obj:`~.cudaMemLocationTypeDevice`, - :py:obj:`~.cudaMemLocationTypeHost`, or - :py:obj:`~.cudaMemLocationTypeHostNuma`. The allocation type can be one - of :py:obj:`~.cudaMemAllocationTypePinned` or + :py:obj:`~.cudaMemLocationTypeHost`, + :py:obj:`~.cudaMemLocationTypeHostNuma`, or + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain`. The allocation + type can be one of :py:obj:`~.cudaMemAllocationTypePinned` or :py:obj:`~.cudaMemAllocationTypeManaged`. When the allocation type is :py:obj:`~.cudaMemAllocationTypeManaged`, the location type can also be :py:obj:`~.cudaMemLocationTypeNone` to indicate no preferred location - for the managed memory pool. In all other cases, the call return - :py:obj:`~.cudaErrorInvalidValue` + for the managed memory pool. :py:obj:`~.cudaMemAllocationTypeManaged` + can not be used with + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain`. In all other + cases, the call return :py:obj:`~.cudaErrorInvalidValue` Parameters ---------- @@ -30119,14 +30593,17 @@ def cudaMemGetMemPool(location : Optional[cudaMemLocation], typename not None : The memory location can be of one of :py:obj:`~.cudaMemLocationTypeDevice`, - :py:obj:`~.cudaMemLocationTypeHost`, or - :py:obj:`~.cudaMemLocationTypeHostNuma`. The allocation type can be one - of :py:obj:`~.cudaMemAllocationTypePinned` or + :py:obj:`~.cudaMemLocationTypeHost`, + :py:obj:`~.cudaMemLocationTypeHostNuma`, or + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain`. The allocation + type can be one of :py:obj:`~.cudaMemAllocationTypePinned` or :py:obj:`~.cudaMemAllocationTypeManaged`. When the allocation type is :py:obj:`~.cudaMemAllocationTypeManaged`, the location type can also be :py:obj:`~.cudaMemLocationTypeNone` to indicate no preferred location - for the managed memory pool. In all other cases, the call return - :py:obj:`~.cudaErrorInvalidValue` + for the managed memory pool. :py:obj:`~.cudaMemAllocationTypeManaged` + can not be used with + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain`. In all other + cases, the call return :py:obj:`~.cudaErrorInvalidValue` Returns the last pool provided to :py:obj:`~.cudaMemSetMemPool` or :py:obj:`~.cudaDeviceSetMemPool` for this location and allocation type @@ -30147,7 +30624,7 @@ def cudaMemGetMemPool(location : Optional[cudaMemLocation], typename not None : Returns ------- cudaError_t - :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` memPool : :py:obj:`~.cudaMemPool_t` None @@ -30170,14 +30647,17 @@ def cudaMemSetMemPool(location : Optional[cudaMemLocation], typename not None : The memory location can be of one of :py:obj:`~.cudaMemLocationTypeDevice`, - :py:obj:`~.cudaMemLocationTypeHost` or - :py:obj:`~.cudaMemLocationTypeHostNuma`. The allocation type can be one - of :py:obj:`~.cudaMemAllocationTypePinned` or + :py:obj:`~.cudaMemLocationTypeHost` + :py:obj:`~.cudaMemLocationTypeHostNuma`, or + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain`. The allocation + type can be one of :py:obj:`~.cudaMemAllocationTypePinned` or :py:obj:`~.cudaMemAllocationTypeManaged`. When the allocation type is :py:obj:`~.cudaMemAllocationTypeManaged`, the location type can also be :py:obj:`~.cudaMemLocationTypeNone` to indicate no preferred location - for the managed memory pool. In all other cases, the call return - :py:obj:`~.cudaErrorInvalidValue` + for the managed memory pool. :py:obj:`~.cudaMemAllocationTypeManaged` + can not be used with + :py:obj:`~.cudaMemLocationTypeDeviceLocalityDomain`. In all other + cases, the call return :py:obj:`~.cudaErrorInvalidValue` When a memory pool is set as the current memory pool, the location parameter should be the same as the location of the pool. If the @@ -30204,7 +30684,7 @@ def cudaMemSetMemPool(location : Optional[cudaMemLocation], typename not None : Returns ------- cudaError_t - :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue` + :py:obj:`~.cudaSuccess`, :py:obj:`~.cudaErrorInvalidValue`, :py:obj:`~.cudaErrorNotSupported` See Also -------- @@ -30232,7 +30712,7 @@ def cudaMemSetMemPool(location : Optional[cudaMemLocation], typename not None : def cudaMallocFromPoolAsync(size_t size, memPool, stream): """ Allocates memory from a specified pool with stream ordered semantics. - Inserts an allocation operation into `hStream`. A pointer to the + Inserts an allocation operation into `stream`. A pointer to the allocated memory is returned immediately in *dptr. The allocation must not be accessed until the the allocation operation completes. The allocation comes from the specified memory pool. @@ -30505,6 +30985,10 @@ def cudaPointerGetAttributes(ptr): memory referred to by `ptr` cannot be accessed directly by the host then this is NULL. + - :py:obj:`~.localityDomainOrdinal` is the locality domain ordinal for + device allocations localized to a locality domain, or -1 when the + allocation is not localized to a locality domain. + Parameters ---------- ptr : Any @@ -31612,6 +32096,11 @@ def cudaRuntimeGetVersion(): of this API is solely to return a compile-time constant stating the CUDA Toolkit version in the above format. + As of CUDA 13.0, on Windows, the `runtimeVersion` may not be the same + as the CUDA Toolkit version the app was built with. Windows will use + the CUDA Runtime packaged with the display driver, and that version + will be reported. + This function automatically returns :py:obj:`~.cudaErrorInvalidValue` if the `runtimeVersion` argument is NULL. @@ -36155,17 +36644,17 @@ def cudaGraphExecUpdate(hGraphExec, hGraph): def cudaGraphUpload(graphExec, stream): """ Uploads an executable graph in a stream. - Uploads `hGraphExec` to the device in `hStream` without executing it. - Uploads of the same `hGraphExec` will be serialized. Each upload is - ordered behind both any previous work in `hStream` and any previous - launches of `hGraphExec`. Uses memory cached by `stream` to back the + Uploads `graphExec` to the device in `stream` without executing it. + Uploads of the same `graphExec` will be serialized. Each upload is + ordered behind both any previous work in `stream` and any previous + launches of `graphExec`. Uses memory cached by `stream` to back the allocations owned by `graphExec`. Parameters ---------- - hGraphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` + graphExec : :py:obj:`~.CUgraphExec` or :py:obj:`~.cudaGraphExec_t` Executable graph to upload - hStream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` + stream : :py:obj:`~.CUstream` or :py:obj:`~.cudaStream_t` Stream in which to upload the graph Returns @@ -37973,10 +38462,17 @@ def cudaDevSmResourceSplit(unsigned int nbGroups, input_ : Optional[cudaDevResou - `flags:` - - `cudaDevSmResourceGroupBackfill:` lets `smCount` be a non-multiple of - `coscheduledSmCount`, filling the difference between SM count and - already assigned co-scheduled groupings with other SMs. This lets any - resulting group behave similar to the `remainder` group for example. + - `cudaDevSmResourceGroupBackfill:` Treats constraints as a hint, + ignoring them if necessary to reach the requested `smCount`. Lets + `smCount` be a non-multiple of `coscheduledSmCount`, filling the + difference between SM count and already assigned co-scheduled groupings + with other SMs. This lets any resulting group behave similar to the + `remainder` group for example. When used with + `cudaDevSmResourceGroupLocalityDomainId`, backfill fills up to the + requested `smCount` using the target locality domain first, then SMs + not attributed to any locality domain, then SMs from other locality + domains. If no SMs can be found in the requested locality domain, + :py:obj:`~.cudaErrorInvalidResourceConfiguration` is returned. Example params and their effect: diff --git a/cuda_bindings/docs/nv-versions.json b/cuda_bindings/docs/nv-versions.json index f5795e15f66..08202cc65b6 100644 --- a/cuda_bindings/docs/nv-versions.json +++ b/cuda_bindings/docs/nv-versions.json @@ -3,6 +3,10 @@ "version": "latest", "url": "https://nvidia.github.io/cuda-python/cuda-bindings/latest/" }, + { + "version": "13.4.1", + "url": "https://nvidia.github.io/cuda-python/cuda-bindings/13.4.1/" + }, { "version": "13.3.1", "url": "https://nvidia.github.io/cuda-python/cuda-bindings/13.3.1/" diff --git a/cuda_bindings/docs/source/module/cufile.rst b/cuda_bindings/docs/source/module/cufile.rst index bd51ff26a40..3328df31e13 100644 --- a/cuda_bindings/docs/source/module/cufile.rst +++ b/cuda_bindings/docs/source/module/cufile.rst @@ -25,7 +25,9 @@ Functions buf_register buf_deregister read + readv write + writev driver_open use_count driver_get_properties @@ -60,6 +62,7 @@ Types :toctree: generated/ IOEvents + IOVec Descr IOParams OpError diff --git a/cuda_bindings/docs/source/module/driver.rst b/cuda_bindings/docs/source/module/driver.rst index 9f4552f091a..4a7b5d68f7e 100644 --- a/cuda_bindings/docs/source/module/driver.rst +++ b/cuda_bindings/docs/source/module/driver.rst @@ -1,9 +1,9 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. This code was automatically generated with version 13.3.0. Do not modify it directly. +.. This code was automatically generated with version 13.4.1. Do not modify it directly. -.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8d52054221a5bd6e5240446c2ef3a12e4c6787538a1115bb24ee3d6b827369cd +.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=8fb799afff57074126fc28394dc578e31f2d13bffcbecea17a8e14da87e419c7 ------ driver ------ @@ -88,6 +88,8 @@ Data types used by CUDA driver .. autoclass:: cuda.bindings.driver.CUDA_EVENT_RECORD_NODE_PARAMS_st .. autoclass:: cuda.bindings.driver.CUDA_EVENT_WAIT_NODE_PARAMS_st .. autoclass:: cuda.bindings.driver.CUgraphNodeParams_st +.. autoclass:: cuda.bindings.driver.CUcheckpointCustomStoragePerDeviceData_st +.. autoclass:: cuda.bindings.driver.CUcheckpointCustomStorageInfo_st .. autoclass:: cuda.bindings.driver.CUcheckpointLockArgs_st .. autoclass:: cuda.bindings.driver.CUcheckpointCheckpointArgs_st .. autoclass:: cuda.bindings.driver.CUcheckpointGpuPair_st @@ -1923,6 +1925,18 @@ Data types used by CUDA driver Device supports atomic reduction operations in stream batch memory operations + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_COUNT + + + Number of locality domains + + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_MAX_OVERSIZED_SHARED_MEMORY_PER_BLOCK + + + Maximum oversized shared memory per block + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_D3D12_CIG_STREAMS_SUPPORTED @@ -1959,6 +1973,24 @@ Data types used by CUDA driver Device supports unicast logical endpoint access on the owner device + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_LOCALITY_DOMAIN_MULTIPROCESSOR_COUNT + + + Number of multiprocessors on each locality domain + + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_LOGICAL_ENDPOINT_SUPPORTED_HANDLE_TYPES + + + Handle types supported with logical endpoint IPC + + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED + + + Device supports GPUDirect RDMA with localized memory using the default RDMA mapping link + + .. autoattribute:: cuda.bindings.driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_MAX .. autoclass:: cuda.bindings.driver.CUpointer_attribute @@ -2088,6 +2120,12 @@ Data types used by CUDA driver Returns in ``*data`` a boolean that indicates whether the pointer points to memory that is capable to be used for hardware accelerated decompression. + + .. autoattribute:: cuda.bindings.driver.CUpointer_attribute.CU_POINTER_ATTRIBUTE_LOCALITY_DOMAIN_ORDINAL + + + Returns in ``*data`` an integer representing the locality domain ordinal of the memory allocation, or -1 if the allocation is not localized to a locality domain. + .. autoclass:: cuda.bindings.driver.CUfunction_attribute .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK @@ -2141,19 +2179,43 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES - The maximum size in bytes of dynamically-allocated shared memory that can be used by this function. If the user-specified dynamic shared memory size is larger than this value, the launch will fail. The default value of this attribute is :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK` - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`, except when :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` is greater than :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`, then the default value of this attribute is 0. The value can be increased to :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + The maximum size in bytes of dynamically-allocated shared memory that can be used by this function. If the user-specified dynamic shared memory size is larger than this value, the launch will fail. + + + + The default value of this attribute is :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK` - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`, except when :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES` is greater than :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK`, then the default value of this attribute is 0. The value can be increased to :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` - :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES`. + + + + This attribute is ignored if :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE` or :py:obj:`~.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE` is set. + + + + This attribute cannot be used to access oversized shared memory. Oversized shared memory can only be accessed by setting :py:obj:`~.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE` or :py:obj:`~.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE`. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT - On devices where the L1 cache and shared memory use the same hardware resources, this sets the shared memory carveout preference, in percent of the total shared memory. Refer to :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`. This is only a hint, and the driver can choose a different ratio if required to execute the function. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + On devices where the L1 cache and shared memory use the same hardware resources, this sets the shared memory carveout preference, in percent of the total shared memory. Refer to :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR`. This is only a hint, and the driver can choose a different ratio if required to execute the function. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET - If this attribute is set, the kernel must launch with a valid cluster size specified. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + If this attribute is set, the kernel must launch with a valid cluster size specified. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH @@ -2163,7 +2225,11 @@ Data types used by CUDA driver - If the value is set during compile time, it cannot be set at runtime. Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + If the value is set during compile time, it cannot be set at runtime. Setting it at runtime will return CUDA_ERROR_NOT_PERMITTED. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT @@ -2173,7 +2239,11 @@ Data types used by CUDA driver - If the value is set during compile time, it cannot be set at runtime. Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + If the value is set during compile time, it cannot be set at runtime. Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH @@ -2183,7 +2253,11 @@ Data types used by CUDA driver - If the value is set during compile time, it cannot be set at runtime. Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + If the value is set during compile time, it cannot be set at runtime. Setting it at runtime should return CUDA_ERROR_NOT_PERMITTED. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED @@ -2205,19 +2279,41 @@ Data types used by CUDA driver - The specific hardware unit may support higher cluster sizes that’s not guaranteed to be portable. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + The specific hardware unit may support higher cluster sizes that’s not guaranteed to be portable. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE - The block scheduling policy of a function. The value type is :py:obj:`~.CUclusterSchedulingPolicy` / cudaClusterSchedulingPolicy. See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` + The block scheduling policy of a function. The value type is :py:obj:`~.CUclusterSchedulingPolicy` / cudaClusterSchedulingPolicy. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED - Whether the function can be updated on device. 1 means device node update is supported, 0 is unsupported. See :py:obj:`~.cuFuncGetAttribute`. + Whether the function can be updated on device. 1 means device node update is supported, 0 is unsupported. + + + + See :py:obj:`~.cuFuncGetAttribute`. + + + .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_SHARED_MEMORY_MODE + + + The shared memory mode of a function. The value type is :py:obj:`~.CUsharedMemoryMode` / cudaSharedMemoryMode. + + + + See :py:obj:`~.cuFuncSetAttribute`, :py:obj:`~.cuKernelSetAttribute` .. autoattribute:: cuda.bindings.driver.CUfunction_attribute.CU_FUNC_ATTRIBUTE_MAX @@ -2909,6 +3005,12 @@ Data types used by CUDA driver Compute device class 10.3. + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_107 + + + Compute device class 10.7. + + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_120 @@ -2942,6 +3044,9 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_103A + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_107A + + Compute device class 12.0. with accelerated features. @@ -2972,6 +3077,9 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_103F + .. autoattribute:: cuda.bindings.driver.CUjit_target.CU_TARGET_COMPUTE_107F + + Compute device class 12.0. with family features. @@ -3194,6 +3302,12 @@ Data types used by CUDA driver When set to zero, CUDA will fail to launch a kernel on a CIG context, instead of using the fallback path, if the kernel uses more shared memory than available + .. autoattribute:: cuda.bindings.driver.CUlimit.CU_LIMIT_PER_BLOCK_MEMORY_SIZE + + + Per-block memory size + + .. autoattribute:: cuda.bindings.driver.CUlimit.CU_LIMIT_MAX .. autoclass:: cuda.bindings.driver.CUresourcetype @@ -3389,7 +3503,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUgraphDependencyType.CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC - This dependency type allows the downstream node to use ``cudaGridDependencySynchronize()``. It may only be used between kernel nodes, and must be used with either the :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port. + This dependency type allows the downstream node to use cudaGridDependencySynchronize(). It may only be used between kernel nodes, and must be used with either the :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC` or :py:obj:`~.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER` outgoing port. .. autoclass:: cuda.bindings.driver.CUgraphInstantiateResult @@ -3460,6 +3574,9 @@ Data types used by CUDA driver allow the hardware to load-balance the blocks in a cluster to the SMs + + .. autoattribute:: cuda.bindings.driver.CUclusterSchedulingPolicy.CU_CLUSTER_SCHEDULING_POLICY_RUBIN_DSMEM_LOCALITY + .. autoclass:: cuda.bindings.driver.CUlaunchMemSyncDomain .. autoattribute:: cuda.bindings.driver.CUlaunchMemSyncDomain.CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT @@ -3511,6 +3628,18 @@ Data types used by CUDA driver Specifies that the dynamic shared size bytes requested may be a non-portable size but still within the bounds of :py:obj:`~.CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN` + + .. autoattribute:: cuda.bindings.driver.CUsharedMemoryMode.CU_SHARED_MEMORY_MODE_ALLOW_OVERSIZED_SHARED_MEMORY + + + Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache) + + + .. autoattribute:: cuda.bindings.driver.CUsharedMemoryMode.CU_SHARED_MEMORY_MODE_PREFER_OVERSIZED_SHARED_MEMORY + + + Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache), and prefer an oversized shared memory configuration + .. autoclass:: cuda.bindings.driver.CUlaunchAttributeID .. autoattribute:: cuda.bindings.driver.CUlaunchAttributeID.CU_LAUNCH_ATTRIBUTE_IGNORE @@ -3644,7 +3773,7 @@ Data types used by CUDA driver .. autoattribute:: cuda.bindings.driver.CUlaunchAttributeID.CU_LAUNCH_ATTRIBUTE_SHARED_MEMORY_MODE - Valid for graph nodes, launches. This indicates if the kernel is allowed to use a non-portable dynamic shared memory mode. + Valid for graph nodes, launches. This controls a kernel's use of non-portable or oversized shared memory configurations. .. autoclass:: cuda.bindings.driver.CUstreamCaptureStatus @@ -3830,6 +3959,12 @@ Data types used by CUDA driver This indicates that requested CUDA device is unavailable at the current time. Devices are often unavailable due to use of :py:obj:`~.CU_COMPUTEMODE_EXCLUSIVE_PROCESS` or :py:obj:`~.CU_COMPUTEMODE_PROHIBITED`. + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_MULTICAST_RESOURCE_FULL + + + The API call failed because of a hardware resource required to bind memory to a multicast object is unavailable. + + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_NO_DEVICE @@ -4000,6 +4135,12 @@ Data types used by CUDA driver This indicates that an exception occurred on the device that is now contained by the GPU's error containment capability. Common causes are - a. Certain types of invalid accesses of peer GPU memory over nvlink b. Certain classes of hardware errors This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_INSUFFICIENT_LOADER_VERSION + + + This indicates that the Loader version is insufficient for fatbin + + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_INVALID_SOURCE @@ -4372,6 +4513,12 @@ Data types used by CUDA driver This error indicates that a graph recapture failed and had to be terminated. + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_FABRIC_NOT_READY + + + The GPU fabric is not ready within the bounded wait while the fabric manager probe is still in progress (or not converging in time). Applications may retry after a delay; for the initialization wait budget, see environment variables such as CUDA_FABRIC_INIT_TIMEOUT_MS. The CUDA Runtime uses the same value as :py:obj:`~.cudaErrorFabricNotReady`. + + .. autoattribute:: cuda.bindings.driver.CUresult.CUDA_ERROR_UNKNOWN @@ -4965,6 +5112,12 @@ Data types used by CUDA driver Location is not visible but device is accessible, id is always CU_DEVICE_INVALID + .. autoattribute:: cuda.bindings.driver.CUmemLocationType.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN + + + Location is a portion of device memory, specified by the locality domain ID. + + .. autoattribute:: cuda.bindings.driver.CUmemLocationType.CU_MEM_LOCATION_TYPE_MAX .. autoclass:: cuda.bindings.driver.CUmemAllocationType @@ -5197,6 +5350,16 @@ Data types used by CUDA driver (value type = int) Indicates whether the pool has hardware compresssion enabled + + .. autoattribute:: cuda.bindings.driver.CUmemPool_attribute.CU_MEMPOOL_ATTR_LOCALITY_DOMAIN_ID + + + (value type = int) The locality domain ID for the mempool, if the mempool is localized to a locality domain. A value of -1 indicates that the mempool is not localized. + + + + Note: On devices with a single locality domain, mempools created with :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN` and localityDomainId 0 are equivalent to full-device mempools created with :py:obj:`~.CU_MEM_LOCATION_TYPE_DEVICE`. The value of this attribute will be -1 for such mempools. + .. autoclass:: cuda.bindings.driver.CUmemcpyFlags .. autoattribute:: cuda.bindings.driver.CUmemcpyFlags.CU_MEMCPY_FLAG_DEFAULT @@ -5525,6 +5688,18 @@ Data types used by CUDA driver Application entered an uncorrectable error during the checkpoint/restore process + + .. autoattribute:: cuda.bindings.driver.CUprocessState.CU_PROCESS_STATE_CHECKPOINTING + + + Application memory contents are being checkpointed + + + .. autoattribute:: cuda.bindings.driver.CUprocessState.CU_PROCESS_STATE_RESTORING + + + Application memory contents are being restored + .. autoclass:: cuda.bindings.driver.CUeglFrameType .. autoattribute:: cuda.bindings.driver.CUeglFrameType.CU_EGL_FRAME_TYPE_ARRAY @@ -6422,6 +6597,9 @@ Data types used by CUDA driver .. autoclass:: cuda.bindings.driver.CUDA_EVENT_RECORD_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUDA_EVENT_WAIT_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUgraphNodeParams +.. autoclass:: cuda.bindings.driver.CUcheckpointCustomStoragePerDeviceData +.. autoclass:: cuda.bindings.driver.CUcheckpointOperationHandle +.. autoclass:: cuda.bindings.driver.CUcheckpointCustomStorageInfo .. autoclass:: cuda.bindings.driver.CUcheckpointLockArgs .. autoclass:: cuda.bindings.driver.CUcheckpointCheckpointArgs .. autoclass:: cuda.bindings.driver.CUcheckpointGpuPair @@ -6559,6 +6737,10 @@ Data types used by CUDA driver This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression. +.. autoattribute:: cuda.bindings.driver.CU_MEM_CREATE_USAGE_GPU_DIRECT_RDMA_OVER_PCIE + + Setting this flag forces GPUDirect RDMA on a locality-domain-localized allocation to use the PCIe (BAR1) path, allowing the allocation to remain locality-domain localized on platforms where the platform-coherent RDMA path does not support localized allocations. Because on some platforms the PCIe bandwidth is limited, using this flag may result in lower RDMA bandwidth than the default RDMA mapping link. Note that this flag does not itself force PCIe to be used, and that this must be done when creating the RDMA export. :py:obj:`~.CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_LOCALIZED_MEMORY_SUPPORTED` indicates whether this flag is needed to create GPUDirect RDMA capable localized memory allocations. This flag is only valid if gpuDirectRDMACapable is set. + .. autoattribute:: cuda.bindings.driver.CU_MEM_POOL_CREATE_USAGE_HW_DECOMPRESS This flag, if set, indicates that the memory will be used as a buffer for hardware accelerated decompression. @@ -7082,6 +7264,46 @@ Support for multicast on a specific device can be queried using the device attri .. autofunction:: cuda.bindings.driver.cuMulticastUnbind .. autofunction:: cuda.bindings.driver.cuMulticastGetGranularity +Fabric Clique Information +------------------------- + +MANBRIEF low-level CUDA driver application programming interface to retrieve fabric clique information. API (CURRENT_FILE) ENDMANBRIEF + + + +This section describes functions and data structures to retrieve fabric clique information. + +.. autoclass:: cuda.bindings.driver.CUcliqueInfo_st +.. autoclass:: cuda.bindings.driver.CUcliqueType + + .. autoattribute:: cuda.bindings.driver.CUcliqueType.CU_CLIQUE_TYPE_UNICAST_POINTER + + + Unicast pointer clique + + + .. autoattribute:: cuda.bindings.driver.CUcliqueType.CU_CLIQUE_TYPE_MULTICAST_POINTER + + + Multicast pointer clique + + + .. autoattribute:: cuda.bindings.driver.CUcliqueType.CU_CLIQUE_TYPE_UNICAST_LOGICAL_ENDPOINT + + + Unicast logical endpoint clique + + + .. autoattribute:: cuda.bindings.driver.CUcliqueType.CU_CLIQUE_TYPE_MULTICAST_LOGICAL_ENDPOINT + + + Multicast logical endpoint clique + +.. autoclass:: cuda.bindings.driver.CUcliqueInfo +.. autofunction:: cuda.bindings.driver.cuDeviceGetFabricClusterUuid +.. autofunction:: cuda.bindings.driver.cuDeviceGetCliqueCount +.. autofunction:: cuda.bindings.driver.cuDeviceGetCliqueInfo + Logical Endpoint ---------------- @@ -7212,6 +7434,7 @@ This device address may be queried using cuMemHostGetDevicePointer() when a cont .. autofunction:: cuda.bindings.driver.cuMemPrefetchBatchAsync .. autofunction:: cuda.bindings.driver.cuMemDiscardBatchAsync .. autofunction:: cuda.bindings.driver.cuMemDiscardAndPrefetchBatchAsync +.. autofunction:: cuda.bindings.driver.cuMemGetLocationInfo .. autofunction:: cuda.bindings.driver.cuMemRangeGetAttribute .. autofunction:: cuda.bindings.driver.cuMemRangeGetAttributes .. autofunction:: cuda.bindings.driver.cuPointerSetAttribute @@ -7475,7 +7698,9 @@ This section describes the graph management functions of the low-level CUDA driv .. autofunction:: cuda.bindings.driver.cuGraphRetainUserObject .. autofunction:: cuda.bindings.driver.cuGraphReleaseUserObject .. autofunction:: cuda.bindings.driver.cuGraphAddNode +.. autofunction:: cuda.bindings.driver.cuGraphAddNode_v3 .. autofunction:: cuda.bindings.driver.cuGraphNodeSetParams +.. autofunction:: cuda.bindings.driver.cuGraphNodeSetParams_v2 .. autofunction:: cuda.bindings.driver.cuGraphNodeGetParams .. autofunction:: cuda.bindings.driver.cuGraphExecNodeSetParams .. autofunction:: cuda.bindings.driver.cuGraphConditionalHandleCreate @@ -7731,6 +7956,22 @@ SMs There are two possible partition operations - with cuDevSmResourceSplitByCount the partitions created have to follow default SM count granularity requirements, so it will often be rounded up and aligned to a default value. On the other hand, cuDevSmResourceSplit is explicit and allows for creation of non-equal groups. It will not round up automatically - instead it is the developer’s responsibility to query and set the correct values. These requirements can be queried with cuDeviceGetDevResource to determine the alignment granularity (sm.smCoscheduledAlignment). A general guideline on the default values for each compute architecture: +- On all architectures, + + + + + + - Portable code should set smCount to a multiple of the device's alignment granularity (sm.smCoscheduledAlignment). + + + + + + + + + - On Compute Architecture 7.X, 8.X, and all Tegra SoC: @@ -7761,15 +8002,17 @@ There are two possible partition operations - with cuDevSmResourceSplitByCount t - - The smCount must be a multiple of 8, or coscheduledSmCount if provided. + - The smCount must be a multiple of coscheduledSmCount if provided. + + + - The alignment is 8. - - The alignment (and default value of coscheduledSmCount) is 8. While the maximum value for coscheduled SM count is 32 on all Compute Architecture 9.0+, it's recommended to follow cluster size requirements. The portable cluster size and the max cluster size should be used in order to benefit from this co-scheduling. @@ -7781,6 +8024,8 @@ There are two possible partition operations - with cuDevSmResourceSplitByCount t +While the maximum value for coscheduled SM count is 32 on all Compute Architecture 9.0+, it's recommended to follow cluster size requirements. The portable cluster size and the max cluster size should be used in order to benefit from this co-scheduling. + @@ -7845,6 +8090,26 @@ Additionally, there are two known scenarios, where its possible for the workload - On Compute Architecture 9.x: When a module with dynamic parallelism (CDP) is loaded, all future kernels running under green contexts may use and share an additional set of 2 SMs. + + + + + + + + + + + + +Memory Copy Operations + + + + + +Green context restrictions apply to memory copy operations only when the copy is performed using a green context. For cross-device copies, green context restrictions may not be applied. + .. autoclass:: cuda.bindings.driver.CUdevSmResource_st .. autoclass:: cuda.bindings.driver.CUdevWorkqueueConfigResource_st .. autoclass:: cuda.bindings.driver.CUdevWorkqueueResource_st @@ -7872,6 +8137,12 @@ Additionally, there are two known scenarios, where its possible for the workload .. autoattribute:: cuda.bindings.driver.CUdevSmResourceGroup_flags.CU_DEV_SM_RESOURCE_GROUP_BACKFILL + + .. autoattribute:: cuda.bindings.driver.CUdevSmResourceGroup_flags.CU_DEV_SM_RESOURCE_GROUP_LOCALITY_DOMAIN_ID + + + The SMs must be located on a specific locality domain, specified by localityDomainId + .. autoclass:: cuda.bindings.driver.CUdevSmResourceSplitByCount_flags .. autoattribute:: cuda.bindings.driver.CUdevSmResourceSplitByCount_flags.CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING @@ -7986,6 +8257,7 @@ Checkpoint and restore capabilities are currently restricted to Linux. .. autofunction:: cuda.bindings.driver.cuCheckpointProcessLock .. autofunction:: cuda.bindings.driver.cuCheckpointProcessCheckpoint .. autofunction:: cuda.bindings.driver.cuCheckpointProcessRestore +.. autofunction:: cuda.bindings.driver.cuCheckpointOperationComplete .. autofunction:: cuda.bindings.driver.cuCheckpointProcessUnlock Profiler Control diff --git a/cuda_bindings/docs/source/module/nvml.rst b/cuda_bindings/docs/source/module/nvml.rst index c5d47ad1670..45949454e11 100644 --- a/cuda_bindings/docs/source/module/nvml.rst +++ b/cuda_bindings/docs/source/module/nvml.rst @@ -29,14 +29,18 @@ Functions device_get_accounting_mode device_get_accounting_pids device_get_accounting_stats + device_get_accounting_stats_v2 device_get_active_vgpus device_get_adaptive_clock_info_status + device_get_adaptive_tgp_mode_info_v1 device_get_addressing_mode device_get_api_restriction device_get_architecture device_get_attributes_v2 device_get_auto_boosted_clocks_enabled + device_get_bank_remapper_status_v1 device_get_bar1_memory_info + device_get_bbx_time_data_v1 device_get_board_id device_get_board_part_number device_get_brand @@ -89,6 +93,7 @@ Functions device_get_gpc_clk_min_max_vf_offset device_get_gpc_clk_vf_offset device_get_gpu_fabric_info_v + device_get_gpu_fabric_info_v4 device_get_gpu_instance_by_id device_get_gpu_instance_id device_get_gpu_instance_possible_placements_v2 @@ -127,6 +132,7 @@ Functions device_get_memory_bus_width device_get_memory_error_counter device_get_memory_info_v2 + device_get_memory_limits_v1 device_get_mig_device_handle_by_index device_get_mig_mode device_get_min_max_clock_of_p_state @@ -139,6 +145,7 @@ Functions device_get_num_fans device_get_num_gpu_cores device_get_numa_node_id + device_get_nv_link_telemetry_samples_v1 device_get_nvlink_bw_mode device_get_nvlink_capability device_get_nvlink_error_counter @@ -172,6 +179,7 @@ Functions device_get_process_utilization device_get_processes_utilization_info device_get_remapped_rows + device_get_remapped_rows_v2 device_get_repair_status device_get_retired_pages device_get_retired_pages_pending_status @@ -216,6 +224,7 @@ Functions device_is_mig_device_handle device_modify_drain_state device_on_same_board + device_perf_metrics_get_samples_v1 device_power_smoothing_activate_preset_profile device_power_smoothing_set_state device_power_smoothing_update_preset_profile_param @@ -228,6 +237,7 @@ Functions device_reset_memory_locked_clocks device_reset_nvlink_error_counters device_set_accounting_mode + device_set_adaptive_tgp_mode_v1 device_set_api_restriction device_set_auto_boosted_clocks_enabled device_set_clock_offsets @@ -244,9 +254,11 @@ Functions device_set_gpu_locked_clocks device_set_gpu_operation_mode device_set_hostname_v1 + device_set_memory_limits_v1 device_set_memory_locked_clocks device_set_mig_mode device_set_nvlink_bw_mode + device_set_nvlink_bw_mode_async_v1 device_set_nvlink_device_low_power_threshold device_set_persistence_mode device_set_power_management_limit_v2 @@ -261,7 +273,13 @@ Functions error_string event_set_create event_set_free + event_set_get_context_count_v1 + event_set_get_context_data_v1 + event_set_get_context_info_v1 + event_set_get_gpu_operational_event_context_legacy_xid_v1 + event_set_register_gpu_operational_events_v1 event_set_wait_v2 + event_set_wait_v3 get_excluded_device_count get_excluded_device_info_by_index get_vgpu_compatibility @@ -296,6 +314,7 @@ Functions system_get_conf_compute_key_rotation_threshold_info system_get_conf_compute_settings system_get_conf_compute_state + system_get_cper_v1 system_get_cuda_driver_version system_get_cuda_driver_version_v2 system_get_driver_branch @@ -487,11 +506,15 @@ Types :toctree: generated/ AccountingStats + AccountingStats_v2 ActiveVgpuInstanceInfo_v1 + AdaptiveTgpModeInfo_v1 BAR1Memory + BBXTimeData_v1 BridgeChipHierarchy BridgeChipInfo C2cModeInfo_v1 + CPERCursor_v1 ClkMonFaultInfo ClkMonStatus ClockOffset_v1 @@ -505,22 +528,32 @@ Types ConfComputeSystemCaps ConfComputeSystemState CoolerInfo_v1 + CoreRailMetrics DeviceAddressingMode_v1 DeviceAttributes DevicePowerMizerModes_v1 EccSramErrorStatus_v1 + EccBankRemapperHistogram_v1 + EccBankRemapperStatus_v1 EccSramUniqueUncorrectedErrorCounts_v1 EccSramUniqueUncorrectedErrorEntry_v1 EncoderSessionInfo EventData + EventData_v2 ExcludedDeviceInfo FBCSessionInfo FBCStats FieldValue + GetCPER_v1 + GetMemoryLimits_v1 GpuDynamicPstatesInfo + GpuFabricClique_v1 GpuFabricInfo_v2 GpuFabricInfo_v3 + GpuFabricInfo_v4 GpuInstanceInfo + GpuOperationalEventConfig_v1 + GpuOperationalEventContextLegacyXid_v1 GpuInstancePlacement GpuInstanceProfileInfo_v3 GpuThermalSettings @@ -535,17 +568,34 @@ Types NvlinkFirmwareVersion NvlinkGetBwMode_v1 NvLinkInfo_v1 - NvLinkInfo_v2 + NvLinkInfo_v2 NvlinkSetBwMode_v1 + NvlinkSetBwModeAsync_v1 NvlinkSupportedBwModes_v1 + NvlinkTelemetrySample_v1 + NvlinkTelemetrySamples_v1 + ObservedMetrics + OperationalEventContextInfo_v1 PciInfo PciInfoExt_v1 + PerfMetricControllerSample + PerfMetricsDlppc2xSample + PerfMetricsPfpp1xSample + PerfMetricsSample + PerfMetricsSamples_v1 PlatformInfo_v1 PlatformInfo_v2 + PmgrPwrTuple PRMCounter_v1 PRMCounterInput_v1 PRMCounterValue_v1 ProcessDetail_v1 + PwrModelMetricsDlppm1x + PwrModelMetricsDlppm1xDramclkEstimates + PwrModelMetricsDlppm1xPerf + PwrModelMetricsPfpp1x + PwrModelMetricsSamplePfpp1x + PwrModelOperatingPointPfpp1x ProcessDetailList_v1 ProcessesUtilizationInfo_v1 ProcessInfo @@ -553,8 +603,11 @@ Types ProcessUtilizationSample PSUInfo RepairStatus_v1 + RailMetrics + RemappedRowsInfo_v2 RowRemapperHistogramValues Sample + SetMemoryLimits_v1 SystemConfComputeSettings_v1 SystemEventData_v1 UnitFanInfo @@ -579,6 +632,7 @@ Types VgpuSchedulerLog VgpuSchedulerLogEntry VgpuSchedulerLogInfo_v1 + VgpuSchedulerLogInfo_v2 VgpuSchedulerParams VgpuSchedulerSetParams VgpuSchedulerState_v1 diff --git a/cuda_bindings/docs/source/module/nvrtc.rst b/cuda_bindings/docs/source/module/nvrtc.rst index 6b6b7046445..bedf6ed179d 100644 --- a/cuda_bindings/docs/source/module/nvrtc.rst +++ b/cuda_bindings/docs/source/module/nvrtc.rst @@ -1,9 +1,9 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. This code was automatically generated with version 13.3.0. Do not modify it directly. +.. This code was automatically generated with version 13.4.1. Do not modify it directly. -.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=c0aad81d1be715fcef6b97fc6fa560c100a9c66fd9a67306e78653884618047c +.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=03c58049a86a77a6113432e5935ea831b2fd6d6980b3f98f20b0025d043e801a ----- nvrtc ----- @@ -423,6 +423,26 @@ Enables (disables) the contraction of floating-point multiplies and adds/subtrac + - ``--fno-signed-zeros`` (``-fno-signed-zeros``) + +This option instructs the optimizer not to distinguish between +-0. + + + + + + + + - ``--ffinite-math-only`` (``-ffinite-math-only``) + +This option instructs the optimizer to assume that values are not nan or +-inf. + + + + + + + - ``--use_fast_math`` (``-use_fast_math``) Make use of fast math operations. ``--use_fast_math`` implies ``--ftz=true`` ``--prec-div=false`` ``--prec-sqrt=false`` ``--fmad=true``. @@ -601,9 +621,9 @@ The preprocessor by default adds the directory of each input sources to the incl - - ``--std={c++03|c++11|c++14|c++17|c++20}`` (``-std``) + - ``--std={c++03|c++11|c++14|c++17|c++20|c++23}`` (``-std``) -Set language dialect to C++03, C++11, C++14, C++17 or C++20 +Set language dialect to C++03, C++11, C++14, C++17, C++20, or C++23 @@ -737,6 +757,16 @@ Generate warnings when member initializers are reordered. + - ``--Wconversion`` (``-Wconversion``) + +Generate a warning when an implicit numeric conversion may narrow the value in the target type (e.g. ``long`` ``long`` narrowed to ``int``) + + + + + + + - ``--warning-as-error=`` ,... (``-Werror``) Make warnings of the specified kinds into errors. The following is the list of warning kinds accepted by this option: @@ -747,6 +777,16 @@ Make warnings of the specified kinds into errors. The following is the list of w + - ``--fmax-errors=`` (``-fmax-errors``) + +Specify the maximum number of errors to emit before compilation is aborted; must be greater than 0. + + + + + + + - ``--restrict`` (``-restrict``) Programmer assertion that all kernel pointer parameters are restrict pointers. @@ -909,3 +949,13 @@ Enable stack canaries in device code. Stack canaries make it more difficult to e - ``--fdevice-time-trace=`` (``-fdevice-time-trace=``) Enables the time profiler, outputting a JSON file based on given . Results can be analyzed on chrome://tracing for a flamegraph visualization. + + + + + + + - ``--utf-8`` (``-utf-8``) + +Set the source and execution character set to UTF-8 on platforms where that isn't already the default. + diff --git a/cuda_bindings/docs/source/module/runtime.rst b/cuda_bindings/docs/source/module/runtime.rst index f48963f069e..f27a847e25f 100644 --- a/cuda_bindings/docs/source/module/runtime.rst +++ b/cuda_bindings/docs/source/module/runtime.rst @@ -1,9 +1,9 @@ .. SPDX-FileCopyrightText: Copyright (c) 2021-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. .. SPDX-License-Identifier: Apache-2.0 -.. This code was automatically generated with version 13.3.0. Do not modify it directly. +.. This code was automatically generated with version 13.4.1. Do not modify it directly. -.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=b8e7a62b90c8589e286058141b339768cc9cc17970781b5d90e8aca128f976c8 +.. CYTHON-BINDINGS-GENERATED-DO-NOT-MODIFY-THIS-FILE: format=1; content-sha256=408acc02ad695c94ce3060966b62863084ed3f1ac77da7e731e37b3cf7cf9b27 ------- runtime ------- @@ -547,6 +547,12 @@ Data types used by CUDA Runtime This indicates that an exception occurred on the device that is now contained by the GPU's error containment capability. Common causes are - a. Certain types of invalid accesses of peer GPU memory over nvlink b. Certain classes of hardware errors This leaves the process in an inconsistent state and any further CUDA work will return the same error. To continue using CUDA, the process must be terminated and relaunched. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInsufficientLoaderVersion + + + This indicates that loader version is insufficient for Fatbin + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorInvalidSource @@ -913,6 +919,12 @@ Data types used by CUDA Runtime This error indicates that a graph recapture failed and had to be terminated. + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorFabricNotReady + + + This error indicates GPU fabric is not ready within the bounded wait while the fabric manager probe is still in progress. Applications may retry after a delay; for the initialization wait budget, see environment variables such as CUDA_FABRIC_INIT_TIMEOUT_MS. + + .. autoattribute:: cuda.bindings.runtime.cudaError_t.cudaErrorUnknown @@ -1353,6 +1365,9 @@ Data types used by CUDA Runtime allow the hardware to load-balance the blocks in a cluster to the SMs + + .. autoattribute:: cuda.bindings.runtime.cudaClusterSchedulingPolicy.cudaClusterSchedulingPolicyRubinDsmemLocality + .. autoclass:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags .. autoattribute:: cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags.cudaStreamAddCaptureDependencies @@ -1729,6 +1744,18 @@ Data types used by CUDA Runtime Specifies that the shared memory size requested may be a non-portable size up to :py:obj:`~.cudaDevAttrMaxSharedMemoryPerBlockOptin` + + .. autoattribute:: cuda.bindings.runtime.cudaSharedMemoryMode.cudaSharedMemoryModeAllowOversizedSharedMemory + + + Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache) + + + .. autoattribute:: cuda.bindings.runtime.cudaSharedMemoryMode.cudaSharedMemoryModePreferOversizedSharedMemory + + + Specifies that oversized shared memory configurations may be used (with the limitation of only 8kB L1 cache), and prefer an oversized shared memory configuration + .. autoclass:: cuda.bindings.runtime.cudaFuncAttribute .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeMaxDynamicSharedMemorySize @@ -1779,6 +1806,12 @@ Data types used by CUDA Runtime Required cluster scheduling policy preference + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeSharedMemoryMode + + + Setting that controls a kernel's use of non-portable or oversized shared memory configurations + + .. autoattribute:: cuda.bindings.runtime.cudaFuncAttribute.cudaFuncAttributeMax .. autoclass:: cuda.bindings.runtime.cudaFuncCache @@ -1903,6 +1936,12 @@ Data types used by CUDA Runtime A size in bytes for L2 persisting lines cache size + + .. autoattribute:: cuda.bindings.runtime.cudaLimit.cudaLimitPerBlockMemorySize + + + Per-block memory size + .. autoclass:: cuda.bindings.runtime.cudaMemoryAdvise .. autoattribute:: cuda.bindings.runtime.cudaMemoryAdvise.cudaMemAdviseSetReadMostly @@ -2832,12 +2871,30 @@ Data types used by CUDA Runtime Device supports atomic reduction operations in stream batch memory operations + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrLocalityDomainCount + + + Number of locality domains + + + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrOversizedSharedMemoryPerBlock + + + The maximum oversized shared memory per block. This value may vary by chip. See :py:obj:`~.cudaFuncSetAttribute` + + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrCigStreamsSupported Device supports CIG streams + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrLocalityDomainMultiprocessorCount + + + Number of multiprocessors on each locality domain + + .. autoattribute:: cuda.bindings.runtime.cudaDeviceAttr.cudaDevAttrMax .. autoclass:: cuda.bindings.runtime.cudaMemPoolAttr @@ -2925,6 +2982,12 @@ Data types used by CUDA Runtime (value type = int) Indicates whether the pool has hardware compresssion enabled + + .. autoattribute:: cuda.bindings.runtime.cudaMemPoolAttr.cudaMemPoolAttrLocalityDomainId + + + (value type = int) The locality domain id for the mempool, if the mempool is localized to a locality domain. A value of -1 indicates that the mempool is not localized to a locality domain. + .. autoclass:: cuda.bindings.runtime.cudaMemLocationType .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeInvalid @@ -2965,6 +3028,12 @@ Data types used by CUDA Runtime Location is not visible but device is accessible, id is always cudaInvalidDeviceId + + .. autoattribute:: cuda.bindings.runtime.cudaMemLocationType.cudaMemLocationTypeDeviceLocalityDomain + + + Location is a portion of device memory, specified by the locality domain ID + .. autoclass:: cuda.bindings.runtime.cudaMemAccessFlags .. autoattribute:: cuda.bindings.runtime.cudaMemAccessFlags.cudaMemAccessFlagsProtNone @@ -3324,7 +3393,13 @@ Data types used by CUDA Runtime .. autoattribute:: cuda.bindings.runtime.cudaDevSmResourceGroup_flags.cudaDevSmResourceGroupBackfill - Lets smCount be a non-multiple of minCoscheduledCount, filling the difference with other SMs. + Treats constraints as a hint, ignoring them if necessary to reach the requested smCount. Lets smCount be a non-multiple of coscheduledSmCount, filling the difference between SM count and already assigned co-scheduled groupings with other SMs. When used with cudaDevSmResourceGroupLocalityDomainId, backfill fills up to the requested smCount using the target locality domain first, then SMs not attributed to any locality domain, then SMs from other locality domains. If no SMs can be found in the requested locality domain, cudaErrorInvalidResourceConfiguration is returned. + + + .. autoattribute:: cuda.bindings.runtime.cudaDevSmResourceGroup_flags.cudaDevSmResourceGroupLocalityDomainId + + + The SMs must be located on a specific locality domain, specified by localityDomainId .. autoclass:: cuda.bindings.runtime.cudaDevSmResourceSplitByCount_flags @@ -5641,6 +5716,7 @@ Some functions have overloaded C++ API template versions documented separately i .. autofunction:: cuda.bindings.runtime.cudaMemPrefetchBatchAsync .. autofunction:: cuda.bindings.runtime.cudaMemDiscardBatchAsync .. autofunction:: cuda.bindings.runtime.cudaMemDiscardAndPrefetchBatchAsync +.. autofunction:: cuda.bindings.runtime.cudaMemGetLocationInfo .. autofunction:: cuda.bindings.runtime.cudaMemAdvise .. autofunction:: cuda.bindings.runtime.cudaMemRangeGetAttribute .. autofunction:: cuda.bindings.runtime.cudaMemRangeGetAttributes @@ -6319,6 +6395,18 @@ Additionally, there are two known scenarios, where its possible for the workload - On Compute Architecture 9.x: When a module with dynamic parallelism (CDP) is loaded, all future kernels running under green contexts may use and share an additional set of 2 SMs. + + + + + + + + +Memory Copy Operations + +Green context restrictions apply to memory copy operations only when the copy is performed using a green context. For cross-device copies, green context restrictions may not be applied. + .. autofunction:: cuda.bindings.runtime.cudaDeviceGetDevResource .. autofunction:: cuda.bindings.runtime.cudaDevSmResourceSplitByCount .. autofunction:: cuda.bindings.runtime.cudaDevSmResourceSplit diff --git a/cuda_bindings/docs/source/release/13.4.0-notes.rst b/cuda_bindings/docs/source/release/13.4.0-notes.rst index 8893b55ab20..7a9a72e9900 100644 --- a/cuda_bindings/docs/source/release/13.4.0-notes.rst +++ b/cuda_bindings/docs/source/release/13.4.0-notes.rst @@ -6,6 +6,52 @@ ``cuda-bindings`` 13.4.0 Release notes ====================================== +New APIs +-------- + +New APIs from CUDA Toolkit 13.4 are now available in ``cuda-bindings``. + +New driver API functions: + +* :func:`driver.cuDeviceGetFabricClusterUuid` +* :func:`driver.cuDeviceGetCliqueCount` +* :func:`driver.cuDeviceGetCliqueInfo` +* :func:`driver.cuMemGetLocationInfo` +* :func:`driver.cuGraphAddNode_v3` +* :func:`driver.cuGraphNodeSetParams_v2` +* :func:`driver.cuCheckpointOperationComplete` + +New runtime API functions: + +* :func:`runtime.cudaMemGetLocationInfo` + +New cuFile API functions: + +* :func:`cufile.readv` +* :func:`cufile.writev` + +New NVML API functions: + +* :func:`nvml.system_get_cper_v1` +* :func:`nvml.device_get_bbx_time_data_v1` +* :func:`nvml.device_get_accounting_stats_v2` +* :func:`nvml.device_get_remapped_rows_v2` +* :func:`nvml.device_set_adaptive_tgp_mode_v1` +* :func:`nvml.device_get_adaptive_tgp_mode_info_v1` +* :func:`nvml.device_set_memory_limits_v1` +* :func:`nvml.device_get_memory_limits_v1` +* :func:`nvml.device_get_gpu_fabric_info_v4` +* :func:`nvml.device_perf_metrics_get_samples_v1` +* :func:`nvml.device_set_nvlink_bw_mode_async_v1` +* :func:`nvml.device_get_nv_link_telemetry_samples_v1` +* :func:`nvml.event_set_register_gpu_operational_events_v1` +* :func:`nvml.event_set_wait_v3` +* :func:`nvml.event_set_get_context_count_v1` +* :func:`nvml.event_set_get_context_info_v1` +* :func:`nvml.event_set_get_gpu_operational_event_context_legacy_xid_v1` +* :func:`nvml.device_get_bank_remapper_status_v1` +* :func:`nvml.event_set_get_context_data_v1` + Deprecation Notices ------------------- diff --git a/cuda_bindings/docs/source/release/13.4.0b1-notes.rst b/cuda_bindings/docs/source/release/13.4.0b1-notes.rst new file mode 100644 index 00000000000..7a9a72e9900 --- /dev/null +++ b/cuda_bindings/docs/source/release/13.4.0b1-notes.rst @@ -0,0 +1,74 @@ +.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 + +.. module:: cuda.bindings + +``cuda-bindings`` 13.4.0 Release notes +====================================== + +New APIs +-------- + +New APIs from CUDA Toolkit 13.4 are now available in ``cuda-bindings``. + +New driver API functions: + +* :func:`driver.cuDeviceGetFabricClusterUuid` +* :func:`driver.cuDeviceGetCliqueCount` +* :func:`driver.cuDeviceGetCliqueInfo` +* :func:`driver.cuMemGetLocationInfo` +* :func:`driver.cuGraphAddNode_v3` +* :func:`driver.cuGraphNodeSetParams_v2` +* :func:`driver.cuCheckpointOperationComplete` + +New runtime API functions: + +* :func:`runtime.cudaMemGetLocationInfo` + +New cuFile API functions: + +* :func:`cufile.readv` +* :func:`cufile.writev` + +New NVML API functions: + +* :func:`nvml.system_get_cper_v1` +* :func:`nvml.device_get_bbx_time_data_v1` +* :func:`nvml.device_get_accounting_stats_v2` +* :func:`nvml.device_get_remapped_rows_v2` +* :func:`nvml.device_set_adaptive_tgp_mode_v1` +* :func:`nvml.device_get_adaptive_tgp_mode_info_v1` +* :func:`nvml.device_set_memory_limits_v1` +* :func:`nvml.device_get_memory_limits_v1` +* :func:`nvml.device_get_gpu_fabric_info_v4` +* :func:`nvml.device_perf_metrics_get_samples_v1` +* :func:`nvml.device_set_nvlink_bw_mode_async_v1` +* :func:`nvml.device_get_nv_link_telemetry_samples_v1` +* :func:`nvml.event_set_register_gpu_operational_events_v1` +* :func:`nvml.event_set_wait_v3` +* :func:`nvml.event_set_get_context_count_v1` +* :func:`nvml.event_set_get_context_info_v1` +* :func:`nvml.event_set_get_gpu_operational_event_context_legacy_xid_v1` +* :func:`nvml.device_get_bank_remapper_status_v1` +* :func:`nvml.event_set_get_context_data_v1` + +Deprecation Notices +------------------- + +* Support for using ``cuda-bindings`` with Python 3.10 is deprecated and will be + removed in a future version. Python 3.10 reaches end of life in October 2026 + per the `CPython support cycle `_. + +Prerelease feature +------------------ + +A new version of the ``nvrtc`` API is available as ``cuda.bindings._v2.nvrtc``. The +primary improvements are: (1) raising exceptions rather than returning error +codes, (2) uses PEP8-compliant naming, and (3) more performance. This API is +still experimental and subject to change. + +Known issues +------------ + +* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``. +* ``nvml.system_get_process_name`` on WSL can return incorrect values. To work around this, set the locale to "C" before calling ``nvml.device_get_compute_running_processes_v3`` (which sets the process names) and before calling ``nvml.system_get_process_name``. ``cuda_core`` does this automatically, but users of the raw NVML API will need to do this manually. diff --git a/cuda_bindings/docs/source/release/13.4.1-notes.rst b/cuda_bindings/docs/source/release/13.4.1-notes.rst new file mode 100644 index 00000000000..e5f68443d45 --- /dev/null +++ b/cuda_bindings/docs/source/release/13.4.1-notes.rst @@ -0,0 +1,98 @@ +.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 + +.. module:: cuda.bindings + +``cuda-bindings`` 13.4.1 Release notes +====================================== + +New APIs +-------- + +New APIs from CUDA Toolkit 13.4 are now available in ``cuda-bindings``. + +New driver API functions: + +* :func:`driver.cuDeviceGetFabricClusterUuid` +* :func:`driver.cuDeviceGetCliqueCount` +* :func:`driver.cuDeviceGetCliqueInfo` +* :func:`driver.cuMemGetLocationInfo` +* :func:`driver.cuGraphAddNode_v3` +* :func:`driver.cuGraphNodeSetParams_v2` +* :func:`driver.cuCheckpointOperationComplete` + +New runtime API functions: + +* :func:`runtime.cudaMemGetLocationInfo` + +New cuFile API functions: + +* :func:`cufile.readv` +* :func:`cufile.writev` + +New NVML API functions: + +* :func:`nvml.system_get_cper_v1` +* :func:`nvml.device_get_bbx_time_data_v1` +* :func:`nvml.device_get_accounting_stats_v2` +* :func:`nvml.device_get_remapped_rows_v2` +* :func:`nvml.device_set_adaptive_tgp_mode_v1` +* :func:`nvml.device_get_adaptive_tgp_mode_info_v1` +* :func:`nvml.device_set_memory_limits_v1` +* :func:`nvml.device_get_memory_limits_v1` +* :func:`nvml.device_get_gpu_fabric_info_v4` +* :func:`nvml.device_perf_metrics_get_samples_v1` +* :func:`nvml.device_set_nvlink_bw_mode_async_v1` +* :func:`nvml.device_get_nv_link_telemetry_samples_v1` +* :func:`nvml.event_set_register_gpu_operational_events_v1` +* :func:`nvml.event_set_wait_v3` +* :func:`nvml.event_set_get_context_count_v1` +* :func:`nvml.event_set_get_context_info_v1` +* :func:`nvml.event_set_get_gpu_operational_event_context_legacy_xid_v1` +* :func:`nvml.device_get_bank_remapper_status_v1` +* :func:`nvml.event_set_get_context_data_v1` + +Bugfixes +-------- + +* Fixed a bug in the wrapping of ``nvrtcBundledHeadersInfo``. + (`PR #2754 `_) +* Fixed ``CUDA_PYTHON_DISABLE_MAJOR_VERSION_WARNING``: previously, setting it + to ``"0"`` (or any other non-empty string) still disabled the warning; it + is now parsed as a bool-like value, so ``"0"`` correctly leaves the warning + enabled. + (`PR #2581 `_) +* Fixed a crash in ``nvml.system_event_set_wait`` caused by calling + ``resize()`` on a non-owning ``SystemEventData_v1._data`` view. + (`PR #2690 `_) +* ``get_cuda_native_handle`` no longer misreports a ``KeyError`` raised from + within a registered getter as an "Unknown type" error. + (`PR #2551 `_) +* Fixed ``cuFile`` status checking to no longer raise ``cuFileError`` + spuriously when ``CUfileError_t.cu_err`` is set on a non-error path (for + example, BAR-size queries on GH200 systems). + (`PR #2530 `_) +* Made ``param_packer.feed()`` safe under free-threaded Python by moving its + internal state initialization to import time. + (`PR #2417 `_) + +Deprecation Notices +------------------- + +* Support for using ``cuda-bindings`` with Python 3.10 is deprecated and will be + removed in a future version. Python 3.10 reaches end of life in October 2026 + per the `CPython support cycle `_. + +Prerelease feature +------------------ + +A new version of the ``nvrtc`` API is available as ``cuda.bindings._v2.nvrtc``. The +primary improvements are: (1) raising exceptions rather than returning error +codes, (2) uses PEP8-compliant naming, and (3) more performance. This API is +still experimental and subject to change. + +Known issues +------------ + +* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``. +* ``nvml.system_get_process_name`` on WSL can return incorrect values. To work around this, set the locale to "C" before calling ``nvml.device_get_compute_running_processes_v3`` (which sets the process names) and before calling ``nvml.system_get_process_name``. ``cuda_core`` does this automatically, but users of the raw NVML API will need to do this manually. diff --git a/cuda_bindings/docs/source/release/13.4.1a0-notes.rst b/cuda_bindings/docs/source/release/13.4.1a0-notes.rst new file mode 100644 index 00000000000..5a4c5f632c7 --- /dev/null +++ b/cuda_bindings/docs/source/release/13.4.1a0-notes.rst @@ -0,0 +1,98 @@ +.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 + +.. module:: cuda.bindings + +``cuda-bindings`` 13.4.1a0 Release notes +======================================== + +New APIs +-------- + +New APIs from CUDA Toolkit 13.4 are now available in ``cuda-bindings``. + +New driver API functions: + +* :func:`driver.cuDeviceGetFabricClusterUuid` +* :func:`driver.cuDeviceGetCliqueCount` +* :func:`driver.cuDeviceGetCliqueInfo` +* :func:`driver.cuMemGetLocationInfo` +* :func:`driver.cuGraphAddNode_v3` +* :func:`driver.cuGraphNodeSetParams_v2` +* :func:`driver.cuCheckpointOperationComplete` + +New runtime API functions: + +* :func:`runtime.cudaMemGetLocationInfo` + +New cuFile API functions: + +* :func:`cufile.readv` +* :func:`cufile.writev` + +New NVML API functions: + +* :func:`nvml.system_get_cper_v1` +* :func:`nvml.device_get_bbx_time_data_v1` +* :func:`nvml.device_get_accounting_stats_v2` +* :func:`nvml.device_get_remapped_rows_v2` +* :func:`nvml.device_set_adaptive_tgp_mode_v1` +* :func:`nvml.device_get_adaptive_tgp_mode_info_v1` +* :func:`nvml.device_set_memory_limits_v1` +* :func:`nvml.device_get_memory_limits_v1` +* :func:`nvml.device_get_gpu_fabric_info_v4` +* :func:`nvml.device_perf_metrics_get_samples_v1` +* :func:`nvml.device_set_nvlink_bw_mode_async_v1` +* :func:`nvml.device_get_nv_link_telemetry_samples_v1` +* :func:`nvml.event_set_register_gpu_operational_events_v1` +* :func:`nvml.event_set_wait_v3` +* :func:`nvml.event_set_get_context_count_v1` +* :func:`nvml.event_set_get_context_info_v1` +* :func:`nvml.event_set_get_gpu_operational_event_context_legacy_xid_v1` +* :func:`nvml.device_get_bank_remapper_status_v1` +* :func:`nvml.event_set_get_context_data_v1` + +Bugfixes +-------- + +* Fixed a bug in the wrapping of ``nvrtcBundledHeadersInfo``. + (`PR #2754 `_) +* Fixed ``CUDA_PYTHON_DISABLE_MAJOR_VERSION_WARNING``: previously, setting it + to ``"0"`` (or any other non-empty string) still disabled the warning; it + is now parsed as a bool-like value, so ``"0"`` correctly leaves the warning + enabled. + (`PR #2581 `_) +* Fixed a crash in ``nvml.system_event_set_wait`` caused by calling + ``resize()`` on a non-owning ``SystemEventData_v1._data`` view. + (`PR #2690 `_) +* ``get_cuda_native_handle`` no longer misreports a ``KeyError`` raised from + within a registered getter as an "Unknown type" error. + (`PR #2551 `_) +* Fixed ``cuFile`` status checking to no longer raise ``cuFileError`` + spuriously when ``CUfileError_t.cu_err`` is set on a non-error path (for + example, BAR-size queries on GH200 systems). + (`PR #2530 `_) +* Made ``param_packer.feed()`` safe under free-threaded Python by moving its + internal state initialization to import time. + (`PR #2417 `_) + +Deprecation Notices +------------------- + +* Support for using ``cuda-bindings`` with Python 3.10 is deprecated and will be + removed in a future version. Python 3.10 reaches end of life in October 2026 + per the `CPython support cycle `_. + +Prerelease feature +------------------ + +A new version of the ``nvrtc`` API is available as ``cuda.bindings._v2.nvrtc``. The +primary improvements are: (1) raising exceptions rather than returning error +codes, (2) uses PEP8-compliant naming, and (3) more performance. This API is +still experimental and subject to change. + +Known issues +------------ + +* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``. +* ``nvml.system_get_process_name`` on WSL can return incorrect values. To work around this, set the locale to "C" before calling ``nvml.device_get_compute_running_processes_v3`` (which sets the process names) and before calling ``nvml.system_get_process_name``. ``cuda_core`` does this automatically, but users of the raw NVML API will need to do this manually. diff --git a/cuda_bindings/pixi.toml b/cuda_bindings/pixi.toml index 9d122d17413..f2a7dc0a6f7 100644 --- a/cuda_bindings/pixi.toml +++ b/cuda_bindings/pixi.toml @@ -10,7 +10,7 @@ preview = ["pixi-build"] [workspace.build-variants] python = ["3.10.*", "3.11.*", "3.12.*", "3.13.*", "3.14.*"] # Keep source-package metadata aligned with the consuming environment's CUDA major. -cuda-version = ["12.*", "13.3.*"] +cuda-version = ["12.*", "13.4.*"] [feature.test.dependencies] cuda-bindings = { path = "." } @@ -76,7 +76,7 @@ CUDA_HOME = "$CONDA_PREFIX/Library" cuda-version = "12.*" [feature.cu13.dependencies] -cuda-version = "13.3.*" +cuda-version = "13.4.*" [environments] default = { features = ["test", "cython-tests"], solve-group = "default" } diff --git a/cuda_bindings/tests/nvml/conftest.py b/cuda_bindings/tests/nvml/conftest.py index ca61416c137..29e7cb697c2 100644 --- a/cuda_bindings/tests/nvml/conftest.py +++ b/cuda_bindings/tests/nvml/conftest.py @@ -100,10 +100,3 @@ def uuids(ngpus, handles): uuids = [nvml.device_get_uuid(handles[i]) for i in range(ngpus)] assert len(uuids) == ngpus return uuids - - -@pytest.fixture -def pci_info(ngpus, handles): - pci_info = [nvml.device_get_pci_info_v3(handles[i]) for i in range(ngpus)] - assert len(pci_info) == ngpus - return pci_info diff --git a/cuda_bindings/tests/nvml/test_cuda.py b/cuda_bindings/tests/nvml/test_cuda.py index ed260a2fbc6..4b4dcfb823a 100644 --- a/cuda_bindings/tests/nvml/test_cuda.py +++ b/cuda_bindings/tests/nvml/test_cuda.py @@ -1,7 +1,6 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -import os import pytest @@ -19,10 +18,15 @@ def get_nvml_device_names(): for idx in range(num_devices): handle = nvml.device_get_handle_by_index_v2(idx) name = nvml.device_get_name(handle) - info = nvml.device_get_pci_info_v3(handle) - assert isinstance(info.bus, int) + try: + info = nvml.device_get_pci_info_v3(handle) + except nvml.NotSupportedError: + bus_id = -1 + else: + bus_id = info.bus + assert isinstance(bus_id, int) assert isinstance(name, str) - result.append({"name": name, "id": info.bus}) + result.append({"name": name, "id": bus_id}) return result @@ -62,12 +66,11 @@ def test_cuda_device_order(): if any(kind in device["name"] for device in nvml_devices): pytest.skip(f"Skipping test on {kind}, which has non-standard device naming") - if "CUDA_VISIBLE_DEVICES" not in os.environ: - # If that environment variable isn't set, the device lists should match exactly - assert cuda_devices == nvml_devices, "CUDA and NVML device lists do not match" - else: - # If the environment variable is set, there may possibly be fewer CUDA devices, - # and each of them should still be found in NVML devices. - assert len(cuda_devices) <= len(nvml_devices) - for cuda_device in cuda_devices: - assert cuda_device in nvml_devices, f"CUDA device {cuda_device} not found in NVML device list" + def compare(cuda_device, nvml_device): + return cuda_device["name"] == nvml_device["name"] and ( + nvml_device["id"] == -1 or cuda_device["id"] == nvml_device["id"] + ) + + assert len(cuda_devices) <= len(nvml_devices) + for cuda_device in cuda_devices: + assert any(compare(cuda_device, nvml_device) for nvml_device in nvml_devices) diff --git a/cuda_bindings/tests/nvml/test_device.py b/cuda_bindings/tests/nvml/test_device.py index 24f3ffd7d77..4eb11fc2a1a 100644 --- a/cuda_bindings/tests/nvml/test_device.py +++ b/cuda_bindings/tests/nvml/test_device.py @@ -28,8 +28,9 @@ def cuda_version_less_than(target): def test_device_capabilities(all_devices): for device in all_devices: - capabilities = nvml.device_get_capabilities(device) - assert isinstance(capabilities, int) + with unsupported_before(device, None): + capabilities = nvml.device_get_capabilities(device) + assert isinstance(capabilities, int) def test_clk_mon_status_t(): @@ -48,19 +49,20 @@ def test_current_clock_freqs(all_devices, subtests): def test_grid_licensable_features(all_devices): for device in all_devices: - features = nvml.device_get_grid_licensable_features_v4(device) - assert isinstance(features, nvml.GridLicensableFeatures) - # #define NVML_GRID_LICENSE_FEATURE_MAX_COUNT 3 - assert len(features.grid_licensable_features) <= 3 - assert not hasattr(features, "licensable_features_count") - - for feature in features.grid_licensable_features: - nvml.GridLicenseFeatureCode(feature.feature_code) - assert isinstance(feature.feature_state, int) - assert isinstance(feature.license_info, str) - assert isinstance(feature.product_name, str) - assert isinstance(feature.feature_enabled, int) - nvml.GridLicenseExpiry(feature.license_expiry) + with unsupported_before(device, None): + features = nvml.device_get_grid_licensable_features_v4(device) + assert isinstance(features, nvml.GridLicensableFeatures) + # #define NVML_GRID_LICENSE_FEATURE_MAX_COUNT 3 + assert len(features.grid_licensable_features) <= 3 + assert not hasattr(features, "licensable_features_count") + + for feature in features.grid_licensable_features: + nvml.GridLicenseFeatureCode(feature.feature_code) + assert isinstance(feature.feature_state, int) + assert isinstance(feature.license_info, str) + assert isinstance(feature.product_name, str) + assert isinstance(feature.feature_enabled, int) + nvml.GridLicenseExpiry(feature.license_expiry) def test_get_handle_by_uuidv(all_devices, subtests): @@ -90,8 +92,9 @@ def test_get_nv_link_supported_bw_modes(all_devices, subtests): def test_device_get_pdi(all_devices): for device in all_devices: - pdi = nvml.device_get_pdi(device) - assert isinstance(pdi, int) + with unsupported_before(device, None): + pdi = nvml.device_get_pdi(device) + assert isinstance(pdi, int) def test_device_get_performance_modes(all_devices, subtests): @@ -156,7 +159,7 @@ def test_set_power_management_limit(all_devices, subtests): for device in all_devices: with ( subtests.test(device_index=nvml.device_get_index(device)), - unsupported_before(device, nvml.DeviceArch.KEPLER), + unsupported_before(device, None), ): try: nvml.device_set_power_management_limit_v2(device, nvml.PowerScope.GPU, 10000) diff --git a/cuda_bindings/tests/nvml/test_pynvml.py b/cuda_bindings/tests/nvml/test_pynvml.py index bb62b716fcd..57b0b8c0f1c 100644 --- a/cuda_bindings/tests/nvml/test_pynvml.py +++ b/cuda_bindings/tests/nvml/test_pynvml.py @@ -61,8 +61,15 @@ def test_device_get_handle_by_uuid(ngpus, handles, uuids, subtests): assert nvml.device_get_handle_by_uuid(uuid) == handles[i] -def test_device_get_handle_by_pci_bus_id(ngpus, pci_info): - handles = [nvml.device_get_handle_by_pci_bus_id_v2(pci_info[i].bus_id) for i in range(ngpus)] +def test_device_get_handle_by_pci_bus_id(ngpus): + pci_infos = [] + for i in range(ngpus): + handle = nvml.device_get_handle_by_index_v2(i) + with unsupported_before(handle, None): + pci_info = nvml.device_get_pci_info_v3(handle) + pci_infos.append(pci_info) + assert len(pci_infos) == ngpus + handles = [nvml.device_get_handle_by_pci_bus_id_v2(pci_infos[i].bus_id) for i in range(ngpus)] assert len(handles) == ngpus @@ -106,7 +113,12 @@ def test_device_get_p2p_status(handles, index): for h1 in handles: for h2 in handles: if h1 is not h2: - status = nvml.device_get_p2p_status(h1, h2, index) + try: + status = nvml.device_get_p2p_status(h1, h2, index) + except nvml.InvalidArgumentError: + # Some devices may not support all indices, and may + # raise InvalidArgumentError for unsupported ones. + continue assert nvml.GpuP2PStatus.P2P_STATUS_OK <= status <= nvml.GpuP2PStatus.P2P_STATUS_UNKNOWN diff --git a/cuda_bindings/tests/test_cuda.py b/cuda_bindings/tests/test_cuda.py index 7bef2b844aa..18c3c0e9d80 100644 --- a/cuda_bindings/tests/test_cuda.py +++ b/cuda_bindings/tests/test_cuda.py @@ -990,6 +990,9 @@ def test_cuGraphGetEdges_edgeData_outlives_call(device, ctx): assert ed.from_port == 0 assert ed.to_port == 0 assert int(ed.type) == 0 + # CUgraphEdgeData_st layout: from_port(1), to_port(1), type(1), reserved[5] + raw = (ctypes.c_uint8 * 8).from_address(ed.getPtr()) + assert bytes(raw[3:]) == b"\x00" * 5 finally: (err,) = cuda.cuGraphDestroy(graph) assert err == cuda.CUresult.CUDA_SUCCESS @@ -1029,6 +1032,9 @@ def test_cuGraphNodeGetDependencies_edgeData_outlives_call(device, ctx): assert ed.from_port == 0 assert ed.to_port == 0 assert int(ed.type) == 0 + # CUgraphEdgeData_st layout: from_port(1), to_port(1), type(1), reserved[5] + raw = (ctypes.c_uint8 * 8).from_address(ed.getPtr()) + assert bytes(raw[3:]) == b"\x00" * 5 finally: (err,) = cuda.cuGraphDestroy(graph) assert err == cuda.CUresult.CUDA_SUCCESS diff --git a/cuda_bindings/tests/test_cudart.py b/cuda_bindings/tests/test_cudart.py index 3dc4fba7461..53702280679 100644 --- a/cuda_bindings/tests/test_cudart.py +++ b/cuda_bindings/tests/test_cudart.py @@ -298,6 +298,9 @@ def test_cudart_cudaGraphGetEdges_edgeData_outlives_call(): assert ed.from_port == 0 assert ed.to_port == 0 assert int(ed.type) == 0 + # cudaGraphEdgeData_st layout: from_port(1), to_port(1), type(1), reserved[5] + raw = (ctypes.c_uint8 * 8).from_address(ed.getPtr()) + assert bytes(raw[3:]) == b"\x00" * 5 finally: (err,) = cudart.cudaGraphDestroy(graph) assertSuccess(err) @@ -337,6 +340,9 @@ def test_cudart_cudaGraphNodeGetDependencies_edgeData_outlives_call(): assert ed.from_port == 0 assert ed.to_port == 0 assert int(ed.type) == 0 + # cudaGraphEdgeData_st layout: from_port(1), to_port(1), type(1), reserved[5] + raw = (ctypes.c_uint8 * 8).from_address(ed.getPtr()) + assert bytes(raw[3:]) == b"\x00" * 5 finally: (err,) = cudart.cudaGraphDestroy(graph) assertSuccess(err) diff --git a/cuda_bindings/tests/test_cufile.py b/cuda_bindings/tests/test_cufile.py index 055f9018175..7de4ceb2e20 100644 --- a/cuda_bindings/tests/test_cufile.py +++ b/cuda_bindings/tests/test_cufile.py @@ -1520,7 +1520,6 @@ def stats(driver): cufileVersionLessThan(1150), reason="cuFile parameter APIs require cuFile library version 13.0 or later" ) @pytest.mark.usefixtures("stats") -@pytest.mark.thread_unsafe(reason="cuFile stats level is process-global") def test_set_stats_level(): """Test cuFile statistics level configuration.""" # Test setting different statistics levels diff --git a/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py b/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py index 4fa9114ea18..41eb158f4e2 100644 --- a/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py +++ b/cuda_core/cuda/core/_utils/driver_cu_result_explanations_frozen.py @@ -1,7 +1,14 @@ # SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: Apache-2.0 -# CUDA Toolkit v13.3 +# Like the runtime counterpart, this fallback is a deliberately frozen +# compatibility snapshot, not a release-maintained mirror of CUDA's enums. +# Do not update it past CUDA Toolkit v13.1.1. Bindings releases new enough to +# define later codes provide explanations through enum-member docstrings; if an +# older binding receives one from a newer driver, it falls through to +# cuGetErrorString(). Synchronizing this table with later Toolkit releases would +# restore the duplicate maintenance burden removed by PR #1860. +# CUDA Toolkit v13.1.1 _FALLBACK_EXPLANATIONS = { 0: ( "The API call returned with no errors. In the case of query calls, this" @@ -346,6 +353,5 @@ " stream is in a detached state. This can occur if the green context associated" " with the stream has been destroyed, limiting the stream's operational capabilities." ), - 918: "This error indicates that a graph recapture failed and had to be terminated.", 999: "This indicates that an unknown internal error has occurred.", } diff --git a/cuda_core/cuda/core/system/_clock.pxi b/cuda_core/cuda/core/system/_clock.pxi index 56889e37d29..3b3db4e85b0 100644 --- a/cuda_core/cuda/core/system/_clock.pxi +++ b/cuda_core/cuda/core/system/_clock.pxi @@ -20,6 +20,8 @@ _CLOCKS_EVENT_REASONS_MAPPING = { nvml.ClocksEventReasons.THROTTLE_REASON_HW_THERMAL_SLOWDOWN: ClocksEventReasons.HW_THERMAL_SLOWDOWN, nvml.ClocksEventReasons.THROTTLE_REASON_HW_POWER_BRAKE_SLOWDOWN: ClocksEventReasons.HW_POWER_BRAKE_SLOWDOWN, nvml.ClocksEventReasons.EVENT_REASON_DISPLAY_CLOCK_SETTING: ClocksEventReasons.DISPLAY_CLOCK_SETTING, + getattr(nvml.ClocksEventReasons, "EVENT_REASON_BOARD_LIMIT", 0x200): ClocksEventReasons.BOARD_LIMIT, + getattr(nvml.ClocksEventReasons, "EVENT_REASON_RELIABILITY", 0x400): ClocksEventReasons.RELIABILITY, } diff --git a/cuda_core/cuda/core/system/_device.pyi b/cuda_core/cuda/core/system/_device.pyi index 137f405038b..3e2a6bd018c 100644 --- a/cuda_core/cuda/core/system/_device.pyi +++ b/cuda_core/cuda/core/system/_device.pyi @@ -14,7 +14,7 @@ from cuda.core.system.typing import (AddressingMode, AffinityScope, ClockId, ThermalTarget) _CLOCK_ID_MAPPING = {ClockId.CURRENT: nvml.ClockId.CURRENT, ClockId.CUSTOMER_BOOST_MAX: nvml.ClockId.CUSTOMER_BOOST_MAX} -_CLOCKS_EVENT_REASONS_MAPPING = {nvml.ClocksEventReasons.EVENT_REASON_NONE: ClocksEventReasons.NONE, nvml.ClocksEventReasons.EVENT_REASON_GPU_IDLE: ClocksEventReasons.GPU_IDLE, nvml.ClocksEventReasons.EVENT_REASON_APPLICATIONS_CLOCKS_SETTING: ClocksEventReasons.APPLICATIONS_CLOCKS_SETTING, nvml.ClocksEventReasons.EVENT_REASON_SW_POWER_CAP: ClocksEventReasons.SW_POWER_CAP, nvml.ClocksEventReasons.THROTTLE_REASON_HW_SLOWDOWN: ClocksEventReasons.HW_SLOWDOWN, nvml.ClocksEventReasons.EVENT_REASON_SYNC_BOOST: ClocksEventReasons.SYNC_BOOST, nvml.ClocksEventReasons.EVENT_REASON_SW_THERMAL_SLOWDOWN: ClocksEventReasons.SW_THERMAL_SLOWDOWN, nvml.ClocksEventReasons.THROTTLE_REASON_HW_THERMAL_SLOWDOWN: ClocksEventReasons.HW_THERMAL_SLOWDOWN, nvml.ClocksEventReasons.THROTTLE_REASON_HW_POWER_BRAKE_SLOWDOWN: ClocksEventReasons.HW_POWER_BRAKE_SLOWDOWN, nvml.ClocksEventReasons.EVENT_REASON_DISPLAY_CLOCK_SETTING: ClocksEventReasons.DISPLAY_CLOCK_SETTING} +_CLOCKS_EVENT_REASONS_MAPPING = {nvml.ClocksEventReasons.EVENT_REASON_NONE: ClocksEventReasons.NONE, nvml.ClocksEventReasons.EVENT_REASON_GPU_IDLE: ClocksEventReasons.GPU_IDLE, nvml.ClocksEventReasons.EVENT_REASON_APPLICATIONS_CLOCKS_SETTING: ClocksEventReasons.APPLICATIONS_CLOCKS_SETTING, nvml.ClocksEventReasons.EVENT_REASON_SW_POWER_CAP: ClocksEventReasons.SW_POWER_CAP, nvml.ClocksEventReasons.THROTTLE_REASON_HW_SLOWDOWN: ClocksEventReasons.HW_SLOWDOWN, nvml.ClocksEventReasons.EVENT_REASON_SYNC_BOOST: ClocksEventReasons.SYNC_BOOST, nvml.ClocksEventReasons.EVENT_REASON_SW_THERMAL_SLOWDOWN: ClocksEventReasons.SW_THERMAL_SLOWDOWN, nvml.ClocksEventReasons.THROTTLE_REASON_HW_THERMAL_SLOWDOWN: ClocksEventReasons.HW_THERMAL_SLOWDOWN, nvml.ClocksEventReasons.THROTTLE_REASON_HW_POWER_BRAKE_SLOWDOWN: ClocksEventReasons.HW_POWER_BRAKE_SLOWDOWN, nvml.ClocksEventReasons.EVENT_REASON_DISPLAY_CLOCK_SETTING: ClocksEventReasons.DISPLAY_CLOCK_SETTING, getattr(nvml.ClocksEventReasons, 'EVENT_REASON_BOARD_LIMIT', 512): ClocksEventReasons.BOARD_LIMIT, getattr(nvml.ClocksEventReasons, 'EVENT_REASON_RELIABILITY', 1024): ClocksEventReasons.RELIABILITY} _CLOCK_TYPE_MAPPING = {ClockType.GRAPHICS: nvml.ClockType.CLOCK_GRAPHICS, ClockType.SM: nvml.ClockType.CLOCK_SM, ClockType.MEMORY: nvml.ClockType.CLOCK_MEM, ClockType.VIDEO: nvml.ClockType.CLOCK_VIDEO} _COOLER_CONTROL_MAPPING = {nvml.CoolerControl.THERMAL_COOLER_SIGNAL_TOGGLE: CoolerControl.TOGGLE, nvml.CoolerControl.THERMAL_COOLER_SIGNAL_VARIABLE: CoolerControl.VARIABLE} _COOLER_TARGET_MAPPING = {nvml.CoolerTarget.THERMAL_NONE: CoolerTarget.NONE, nvml.CoolerTarget.THERMAL_GPU: CoolerTarget.GPU, nvml.CoolerTarget.THERMAL_MEMORY: CoolerTarget.MEMORY, nvml.CoolerTarget.THERMAL_POWER_SUPPLY: CoolerTarget.POWER_SUPPLY} diff --git a/cuda_core/cuda/core/system/_device.pyx b/cuda_core/cuda/core/system/_device.pyx index 6c81c3b9732..c3bf23fe025 100644 --- a/cuda_core/cuda/core/system/_device.pyx +++ b/cuda_core/cuda/core/system/_device.pyx @@ -108,6 +108,14 @@ _BRAND_TYPE_MAPPING = { } +if hasattr(nvml.BrandType, "BRAND_NVIDIA_DLA"): + _BRAND_TYPE_MAPPING.update({ + nvml.BrandType.BRAND_NVIDIA_DLA: "NVIDIA DLA", + nvml.BrandType.BRAND_NVIDIA_VGAMEDEV: "NVIDIA vGameDev", + nvml.BrandType.BRAND_NVIDIA_NPU: "NVIDIA NPU", + }) + + _GPU_P2P_CAPS_INDEX_MAPPING = { GpuP2PCapsIndex.READ: nvml.GpuP2PCapsIndex.P2P_CAPS_INDEX_READ, GpuP2PCapsIndex.WRITE: nvml.GpuP2PCapsIndex.P2P_CAPS_INDEX_WRITE, @@ -143,7 +151,6 @@ _GPU_TOPOLOGY_LEVEL_MAPPING = { _GPU_TOPOLOGY_LEVEL_INV_MAPPING = {v: k for k, v in _GPU_TOPOLOGY_LEVEL_MAPPING.items()} - cdef class Device: """ Representation of a device. diff --git a/cuda_core/cuda/core/system/typing.py b/cuda_core/cuda/core/system/typing.py index 02246714a39..6ef9bcb2bc6 100644 --- a/cuda_core/cuda/core/system/typing.py +++ b/cuda_core/cuda/core/system/typing.py @@ -96,6 +96,8 @@ class ClocksEventReasons(StrEnum): HW_THERMAL_SLOWDOWN = "hw_thermal_slowdown" HW_POWER_BRAKE_SLOWDOWN = "hw_power_brake_slowdown" DISPLAY_CLOCK_SETTING = "display_clock_setting" + BOARD_LIMIT = "board_limit" + RELIABILITY = "reliability" class ClockType(StrEnum): diff --git a/cuda_core/pixi.toml b/cuda_core/pixi.toml index b2c6a3389c3..cbeaf696607 100644 --- a/cuda_core/pixi.toml +++ b/cuda_core/pixi.toml @@ -10,7 +10,7 @@ preview = ["pixi-build"] [workspace.build-variants] python = ["3.10.*", "3.11.*", "3.12.*", "3.13.*", "3.14.*"] # Keep source-package metadata aligned with the consuming environment's CUDA major. -cuda-version = ["12.*", "13.3.*"] +cuda-version = ["12.*", "13.4.*"] [feature.test.dependencies] cuda-core = { path = "." } @@ -90,7 +90,7 @@ CUDA_HOME = "$CONDA_PREFIX/targets/sbsa-linux" CUDA_HOME = "$CONDA_PREFIX/Library" [feature.cu13.dependencies] -cuda-version = "13.3.*" +cuda-version = "13.4.*" [feature.cu12.dependencies] cuda-version = "12.*" diff --git a/cuda_core/tests/system/test_system_device.py b/cuda_core/tests/system/test_system_device.py index 0d55afd6f29..03d92a98a20 100644 --- a/cuda_core/tests/system/test_system_device.py +++ b/cuda_core/tests/system/test_system_device.py @@ -316,7 +316,7 @@ def test_device_pci_bus_id(): pci_bus_id = device.pci_info.bus_id assert isinstance(pci_bus_id, str) - new_device = system.Device(pci_bus_id=device.pci_info.bus_id) + new_device = system.Device(pci_bus_id=pci_bus_id) assert new_device.index == device.index @@ -1013,5 +1013,5 @@ def test_uuid(): for device in system.Device.get_all_devices(): uuid = device.uuid assert isinstance(uuid, str) - assert uuid.startswith(("GPU-", "MIG-")) + assert uuid.startswith(("GPU-", "MIG-", "DLA-")) assert uuid == device.uuid diff --git a/cuda_core/tests/test_device.py b/cuda_core/tests/test_device.py index dbfb9fed5a9..ab145e5a178 100644 --- a/cuda_core/tests/test_device.py +++ b/cuda_core/tests/test_device.py @@ -257,6 +257,19 @@ def test_name(): assert device.name == name.decode() +def test_get_all_devices_uses_cuda_driver_count(): + expected = handle_return(driver.cuDeviceGetCount()) + devices = Device.get_all_devices() + assert len(devices) == expected + assert [device.device_id for device in devices] == list(range(expected)) + + +def test_get_all_devices_does_not_create_context(deinit_cuda): + assert int(handle_return(driver.cuCtxGetCurrent())) == 0 + Device.get_all_devices() + assert int(handle_return(driver.cuCtxGetCurrent())) == 0 + + def test_compute_capability(): device = Device() major = handle_return( diff --git a/cuda_core/tests/test_enum_coverage.py b/cuda_core/tests/test_enum_coverage.py index 468e2b505e2..2c83d1a1f21 100644 --- a/cuda_core/tests/test_enum_coverage.py +++ b/cuda_core/tests/test_enum_coverage.py @@ -57,6 +57,7 @@ # We have some explicitly unsupported memory location types { "CU_MEM_LOCATION_TYPE_NONE", + "CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN", "CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT", "CU_MEM_LOCATION_TYPE_INVISIBLE", "CU_MEM_LOCATION_TYPE_MAX", @@ -92,6 +93,9 @@ # We have some explicitly unsupported memory location types { "CU_MEM_LOCATION_TYPE_NONE", + # Requires a separate locality-domain id; cuda-core memory-resource + # options currently expose only device and host/NUMA placement. + "CU_MEM_LOCATION_TYPE_DEVICE_LOCALITY_DOMAIN", "CU_MEM_LOCATION_TYPE_INVISIBLE", "CU_MEM_LOCATION_TYPE_MAX", "CU_MEM_LOCATION_TYPE_INVALID", diff --git a/cuda_core/tests/test_utils_enum_explanations_helpers.py b/cuda_core/tests/test_utils_enum_explanations_helpers.py index 59e39cda701..6d4c9e32b82 100644 --- a/cuda_core/tests/test_utils_enum_explanations_helpers.py +++ b/cuda_core/tests/test_utils_enum_explanations_helpers.py @@ -168,12 +168,3 @@ def test_runtime_explanations_module_skips_fallback_import_when_docstrings_avail assert "cuda.core._utils.runtime_cuda_error_explanations_frozen" not in sys.modules assert isinstance(runtime_explanations.RUNTIME_CUDA_ERROR_EXPLANATIONS, DocstringBackedExplanations) - - -@pytest.mark.human_authored -def test_frozen_driver_table_covers_all_curesult_members(): - from cuda.bindings import driver - from cuda.core._utils.driver_cu_result_explanations_frozen import _FALLBACK_EXPLANATIONS - - missing = [m.name for m in driver.CUresult if int(m) not in _FALLBACK_EXPLANATIONS] - assert not missing, f"Missing frozen fallback explanations for: {missing}" diff --git a/cuda_python/docs/exts/release_toc.py b/cuda_python/docs/exts/release_toc.py index 78345da8974..ac833b1990f 100644 --- a/cuda_python/docs/exts/release_toc.py +++ b/cuda_python/docs/exts/release_toc.py @@ -7,8 +7,7 @@ from sphinx.directives.other import TocTree -def _version_sort_key(docname): - version_text = Path(docname).name.removesuffix("-notes") +def _version_sort_key(version_text): normalized = version_text.replace(".x", ".999999") try: return (1, Version(normalized)) @@ -16,6 +15,14 @@ def _version_sort_key(docname): return (0, version_text) +def _is_prerelease(version_text): + try: + version = Version(version_text) + return version.is_prerelease + except InvalidVersion: + return False + + class TocTreeSorted(TocTree): """A toctree directive that sorts entries by version.""" @@ -30,7 +37,9 @@ def parse_content(self, toctree): return entries = [(Path(x[1]).name.removesuffix("-notes"), x[1]) for x in entries] - entries.sort(key=lambda x: _version_sort_key(x[1]), reverse=True) + # Don't include any prereleases in the toctree + entries = [entry for entry in entries if not _is_prerelease(entry[0])] + entries.sort(key=lambda x: _version_sort_key(x[0]), reverse=True) toctree["entries"] = entries diff --git a/cuda_python/docs/nv-versions.json b/cuda_python/docs/nv-versions.json index 0d0772ccf40..1d442c13209 100644 --- a/cuda_python/docs/nv-versions.json +++ b/cuda_python/docs/nv-versions.json @@ -3,6 +3,10 @@ "version": "latest", "url": "https://nvidia.github.io/cuda-python/latest/" }, + { + "version": "13.4.1", + "url": "https://nvidia.github.io/cuda-python/13.4.1/" + }, { "version": "13.3.1", "url": "https://nvidia.github.io/cuda-python/13.3.1/" diff --git a/cuda_python/docs/source/release/13.4.1-notes.rst b/cuda_python/docs/source/release/13.4.1-notes.rst new file mode 100644 index 00000000000..485d17366f1 --- /dev/null +++ b/cuda_python/docs/source/release/13.4.1-notes.rst @@ -0,0 +1,17 @@ +.. SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +.. SPDX-License-Identifier: Apache-2.0 + +CUDA Python 13.4.1 Release notes +================================= + +Deprecation Notices +------------------- + +* Support for using ``cuda-python`` with Python 3.10 is deprecated and will be + removed in a future version. Python 3.10 reaches end of life in October 2026 + per the `CPython support cycle `_. + +Known issues +------------ + +* Updating from older versions (v12.6.2.post1 and below) via ``pip install -U cuda-python`` might not work. Please do a clean re-installation by uninstalling ``pip uninstall -y cuda-python`` followed by installing ``pip install cuda-python``. diff --git a/cuda_python/setup.py b/cuda_python/setup.py index b46d01de59a..fb04dade50a 100644 --- a/cuda_python/setup.py +++ b/cuda_python/setup.py @@ -32,7 +32,7 @@ version=version, install_requires=[ f"cuda-bindings{matcher}{version}", - "cuda-core~=1.1.0", + "cuda-core~=1.2.0", "cuda-pathfinder~=1.1", ], extras_require={ diff --git a/cuda_python_test_helpers/cuda_python_test_helpers/arch_check.py b/cuda_python_test_helpers/cuda_python_test_helpers/arch_check.py index adb3563821f..2eb0a61ffca 100644 --- a/cuda_python_test_helpers/cuda_python_test_helpers/arch_check.py +++ b/cuda_python_test_helpers/cuda_python_test_helpers/arch_check.py @@ -80,10 +80,11 @@ def unsupported_before(device, expected_device_arch): try: yield except (nvml.NotSupportedError, nvml.FunctionNotFoundError, NvmlSymbolNotFoundError): - pytest.skip( - f"Unsupported call for device architecture {nvml.DeviceArch(device_arch).name} " - f"on device '{nvml.device_get_name(handle)}'" - ) + try: + name = nvml.DeviceArch(device_arch).name + except ValueError: + name = f"UNKNOWN({device_arch})" + pytest.skip(f"Unsupported call for device architecture {name} on device '{nvml.device_get_name(handle)}'") elif int(device_arch) < expected_device_arch_int: # We know it will fail; assert that it does. with pytest.raises(nvml.NotSupportedError):