diff --git a/docs/.buildinfo b/docs/.buildinfo deleted file mode 100644 index 637365995..000000000 --- a/docs/.buildinfo +++ /dev/null @@ -1,4 +0,0 @@ -# Sphinx build info version 1 -# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: b213ac36e34cef7446ec345411893f07 -tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/12.6.1/.buildinfo b/docs/12.6.1/.buildinfo new file mode 100644 index 000000000..defd3d251 --- /dev/null +++ b/docs/12.6.1/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 2f9c4a1944b1a0d538f9f880d688e4c2 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/12.6.1/.doctrees/conduct.doctree b/docs/12.6.1/.doctrees/conduct.doctree new file mode 100644 index 000000000..3dee2c420 Binary files /dev/null and b/docs/12.6.1/.doctrees/conduct.doctree differ diff --git a/docs/12.6.1/.doctrees/contribute.doctree b/docs/12.6.1/.doctrees/contribute.doctree new file mode 100644 index 000000000..810f7ffd4 Binary files /dev/null and b/docs/12.6.1/.doctrees/contribute.doctree differ diff --git a/docs/12.6.1/.doctrees/environment.pickle b/docs/12.6.1/.doctrees/environment.pickle new file mode 100644 index 000000000..6ccd67bf4 Binary files /dev/null and b/docs/12.6.1/.doctrees/environment.pickle differ diff --git a/docs/12.6.1/.doctrees/index.doctree b/docs/12.6.1/.doctrees/index.doctree new file mode 100644 index 000000000..62b22cffd Binary files /dev/null and b/docs/12.6.1/.doctrees/index.doctree differ diff --git a/docs/12.6.1/.doctrees/release.doctree b/docs/12.6.1/.doctrees/release.doctree new file mode 100644 index 000000000..63808f990 Binary files /dev/null and b/docs/12.6.1/.doctrees/release.doctree differ diff --git a/docs/12.6.1/.doctrees/release/12.6.1-notes.doctree b/docs/12.6.1/.doctrees/release/12.6.1-notes.doctree new file mode 100644 index 000000000..1104cf8fe Binary files /dev/null and b/docs/12.6.1/.doctrees/release/12.6.1-notes.doctree differ diff --git a/docs/_sources/conduct.md.txt b/docs/12.6.1/_sources/conduct.md.txt similarity index 100% rename from docs/_sources/conduct.md.txt rename to docs/12.6.1/_sources/conduct.md.txt diff --git a/docs/_sources/contribute.md.txt b/docs/12.6.1/_sources/contribute.md.txt similarity index 100% rename from docs/_sources/contribute.md.txt rename to docs/12.6.1/_sources/contribute.md.txt diff --git a/docs/12.6.1/_sources/index.rst.txt b/docs/12.6.1/_sources/index.rst.txt new file mode 100644 index 000000000..4b17a1e98 --- /dev/null +++ b/docs/12.6.1/_sources/index.rst.txt @@ -0,0 +1,34 @@ +CUDA Python +=========== + +CUDA Python is the home for accessing NVIDIA's CUDA platform from Python. It consists of +multiple components: + +- `cuda.core`_: Pythonic access to CUDA runtime and other core functionalities +- `cuda.bindings`_: Low-level Python bindings to CUDA C APIs +- `cuda.cooperative`_: Pythonic exposure of CUB cooperative algorithms +- `cuda.parallel`_: Pythonic exposure of Thrust parallel algorithms + +For access to NVIDIA Math Libraries, please refer to `nvmath-python`_. + +.. _nvmath-python: https://docs.nvidia.com/cuda/nvmath-python/latest + +CUDA Python is currently undergoing an overhaul to improve existing and bring up new components. +All of the previously available functionalities from the ``cuda-python`` package will continue to +be available, please refer to the `cuda.bindings`_ documentation for installation guide and further detail. + +.. + The urls above can be auto-inserted by Sphinx (see rst_epilog in conf.py), but + not for the urls below, which must be hard-coded due to Sphinx limitation... + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + release.md + cuda.core + cuda.bindings + cuda.cooperative + cuda.parallel + conduct.md + contribute.md diff --git a/docs/12.6.1/_sources/release.md.txt b/docs/12.6.1/_sources/release.md.txt new file mode 100644 index 000000000..7af897927 --- /dev/null +++ b/docs/12.6.1/_sources/release.md.txt @@ -0,0 +1,9 @@ +# Release Notes + +```{toctree} +--- +maxdepth: 3 +--- + + 12.6.1 +``` diff --git a/docs/12.6.1/_sources/release/12.6.1-notes.md.txt b/docs/12.6.1/_sources/release/12.6.1-notes.md.txt new file mode 100644 index 000000000..9a812afc9 --- /dev/null +++ b/docs/12.6.1/_sources/release/12.6.1-notes.md.txt @@ -0,0 +1,12 @@ +# CUDA Python Release notes + +Released on Oct 7, 2024 + +## Included components + +- [`cuda.bindings` 12.6.1](https://nvidia.github.io/cuda-python/cuda-bindings/12.6.1/release/12.6.1-notes.html) + + +## Hightlights +- Internal layout refactoring to prepare for the `cuda-python` metapackage ([Issue #90](https://github.com/NVIDIA/cuda-python/issues/90), + [Issue #75](https://github.com/NVIDIA/cuda-python/issues/75)) diff --git a/docs/_static/basic.css b/docs/12.6.1/_static/basic.css similarity index 95% rename from docs/_static/basic.css rename to docs/12.6.1/_static/basic.css index 088967717..7ebbd6d07 100644 --- a/docs/_static/basic.css +++ b/docs/12.6.1/_static/basic.css @@ -1,12 +1,5 @@ /* - * basic.css - * ~~~~~~~~~ - * * Sphinx stylesheet -- basic theme. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * */ /* -- main layout ----------------------------------------------------------- */ @@ -115,15 +108,11 @@ img { /* -- search page ----------------------------------------------------------- */ ul.search { - margin: 10px 0 0 20px; - padding: 0; + margin-top: 10px; } ul.search li { - padding: 5px 0 5px 20px; - background-image: url(file.png); - background-repeat: no-repeat; - background-position: 0 7px; + padding: 5px 0; } ul.search li a { @@ -237,6 +226,10 @@ a.headerlink { visibility: hidden; } +a:visited { + color: #551A8B; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -324,17 +317,17 @@ aside.sidebar { p.sidebar-title { font-weight: bold; } + nav.contents, aside.topic, - div.admonition, div.topic, blockquote { clear: left; } /* -- topics ---------------------------------------------------------------- */ + nav.contents, aside.topic, - div.topic { border: 1px solid #ccc; padding: 7px; @@ -375,7 +368,6 @@ div.sidebar > :last-child, aside.sidebar > :last-child, nav.contents > :last-child, aside.topic > :last-child, - div.topic > :last-child, div.admonition > :last-child { margin-bottom: 0; @@ -385,7 +377,6 @@ div.sidebar::after, aside.sidebar::after, nav.contents::after, aside.topic::after, - div.topic::after, div.admonition::after, blockquote::after { @@ -611,25 +602,6 @@ ul.simple p { margin-bottom: 0; } -/* Docutils 0.17 and older (footnotes & citations) */ -dl.footnote > dt, -dl.citation > dt { - float: left; - margin-right: 0.5em; -} - -dl.footnote > dd, -dl.citation > dd { - margin-bottom: 0em; -} - -dl.footnote > dd:after, -dl.citation > dd:after { - content: ""; - clear: both; -} - -/* Docutils 0.18+ (footnotes & citations) */ aside.footnote > span, div.citation > span { float: left; @@ -654,8 +626,6 @@ div.citation > p:last-of-type:after { clear: both; } -/* Footnotes & citations ends */ - dl.field-list { display: grid; grid-template-columns: fit-content(30%) auto; @@ -668,10 +638,6 @@ dl.field-list > dt { padding-right: 5px; } -dl.field-list > dt:after { - content: ":"; -} - dl.field-list > dd { padding-left: 0.5em; margin-top: 0em; @@ -697,6 +663,16 @@ dd { margin-left: 30px; } +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; @@ -765,6 +741,14 @@ abbr, acronym { cursor: help; } +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + /* -- code displays --------------------------------------------------------- */ pre { diff --git a/docs/_static/debug.css b/docs/12.6.1/_static/debug.css similarity index 100% rename from docs/_static/debug.css rename to docs/12.6.1/_static/debug.css diff --git a/docs/12.6.1/_static/doctools.js b/docs/12.6.1/_static/doctools.js new file mode 100644 index 000000000..0398ebb9f --- /dev/null +++ b/docs/12.6.1/_static/doctools.js @@ -0,0 +1,149 @@ +/* + * Base JavaScript utilities for all Sphinx HTML documentation. + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/docs/_static/documentation_options.js b/docs/12.6.1/_static/documentation_options.js similarity index 62% rename from docs/_static/documentation_options.js rename to docs/12.6.1/_static/documentation_options.js index c63309f37..1baa85dc0 100644 --- a/docs/_static/documentation_options.js +++ b/docs/12.6.1/_static/documentation_options.js @@ -1,5 +1,4 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), +const DOCUMENTATION_OPTIONS = { VERSION: '12.6.1', LANGUAGE: 'en', COLLAPSE_INDEX: false, @@ -10,5 +9,5 @@ var DOCUMENTATION_OPTIONS = { SOURCELINK_SUFFIX: '.txt', NAVIGATION_WITH_KEYS: false, SHOW_SEARCH_SUMMARY: true, - ENABLE_SEARCH_SHORTCUTS: false, + ENABLE_SEARCH_SHORTCUTS: true, }; \ No newline at end of file diff --git a/docs/_static/file.png b/docs/12.6.1/_static/file.png similarity index 100% rename from docs/_static/file.png rename to docs/12.6.1/_static/file.png diff --git a/docs/12.6.1/_static/javascripts/version_dropdown.js b/docs/12.6.1/_static/javascripts/version_dropdown.js new file mode 100644 index 000000000..29860a8f8 --- /dev/null +++ b/docs/12.6.1/_static/javascripts/version_dropdown.js @@ -0,0 +1,58 @@ +function change_current_version(event) { + event.preventDefault(); + + var selectedVersion = event.target.textContent; + var currentVersion = document.getElementById('currentVersion'); + + // need to update both the on-screen state and the internal (persistent) storage + currentVersion.textContent = selectedVersion; + sessionStorage.setItem("currentVersion", selectedVersion); + + // Navigate to the clicked URL + window.location.href = event.target.href; +} + + +function add_version_dropdown(jsonLoc, targetLoc, currentVersion) { + var otherVersionsDiv = document.getElementById('otherVersions'); + + fetch(jsonLoc) + .then(function(response) { + return response.json(); + }) + .then(function(data) { + var versions = data; + + if (Object.keys(versions).length >= 1) { + var dlElement = document.createElement('dl'); + var dtElement = document.createElement('dt'); + dtElement.textContent = 'Versions'; + dlElement.appendChild(dtElement); + + for (var ver in versions) { + var url = versions[ver]; + var ddElement = document.createElement('dd'); + var aElement = document.createElement('a'); + aElement.setAttribute('href', targetLoc + url); + aElement.textContent = ver; + + if (ver === currentVersion) { + var strongElement = document.createElement('strong'); + strongElement.appendChild(aElement); + aElement = strongElement; + } + + ddElement.appendChild(aElement); + // Attach event listeners to version links + ddElement.addEventListener('click', change_current_version); + dlElement.appendChild(ddElement); + } + + otherVersionsDiv.innerHTML = ''; + otherVersionsDiv.appendChild(dlElement); + } + }) + .catch(function(error) { + console.error('Error fetching version.json:', error); + }); +} diff --git a/docs/_static/language_data.js b/docs/12.6.1/_static/language_data.js similarity index 95% rename from docs/_static/language_data.js rename to docs/12.6.1/_static/language_data.js index 2e22b06ab..c7fe6c6fa 100644 --- a/docs/_static/language_data.js +++ b/docs/12.6.1/_static/language_data.js @@ -1,19 +1,12 @@ /* - * language_data.js - * ~~~~~~~~~~~~~~~~ - * * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * */ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; -/* Non-minified version is copied as a separate JS file, is available */ +/* Non-minified version is copied as a separate JS file, if available */ /** * Porter Stemmer diff --git a/docs/_static/logo-dark-mode.png b/docs/12.6.1/_static/logo-dark-mode.png similarity index 100% rename from docs/_static/logo-dark-mode.png rename to docs/12.6.1/_static/logo-dark-mode.png diff --git a/docs/_static/logo-light-mode.png b/docs/12.6.1/_static/logo-light-mode.png similarity index 100% rename from docs/_static/logo-light-mode.png rename to docs/12.6.1/_static/logo-light-mode.png diff --git a/docs/_static/minus.png b/docs/12.6.1/_static/minus.png similarity index 100% rename from docs/_static/minus.png rename to docs/12.6.1/_static/minus.png diff --git a/docs/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css b/docs/12.6.1/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css similarity index 100% rename from docs/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css rename to docs/12.6.1/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css diff --git a/docs/_static/plus.png b/docs/12.6.1/_static/plus.png similarity index 100% rename from docs/_static/plus.png rename to docs/12.6.1/_static/plus.png diff --git a/docs/_static/pygments.css b/docs/12.6.1/_static/pygments.css similarity index 96% rename from docs/_static/pygments.css rename to docs/12.6.1/_static/pygments.css index d9a83a7ba..02b4b1281 100644 --- a/docs/_static/pygments.css +++ b/docs/12.6.1/_static/pygments.css @@ -22,6 +22,7 @@ .highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ .highlight .gd { color: #a40000 } /* Generic.Deleted */ .highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ .highlight .gr { color: #ef2929 } /* Generic.Error */ .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ .highlight .gi { color: #00A000 } /* Generic.Inserted */ @@ -105,16 +106,17 @@ body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ -body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */ +body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ @@ -190,16 +192,17 @@ body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bol body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ -body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ -body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ -body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ diff --git a/docs/_static/scripts/furo-extensions.js b/docs/12.6.1/_static/scripts/furo-extensions.js similarity index 100% rename from docs/_static/scripts/furo-extensions.js rename to docs/12.6.1/_static/scripts/furo-extensions.js diff --git a/docs/_static/scripts/furo.js b/docs/12.6.1/_static/scripts/furo.js similarity index 64% rename from docs/_static/scripts/furo.js rename to docs/12.6.1/_static/scripts/furo.js index cbf64878d..0abb2afac 100644 --- a/docs/_static/scripts/furo.js +++ b/docs/12.6.1/_static/scripts/furo.js @@ -1,3 +1,3 @@ /*! For license information please see furo.js.LICENSE.txt */ -(()=>{var t={212:function(t,e,n){var o,r;r=void 0!==n.g?n.g:"undefined"!=typeof window?window:this,o=function(){return function(t){"use strict";var e={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},n=function(t,e,n){if(n.settings.events){var o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(o)}},o=function(t){var e=0;if(t.offsetParent)for(;t;)e+=t.offsetTop,t=t.offsetParent;return e>=0?e:0},r=function(t){t&&t.sort((function(t,e){return o(t.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},l=function(t,e){var n=t[t.length-1];if(function(t,e){return!(!s()||!c(t.content,e,!0))}(n,e))return n;for(var o=t.length-1;o>=0;o--)if(c(t[o].content,e))return t[o]},a=function(t,e){if(e.nested&&t.parentNode){var n=t.parentNode.closest("li");n&&(n.classList.remove(e.nestedClass),a(n,e))}},i=function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.remove(e.navClass),t.content.classList.remove(e.contentClass),a(o,e),n("gumshoeDeactivate",o,{link:t.nav,content:t.content,settings:e}))}},u=function(t,e){if(e.nested){var n=t.parentNode.closest("li");n&&(n.classList.add(e.nestedClass),u(n,e))}};return function(o,c){var s,a,d,f,m,v={setup:function(){s=document.querySelectorAll(o),a=[],Array.prototype.forEach.call(s,(function(t){var e=document.getElementById(decodeURIComponent(t.hash.substr(1)));e&&a.push({nav:t,content:e})})),r(a)},detect:function(){var t=l(a,m);t?d&&t.content===d.content||(i(d,m),function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.add(e.navClass),t.content.classList.add(e.contentClass),u(o,e),n("gumshoeActivate",o,{link:t.nav,content:t.content,settings:e}))}}(t,m),d=t):d&&(i(d,m),d=null)}},h=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame(v.detect)},g=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame((function(){r(a),v.detect()}))};return v.destroy=function(){d&&i(d,m),t.removeEventListener("scroll",h,!1),m.reflow&&t.removeEventListener("resize",g,!1),a=null,s=null,d=null,f=null,m=null},m=function(){var t={};return Array.prototype.forEach.call(arguments,(function(e){for(var n in e){if(!e.hasOwnProperty(n))return;t[n]=e[n]}})),t}(e,c||{}),v.setup(),v.detect(),t.addEventListener("scroll",h,!1),m.reflow&&t.addEventListener("resize",g,!1),v}}(r)}.apply(e,[]),void 0===o||(t.exports=o)}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var c=e[o]={exports:{}};return t[o].call(c.exports,c,c.exports,n),c.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(212),e=n.n(t),o=null,r=null,c=window.pageYOffset||document.documentElement.scrollTop;function s(){const t=localStorage.getItem("theme")||"auto";var e;"light"!==(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"auto"===t?"light":"light"==t?"dark":"auto":"auto"===t?"dark":"dark"==t?"light":"auto")&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto"),document.body.dataset.theme=e,localStorage.setItem("theme",e),console.log(`Changed to ${e} mode.`)}function l(){!function(){const t=document.getElementsByClassName("theme-toggle");Array.from(t).forEach((t=>{t.addEventListener("click",s)}))}(),function(){let t=0,e=!1;window.addEventListener("scroll",(function(n){t=window.scrollY,e||(window.requestAnimationFrame((function(){var n;n=t,0==Math.floor(r.getBoundingClientRect().top)?r.classList.add("scrolled"):r.classList.remove("scrolled"),function(t){t<64?document.documentElement.classList.remove("show-back-to-top"):tc&&document.documentElement.classList.remove("show-back-to-top"),c=t}(n),function(t){null!==o&&(0==t?o.scrollTo(0,0):Math.ceil(t)>=Math.floor(document.documentElement.scrollHeight-window.innerHeight)?o.scrollTo(0,o.scrollHeight):document.querySelector(".scroll-current"))}(n),e=!1})),e=!0)})),window.scroll()}(),null!==o&&new(e())(".toc-tree a",{reflow:!0,recursive:!0,navClass:"scroll-current",offset:()=>{let t=parseFloat(getComputedStyle(document.documentElement).fontSize);return r.getBoundingClientRect().height+.5*t+1}})}document.addEventListener("DOMContentLoaded",(function(){document.body.parentNode.classList.remove("no-js"),r=document.querySelector("header"),o=document.querySelector(".toc-scroll"),l()}))})()})(); +(()=>{var t={856:function(t,e,n){var o,r;r=void 0!==n.g?n.g:"undefined"!=typeof window?window:this,o=function(){return function(t){"use strict";var e={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},n=function(t,e,n){if(n.settings.events){var o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(o)}},o=function(t){var e=0;if(t.offsetParent)for(;t;)e+=t.offsetTop,t=t.offsetParent;return e>=0?e:0},r=function(t){t&&t.sort((function(t,e){return o(t.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},l=function(t,e){var n=t[t.length-1];if(function(t,e){return!(!s()||!c(t.content,e,!0))}(n,e))return n;for(var o=t.length-1;o>=0;o--)if(c(t[o].content,e))return t[o]},a=function(t,e){if(e.nested&&t.parentNode){var n=t.parentNode.closest("li");n&&(n.classList.remove(e.nestedClass),a(n,e))}},i=function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.remove(e.navClass),t.content.classList.remove(e.contentClass),a(o,e),n("gumshoeDeactivate",o,{link:t.nav,content:t.content,settings:e}))}},u=function(t,e){if(e.nested){var n=t.parentNode.closest("li");n&&(n.classList.add(e.nestedClass),u(n,e))}};return function(o,c){var s,a,d,f,m,v={setup:function(){s=document.querySelectorAll(o),a=[],Array.prototype.forEach.call(s,(function(t){var e=document.getElementById(decodeURIComponent(t.hash.substr(1)));e&&a.push({nav:t,content:e})})),r(a)},detect:function(){var t=l(a,m);t?d&&t.content===d.content||(i(d,m),function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.add(e.navClass),t.content.classList.add(e.contentClass),u(o,e),n("gumshoeActivate",o,{link:t.nav,content:t.content,settings:e}))}}(t,m),d=t):d&&(i(d,m),d=null)}},h=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame(v.detect)},g=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame((function(){r(a),v.detect()}))};return v.destroy=function(){d&&i(d,m),t.removeEventListener("scroll",h,!1),m.reflow&&t.removeEventListener("resize",g,!1),a=null,s=null,d=null,f=null,m=null},m=function(){var t={};return Array.prototype.forEach.call(arguments,(function(e){for(var n in e){if(!e.hasOwnProperty(n))return;t[n]=e[n]}})),t}(e,c||{}),v.setup(),v.detect(),t.addEventListener("scroll",h,!1),m.reflow&&t.addEventListener("resize",g,!1),v}}(r)}.apply(e,[]),void 0===o||(t.exports=o)}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var c=e[o]={exports:{}};return t[o].call(c.exports,c,c.exports,n),c.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(856),e=n.n(t),o=null,r=null,c=document.documentElement.scrollTop;const s=64;function l(){const t=localStorage.getItem("theme")||"auto";var e;"light"!==(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"auto"===t?"light":"light"==t?"dark":"auto":"auto"===t?"dark":"dark"==t?"light":"auto")&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto"),document.body.dataset.theme=e,localStorage.setItem("theme",e),console.log(`Changed to ${e} mode.`)}function a(){!function(){const t=document.getElementsByClassName("theme-toggle");Array.from(t).forEach((t=>{t.addEventListener("click",l)}))}(),function(){let t=0,e=!1;window.addEventListener("scroll",(function(n){t=window.scrollY,e||(window.requestAnimationFrame((function(){var n;(function(t){const e=Math.floor(r.getBoundingClientRect().top);console.log(`headerTop: ${e}`),0==e&&t!=e?r.classList.add("scrolled"):r.classList.remove("scrolled")})(n=t),function(t){tc&&document.documentElement.classList.remove("show-back-to-top"),c=t}(n),function(t){null!==o&&(0==t?o.scrollTo(0,0):Math.ceil(t)>=Math.floor(document.documentElement.scrollHeight-window.innerHeight)?o.scrollTo(0,o.scrollHeight):document.querySelector(".scroll-current"))}(n),e=!1})),e=!0)})),window.scroll()}(),null!==o&&new(e())(".toc-tree a",{reflow:!0,recursive:!0,navClass:"scroll-current",offset:()=>{let t=parseFloat(getComputedStyle(document.documentElement).fontSize);return r.getBoundingClientRect().height+2.5*t+1}})}document.addEventListener("DOMContentLoaded",(function(){document.body.parentNode.classList.remove("no-js"),r=document.querySelector("header"),o=document.querySelector(".toc-scroll"),a()}))})()})(); //# sourceMappingURL=furo.js.map \ No newline at end of file diff --git a/docs/_static/scripts/furo.js.LICENSE.txt b/docs/12.6.1/_static/scripts/furo.js.LICENSE.txt similarity index 100% rename from docs/_static/scripts/furo.js.LICENSE.txt rename to docs/12.6.1/_static/scripts/furo.js.LICENSE.txt diff --git a/docs/12.6.1/_static/scripts/furo.js.map b/docs/12.6.1/_static/scripts/furo.js.map new file mode 100644 index 000000000..80ea12b85 --- /dev/null +++ b/docs/12.6.1/_static/scripts/furo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/furo.js","mappings":";iCAAA,MAQWA,SAWS,IAAX,EAAAC,EACH,EAAAA,EACkB,oBAAXC,OACLA,OACAC,KAbO,EAAF,WACP,OAaJ,SAAUD,GACR,aAMA,IAAIE,EAAW,CAEbC,SAAU,SACVC,aAAc,SAGdC,QAAQ,EACRC,YAAa,SAGbC,OAAQ,EACRC,QAAQ,EAGRC,QAAQ,GA6BNC,EAAY,SAAUC,EAAMC,EAAMC,GAEpC,GAAKA,EAAOC,SAASL,OAArB,CAGA,IAAIM,EAAQ,IAAIC,YAAYL,EAAM,CAChCM,SAAS,EACTC,YAAY,EACZL,OAAQA,IAIVD,EAAKO,cAAcJ,EAVgB,CAWrC,EAOIK,EAAe,SAAUR,GAC3B,IAAIS,EAAW,EACf,GAAIT,EAAKU,aACP,KAAOV,GACLS,GAAYT,EAAKW,UACjBX,EAAOA,EAAKU,aAGhB,OAAOD,GAAY,EAAIA,EAAW,CACpC,EAMIG,EAAe,SAAUC,GACvBA,GACFA,EAASC,MAAK,SAAUC,EAAOC,GAG7B,OAFcR,EAAaO,EAAME,SACnBT,EAAaQ,EAAMC,UACF,EACxB,CACT,GAEJ,EAwCIC,EAAW,SAAUlB,EAAME,EAAUiB,GACvC,IAAIC,EAASpB,EAAKqB,wBACd1B,EAnCU,SAAUO,GAExB,MAA+B,mBAApBA,EAASP,OACX2B,WAAWpB,EAASP,UAItB2B,WAAWpB,EAASP,OAC7B,CA2Be4B,CAAUrB,GACvB,OAAIiB,EAEAK,SAASJ,EAAOD,OAAQ,KACvB/B,EAAOqC,aAAeC,SAASC,gBAAgBC,cAG7CJ,SAASJ,EAAOS,IAAK,KAAOlC,CACrC,EAMImC,EAAa,WACf,OACEC,KAAKC,KAAK5C,EAAOqC,YAAcrC,EAAO6C,cAnCjCF,KAAKG,IACVR,SAASS,KAAKC,aACdV,SAASC,gBAAgBS,aACzBV,SAASS,KAAKE,aACdX,SAASC,gBAAgBU,aACzBX,SAASS,KAAKP,aACdF,SAASC,gBAAgBC,aAkC7B,EAmBIU,EAAY,SAAUzB,EAAUX,GAClC,IAAIqC,EAAO1B,EAASA,EAAS2B,OAAS,GACtC,GAbgB,SAAUC,EAAMvC,GAChC,SAAI4B,MAAgBZ,EAASuB,EAAKxB,QAASf,GAAU,GAEvD,CAUMwC,CAAYH,EAAMrC,GAAW,OAAOqC,EACxC,IAAK,IAAII,EAAI9B,EAAS2B,OAAS,EAAGG,GAAK,EAAGA,IACxC,GAAIzB,EAASL,EAAS8B,GAAG1B,QAASf,GAAW,OAAOW,EAAS8B,EAEjE,EAOIC,EAAmB,SAAUC,EAAK3C,GAEpC,GAAKA,EAAST,QAAWoD,EAAIC,WAA7B,CAGA,IAAIC,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASR,aAG7BkD,EAAiBG,EAAI7C,GAV0B,CAWjD,EAOIiD,EAAa,SAAUC,EAAOlD,GAEhC,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASX,UAC7B6D,EAAMnC,QAAQgC,UAAUC,OAAOhD,EAASV,cAGxCoD,EAAiBG,EAAI7C,GAGrBJ,EAAU,oBAAqBiD,EAAI,CACjCM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,IAjBM,CAmBpB,EAOIoD,EAAiB,SAAUT,EAAK3C,GAElC,GAAKA,EAAST,OAAd,CAGA,IAAIsD,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASR,aAG1B4D,EAAeP,EAAI7C,GAVS,CAW9B,EA6LA,OA1JkB,SAAUsD,EAAUC,GAKpC,IACIC,EAAU7C,EAAU8C,EAASC,EAAS1D,EADtC2D,EAAa,CAUjBA,MAAmB,WAEjBH,EAAWhC,SAASoC,iBAAiBN,GAGrC3C,EAAW,GAGXkD,MAAMC,UAAUC,QAAQC,KAAKR,GAAU,SAAUjB,GAE/C,IAAIxB,EAAUS,SAASyC,eACrBC,mBAAmB3B,EAAK4B,KAAKC,OAAO,KAEjCrD,GAGLJ,EAAS0D,KAAK,CACZ1B,IAAKJ,EACLxB,QAASA,GAEb,IAGAL,EAAaC,EACf,EAKAgD,OAAoB,WAElB,IAAIW,EAASlC,EAAUzB,EAAUX,GAG5BsE,EASDb,GAAWa,EAAOvD,UAAY0C,EAAQ1C,UAG1CkC,EAAWQ,EAASzD,GAzFT,SAAUkD,EAAOlD,GAE9B,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASX,UAC1B6D,EAAMnC,QAAQgC,UAAUM,IAAIrD,EAASV,cAGrC8D,EAAeP,EAAI7C,GAGnBJ,EAAU,kBAAmBiD,EAAI,CAC/BM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,IAjBM,CAmBpB,CAqEIuE,CAASD,EAAQtE,GAGjByD,EAAUa,GAfJb,IACFR,EAAWQ,EAASzD,GACpByD,EAAU,KAchB,GAMIe,EAAgB,SAAUvE,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,sBAAsBf,EAAWgB,OACpD,EAMIC,EAAgB,SAAU3E,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,uBAAsB,WACrChE,EAAaC,GACbgD,EAAWgB,QACb,GACF,EAkDA,OA7CAhB,EAAWkB,QAAU,WAEfpB,GACFR,EAAWQ,EAASzD,GAItBd,EAAO4F,oBAAoB,SAAUN,GAAe,GAChDxE,EAASN,QACXR,EAAO4F,oBAAoB,SAAUF,GAAe,GAItDjE,EAAW,KACX6C,EAAW,KACXC,EAAU,KACVC,EAAU,KACV1D,EAAW,IACb,EAOEA,EA3XS,WACX,IAAI+E,EAAS,CAAC,EAOd,OANAlB,MAAMC,UAAUC,QAAQC,KAAKgB,WAAW,SAAUC,GAChD,IAAK,IAAIC,KAAOD,EAAK,CACnB,IAAKA,EAAIE,eAAeD,GAAM,OAC9BH,EAAOG,GAAOD,EAAIC,EACpB,CACF,IACOH,CACT,CAkXeK,CAAOhG,EAAUmE,GAAW,CAAC,GAGxCI,EAAW0B,QAGX1B,EAAWgB,SAGXzF,EAAOoG,iBAAiB,SAAUd,GAAe,GAC7CxE,EAASN,QACXR,EAAOoG,iBAAiB,SAAUV,GAAe,GAS9CjB,CACT,CAOF,CArcW4B,CAAQvG,EAChB,UAFM,SAEN,uBCXDwG,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAU1B,KAAK8B,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAGpEK,EAAOD,OACf,CCrBAJ,EAAoBO,EAAKF,IACxB,IAAIG,EAASH,GAAUA,EAAOI,WAC7B,IAAOJ,EAAiB,QACxB,IAAM,EAEP,OADAL,EAAoBU,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdR,EAAoBU,EAAI,CAACN,EAASQ,KACjC,IAAI,IAAInB,KAAOmB,EACXZ,EAAoBa,EAAED,EAAYnB,KAASO,EAAoBa,EAAET,EAASX,IAC5EqB,OAAOC,eAAeX,EAASX,EAAK,CAAEuB,YAAY,EAAMC,IAAKL,EAAWnB,IAE1E,ECNDO,EAAoBxG,EAAI,WACvB,GAA0B,iBAAf0H,WAAyB,OAAOA,WAC3C,IACC,OAAOxH,MAAQ,IAAIyH,SAAS,cAAb,EAChB,CAAE,MAAOC,GACR,GAAsB,iBAAX3H,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxBuG,EAAoBa,EAAI,CAACrB,EAAK6B,IAAUP,OAAOzC,UAAUqB,eAAenB,KAAKiB,EAAK6B,4CCK9EC,EAAY,KACZC,EAAS,KACTC,EAAgBzF,SAASC,gBAAgByF,UAC7C,MAAMC,EAAmB,GA8EzB,SAASC,IACP,MAAMC,EAAeC,aAAaC,QAAQ,UAAY,OAZxD,IAAkBC,EACH,WADGA,EAaItI,OAAOuI,WAAW,gCAAgCC,QAI/C,SAAjBL,EACO,QACgB,SAAhBA,EACA,OAEA,OAIU,SAAjBA,EACO,OACgB,QAAhBA,EACA,QAEA,SA9BoB,SAATG,GAA4B,SAATA,IACzCG,QAAQC,MAAM,2BAA2BJ,yBACzCA,EAAO,QAGThG,SAASS,KAAK4F,QAAQC,MAAQN,EAC9BF,aAAaS,QAAQ,QAASP,GAC9BG,QAAQK,IAAI,cAAcR,UA0B5B,CAkDA,SAASnC,KART,WAEE,MAAM4C,EAAUzG,SAAS0G,uBAAuB,gBAChDrE,MAAMsE,KAAKF,GAASlE,SAASqE,IAC3BA,EAAI9C,iBAAiB,QAAS8B,EAAe,GAEjD,CAGEiB,GA9CF,WAEE,IAAIC,EAA6B,EAC7BC,GAAU,EAEdrJ,OAAOoG,iBAAiB,UAAU,SAAUuB,GAC1CyB,EAA6BpJ,OAAOsJ,QAE/BD,IACHrJ,OAAOwF,uBAAsB,WAzDnC,IAAuB+D,GAxDvB,SAAgCA,GAC9B,MAAMC,EAAY7G,KAAK8G,MAAM3B,EAAO7F,wBAAwBQ,KAE5DgG,QAAQK,IAAI,cAAcU,KACT,GAAbA,GAAkBD,GAAaC,EACjC1B,EAAOjE,UAAUM,IAAI,YAErB2D,EAAOjE,UAAUC,OAAO,WAE5B,EAgDE4F,CADqBH,EA0DDH,GAvGtB,SAAmCG,GAC7BA,EAAYtB,EACd3F,SAASC,gBAAgBsB,UAAUC,OAAO,oBAEtCyF,EAAYxB,EACdzF,SAASC,gBAAgBsB,UAAUM,IAAI,oBAC9BoF,EAAYxB,GACrBzF,SAASC,gBAAgBsB,UAAUC,OAAO,oBAG9CiE,EAAgBwB,CAClB,CAoCEI,CAA0BJ,GAlC5B,SAA6BA,GACT,OAAd1B,IAKa,GAAb0B,EACF1B,EAAU+B,SAAS,EAAG,GAGtBjH,KAAKC,KAAK2G,IACV5G,KAAK8G,MAAMnH,SAASC,gBAAgBS,aAAehD,OAAOqC,aAE1DwF,EAAU+B,SAAS,EAAG/B,EAAU7E,cAGhBV,SAASuH,cAAc,mBAc3C,CAKEC,CAAoBP,GAwDdF,GAAU,CACZ,IAEAA,GAAU,EAEd,IACArJ,OAAO+J,QACT,CA6BEC,GA1BkB,OAAdnC,GAKJ,IAAI,IAAJ,CAAY,cAAe,CACzBrH,QAAQ,EACRyJ,WAAW,EACX9J,SAAU,iBACVI,OAAQ,KACN,IAAI2J,EAAMhI,WAAWiI,iBAAiB7H,SAASC,iBAAiB6H,UAChE,OAAOtC,EAAO7F,wBAAwBoI,OAAS,IAAMH,EAAM,CAAC,GAiBlE,CAcA5H,SAAS8D,iBAAiB,oBAT1B,WACE9D,SAASS,KAAKW,WAAWG,UAAUC,OAAO,SAE1CgE,EAASxF,SAASuH,cAAc,UAChChC,EAAYvF,SAASuH,cAAc,eAEnC1D,GACF","sources":["webpack:///./src/furo/assets/scripts/gumshoe-patched.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./src/furo/assets/scripts/furo.js"],"sourcesContent":["/*!\n * gumshoejs v5.1.2 (patched by @pradyunsg)\n * A simple, framework-agnostic scrollspy script.\n * (c) 2019 Chris Ferdinandi\n * MIT License\n * http://github.com/cferdinandi/gumshoe\n */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], function () {\n return factory(root);\n });\n } else if (typeof exports === \"object\") {\n module.exports = factory(root);\n } else {\n root.Gumshoe = factory(root);\n }\n})(\n typeof global !== \"undefined\"\n ? global\n : typeof window !== \"undefined\"\n ? window\n : this,\n function (window) {\n \"use strict\";\n\n //\n // Defaults\n //\n\n var defaults = {\n // Active classes\n navClass: \"active\",\n contentClass: \"active\",\n\n // Nested navigation\n nested: false,\n nestedClass: \"active\",\n\n // Offset & reflow\n offset: 0,\n reflow: false,\n\n // Event support\n events: true,\n };\n\n //\n // Methods\n //\n\n /**\n * Merge two or more objects together.\n * @param {Object} objects The objects to merge together\n * @returns {Object} Merged values of defaults and options\n */\n var extend = function () {\n var merged = {};\n Array.prototype.forEach.call(arguments, function (obj) {\n for (var key in obj) {\n if (!obj.hasOwnProperty(key)) return;\n merged[key] = obj[key];\n }\n });\n return merged;\n };\n\n /**\n * Emit a custom event\n * @param {String} type The event type\n * @param {Node} elem The element to attach the event to\n * @param {Object} detail Any details to pass along with the event\n */\n var emitEvent = function (type, elem, detail) {\n // Make sure events are enabled\n if (!detail.settings.events) return;\n\n // Create a new event\n var event = new CustomEvent(type, {\n bubbles: true,\n cancelable: true,\n detail: detail,\n });\n\n // Dispatch the event\n elem.dispatchEvent(event);\n };\n\n /**\n * Get an element's distance from the top of the Document.\n * @param {Node} elem The element\n * @return {Number} Distance from the top in pixels\n */\n var getOffsetTop = function (elem) {\n var location = 0;\n if (elem.offsetParent) {\n while (elem) {\n location += elem.offsetTop;\n elem = elem.offsetParent;\n }\n }\n return location >= 0 ? location : 0;\n };\n\n /**\n * Sort content from first to last in the DOM\n * @param {Array} contents The content areas\n */\n var sortContents = function (contents) {\n if (contents) {\n contents.sort(function (item1, item2) {\n var offset1 = getOffsetTop(item1.content);\n var offset2 = getOffsetTop(item2.content);\n if (offset1 < offset2) return -1;\n return 1;\n });\n }\n };\n\n /**\n * Get the offset to use for calculating position\n * @param {Object} settings The settings for this instantiation\n * @return {Float} The number of pixels to offset the calculations\n */\n var getOffset = function (settings) {\n // if the offset is a function run it\n if (typeof settings.offset === \"function\") {\n return parseFloat(settings.offset());\n }\n\n // Otherwise, return it as-is\n return parseFloat(settings.offset);\n };\n\n /**\n * Get the document element's height\n * @private\n * @returns {Number}\n */\n var getDocumentHeight = function () {\n return Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.offsetHeight,\n document.body.clientHeight,\n document.documentElement.clientHeight,\n );\n };\n\n /**\n * Determine if an element is in view\n * @param {Node} elem The element\n * @param {Object} settings The settings for this instantiation\n * @param {Boolean} bottom If true, check if element is above bottom of viewport instead\n * @return {Boolean} Returns true if element is in the viewport\n */\n var isInView = function (elem, settings, bottom) {\n var bounds = elem.getBoundingClientRect();\n var offset = getOffset(settings);\n if (bottom) {\n return (\n parseInt(bounds.bottom, 10) <\n (window.innerHeight || document.documentElement.clientHeight)\n );\n }\n return parseInt(bounds.top, 10) <= offset;\n };\n\n /**\n * Check if at the bottom of the viewport\n * @return {Boolean} If true, page is at the bottom of the viewport\n */\n var isAtBottom = function () {\n if (\n Math.ceil(window.innerHeight + window.pageYOffset) >=\n getDocumentHeight()\n )\n return true;\n return false;\n };\n\n /**\n * Check if the last item should be used (even if not at the top of the page)\n * @param {Object} item The last item\n * @param {Object} settings The settings for this instantiation\n * @return {Boolean} If true, use the last item\n */\n var useLastItem = function (item, settings) {\n if (isAtBottom() && isInView(item.content, settings, true)) return true;\n return false;\n };\n\n /**\n * Get the active content\n * @param {Array} contents The content areas\n * @param {Object} settings The settings for this instantiation\n * @return {Object} The content area and matching navigation link\n */\n var getActive = function (contents, settings) {\n var last = contents[contents.length - 1];\n if (useLastItem(last, settings)) return last;\n for (var i = contents.length - 1; i >= 0; i--) {\n if (isInView(contents[i].content, settings)) return contents[i];\n }\n };\n\n /**\n * Deactivate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var deactivateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested || !nav.parentNode) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Remove the active class\n li.classList.remove(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n deactivateNested(li, settings);\n };\n\n /**\n * Deactivate a nav and content area\n * @param {Object} items The nav item and content to deactivate\n * @param {Object} settings The settings for this instantiation\n */\n var deactivate = function (items, settings) {\n // Make sure there are items to deactivate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Remove the active class from the nav and content\n li.classList.remove(settings.navClass);\n items.content.classList.remove(settings.contentClass);\n\n // Deactivate any parent navs in a nested navigation\n deactivateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeDeactivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Activate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var activateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Add the active class\n li.classList.add(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n activateNested(li, settings);\n };\n\n /**\n * Activate a nav and content area\n * @param {Object} items The nav item and content to activate\n * @param {Object} settings The settings for this instantiation\n */\n var activate = function (items, settings) {\n // Make sure there are items to activate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Add the active class to the nav and content\n li.classList.add(settings.navClass);\n items.content.classList.add(settings.contentClass);\n\n // Activate any parent navs in a nested navigation\n activateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeActivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Create the Constructor object\n * @param {String} selector The selector to use for navigation items\n * @param {Object} options User options and settings\n */\n var Constructor = function (selector, options) {\n //\n // Variables\n //\n\n var publicAPIs = {};\n var navItems, contents, current, timeout, settings;\n\n //\n // Methods\n //\n\n /**\n * Set variables from DOM elements\n */\n publicAPIs.setup = function () {\n // Get all nav items\n navItems = document.querySelectorAll(selector);\n\n // Create contents array\n contents = [];\n\n // Loop through each item, get it's matching content, and push to the array\n Array.prototype.forEach.call(navItems, function (item) {\n // Get the content for the nav item\n var content = document.getElementById(\n decodeURIComponent(item.hash.substr(1)),\n );\n if (!content) return;\n\n // Push to the contents array\n contents.push({\n nav: item,\n content: content,\n });\n });\n\n // Sort contents by the order they appear in the DOM\n sortContents(contents);\n };\n\n /**\n * Detect which content is currently active\n */\n publicAPIs.detect = function () {\n // Get the active content\n var active = getActive(contents, settings);\n\n // if there's no active content, deactivate and bail\n if (!active) {\n if (current) {\n deactivate(current, settings);\n current = null;\n }\n return;\n }\n\n // If the active content is the one currently active, do nothing\n if (current && active.content === current.content) return;\n\n // Deactivate the current content and activate the new content\n deactivate(current, settings);\n activate(active, settings);\n\n // Update the currently active content\n current = active;\n };\n\n /**\n * Detect the active content on scroll\n * Debounced for performance\n */\n var scrollHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(publicAPIs.detect);\n };\n\n /**\n * Update content sorting on resize\n * Debounced for performance\n */\n var resizeHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(function () {\n sortContents(contents);\n publicAPIs.detect();\n });\n };\n\n /**\n * Destroy the current instantiation\n */\n publicAPIs.destroy = function () {\n // Undo DOM changes\n if (current) {\n deactivate(current, settings);\n }\n\n // Remove event listeners\n window.removeEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.removeEventListener(\"resize\", resizeHandler, false);\n }\n\n // Reset variables\n contents = null;\n navItems = null;\n current = null;\n timeout = null;\n settings = null;\n };\n\n /**\n * Initialize the current instantiation\n */\n var init = function () {\n // Merge user options into defaults\n settings = extend(defaults, options || {});\n\n // Setup variables based on the current DOM\n publicAPIs.setup();\n\n // Find the currently active content\n publicAPIs.detect();\n\n // Setup event listeners\n window.addEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.addEventListener(\"resize\", resizeHandler, false);\n }\n };\n\n //\n // Initialize and return the public APIs\n //\n\n init();\n return publicAPIs;\n };\n\n //\n // Return the Constructor\n //\n\n return Constructor;\n },\n);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import Gumshoe from \"./gumshoe-patched.js\";\n\n////////////////////////////////////////////////////////////////////////////////\n// Scroll Handling\n////////////////////////////////////////////////////////////////////////////////\nvar tocScroll = null;\nvar header = null;\nvar lastScrollTop = document.documentElement.scrollTop;\nconst GO_TO_TOP_OFFSET = 64;\n\nfunction scrollHandlerForHeader(positionY) {\n const headerTop = Math.floor(header.getBoundingClientRect().top);\n\n console.log(`headerTop: ${headerTop}`);\n if (headerTop == 0 && positionY != headerTop) {\n header.classList.add(\"scrolled\");\n } else {\n header.classList.remove(\"scrolled\");\n }\n}\n\nfunction scrollHandlerForBackToTop(positionY) {\n if (positionY < GO_TO_TOP_OFFSET) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n } else {\n if (positionY < lastScrollTop) {\n document.documentElement.classList.add(\"show-back-to-top\");\n } else if (positionY > lastScrollTop) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n }\n }\n lastScrollTop = positionY;\n}\n\nfunction scrollHandlerForTOC(positionY) {\n if (tocScroll === null) {\n return;\n }\n\n // top of page.\n if (positionY == 0) {\n tocScroll.scrollTo(0, 0);\n } else if (\n // bottom of page.\n Math.ceil(positionY) >=\n Math.floor(document.documentElement.scrollHeight - window.innerHeight)\n ) {\n tocScroll.scrollTo(0, tocScroll.scrollHeight);\n } else {\n // somewhere in the middle.\n const current = document.querySelector(\".scroll-current\");\n if (current == null) {\n return;\n }\n\n // https://github.com/pypa/pip/issues/9159 This breaks scroll behaviours.\n // // scroll the currently \"active\" heading in toc, into view.\n // const rect = current.getBoundingClientRect();\n // if (0 > rect.top) {\n // current.scrollIntoView(true); // the argument is \"alignTop\"\n // } else if (rect.bottom > window.innerHeight) {\n // current.scrollIntoView(false);\n // }\n }\n}\n\nfunction scrollHandler(positionY) {\n scrollHandlerForHeader(positionY);\n scrollHandlerForBackToTop(positionY);\n scrollHandlerForTOC(positionY);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Theme Toggle\n////////////////////////////////////////////////////////////////////////////////\nfunction setTheme(mode) {\n if (mode !== \"light\" && mode !== \"dark\" && mode !== \"auto\") {\n console.error(`Got invalid theme mode: ${mode}. Resetting to auto.`);\n mode = \"auto\";\n }\n\n document.body.dataset.theme = mode;\n localStorage.setItem(\"theme\", mode);\n console.log(`Changed to ${mode} mode.`);\n}\n\nfunction cycleThemeOnce() {\n const currentTheme = localStorage.getItem(\"theme\") || \"auto\";\n const prefersDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n\n if (prefersDark) {\n // Auto (dark) -> Light -> Dark\n if (currentTheme === \"auto\") {\n setTheme(\"light\");\n } else if (currentTheme == \"light\") {\n setTheme(\"dark\");\n } else {\n setTheme(\"auto\");\n }\n } else {\n // Auto (light) -> Dark -> Light\n if (currentTheme === \"auto\") {\n setTheme(\"dark\");\n } else if (currentTheme == \"dark\") {\n setTheme(\"light\");\n } else {\n setTheme(\"auto\");\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Setup\n////////////////////////////////////////////////////////////////////////////////\nfunction setupScrollHandler() {\n // Taken from https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event\n let last_known_scroll_position = 0;\n let ticking = false;\n\n window.addEventListener(\"scroll\", function (e) {\n last_known_scroll_position = window.scrollY;\n\n if (!ticking) {\n window.requestAnimationFrame(function () {\n scrollHandler(last_known_scroll_position);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n window.scroll();\n}\n\nfunction setupScrollSpy() {\n if (tocScroll === null) {\n return;\n }\n\n // Scrollspy -- highlight table on contents, based on scroll\n new Gumshoe(\".toc-tree a\", {\n reflow: true,\n recursive: true,\n navClass: \"scroll-current\",\n offset: () => {\n let rem = parseFloat(getComputedStyle(document.documentElement).fontSize);\n return header.getBoundingClientRect().height + 2.5 * rem + 1;\n },\n });\n}\n\nfunction setupTheme() {\n // Attach event handlers for toggling themes\n const buttons = document.getElementsByClassName(\"theme-toggle\");\n Array.from(buttons).forEach((btn) => {\n btn.addEventListener(\"click\", cycleThemeOnce);\n });\n}\n\nfunction setup() {\n setupTheme();\n setupScrollHandler();\n setupScrollSpy();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Main entrypoint\n////////////////////////////////////////////////////////////////////////////////\nfunction main() {\n document.body.parentNode.classList.remove(\"no-js\");\n\n header = document.querySelector(\"header\");\n tocScroll = document.querySelector(\".toc-scroll\");\n\n setup();\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", main);\n"],"names":["root","g","window","this","defaults","navClass","contentClass","nested","nestedClass","offset","reflow","events","emitEvent","type","elem","detail","settings","event","CustomEvent","bubbles","cancelable","dispatchEvent","getOffsetTop","location","offsetParent","offsetTop","sortContents","contents","sort","item1","item2","content","isInView","bottom","bounds","getBoundingClientRect","parseFloat","getOffset","parseInt","innerHeight","document","documentElement","clientHeight","top","isAtBottom","Math","ceil","pageYOffset","max","body","scrollHeight","offsetHeight","getActive","last","length","item","useLastItem","i","deactivateNested","nav","parentNode","li","closest","classList","remove","deactivate","items","link","activateNested","add","selector","options","navItems","current","timeout","publicAPIs","querySelectorAll","Array","prototype","forEach","call","getElementById","decodeURIComponent","hash","substr","push","active","activate","scrollHandler","cancelAnimationFrame","requestAnimationFrame","detect","resizeHandler","destroy","removeEventListener","merged","arguments","obj","key","hasOwnProperty","extend","setup","addEventListener","factory","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","globalThis","Function","e","prop","tocScroll","header","lastScrollTop","scrollTop","GO_TO_TOP_OFFSET","cycleThemeOnce","currentTheme","localStorage","getItem","mode","matchMedia","matches","console","error","dataset","theme","setItem","log","buttons","getElementsByClassName","from","btn","setupTheme","last_known_scroll_position","ticking","scrollY","positionY","headerTop","floor","scrollHandlerForHeader","scrollHandlerForBackToTop","scrollTo","querySelector","scrollHandlerForTOC","scroll","setupScrollHandler","recursive","rem","getComputedStyle","fontSize","height"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/_static/searchtools.js b/docs/12.6.1/_static/searchtools.js similarity index 63% rename from docs/_static/searchtools.js rename to docs/12.6.1/_static/searchtools.js index ac4d5861f..2c774d17a 100644 --- a/docs/_static/searchtools.js +++ b/docs/12.6.1/_static/searchtools.js @@ -1,12 +1,5 @@ /* - * searchtools.js - * ~~~~~~~~~~~~~~~~ - * * Sphinx JavaScript utilities for the full-text search. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * */ "use strict"; @@ -20,7 +13,7 @@ if (typeof Scorer === "undefined") { // and returns the new score. /* score: result => { - const [docname, title, anchor, descr, score, filename] = result + const [docname, title, anchor, descr, score, filename, kind] = result return score }, */ @@ -47,6 +40,14 @@ if (typeof Scorer === "undefined") { }; } +// Global search result kind enum, used by themes to style search results. +class SearchResultKind { + static get index() { return "index"; } + static get object() { return "object"; } + static get text() { return "text"; } + static get title() { return "title"; } +} + const _removeChildren = (element) => { while (element && element.lastChild) element.removeChild(element.lastChild); }; @@ -57,16 +58,20 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, highlightTerms, searchTerms) => { +const _displayItem = (item, searchTerms, highlightTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; - const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; - const [docName, title, anchor, descr] = item; + const [docName, title, anchor, descr, score, _filename, kind] = item; let listItem = document.createElement("li"); + // Add a class representing the item's type: + // can be used by a theme's CSS selector for styling + // See SearchResultKind for the class names. + listItem.classList.add(`kind-${kind}`); let requestUrl; let linkUrl; if (docBuilder === "dirhtml") { @@ -75,29 +80,35 @@ const _displayItem = (item, highlightTerms, searchTerms) => { if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; - requestUrl = docUrlRoot + dirname; + requestUrl = contentRoot + dirname; linkUrl = requestUrl; } else { // normal html builders - requestUrl = docUrlRoot + docName + docFileSuffix; + requestUrl = contentRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } - const params = new URLSearchParams(); - params.set("highlight", [...highlightTerms].join(" ")); let linkEl = listItem.appendChild(document.createElement("a")); - linkEl.href = linkUrl + "?" + params.toString() + anchor; + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; linkEl.innerHTML = title; - if (descr) - listItem.appendChild(document.createElement("span")).innerText = + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms, highlightTerms) + Search.makeSearchSummary(data, searchTerms, anchor) ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; @@ -109,28 +120,46 @@ const _finishSearch = (resultCount) => { "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." ); else - Search.status.innerText = _( - `Search finished, found ${resultCount} page(s) matching the search query.` - ); + Search.status.innerText = Documentation.ngettext( + "Search finished, found one page matching the search query.", + "Search finished, found ${resultCount} pages matching the search query.", + resultCount, + ).replace('${resultCount}', resultCount); }; const _displayNextItem = ( results, resultCount, + searchTerms, highlightTerms, - searchTerms ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), highlightTerms, searchTerms); + _displayItem(results.pop(), searchTerms, highlightTerms); setTimeout( - () => _displayNextItem(results, resultCount, highlightTerms, searchTerms), + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), 5 ); } // search finished, update title and status message else _finishSearch(resultCount); }; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -154,15 +183,26 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString) => { - const htmlElement = document - .createRange() - .createContextualFragment(htmlString); - _removeChildren(htmlElement.querySelectorAll(".headerlink")); + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent !== undefined) return docContent.textContent; + if (docContent) return docContent.textContent; + console.warn( - "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." ); return ""; }, @@ -215,6 +255,7 @@ const Search = { searchSummary.classList.add("search-summary"); searchSummary.innerText = ""; const searchList = document.createElement("ul"); + searchList.setAttribute("role", "list"); searchList.classList.add("search"); const out = document.getElementById("search-results"); @@ -235,10 +276,7 @@ const Search = { else Search.deferQuery(query); }, - /** - * execute search (requires search index to be loaded) - */ - query: (query) => { + _parseQuery: (query) => { // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -266,40 +304,98 @@ const Search = { } }); + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + // console.debug("SEARCH: searching for:"); // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - // array of [docname, title, anchor, descr, score, filename] - let results = []; + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename, kind]. + const normalResults = []; + const nonMainIndexResults = []; + _removeChildren(document.getElementById("search-progress")); + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score + boost, + filenames[file], + SearchResultKind.title, + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + SearchResultKind.index, + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + // lookup as object objectTerms.forEach((term) => - results.push(...Search.performObjectSearch(term, objectTerms)) + normalResults.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - - // now sort the results by score (in opposite order of appearance, since the - // display function below uses pop() to retrieve items) and then - // alphabetically - results.sort((a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; - }); + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -313,14 +409,19 @@ const Search = { return acc; }, []); - results = results.reverse(); + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); // for debugging //Search.lastresults = results.slice(); // a copy // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, highlightTerms, searchTerms); + _displayNextItem(results, results.length, searchTerms, highlightTerms); }, /** @@ -384,6 +485,7 @@ const Search = { descr, score, filenames[match[0]], + SearchResultKind.object, ]); }; Object.keys(objects).forEach((prefix) => @@ -401,8 +503,8 @@ const Search = { // prepare search const terms = Search._index.terms; const titleTerms = Search._index.titleterms; - const docNames = Search._index.docnames; const filenames = Search._index.filenames; + const docNames = Search._index.docnames; const titles = Search._index.titles; const scoreMap = new Map(); @@ -418,14 +520,18 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord) && !terms[word]) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord) && !titleTerms[word]) - arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); - }); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } } // no match but word was a required one @@ -448,9 +554,8 @@ const Search = { // create the mapping files.forEach((file) => { - if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) - fileMap.get(file).push(word); - else fileMap.set(file, [word]); + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); }); }); @@ -491,6 +596,7 @@ const Search = { null, score, filenames[file], + SearchResultKind.text, ]); } return results; @@ -499,16 +605,15 @@ const Search = { /** * helper function to return a node containing the * search summary for a given text. keywords is a list - * of stemmed words, highlightWords is the list of normal, unstemmed - * words. the first one is used to find the occurrence, the - * latter for highlighting it. + * of stemmed words. */ - makeSearchSummary: (htmlText, keywords, highlightWords) => { - const text = Search.htmlToText(htmlText).toLowerCase(); + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); if (text === "") return null; + const textLower = text.toLowerCase(); const actualStartPosition = [...keywords] - .map((k) => text.indexOf(k.toLowerCase())) + .map((k) => textLower.indexOf(k.toLowerCase())) .filter((i) => i > -1) .slice(-1)[0]; const startWithContext = Math.max(actualStartPosition - 120, 0); @@ -516,13 +621,9 @@ const Search = { const top = startWithContext === 0 ? "" : "..."; const tail = startWithContext + 240 < text.length ? "..." : ""; - let summary = document.createElement("div"); + let summary = document.createElement("p"); summary.classList.add("context"); - summary.innerText = top + text.substr(startWithContext, 240).trim() + tail; - - highlightWords.forEach((highlightWord) => - _highlightText(summary, highlightWord, "highlighted") - ); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; return summary; }, diff --git a/docs/_static/skeleton.css b/docs/12.6.1/_static/skeleton.css similarity index 100% rename from docs/_static/skeleton.css rename to docs/12.6.1/_static/skeleton.css diff --git a/docs/_static/sphinx_highlight.js b/docs/12.6.1/_static/sphinx_highlight.js similarity index 88% rename from docs/_static/sphinx_highlight.js rename to docs/12.6.1/_static/sphinx_highlight.js index aae669d7e..8a96c69a1 100644 --- a/docs/_static/sphinx_highlight.js +++ b/docs/12.6.1/_static/sphinx_highlight.js @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => { } span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), + rest, node.nextSibling ) ); node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( @@ -140,5 +145,10 @@ const SphinxHighlight = { }, }; -_ready(SphinxHighlight.highlightSearchWords); -_ready(SphinxHighlight.initEscapeListener); +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/docs/12.6.1/_static/styles/furo-extensions.css b/docs/12.6.1/_static/styles/furo-extensions.css new file mode 100644 index 000000000..822958761 --- /dev/null +++ b/docs/12.6.1/_static/styles/furo-extensions.css @@ -0,0 +1,2 @@ +#furo-sidebar-ad-placement{padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)}#furo-sidebar-ad-placement .ethical-sidebar{background:var(--color-background-secondary);border:none;box-shadow:none}#furo-sidebar-ad-placement .ethical-sidebar:hover{background:var(--color-background-hover)}#furo-sidebar-ad-placement .ethical-sidebar a{color:var(--color-foreground-primary)}#furo-sidebar-ad-placement .ethical-callout a{color:var(--color-foreground-secondary)!important}#furo-readthedocs-versions{background:transparent;display:block;position:static;width:100%}#furo-readthedocs-versions .rst-versions{background:#1a1c1e}#furo-readthedocs-versions .rst-current-version{background:var(--color-sidebar-item-background);cursor:unset}#furo-readthedocs-versions .rst-current-version:hover{background:var(--color-sidebar-item-background)}#furo-readthedocs-versions .rst-current-version .fa-book{color:var(--color-foreground-primary)}#furo-readthedocs-versions>.rst-other-versions{padding:0}#furo-readthedocs-versions>.rst-other-versions small{opacity:1}#furo-readthedocs-versions .injected .rst-versions{position:unset}#furo-readthedocs-versions:focus-within,#furo-readthedocs-versions:hover{box-shadow:0 0 0 1px var(--color-sidebar-background-border)}#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:hover .rst-current-version{background:#1a1c1e;font-size:inherit;height:auto;line-height:inherit;padding:12px;text-align:right}#furo-readthedocs-versions:focus-within .rst-current-version .fa-book,#furo-readthedocs-versions:hover .rst-current-version .fa-book{color:#fff;float:left}#furo-readthedocs-versions:focus-within .fa-caret-down,#furo-readthedocs-versions:hover .fa-caret-down{display:none}#furo-readthedocs-versions:focus-within .injected,#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:focus-within .rst-other-versions,#furo-readthedocs-versions:hover .injected,#furo-readthedocs-versions:hover .rst-current-version,#furo-readthedocs-versions:hover .rst-other-versions{display:block}#furo-readthedocs-versions:focus-within>.rst-current-version,#furo-readthedocs-versions:hover>.rst-current-version{display:none}.highlight:hover button.copybtn{color:var(--color-code-foreground)}.highlight button.copybtn{align-items:center;background-color:var(--color-code-background);border:none;color:var(--color-background-item);cursor:pointer;height:1.25em;right:.5rem;top:.625rem;transition:color .3s,opacity .3s;width:1.25em}.highlight button.copybtn:hover{background-color:var(--color-code-background);color:var(--color-brand-content)}.highlight button.copybtn:after{background-color:transparent;color:var(--color-code-foreground);display:none}.highlight button.copybtn.success{color:#22863a;transition:color 0ms}.highlight button.copybtn.success:after{display:block}.highlight button.copybtn svg{padding:0}body{--sd-color-primary:var(--color-brand-primary);--sd-color-primary-highlight:var(--color-brand-content);--sd-color-primary-text:var(--color-background-primary);--sd-color-shadow:rgba(0,0,0,.05);--sd-color-card-border:var(--color-card-border);--sd-color-card-border-hover:var(--color-brand-content);--sd-color-card-background:var(--color-card-background);--sd-color-card-text:var(--color-foreground-primary);--sd-color-card-header:var(--color-card-marginals-background);--sd-color-card-footer:var(--color-card-marginals-background);--sd-color-tabs-label-active:var(--color-brand-content);--sd-color-tabs-label-hover:var(--color-foreground-muted);--sd-color-tabs-label-inactive:var(--color-foreground-muted);--sd-color-tabs-underline-active:var(--color-brand-content);--sd-color-tabs-underline-hover:var(--color-foreground-border);--sd-color-tabs-underline-inactive:var(--color-background-border);--sd-color-tabs-overline:var(--color-background-border);--sd-color-tabs-underline:var(--color-background-border)}.sd-tab-content{box-shadow:0 -2px var(--sd-color-tabs-overline),0 1px var(--sd-color-tabs-underline)}.sd-card{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)}.sd-shadow-sm{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-md{box-shadow:0 .3rem .75rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-lg{box-shadow:0 .6rem 1.5rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-card-hover:hover{transform:none}.sd-cards-carousel{gap:.25rem;padding:.25rem}body{--tabs--label-text:var(--color-foreground-muted);--tabs--label-text--hover:var(--color-foreground-muted);--tabs--label-text--active:var(--color-brand-content);--tabs--label-text--active--hover:var(--color-brand-content);--tabs--label-background:transparent;--tabs--label-background--hover:transparent;--tabs--label-background--active:transparent;--tabs--label-background--active--hover:transparent;--tabs--padding-x:0.25em;--tabs--margin-x:1em;--tabs--border:var(--color-background-border);--tabs--label-border:transparent;--tabs--label-border--hover:var(--color-foreground-muted);--tabs--label-border--active:var(--color-brand-content);--tabs--label-border--active--hover:var(--color-brand-content)}[role=main] .container{max-width:none;padding-left:0;padding-right:0}.shadow.docutils{border:none;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1)!important}.sphinx-bs .card{background-color:var(--color-background-secondary);color:var(--color-foreground)} +/*# sourceMappingURL=furo-extensions.css.map*/ \ No newline at end of file diff --git a/docs/12.6.1/_static/styles/furo-extensions.css.map b/docs/12.6.1/_static/styles/furo-extensions.css.map new file mode 100644 index 000000000..c26eac7f5 --- /dev/null +++ b/docs/12.6.1/_static/styles/furo-extensions.css.map @@ -0,0 +1 @@ +{"version":3,"file":"styles/furo-extensions.css","mappings":"AAGA,2BACE,oFACA,4CAKE,6CAHA,YACA,eAEA,CACA,kDACE,yCAEF,8CACE,sCAEJ,8CACE,kDAEJ,2BAGE,uBACA,cAHA,gBACA,UAEA,CAGA,yCACE,mBAEF,gDAEE,gDADA,YACA,CACA,sDACE,gDACF,yDACE,sCAEJ,+CACE,UACA,qDACE,UAGF,mDACE,eAEJ,yEAEE,4DAEA,mHASE,mBAPA,kBAEA,YADA,oBAGA,aADA,gBAIA,CAEA,qIAEE,WADA,UACA,CAEJ,uGACE,aAEF,iUAGE,cAEF,mHACE,aC1EJ,gCACE,mCAEF,0BAEE,mBAUA,8CACA,YAFA,mCAKA,eAZA,cAIA,YADA,YAYA,iCAdA,YAcA,CAEA,gCAEE,8CADA,gCACA,CAEF,gCAGE,6BADA,mCADA,YAEA,CAEF,kCAEE,cADA,oBACA,CACA,wCACE,cAEJ,8BACE,UCzCN,KAEE,6CAA8C,CAC9C,uDAAwD,CACxD,uDAAwD,CAGxD,iCAAsC,CAGtC,+CAAgD,CAChD,uDAAwD,CACxD,uDAAwD,CACxD,oDAAqD,CACrD,6DAA8D,CAC9D,6DAA8D,CAG9D,uDAAwD,CACxD,yDAA0D,CAC1D,4DAA6D,CAC7D,2DAA4D,CAC5D,8DAA+D,CAC/D,iEAAkE,CAClE,uDAAwD,CACxD,wDAAyD,CAG3D,gBACE,qFAGF,SACE,6EAEF,cACE,uFAEF,cACE,uFAEF,cACE,uFAGF,qBACE,eAEF,mBACE,WACA,eChDF,KACE,gDAAiD,CACjD,uDAAwD,CACxD,qDAAsD,CACtD,4DAA6D,CAC7D,oCAAqC,CACrC,2CAA4C,CAC5C,4CAA6C,CAC7C,mDAAoD,CACpD,wBAAyB,CACzB,oBAAqB,CACrB,6CAA8C,CAC9C,gCAAiC,CACjC,yDAA0D,CAC1D,uDAAwD,CACxD,8DAA+D,CCbjE,uBACE,eACA,eACA,gBAGF,iBACE,YACA,+EAGF,iBACE,mDACA","sources":["webpack:///./src/furo/assets/styles/extensions/_readthedocs.sass","webpack:///./src/furo/assets/styles/extensions/_copybutton.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-design.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-inline-tabs.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-panels.sass"],"sourcesContent":["// This file contains the styles used for tweaking how ReadTheDoc's embedded\n// contents would show up inside the theme.\n\n#furo-sidebar-ad-placement\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n .ethical-sidebar\n // Remove the border and box-shadow.\n border: none\n box-shadow: none\n // Manage the background colors.\n background: var(--color-background-secondary)\n &:hover\n background: var(--color-background-hover)\n // Ensure the text is legible.\n a\n color: var(--color-foreground-primary)\n\n .ethical-callout a\n color: var(--color-foreground-secondary) !important\n\n#furo-readthedocs-versions\n position: static\n width: 100%\n background: transparent\n display: block\n\n // Make the background color fit with the theme's aesthetic.\n .rst-versions\n background: rgb(26, 28, 30)\n\n .rst-current-version\n cursor: unset\n background: var(--color-sidebar-item-background)\n &:hover\n background: var(--color-sidebar-item-background)\n .fa-book\n color: var(--color-foreground-primary)\n\n > .rst-other-versions\n padding: 0\n small\n opacity: 1\n\n .injected\n .rst-versions\n position: unset\n\n &:hover,\n &:focus-within\n box-shadow: 0 0 0 1px var(--color-sidebar-background-border)\n\n .rst-current-version\n // Undo the tweaks done in RTD's CSS\n font-size: inherit\n line-height: inherit\n height: auto\n text-align: right\n padding: 12px\n\n // Match the rest of the body\n background: #1a1c1e\n\n .fa-book\n float: left\n color: white\n\n .fa-caret-down\n display: none\n\n .rst-current-version,\n .rst-other-versions,\n .injected\n display: block\n\n > .rst-current-version\n display: none\n",".highlight\n &:hover button.copybtn\n color: var(--color-code-foreground)\n\n button.copybtn\n // Align things correctly\n align-items: center\n\n height: 1.25em\n width: 1.25em\n\n top: 0.625rem // $code-spacing-vertical\n right: 0.5rem\n\n // Make it look better\n color: var(--color-background-item)\n background-color: var(--color-code-background)\n border: none\n\n // Change to cursor to make it obvious that you can click on it\n cursor: pointer\n\n // Transition smoothly, for aesthetics\n transition: color 300ms, opacity 300ms\n\n &:hover\n color: var(--color-brand-content)\n background-color: var(--color-code-background)\n\n &::after\n display: none\n color: var(--color-code-foreground)\n background-color: transparent\n\n &.success\n transition: color 0ms\n color: #22863a\n &::after\n display: block\n\n svg\n padding: 0\n","body\n // Colors\n --sd-color-primary: var(--color-brand-primary)\n --sd-color-primary-highlight: var(--color-brand-content)\n --sd-color-primary-text: var(--color-background-primary)\n\n // Shadows\n --sd-color-shadow: rgba(0, 0, 0, 0.05)\n\n // Cards\n --sd-color-card-border: var(--color-card-border)\n --sd-color-card-border-hover: var(--color-brand-content)\n --sd-color-card-background: var(--color-card-background)\n --sd-color-card-text: var(--color-foreground-primary)\n --sd-color-card-header: var(--color-card-marginals-background)\n --sd-color-card-footer: var(--color-card-marginals-background)\n\n // Tabs\n --sd-color-tabs-label-active: var(--color-brand-content)\n --sd-color-tabs-label-hover: var(--color-foreground-muted)\n --sd-color-tabs-label-inactive: var(--color-foreground-muted)\n --sd-color-tabs-underline-active: var(--color-brand-content)\n --sd-color-tabs-underline-hover: var(--color-foreground-border)\n --sd-color-tabs-underline-inactive: var(--color-background-border)\n --sd-color-tabs-overline: var(--color-background-border)\n --sd-color-tabs-underline: var(--color-background-border)\n\n// Tabs\n.sd-tab-content\n box-shadow: 0 -2px var(--sd-color-tabs-overline), 0 1px var(--sd-color-tabs-underline)\n\n// Shadows\n.sd-card // Have a shadow by default\n box-shadow: 0 0.1rem 0.25rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1)\n\n.sd-shadow-sm\n box-shadow: 0 0.1rem 0.25rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n.sd-shadow-md\n box-shadow: 0 0.3rem 0.75rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n.sd-shadow-lg\n box-shadow: 0 0.6rem 1.5rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n// Cards\n.sd-card-hover:hover // Don't change scale on hover\n transform: none\n\n.sd-cards-carousel // Have a bit of gap in the carousel by default\n gap: 0.25rem\n padding: 0.25rem\n","// This file contains styles to tweak sphinx-inline-tabs to work well with Furo.\n\nbody\n --tabs--label-text: var(--color-foreground-muted)\n --tabs--label-text--hover: var(--color-foreground-muted)\n --tabs--label-text--active: var(--color-brand-content)\n --tabs--label-text--active--hover: var(--color-brand-content)\n --tabs--label-background: transparent\n --tabs--label-background--hover: transparent\n --tabs--label-background--active: transparent\n --tabs--label-background--active--hover: transparent\n --tabs--padding-x: 0.25em\n --tabs--margin-x: 1em\n --tabs--border: var(--color-background-border)\n --tabs--label-border: transparent\n --tabs--label-border--hover: var(--color-foreground-muted)\n --tabs--label-border--active: var(--color-brand-content)\n --tabs--label-border--active--hover: var(--color-brand-content)\n","// This file contains styles to tweak sphinx-panels to work well with Furo.\n\n// sphinx-panels includes Bootstrap 4, which uses .container which can conflict\n// with docutils' `.. container::` directive.\n[role=\"main\"] .container\n max-width: initial\n padding-left: initial\n padding-right: initial\n\n// Make the panels look nicer!\n.shadow.docutils\n border: none\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n// Make panel colors respond to dark mode\n.sphinx-bs .card\n background-color: var(--color-background-secondary)\n color: var(--color-foreground)\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/12.6.1/_static/styles/furo.css b/docs/12.6.1/_static/styles/furo.css new file mode 100644 index 000000000..05a56b17f --- /dev/null +++ b/docs/12.6.1/_static/styles/furo.css @@ -0,0 +1,2 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}@media print{.content-icon-container,.headerlink,.mobile-header,.related-pages{display:none!important}.highlight{border:.1pt solid var(--color-foreground-border)}a,blockquote,dl,ol,p,pre,table,ul{page-break-inside:avoid}caption,figure,h1,h2,h3,h4,h5,h6,img{page-break-after:avoid;page-break-inside:avoid}dl,ol,ul{page-break-before:avoid}}.visually-hidden{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;background:var(--color-background-primary);border:0!important;color:var(--color-foreground-primary);white-space:nowrap!important}:-moz-focusring{outline:auto}body{--font-stack:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--font-stack--monospace:"SFMono-Regular",Menlo,Consolas,Monaco,Liberation Mono,Lucida Console,monospace;--font-stack--headings:var(--font-stack);--font-size--normal:100%;--font-size--small:87.5%;--font-size--small--2:81.25%;--font-size--small--3:75%;--font-size--small--4:62.5%;--sidebar-caption-font-size:var(--font-size--small--2);--sidebar-item-font-size:var(--font-size--small);--sidebar-search-input-font-size:var(--font-size--small);--toc-font-size:var(--font-size--small--3);--toc-font-size--mobile:var(--font-size--normal);--toc-title-font-size:var(--font-size--small--4);--admonition-font-size:0.8125rem;--admonition-title-font-size:0.8125rem;--code-font-size:var(--font-size--small--2);--api-font-size:var(--font-size--small);--header-height:calc(var(--sidebar-item-line-height) + var(--sidebar-item-spacing-vertical)*4);--header-padding:0.5rem;--sidebar-tree-space-above:1.5rem;--sidebar-caption-space-above:1rem;--sidebar-item-line-height:1rem;--sidebar-item-spacing-vertical:0.5rem;--sidebar-item-spacing-horizontal:1rem;--sidebar-item-height:calc(var(--sidebar-item-line-height) + var(--sidebar-item-spacing-vertical)*2);--sidebar-expander-width:var(--sidebar-item-height);--sidebar-search-space-above:0.5rem;--sidebar-search-input-spacing-vertical:0.5rem;--sidebar-search-input-spacing-horizontal:0.5rem;--sidebar-search-input-height:1rem;--sidebar-search-icon-size:var(--sidebar-search-input-height);--toc-title-padding:0.25rem 0;--toc-spacing-vertical:1.5rem;--toc-spacing-horizontal:1.5rem;--toc-item-spacing-vertical:0.4rem;--toc-item-spacing-horizontal:1rem;--icon-search:url('data:image/svg+xml;charset=utf-8,');--icon-pencil:url('data:image/svg+xml;charset=utf-8,');--icon-abstract:url('data:image/svg+xml;charset=utf-8,');--icon-info:url('data:image/svg+xml;charset=utf-8,');--icon-flame:url('data:image/svg+xml;charset=utf-8,');--icon-question:url('data:image/svg+xml;charset=utf-8,');--icon-warning:url('data:image/svg+xml;charset=utf-8,');--icon-failure:url('data:image/svg+xml;charset=utf-8,');--icon-spark:url('data:image/svg+xml;charset=utf-8,');--color-admonition-title--caution:#ff9100;--color-admonition-title-background--caution:rgba(255,145,0,.2);--color-admonition-title--warning:#ff9100;--color-admonition-title-background--warning:rgba(255,145,0,.2);--color-admonition-title--danger:#ff5252;--color-admonition-title-background--danger:rgba(255,82,82,.2);--color-admonition-title--attention:#ff5252;--color-admonition-title-background--attention:rgba(255,82,82,.2);--color-admonition-title--error:#ff5252;--color-admonition-title-background--error:rgba(255,82,82,.2);--color-admonition-title--hint:#00c852;--color-admonition-title-background--hint:rgba(0,200,82,.2);--color-admonition-title--tip:#00c852;--color-admonition-title-background--tip:rgba(0,200,82,.2);--color-admonition-title--important:#00bfa5;--color-admonition-title-background--important:rgba(0,191,165,.2);--color-admonition-title--note:#00b0ff;--color-admonition-title-background--note:rgba(0,176,255,.2);--color-admonition-title--seealso:#448aff;--color-admonition-title-background--seealso:rgba(68,138,255,.2);--color-admonition-title--admonition-todo:grey;--color-admonition-title-background--admonition-todo:hsla(0,0%,50%,.2);--color-admonition-title:#651fff;--color-admonition-title-background:rgba(101,31,255,.2);--icon-admonition-default:var(--icon-abstract);--color-topic-title:#14b8a6;--color-topic-title-background:rgba(20,184,166,.2);--icon-topic-default:var(--icon-pencil);--color-problematic:#b30000;--color-foreground-primary:#000;--color-foreground-secondary:#5a5c63;--color-foreground-muted:#6b6f76;--color-foreground-border:#878787;--color-background-primary:#fff;--color-background-secondary:#f8f9fb;--color-background-hover:#efeff4;--color-background-hover--transparent:#efeff400;--color-background-border:#eeebee;--color-background-item:#ccc;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#0a4bff;--color-brand-content:#2757dd;--color-brand-visited:#872ee0;--color-api-background:var(--color-background-hover--transparent);--color-api-background-hover:var(--color-background-hover);--color-api-overall:var(--color-foreground-secondary);--color-api-name:var(--color-problematic);--color-api-pre-name:var(--color-problematic);--color-api-paren:var(--color-foreground-secondary);--color-api-keyword:var(--color-foreground-primary);--color-api-added:#21632c;--color-api-added-border:#38a84d;--color-api-changed:#046172;--color-api-changed-border:#06a1bc;--color-api-deprecated:#605706;--color-api-deprecated-border:#f0d90f;--color-api-removed:#b30000;--color-api-removed-border:#ff5c5c;--color-highlight-on-target:#ffc;--color-inline-code-background:var(--color-background-secondary);--color-highlighted-background:#def;--color-highlighted-text:var(--color-foreground-primary);--color-guilabel-background:#ddeeff80;--color-guilabel-border:#bedaf580;--color-guilabel-text:var(--color-foreground-primary);--color-admonition-background:transparent;--color-table-header-background:var(--color-background-secondary);--color-table-border:var(--color-background-border);--color-card-border:var(--color-background-secondary);--color-card-background:transparent;--color-card-marginals-background:var(--color-background-secondary);--color-header-background:var(--color-background-primary);--color-header-border:var(--color-background-border);--color-header-text:var(--color-foreground-primary);--color-sidebar-background:var(--color-background-secondary);--color-sidebar-background-border:var(--color-background-border);--color-sidebar-brand-text:var(--color-foreground-primary);--color-sidebar-caption-text:var(--color-foreground-muted);--color-sidebar-link-text:var(--color-foreground-secondary);--color-sidebar-link-text--top-level:var(--color-brand-primary);--color-sidebar-item-background:var(--color-sidebar-background);--color-sidebar-item-background--current:var( --color-sidebar-item-background );--color-sidebar-item-background--hover:linear-gradient(90deg,var(--color-background-hover--transparent) 0%,var(--color-background-hover) var(--sidebar-item-spacing-horizontal),var(--color-background-hover) 100%);--color-sidebar-item-expander-background:transparent;--color-sidebar-item-expander-background--hover:var( --color-background-hover );--color-sidebar-search-text:var(--color-foreground-primary);--color-sidebar-search-background:var(--color-background-secondary);--color-sidebar-search-background--focus:var(--color-background-primary);--color-sidebar-search-border:var(--color-background-border);--color-sidebar-search-icon:var(--color-foreground-muted);--color-toc-background:var(--color-background-primary);--color-toc-title-text:var(--color-foreground-muted);--color-toc-item-text:var(--color-foreground-secondary);--color-toc-item-text--hover:var(--color-foreground-primary);--color-toc-item-text--active:var(--color-brand-primary);--color-content-foreground:var(--color-foreground-primary);--color-content-background:transparent;--color-link:var(--color-brand-content);--color-link-underline:var(--color-background-border);--color-link--hover:var(--color-brand-content);--color-link-underline--hover:var(--color-foreground-border);--color-link--visited:var(--color-brand-visited);--color-link-underline--visited:var(--color-background-border);--color-link--visited--hover:var(--color-brand-visited);--color-link-underline--visited--hover:var(--color-foreground-border)}.only-light{display:block!important}html body .only-dark{display:none!important}@media not print{body[data-theme=dark]{--color-problematic:#ee5151;--color-foreground-primary:#cfd0d0;--color-foreground-secondary:#9ca0a5;--color-foreground-muted:#81868d;--color-foreground-border:#666;--color-background-primary:#131416;--color-background-secondary:#1a1c1e;--color-background-hover:#1e2124;--color-background-hover--transparent:#1e212400;--color-background-border:#303335;--color-background-item:#444;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#3d94ff;--color-brand-content:#5ca5ff;--color-brand-visited:#b27aeb;--color-highlighted-background:#083563;--color-guilabel-background:#08356380;--color-guilabel-border:#13395f80;--color-api-keyword:var(--color-foreground-secondary);--color-highlight-on-target:#330;--color-api-added:#3db854;--color-api-added-border:#267334;--color-api-changed:#09b0ce;--color-api-changed-border:#056d80;--color-api-deprecated:#b1a10b;--color-api-deprecated-border:#6e6407;--color-api-removed:#ff7575;--color-api-removed-border:#b03b3b;--color-admonition-background:#18181a;--color-card-border:var(--color-background-secondary);--color-card-background:#18181a;--color-card-marginals-background:var(--color-background-hover)}html body[data-theme=dark] .only-light{display:none!important}body[data-theme=dark] .only-dark{display:block!important}@media(prefers-color-scheme:dark){body:not([data-theme=light]){--color-problematic:#ee5151;--color-foreground-primary:#cfd0d0;--color-foreground-secondary:#9ca0a5;--color-foreground-muted:#81868d;--color-foreground-border:#666;--color-background-primary:#131416;--color-background-secondary:#1a1c1e;--color-background-hover:#1e2124;--color-background-hover--transparent:#1e212400;--color-background-border:#303335;--color-background-item:#444;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#3d94ff;--color-brand-content:#5ca5ff;--color-brand-visited:#b27aeb;--color-highlighted-background:#083563;--color-guilabel-background:#08356380;--color-guilabel-border:#13395f80;--color-api-keyword:var(--color-foreground-secondary);--color-highlight-on-target:#330;--color-api-added:#3db854;--color-api-added-border:#267334;--color-api-changed:#09b0ce;--color-api-changed-border:#056d80;--color-api-deprecated:#b1a10b;--color-api-deprecated-border:#6e6407;--color-api-removed:#ff7575;--color-api-removed-border:#b03b3b;--color-admonition-background:#18181a;--color-card-border:var(--color-background-secondary);--color-card-background:#18181a;--color-card-marginals-background:var(--color-background-hover)}html body:not([data-theme=light]) .only-light{display:none!important}body:not([data-theme=light]) .only-dark{display:block!important}}}body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-light{display:block}@media(prefers-color-scheme:dark){body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-dark{display:block}body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-light{display:none}}body[data-theme=dark] .theme-toggle svg.theme-icon-when-dark,body[data-theme=light] .theme-toggle svg.theme-icon-when-light{display:block}body{font-family:var(--font-stack)}code,kbd,pre,samp{font-family:var(--font-stack--monospace)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}article{line-height:1.5}h1,h2,h3,h4,h5,h6{border-radius:.5rem;font-family:var(--font-stack--headings);font-weight:700;line-height:1.25;margin:.5rem -.5rem;padding-left:.5rem;padding-right:.5rem}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p{margin-top:0}h1{font-size:2.5em;margin-bottom:1rem}h1,h2{margin-top:1.75rem}h2{font-size:2em}h3{font-size:1.5em}h4{font-size:1.25em}h5{font-size:1.125em}h6{font-size:1em}small{font-size:80%;opacity:75%}p{margin-bottom:.75rem;margin-top:.5rem}hr.docutils{background-color:var(--color-background-border);border:0;height:1px;margin:2rem 0;padding:0}.centered{text-align:center}a{color:var(--color-link);text-decoration:underline;text-decoration-color:var(--color-link-underline)}a:visited{color:var(--color-link--visited);text-decoration-color:var(--color-link-underline--visited)}a:visited:hover{color:var(--color-link--visited--hover);text-decoration-color:var(--color-link-underline--visited--hover)}a:hover{color:var(--color-link--hover);text-decoration-color:var(--color-link-underline--hover)}a.muted-link{color:inherit}a.muted-link:hover{color:var(--color-link--hover);text-decoration-color:var(--color-link-underline--hover)}a.muted-link:hover:visited{color:var(--color-link--visited--hover);text-decoration-color:var(--color-link-underline--visited--hover)}html{overflow-x:hidden;overflow-y:scroll;scroll-behavior:smooth}.sidebar-scroll,.toc-scroll,article[role=main] *{scrollbar-color:var(--color-foreground-border) transparent;scrollbar-width:thin}.sidebar-scroll::-webkit-scrollbar,.toc-scroll::-webkit-scrollbar,article[role=main] ::-webkit-scrollbar{height:.25rem;width:.25rem}.sidebar-scroll::-webkit-scrollbar-thumb,.toc-scroll::-webkit-scrollbar-thumb,article[role=main] ::-webkit-scrollbar-thumb{background-color:var(--color-foreground-border);border-radius:.125rem}body,html{height:100%}.skip-to-content,body,html{background:var(--color-background-primary);color:var(--color-foreground-primary)}.skip-to-content{border-radius:1rem;left:.25rem;padding:1rem;position:fixed;top:.25rem;transform:translateY(-200%);transition:transform .3s ease-in-out;z-index:40}.skip-to-content:focus-within{transform:translateY(0)}article{background:var(--color-content-background);color:var(--color-content-foreground);overflow-wrap:break-word}.page{display:flex;min-height:100%}.mobile-header{background-color:var(--color-header-background);border-bottom:1px solid var(--color-header-border);color:var(--color-header-text);display:none;height:var(--header-height);width:100%;z-index:10}.mobile-header.scrolled{border-bottom:none;box-shadow:0 0 .2rem rgba(0,0,0,.1),0 .2rem .4rem rgba(0,0,0,.2)}.mobile-header .header-center a{color:var(--color-header-text);text-decoration:none}.main{display:flex;flex:1}.sidebar-drawer{background:var(--color-sidebar-background);border-right:1px solid var(--color-sidebar-background-border);box-sizing:border-box;display:flex;justify-content:flex-end;min-width:15em;width:calc(50% - 26em)}.sidebar-container,.toc-drawer{box-sizing:border-box;width:15em}.toc-drawer{background:var(--color-toc-background);padding-right:1rem}.sidebar-sticky,.toc-sticky{display:flex;flex-direction:column;height:min(100%,100vh);height:100vh;position:sticky;top:0}.sidebar-scroll,.toc-scroll{flex-grow:1;flex-shrink:1;overflow:auto;scroll-behavior:smooth}.content{display:flex;flex-direction:column;justify-content:space-between;padding:0 3em;width:46em}.icon{display:inline-block;height:1rem;width:1rem}.icon svg{height:100%;width:100%}.announcement{align-items:center;background-color:var(--color-announcement-background);color:var(--color-announcement-text);display:flex;height:var(--header-height);overflow-x:auto}.announcement+.page{min-height:calc(100% - var(--header-height))}.announcement-content{box-sizing:border-box;min-width:100%;padding:.5rem;text-align:center;white-space:nowrap}.announcement-content a{color:var(--color-announcement-text);text-decoration-color:var(--color-announcement-text)}.announcement-content a:hover{color:var(--color-announcement-text);text-decoration-color:var(--color-link--hover)}.no-js .theme-toggle-container{display:none}.theme-toggle-container{display:flex}.theme-toggle{background:transparent;border:none;cursor:pointer;display:flex;padding:0}.theme-toggle svg{color:var(--color-foreground-primary);display:none;height:1.25rem;width:1.25rem}.theme-toggle-header{align-items:center;display:flex;justify-content:center}.nav-overlay-icon,.toc-overlay-icon{cursor:pointer;display:none}.nav-overlay-icon .icon,.toc-overlay-icon .icon{color:var(--color-foreground-secondary);height:1.5rem;width:1.5rem}.nav-overlay-icon,.toc-header-icon{align-items:center;justify-content:center}.toc-content-icon{height:1.5rem;width:1.5rem}.content-icon-container{display:flex;float:right;gap:.5rem;margin-bottom:1rem;margin-left:1rem;margin-top:1.5rem}.content-icon-container .edit-this-page svg,.content-icon-container .view-this-page svg{color:inherit;height:1.25rem;width:1.25rem}.sidebar-toggle{display:none;position:absolute}.sidebar-toggle[name=__toc]{left:20px}.sidebar-toggle:checked{left:40px}.overlay{background-color:rgba(0,0,0,.54);height:0;opacity:0;position:fixed;top:0;transition:width 0ms,height 0ms,opacity .25s ease-out;width:0}.sidebar-overlay{z-index:20}.toc-overlay{z-index:40}.sidebar-drawer{transition:left .25s ease-in-out;z-index:30}.toc-drawer{transition:right .25s ease-in-out;z-index:50}#__navigation:checked~.sidebar-overlay{height:100%;opacity:1;width:100%}#__navigation:checked~.page .sidebar-drawer{left:0;top:0}#__toc:checked~.toc-overlay{height:100%;opacity:1;width:100%}#__toc:checked~.page .toc-drawer{right:0;top:0}.back-to-top{background:var(--color-background-primary);border-radius:1rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 1px 0 hsla(220,9%,46%,.502);display:none;font-size:.8125rem;left:0;margin-left:50%;padding:.5rem .75rem .5rem .5rem;position:fixed;text-decoration:none;top:1rem;transform:translateX(-50%);z-index:10}.back-to-top svg{height:1rem;width:1rem;fill:currentColor;display:inline-block}.back-to-top span{margin-left:.25rem}.show-back-to-top .back-to-top{align-items:center;display:flex}@media(min-width:97em){html{font-size:110%}}@media(max-width:82em){.toc-content-icon{display:flex}.toc-drawer{border-left:1px solid var(--color-background-muted);height:100vh;position:fixed;right:-15em;top:0}.toc-tree{border-left:none;font-size:var(--toc-font-size--mobile)}.sidebar-drawer{width:calc(50% - 18.5em)}}@media(max-width:67em){.content{margin-left:auto;margin-right:auto;padding:0 1em}}@media(max-width:63em){.nav-overlay-icon{display:flex}.sidebar-drawer{height:100vh;left:-15em;position:fixed;top:0;width:15em}.theme-toggle-header,.toc-header-icon{display:flex}.theme-toggle-content,.toc-content-icon{display:none}.mobile-header{align-items:center;display:flex;justify-content:space-between;position:sticky;top:0}.mobile-header .header-left,.mobile-header .header-right{display:flex;height:var(--header-height);padding:0 var(--header-padding)}.mobile-header .header-left label,.mobile-header .header-right label{height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.nav-overlay-icon .icon,.theme-toggle svg{height:1.5rem;width:1.5rem}:target{scroll-margin-top:calc(var(--header-height) + 2.5rem)}.back-to-top{top:calc(var(--header-height) + .5rem)}.page{flex-direction:column;justify-content:center}}@media(max-width:48em){.content{overflow-x:auto;width:100%}}@media(max-width:46em){article[role=main] aside.sidebar{float:none;margin:1rem 0;width:100%}}.admonition,.topic{background:var(--color-admonition-background);border-radius:.2rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1);font-size:var(--admonition-font-size);margin:1rem auto;overflow:hidden;padding:0 .5rem .5rem;page-break-inside:avoid}.admonition>:nth-child(2),.topic>:nth-child(2){margin-top:0}.admonition>:last-child,.topic>:last-child{margin-bottom:0}.admonition p.admonition-title,p.topic-title{font-size:var(--admonition-title-font-size);font-weight:500;line-height:1.3;margin:0 -.5rem .5rem;padding:.4rem .5rem .4rem 2rem;position:relative}.admonition p.admonition-title:before,p.topic-title:before{content:"";height:1rem;left:.5rem;position:absolute;width:1rem}p.admonition-title{background-color:var(--color-admonition-title-background)}p.admonition-title:before{background-color:var(--color-admonition-title);-webkit-mask-image:var(--icon-admonition-default);mask-image:var(--icon-admonition-default);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}p.topic-title{background-color:var(--color-topic-title-background)}p.topic-title:before{background-color:var(--color-topic-title);-webkit-mask-image:var(--icon-topic-default);mask-image:var(--icon-topic-default);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.admonition{border-left:.2rem solid var(--color-admonition-title)}.admonition.caution{border-left-color:var(--color-admonition-title--caution)}.admonition.caution>.admonition-title{background-color:var(--color-admonition-title-background--caution)}.admonition.caution>.admonition-title:before{background-color:var(--color-admonition-title--caution);-webkit-mask-image:var(--icon-spark);mask-image:var(--icon-spark)}.admonition.warning{border-left-color:var(--color-admonition-title--warning)}.admonition.warning>.admonition-title{background-color:var(--color-admonition-title-background--warning)}.admonition.warning>.admonition-title:before{background-color:var(--color-admonition-title--warning);-webkit-mask-image:var(--icon-warning);mask-image:var(--icon-warning)}.admonition.danger{border-left-color:var(--color-admonition-title--danger)}.admonition.danger>.admonition-title{background-color:var(--color-admonition-title-background--danger)}.admonition.danger>.admonition-title:before{background-color:var(--color-admonition-title--danger);-webkit-mask-image:var(--icon-spark);mask-image:var(--icon-spark)}.admonition.attention{border-left-color:var(--color-admonition-title--attention)}.admonition.attention>.admonition-title{background-color:var(--color-admonition-title-background--attention)}.admonition.attention>.admonition-title:before{background-color:var(--color-admonition-title--attention);-webkit-mask-image:var(--icon-warning);mask-image:var(--icon-warning)}.admonition.error{border-left-color:var(--color-admonition-title--error)}.admonition.error>.admonition-title{background-color:var(--color-admonition-title-background--error)}.admonition.error>.admonition-title:before{background-color:var(--color-admonition-title--error);-webkit-mask-image:var(--icon-failure);mask-image:var(--icon-failure)}.admonition.hint{border-left-color:var(--color-admonition-title--hint)}.admonition.hint>.admonition-title{background-color:var(--color-admonition-title-background--hint)}.admonition.hint>.admonition-title:before{background-color:var(--color-admonition-title--hint);-webkit-mask-image:var(--icon-question);mask-image:var(--icon-question)}.admonition.tip{border-left-color:var(--color-admonition-title--tip)}.admonition.tip>.admonition-title{background-color:var(--color-admonition-title-background--tip)}.admonition.tip>.admonition-title:before{background-color:var(--color-admonition-title--tip);-webkit-mask-image:var(--icon-info);mask-image:var(--icon-info)}.admonition.important{border-left-color:var(--color-admonition-title--important)}.admonition.important>.admonition-title{background-color:var(--color-admonition-title-background--important)}.admonition.important>.admonition-title:before{background-color:var(--color-admonition-title--important);-webkit-mask-image:var(--icon-flame);mask-image:var(--icon-flame)}.admonition.note{border-left-color:var(--color-admonition-title--note)}.admonition.note>.admonition-title{background-color:var(--color-admonition-title-background--note)}.admonition.note>.admonition-title:before{background-color:var(--color-admonition-title--note);-webkit-mask-image:var(--icon-pencil);mask-image:var(--icon-pencil)}.admonition.seealso{border-left-color:var(--color-admonition-title--seealso)}.admonition.seealso>.admonition-title{background-color:var(--color-admonition-title-background--seealso)}.admonition.seealso>.admonition-title:before{background-color:var(--color-admonition-title--seealso);-webkit-mask-image:var(--icon-info);mask-image:var(--icon-info)}.admonition.admonition-todo{border-left-color:var(--color-admonition-title--admonition-todo)}.admonition.admonition-todo>.admonition-title{background-color:var(--color-admonition-title-background--admonition-todo)}.admonition.admonition-todo>.admonition-title:before{background-color:var(--color-admonition-title--admonition-todo);-webkit-mask-image:var(--icon-pencil);mask-image:var(--icon-pencil)}.admonition-todo>.admonition-title{text-transform:uppercase}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd{margin-left:2rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd>:first-child{margin-top:.125rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list,dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd>:last-child{margin-bottom:.75rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list>dt{font-size:var(--font-size--small);text-transform:uppercase}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd:empty{margin-bottom:.5rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul{margin-left:-1.2rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul>li>p:nth-child(2){margin-top:0}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul>li>p+p:last-child:empty{margin-bottom:0;margin-top:0}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt{color:var(--color-api-overall)}.sig:not(.sig-inline){background:var(--color-api-background);border-radius:.25rem;font-family:var(--font-stack--monospace);font-size:var(--api-font-size);font-weight:700;margin-left:-.25rem;margin-right:-.25rem;padding:.25rem .5rem .25rem 3em;text-indent:-2.5em;transition:background .1s ease-out}.sig:not(.sig-inline):hover{background:var(--color-api-background-hover)}.sig:not(.sig-inline) a.reference .viewcode-link{font-weight:400;width:4.25rem}em.property{font-style:normal}em.property:first-child{color:var(--color-api-keyword)}.sig-name{color:var(--color-api-name)}.sig-prename{color:var(--color-api-pre-name);font-weight:400}.sig-paren{color:var(--color-api-paren)}.sig-param{font-style:normal}div.deprecated,div.versionadded,div.versionchanged,div.versionremoved{border-left:.1875rem solid;border-radius:.125rem;padding-left:.75rem}div.deprecated p,div.versionadded p,div.versionchanged p,div.versionremoved p{margin-bottom:.125rem;margin-top:.125rem}div.versionadded{border-color:var(--color-api-added-border)}div.versionadded .versionmodified{color:var(--color-api-added)}div.versionchanged{border-color:var(--color-api-changed-border)}div.versionchanged .versionmodified{color:var(--color-api-changed)}div.deprecated{border-color:var(--color-api-deprecated-border)}div.deprecated .versionmodified{color:var(--color-api-deprecated)}div.versionremoved{border-color:var(--color-api-removed-border)}div.versionremoved .versionmodified{color:var(--color-api-removed)}.viewcode-back,.viewcode-link{float:right;text-align:right}.line-block{margin-bottom:.75rem;margin-top:.5rem}.line-block .line-block{margin-bottom:0;margin-top:0;padding-left:1rem}.code-block-caption,article p.caption,table>caption{font-size:var(--font-size--small);text-align:center}.toctree-wrapper.compound .caption,.toctree-wrapper.compound :not(.caption)>.caption-text{font-size:var(--font-size--small);margin-bottom:0;text-align:initial;text-transform:uppercase}.toctree-wrapper.compound>ul{margin-bottom:0;margin-top:0}.sig-inline,code.literal{background:var(--color-inline-code-background);border-radius:.2em;font-size:var(--font-size--small--2);padding:.1em .2em}pre.literal-block .sig-inline,pre.literal-block code.literal{font-size:inherit;padding:0}p .sig-inline,p code.literal{border:1px solid var(--color-background-border)}.sig-inline{font-family:var(--font-stack--monospace)}div[class*=" highlight-"],div[class^=highlight-]{display:flex;margin:1em 0}div[class*=" highlight-"] .table-wrapper,div[class^=highlight-] .table-wrapper,pre{margin:0;padding:0}pre{overflow:auto}article[role=main] .highlight pre{line-height:1.5}.highlight pre,pre.literal-block{font-size:var(--code-font-size);padding:.625rem .875rem}pre.literal-block{background-color:var(--color-code-background);border-radius:.2rem;color:var(--color-code-foreground);margin-bottom:1rem;margin-top:1rem}.highlight{border-radius:.2rem;width:100%}.highlight .gp,.highlight span.linenos{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.highlight .hll{display:block;margin-left:-.875rem;margin-right:-.875rem;padding-left:.875rem;padding-right:.875rem}.code-block-caption{background-color:var(--color-code-background);border-bottom:1px solid;border-radius:.25rem;border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:var(--color-background-border);color:var(--color-code-foreground);display:flex;font-weight:300;padding:.625rem .875rem}.code-block-caption+div[class]{margin-top:0}.code-block-caption+div[class] pre{border-top-left-radius:0;border-top-right-radius:0}.highlighttable{display:block;width:100%}.highlighttable tbody{display:block}.highlighttable tr{display:flex}.highlighttable td.linenos{background-color:var(--color-code-background);border-bottom-left-radius:.2rem;border-top-left-radius:.2rem;color:var(--color-code-foreground);padding:.625rem 0 .625rem .875rem}.highlighttable .linenodiv{box-shadow:-.0625rem 0 var(--color-foreground-border) inset;font-size:var(--code-font-size);padding-right:.875rem}.highlighttable td.code{display:block;flex:1;overflow:hidden;padding:0}.highlighttable td.code .highlight{border-bottom-left-radius:0;border-top-left-radius:0}.highlight span.linenos{box-shadow:-.0625rem 0 var(--color-foreground-border) inset;display:inline-block;margin-right:.875rem;padding-left:0;padding-right:.875rem}.footnote-reference{font-size:var(--font-size--small--4);vertical-align:super}dl.footnote.brackets{color:var(--color-foreground-secondary);display:grid;font-size:var(--font-size--small);grid-template-columns:max-content auto}dl.footnote.brackets dt{margin:0}dl.footnote.brackets dt>.fn-backref{margin-left:.25rem}dl.footnote.brackets dt:after{content:":"}dl.footnote.brackets dt .brackets:before{content:"["}dl.footnote.brackets dt .brackets:after{content:"]"}dl.footnote.brackets dd{margin:0;padding:0 1rem}aside.footnote{color:var(--color-foreground-secondary);font-size:var(--font-size--small)}aside.footnote>span,div.citation>span{float:left;font-weight:500;padding-right:.25rem}aside.footnote>:not(span),div.citation>p{margin-left:2rem}img{box-sizing:border-box;height:auto;max-width:100%}article .figure,article figure{border-radius:.2rem;margin:0}article .figure :last-child,article figure :last-child{margin-bottom:0}article .align-left{clear:left;float:left;margin:0 1rem 1rem}article .align-right{clear:right;float:right;margin:0 1rem 1rem}article .align-center,article .align-default{display:block;margin-left:auto;margin-right:auto;text-align:center}article table.align-default{display:table;text-align:initial}.domainindex-jumpbox,.genindex-jumpbox{border-bottom:1px solid var(--color-background-border);border-top:1px solid var(--color-background-border);padding:.25rem}.domainindex-section h2,.genindex-section h2{margin-bottom:.5rem;margin-top:.75rem}.domainindex-section ul,.genindex-section ul{margin-bottom:0;margin-top:0}ol,ul{margin-bottom:1rem;margin-top:1rem;padding-left:1.2rem}ol li>p:first-child,ul li>p:first-child{margin-bottom:.25rem;margin-top:.25rem}ol li>p:last-child,ul li>p:last-child{margin-top:.25rem}ol li>ol,ol li>ul,ul li>ol,ul li>ul{margin-bottom:.5rem;margin-top:.5rem}ol.arabic{list-style:decimal}ol.loweralpha{list-style:lower-alpha}ol.upperalpha{list-style:upper-alpha}ol.lowerroman{list-style:lower-roman}ol.upperroman{list-style:upper-roman}.simple li>ol,.simple li>ul,.toctree-wrapper li>ol,.toctree-wrapper li>ul{margin-bottom:0;margin-top:0}.field-list dt,.option-list dt,dl.footnote dt,dl.glossary dt,dl.simple dt,dl:not([class]) dt{font-weight:500;margin-top:.25rem}.field-list dt+dt,.option-list dt+dt,dl.footnote dt+dt,dl.glossary dt+dt,dl.simple dt+dt,dl:not([class]) dt+dt{margin-top:0}.field-list dt .classifier:before,.option-list dt .classifier:before,dl.footnote dt .classifier:before,dl.glossary dt .classifier:before,dl.simple dt .classifier:before,dl:not([class]) dt .classifier:before{content:":";margin-left:.2rem;margin-right:.2rem}.field-list dd ul,.field-list dd>p:first-child,.option-list dd ul,.option-list dd>p:first-child,dl.footnote dd ul,dl.footnote dd>p:first-child,dl.glossary dd ul,dl.glossary dd>p:first-child,dl.simple dd ul,dl.simple dd>p:first-child,dl:not([class]) dd ul,dl:not([class]) dd>p:first-child{margin-top:.125rem}.field-list dd ul,.option-list dd ul,dl.footnote dd ul,dl.glossary dd ul,dl.simple dd ul,dl:not([class]) dd ul{margin-bottom:.125rem}.math-wrapper{overflow-x:auto;width:100%}div.math{position:relative;text-align:center}div.math .headerlink,div.math:focus .headerlink{display:none}div.math:hover .headerlink{display:inline-block}div.math span.eqno{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);z-index:1}abbr[title]{cursor:help}.problematic{color:var(--color-problematic)}kbd:not(.compound){background-color:var(--color-background-secondary);border:1px solid var(--color-foreground-border);border-radius:.2rem;box-shadow:0 .0625rem 0 rgba(0,0,0,.2),inset 0 0 0 .125rem var(--color-background-primary);color:var(--color-foreground-primary);display:inline-block;font-size:var(--font-size--small--3);margin:0 .2rem;padding:0 .2rem;vertical-align:text-bottom}blockquote{background:var(--color-background-secondary);border-left:4px solid var(--color-background-border);margin-left:0;margin-right:0;padding:.5rem 1rem}blockquote .attribution{font-weight:600;text-align:right}blockquote.highlights,blockquote.pull-quote{font-size:1.25em}blockquote.epigraph,blockquote.pull-quote{border-left-width:0;border-radius:.5rem}blockquote.highlights{background:transparent;border-left-width:0}p .reference img{vertical-align:middle}p.rubric{font-size:1.125em;font-weight:700;line-height:1.25}dd p.rubric{font-size:var(--font-size--small);font-weight:inherit;line-height:inherit;text-transform:uppercase}article .sidebar{background-color:var(--color-background-secondary);border:1px solid var(--color-background-border);border-radius:.2rem;clear:right;float:right;margin-left:1rem;margin-right:0;width:30%}article .sidebar>*{padding-left:1rem;padding-right:1rem}article .sidebar>ol,article .sidebar>ul{padding-left:2.2rem}article .sidebar .sidebar-title{border-bottom:1px solid var(--color-background-border);font-weight:500;margin:0;padding:.5rem 1rem}[role=main] .table-wrapper.container{margin-bottom:.5rem;margin-top:1rem;overflow-x:auto;padding:.2rem .2rem .75rem;width:100%}table.docutils{border-collapse:collapse;border-radius:.2rem;border-spacing:0;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1)}table.docutils th{background:var(--color-table-header-background)}table.docutils td,table.docutils th{border-bottom:1px solid var(--color-table-border);border-left:1px solid var(--color-table-border);border-right:1px solid var(--color-table-border);padding:0 .25rem}table.docutils td p,table.docutils th p{margin:.25rem}table.docutils td:first-child,table.docutils th:first-child{border-left:none}table.docutils td:last-child,table.docutils th:last-child{border-right:none}table.docutils td.text-left,table.docutils th.text-left{text-align:left}table.docutils td.text-right,table.docutils th.text-right{text-align:right}table.docutils td.text-center,table.docutils th.text-center{text-align:center}:target{scroll-margin-top:2.5rem}@media(max-width:67em){:target{scroll-margin-top:calc(2.5rem + var(--header-height))}section>span:target{scroll-margin-top:calc(2.8rem + var(--header-height))}}.headerlink{font-weight:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.code-block-caption>.headerlink,dl dt>.headerlink,figcaption p>.headerlink,h1>.headerlink,h2>.headerlink,h3>.headerlink,h4>.headerlink,h5>.headerlink,h6>.headerlink,p.caption>.headerlink,table>caption>.headerlink{margin-left:.5rem;visibility:hidden}.code-block-caption:hover>.headerlink,dl dt:hover>.headerlink,figcaption p:hover>.headerlink,h1:hover>.headerlink,h2:hover>.headerlink,h3:hover>.headerlink,h4:hover>.headerlink,h5:hover>.headerlink,h6:hover>.headerlink,p.caption:hover>.headerlink,table>caption:hover>.headerlink{visibility:visible}.code-block-caption>.toc-backref,dl dt>.toc-backref,figcaption p>.toc-backref,h1>.toc-backref,h2>.toc-backref,h3>.toc-backref,h4>.toc-backref,h5>.toc-backref,h6>.toc-backref,p.caption>.toc-backref,table>caption>.toc-backref{color:inherit;text-decoration-line:none}figure:hover>figcaption>p>.headerlink,table:hover>caption>.headerlink{visibility:visible}:target>h1:first-of-type,:target>h2:first-of-type,:target>h3:first-of-type,:target>h4:first-of-type,:target>h5:first-of-type,:target>h6:first-of-type,span:target~h1:first-of-type,span:target~h2:first-of-type,span:target~h3:first-of-type,span:target~h4:first-of-type,span:target~h5:first-of-type,span:target~h6:first-of-type{background-color:var(--color-highlight-on-target)}:target>h1:first-of-type code.literal,:target>h2:first-of-type code.literal,:target>h3:first-of-type code.literal,:target>h4:first-of-type code.literal,:target>h5:first-of-type code.literal,:target>h6:first-of-type code.literal,span:target~h1:first-of-type code.literal,span:target~h2:first-of-type code.literal,span:target~h3:first-of-type code.literal,span:target~h4:first-of-type code.literal,span:target~h5:first-of-type code.literal,span:target~h6:first-of-type code.literal{background-color:transparent}.literal-block-wrapper:target .code-block-caption,.this-will-duplicate-information-and-it-is-still-useful-here li :target,figure:target,table:target>caption{background-color:var(--color-highlight-on-target)}dt:target{background-color:var(--color-highlight-on-target)!important}.footnote-reference:target,.footnote>dt:target+dd{background-color:var(--color-highlight-on-target)}.guilabel{background-color:var(--color-guilabel-background);border:1px solid var(--color-guilabel-border);border-radius:.5em;color:var(--color-guilabel-text);font-size:.9em;padding:0 .3em}footer{display:flex;flex-direction:column;font-size:var(--font-size--small);margin-top:2rem}.bottom-of-page{align-items:center;border-top:1px solid var(--color-background-border);color:var(--color-foreground-secondary);display:flex;justify-content:space-between;line-height:1.5;margin-top:1rem;padding-bottom:1rem;padding-top:1rem}@media(max-width:46em){.bottom-of-page{flex-direction:column-reverse;gap:.25rem;text-align:center}}.bottom-of-page .left-details{font-size:var(--font-size--small)}.bottom-of-page .right-details{display:flex;flex-direction:column;gap:.25rem;text-align:right}.bottom-of-page .icons{display:flex;font-size:1rem;gap:.25rem;justify-content:flex-end}.bottom-of-page .icons a{text-decoration:none}.bottom-of-page .icons img,.bottom-of-page .icons svg{font-size:1.125rem;height:1em;width:1em}.related-pages a{align-items:center;display:flex;text-decoration:none}.related-pages a:hover .page-info .title{color:var(--color-link);text-decoration:underline;text-decoration-color:var(--color-link-underline)}.related-pages a svg.furo-related-icon,.related-pages a svg.furo-related-icon>use{color:var(--color-foreground-border);flex-shrink:0;height:.75rem;margin:0 .5rem;width:.75rem}.related-pages a.next-page{clear:right;float:right;max-width:50%;text-align:right}.related-pages a.prev-page{clear:left;float:left;max-width:50%}.related-pages a.prev-page svg{transform:rotate(180deg)}.page-info{display:flex;flex-direction:column;overflow-wrap:anywhere}.next-page .page-info{align-items:flex-end}.page-info .context{align-items:center;color:var(--color-foreground-muted);display:flex;font-size:var(--font-size--small);padding-bottom:.1rem;text-decoration:none}ul.search{list-style:none;padding-left:0}ul.search li{border-bottom:1px solid var(--color-background-border);padding:1rem 0}[role=main] .highlighted{background-color:var(--color-highlighted-background);color:var(--color-highlighted-text)}.sidebar-brand{display:flex;flex-direction:column;flex-shrink:0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-decoration:none}.sidebar-brand-text{color:var(--color-sidebar-brand-text);font-size:1.5rem;overflow-wrap:break-word}.sidebar-brand-text,.sidebar-logo-container{margin:var(--sidebar-item-spacing-vertical) 0}.sidebar-logo{display:block;margin:0 auto;max-width:100%}.sidebar-search-container{align-items:center;background:var(--color-sidebar-search-background);display:flex;margin-top:var(--sidebar-search-space-above);position:relative}.sidebar-search-container:focus-within,.sidebar-search-container:hover{background:var(--color-sidebar-search-background--focus)}.sidebar-search-container:before{background-color:var(--color-sidebar-search-icon);content:"";height:var(--sidebar-search-icon-size);left:var(--sidebar-item-spacing-horizontal);-webkit-mask-image:var(--icon-search);mask-image:var(--icon-search);position:absolute;width:var(--sidebar-search-icon-size)}.sidebar-search{background:transparent;border:none;border-bottom:1px solid var(--color-sidebar-search-border);border-top:1px solid var(--color-sidebar-search-border);box-sizing:border-box;color:var(--color-sidebar-search-foreground);padding:var(--sidebar-search-input-spacing-vertical) var(--sidebar-search-input-spacing-horizontal) var(--sidebar-search-input-spacing-vertical) calc(var(--sidebar-item-spacing-horizontal) + var(--sidebar-search-input-spacing-horizontal) + var(--sidebar-search-icon-size));width:100%;z-index:10}.sidebar-search:focus{outline:none}.sidebar-search::-moz-placeholder{font-size:var(--sidebar-search-input-font-size)}.sidebar-search::placeholder{font-size:var(--sidebar-search-input-font-size)}#searchbox .highlight-link{margin:0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal) 0;text-align:center}#searchbox .highlight-link a{color:var(--color-sidebar-search-icon);font-size:var(--font-size--small--2)}.sidebar-tree{font-size:var(--sidebar-item-font-size);margin-bottom:var(--sidebar-item-spacing-vertical);margin-top:var(--sidebar-tree-space-above)}.sidebar-tree ul{display:flex;flex-direction:column;list-style:none;margin-bottom:0;margin-top:0;padding:0}.sidebar-tree li{margin:0;position:relative}.sidebar-tree li>ul{margin-left:var(--sidebar-item-spacing-horizontal)}.sidebar-tree .icon,.sidebar-tree .reference{color:var(--color-sidebar-link-text)}.sidebar-tree .reference{box-sizing:border-box;display:inline-block;height:100%;line-height:var(--sidebar-item-line-height);overflow-wrap:anywhere;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-decoration:none;width:100%}.sidebar-tree .reference:hover{background:var(--color-sidebar-item-background--hover);color:var(--color-sidebar-link-text)}.sidebar-tree .reference.external:after{color:var(--color-sidebar-link-text);content:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23607D8B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M11 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-5M10 14 20 4M15 4h5v5'/%3E%3C/svg%3E");margin:0 .25rem;vertical-align:middle}.sidebar-tree .current-page>.reference{font-weight:700}.sidebar-tree label{align-items:center;cursor:pointer;display:flex;height:var(--sidebar-item-height);justify-content:center;position:absolute;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--sidebar-expander-width)}.sidebar-tree .caption,.sidebar-tree :not(.caption)>.caption-text{color:var(--color-sidebar-caption-text);font-size:var(--sidebar-caption-font-size);font-weight:700;margin:var(--sidebar-caption-space-above) 0 0 0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-transform:uppercase}.sidebar-tree li.has-children>.reference{padding-right:var(--sidebar-expander-width)}.sidebar-tree .toctree-l1>.reference,.sidebar-tree .toctree-l1>label .icon{color:var(--color-sidebar-link-text--top-level)}.sidebar-tree label{background:var(--color-sidebar-item-expander-background)}.sidebar-tree label:hover{background:var(--color-sidebar-item-expander-background--hover)}.sidebar-tree .current>.reference{background:var(--color-sidebar-item-background--current)}.sidebar-tree .current>.reference:hover{background:var(--color-sidebar-item-background--hover)}.toctree-checkbox{display:none;position:absolute}.toctree-checkbox~ul{display:none}.toctree-checkbox~label .icon svg{transform:rotate(90deg)}.toctree-checkbox:checked~ul{display:block}.toctree-checkbox:checked~label .icon svg{transform:rotate(-90deg)}.toc-title-container{padding:var(--toc-title-padding);padding-top:var(--toc-spacing-vertical)}.toc-title{color:var(--color-toc-title-text);font-size:var(--toc-title-font-size);padding-left:var(--toc-spacing-horizontal);text-transform:uppercase}.no-toc{display:none}.toc-tree-container{padding-bottom:var(--toc-spacing-vertical)}.toc-tree{border-left:1px solid var(--color-background-border);font-size:var(--toc-font-size);line-height:1.3;padding-left:calc(var(--toc-spacing-horizontal) - var(--toc-item-spacing-horizontal))}.toc-tree>ul>li:first-child{padding-top:0}.toc-tree>ul>li:first-child>ul{padding-left:0}.toc-tree>ul>li:first-child>a{display:none}.toc-tree ul{list-style-type:none;margin-bottom:0;margin-top:0;padding-left:var(--toc-item-spacing-horizontal)}.toc-tree li{padding-top:var(--toc-item-spacing-vertical)}.toc-tree li.scroll-current>.reference{color:var(--color-toc-item-text--active);font-weight:700}.toc-tree a.reference{color:var(--color-toc-item-text);overflow-wrap:anywhere;text-decoration:none}.toc-scroll{max-height:100vh;overflow-y:scroll}.contents:not(.this-will-duplicate-information-and-it-is-still-useful-here){background:rgba(255,0,0,.25);color:var(--color-problematic)}.contents:not(.this-will-duplicate-information-and-it-is-still-useful-here):before{content:"ERROR: Adding a table of contents in Furo-based documentation is unnecessary, and does not work well with existing styling. Add a 'this-will-duplicate-information-and-it-is-still-useful-here' class, if you want an escape hatch."}.text-align\:left>p{text-align:left}.text-align\:center>p{text-align:center}.text-align\:right>p{text-align:right} +/*# sourceMappingURL=furo.css.map*/ \ No newline at end of file diff --git a/docs/12.6.1/_static/styles/furo.css.map b/docs/12.6.1/_static/styles/furo.css.map new file mode 100644 index 000000000..3ecc37150 --- /dev/null +++ b/docs/12.6.1/_static/styles/furo.css.map @@ -0,0 +1 @@ +{"version":3,"file":"styles/furo.css","mappings":"AAAA,2EAA2E,CAU3E,KACE,gBAAiB,CACjB,6BACF,CASA,KACE,QACF,CAMA,KACE,aACF,CAOA,GACE,aAAc,CACd,cACF,CAUA,GACE,sBAAuB,CACvB,QAAS,CACT,gBACF,CAOA,IACE,+BAAiC,CACjC,aACF,CASA,EACE,4BACF,CAOA,YACE,kBAAmB,CACnB,yBAA0B,CAC1B,gCACF,CAMA,SAEE,kBACF,CAOA,cAGE,+BAAiC,CACjC,aACF,CAeA,QAEE,aAAc,CACd,aAAc,CACd,iBAAkB,CAClB,uBACF,CAEA,IACE,aACF,CAEA,IACE,SACF,CASA,IACE,iBACF,CAUA,sCAKE,mBAAoB,CACpB,cAAe,CACf,gBAAiB,CACjB,QACF,CAOA,aAEE,gBACF,CAOA,cAEE,mBACF,CAMA,gDAIE,yBACF,CAMA,wHAIE,iBAAkB,CAClB,SACF,CAMA,4GAIE,6BACF,CAMA,SACE,0BACF,CASA,OACE,qBAAsB,CACtB,aAAc,CACd,aAAc,CACd,cAAe,CACf,SAAU,CACV,kBACF,CAMA,SACE,uBACF,CAMA,SACE,aACF,CAOA,6BAEE,qBAAsB,CACtB,SACF,CAMA,kFAEE,WACF,CAOA,cACE,4BAA6B,CAC7B,mBACF,CAMA,yCACE,uBACF,CAOA,6BACE,yBAA0B,CAC1B,YACF,CASA,QACE,aACF,CAMA,QACE,iBACF,CAiBA,kBACE,YACF,CCvVA,aAcE,kEACE,uBAOF,WACE,iDAMF,kCACE,wBAEF,qCAEE,uBADA,uBACA,CAEF,SACE,wBAtBA,CCpBJ,iBAGE,qBAEA,sBACA,0BAFA,oBAHA,4BACA,oBAKA,6BAIA,2CAFA,mBACA,sCAFA,4BAGA,CAEF,gBACE,aCTF,KCGE,mHAEA,wGAEA,wCAAyC,CAEzC,wBAAyB,CACzB,wBAAyB,CACzB,4BAA6B,CAC7B,yBAA0B,CAC1B,2BAA4B,CAG5B,sDAAuD,CACvD,gDAAiD,CACjD,wDAAyD,CAGzD,0CAA2C,CAC3C,gDAAiD,CACjD,gDAAiD,CAKjD,gCAAiC,CACjC,sCAAuC,CAGvC,2CAA4C,CAG5C,uCAAwC,CCjCxC,+FAGA,uBAAwB,CAGxB,iCAAkC,CAClC,kCAAmC,CAEnC,+BAAgC,CAChC,sCAAuC,CACvC,sCAAuC,CACvC,qGAIA,mDAAoD,CAEpD,mCAAoC,CACpC,8CAA+C,CAC/C,gDAAiD,CACjD,kCAAmC,CACnC,6DAA8D,CAG9D,6BAA8B,CAC9B,6BAA8B,CAC9B,+BAAgC,CAChC,kCAAmC,CACnC,kCAAmC,CCPjC,+jBCYA,iqCAZF,iaCVA,8KAOA,4SAWA,4SAUA,0CACA,gEAGA,0CAGA,gEAGA,yCACA,+DAIA,4CACA,kEAGA,wCAUA,8DACA,uCAGA,4DACA,sCACA,2DAGA,4CACA,kEACA,uCAGA,6DACA,2GAGA,sHAEA,yFAEA,+CACA,+EAGA,4MAOA,gCACA,sHAIA,kCACA,uEACA,gEACA,4DACA,kEAGA,2DACA,sDACA,0CACA,8CACA,wGAGA,0BACA,iCAGA,+DACA,+BACA,sCACA,+DAEA,kGACA,oCACA,yDACA,sCL7HF,kCAEA,sDAIA,0CK2HE,kEAIA,oDACA,sDAGA,oCACA,oEAEA,0DACA,qDAIA,oDACA,6DAIA,iEAIA,2DAIA,2DAGA,4DACA,gEAIA,gEAEA,gFAEA,oNASA,qDLxKE,gFAGE,4DAIF,oEKkHF,yEAEA,6DAGA,0DAEA,uDACA,qDACA,wDAIA,6DAIA,yDACA,2DAIA,uCAGA,wCACA,sDAGA,+CAGA,6DAEA,iDACA,+DAEA,wDAEA,sEAMA,0DACA,sBACA,mEL9JI,wEAEA,iCACE,+BAMN,wEAGA,iCACE,kFAEA,uEAIF,gEACE,8BAGF,qEMvDA,sCAKA,wFAKA,iCAIA,0BAWA,iCACA,4BACA,mCAGA,+BAEA,sCACA,4BAEA,mCAEA,sCAKA,sDAIA,gCAEA,gEAQF,wCAME,sBACA,kCAKA,uBAEA,gEAIA,2BAIA,mCAEA,qCACA,iCAGE,+BACA,wEAEE,iCACA,kFAGF,6BACA,0CACF,kCAEE,8BACE,8BACA,qEAEE,sCACA,wFCnFN,iCAGF,2DAEE,4BACA,oCAGA,mIAGA,4HACE,gEAMJ,+CAGE,sBACA,yCAEF,uBAEE,sEAKA,gDACA,kEAGA,iFAGE,YAGF,EACA,4HAQF,mBACE,6BACA,mBACA,wCACA,wCACA,2CAIA,eAGA,mBAKE,mBAGA,CAJA,uCACA,iBAFF,gBACE,CAKE,mBACA,mBAGJ,oBAIF,+BAGE,kDACA,OADA,kBAGA,CAFA,gBAEA,mBACA,oBAEA,sCACA,OAGF,cAHE,WAGF,GAEE,oBACA,CAHF,gBAGE,CC9Gc,YDiHd,+CAIF,SAEE,CAPF,UACE,wBAMA,4BAEA,GAGA,uBACA,CAJA,yBAGA,CACA,iDAKA,2CAGA,2DAQA,iBACA,uCAGA,kEAKE,SAKJ,8BACE,yDACA,2BAEA,oBACA,8BAEA,yDAEE,4BAEJ,uCACE,CACA,iEAGA,CAEA,wCACE,uBACA,kDAEA,0DAEE,CAJF,oBAIE,0GAWN,aACE,CAHA,YAGA,4HASA,+CAGF,sBACE,WACA,WAQA,4BAFF,0CAEE,CARA,qCAsBA,CAdA,iBAEA,kBACE,aADF,4BACE,WAMF,2BAGF,qCAEE,CAXE,UAWF,+BAGA,uBAEA,SAEA,0CAIE,CANF,qCAEA,CAIE,2DACE,gBAIN,+CAIA,CAEA,kDAKE,CAPF,8BAEA,CAOE,YACA,CAjBI,2BAGN,CAHM,WAcJ,UAGA,CAEA,2GAIF,iCAGE,8BAIA,qBACA,oBACF,uBAOI,0CAIA,CATF,6DAKE,CALF,sBASE,qCAKF,CACE,cACA,CAFF,sBAEE,CACA,+BAEA,qBAEE,WAKN,aACE,sCAGA,mBAEA,6BAMA,kCACA,CAJA,sBACA,aAEA,CAJA,eACA,MAIA,2FAEA,UAGA,YACA,sBACE,8BAEA,CALF,aACA,WAIE,OACA,oBAEF,uBACE,WAEF,YAFE,UAEF,eAgBA,kBACE,CAhBA,qDAQF,qCAGF,CAGI,YACF,CAJF,2BAGI,CAEA,eACA,qBAGA,mEAEA,qBACA,8BAIA,kBADF,kBACE,yBAEJ,oCAGI,qDAIJ,+BAGI,oCAEA,+CAQF,4CACE,yBACF,2BAOE,sBACA,CAHA,WACA,CAFF,cACE,CAJA,YAGF,CAEE,SAEA,mBAGA,kDAEE,CAJF,cAEA,cAEE,sBAEA,mBADA,YACA,uBACA,mDACE,CADF,YACE,iDAEA,uCAEN,+DAOE,mBADF,sBACE,mBAGF,aACE,sCAIA,aADF,WACE,CAKF,SACE,CAHJ,kBAEE,CAJE,gBAEJ,CAHI,iBAMA,yFAKA,aACA,eACA,cElbJ,iBAEE,aADA,iBACA,6BAEA,kCAEA,SACA,UAIA,gCACA,CALA,SAEA,SAEA,CAJA,0EAEA,CAFA,OAKA,CAGA,mDACE,iBAGF,gCACE,CADF,UACE,aAEJ,iCAEE,CAFF,UAEE,wCAEA,WACA,WADA,UACA,CACA,4CAGA,MACA,CADA,KACA,wCACA,UAGA,CAJA,UAIA,6DAUA,0CACE,CAFF,mBAEE,wEACA,CAVA,YACA,CAMF,mBAJE,OAOA,gBAJJ,gCACE,CANE,cACA,CAHA,oBACA,CAGA,QAGJ,CAII,0BACA,CADA,UACA,wCAEJ,kBACE,0DACA,gCACE,kBACA,CADA,YACA,oEACA,2CAMF,mDAII,CALN,YACE,CANE,cAKJ,CACE,iBAII,kEACA,yCACE,kDACA,yDACE,+CACA,uBANN,CAMM,+BANN,uCACE,qDACA,4BAEE,mBADA,0CACA,CADA,qBACA,0DACE,wCACA,sGALJ,oCACA,sBACE,kBAFF,UAEE,2CACA,wFACE,cACA,kEANN,uBACE,iDACA,CADA,UACA,0DACE,wDAEE,iEACA,qEANN,sCACE,CAGE,iBAHF,gBAGE,qBACE,CAJJ,uBACA,gDACE,wDACA,6DAHF,2CACA,CADA,gBACA,eACE,CAGE,sBANN,8BACE,CAII,iBAFF,4DACA,WACE,YADF,uCACE,6EACA,2BANN,8CACE,kDACA,0CACE,8BACA,yFACE,sBACA,sFALJ,mEACA,sBACE,kEACA,6EACE,uCACA,kEALJ,qGAEE,kEACA,6EACE,uCACA,kEALJ,8CACA,uDACE,sEACA,2EACE,sCACA,iEALJ,mGACA,qCACE,oDACA,0DACE,6GACA,gDAGR,yDCrEA,sEACE,CACA,6GACE,gEACF,iGAIF,wFACE,qDAGA,mGAEE,2CAEF,4FACE,gCACF,wGACE,8DAEE,6FAIA,iJAKN,6GACE,gDAKF,yDACA,qCAGA,6BACA,kBACA,qDAKA,oCAEA,+DAGA,2CAGE,oDAIA,oEAEE,qBAGJ,wDAEE,uCAEF,kEAGA,8CAEA,uDAIF,gEAIE,6BACA,gEAIA,+CACE,0EAIF,sDAEE,+DAGF,sCACA,8BACE,oCAEJ,wBACE,4FAEE,gBAEJ,yGAGI,kBAGJ,CCnHE,2MCFF,oBAGE,wGAKA,iCACE,CADF,wBACE,8GAQA,mBCjBJ,2GAIE,mBACA,6HAMA,YACE,mIAYF,eACA,CAHF,YAGE,4FAGE,8BAKF,uBAkBE,sCACA,CADA,qBAbA,wCAIA,CALF,8BACE,CADF,gBAKE,wCACA,CAOA,kDACA,CACA,kCAKF,6BAGA,4CACE,kDACA,eAGF,cACE,aACA,iBACA,yBACA,8BACA,WAGJ,2BACE,cAGA,+BACA,CAHA,eAGA,wCACA,YACA,iBACA,uEAGA,0BACA,2CAEA,8EAGI,qBACA,CAFF,kBAEE,kBAGN,0CAGE,mCAGA,4BAIA,gEACE,qCACA,8BAEA,gBACA,+CACA,iCAEF,iCAEE,gEACA,qCAGF,8BAEE,+BAIA,yCAEE,qBADA,gBACA,yBAKF,eACA,CAFF,YACE,CACA,iBACA,qDAEA,mDCvIJ,2FAOE,iCACA,CAEA,eACA,CAHA,kBAEA,CAFA,wBAGA,8BACA,eACE,CAFF,YAEE,0BACA,8CAGA,oBACE,oCAGA,kBACE,8DAEA,iBAEN,UACE,8BAIJ,+CAEE,qDAEF,kDAIE,YAEF,CAFE,YAEF,CCpCE,mFADA,kBAKE,CAJF,IAGA,aACE,mCAGA,iDACE,+BAEJ,wBAEE,mBAMA,6CAEF,CAJE,mBAEA,CAEF,kCAGE,CARF,kBACE,CAHA,eAUA,YACA,mBACA,CADA,UACA,wCC9BF,oBDkCE,wBCnCJ,uCACE,+BACA,+DACA,sBAGA,qBCDA,6CAIE,CAPF,uBAGA,CDGE,oBACF,yDAEE,CCDE,2CAGF,CAJA,kCACE,CDJJ,YACE,CAIA,eCTF,CDKE,uBCMA,gCACE,YAEF,oCAEE,wBACA,0BAIF,iBAEA,cADF,UACE,uBAEA,iCAEA,wCAEA,6CAMA,CAYF,gCATI,4BASJ,CAZE,mCAEE,iCAUJ,4BAGE,4DADA,+BACA,CAHF,qBAGE,sCACE,OAEF,iBAHA,SAGA,iHACE,2DAKF,CANA,8EAMA,uSAEE,kBAEF,+FACE,yCCjEJ,WACA,yBAGA,uBACA,gBAEA,uCAIA,CAJA,iCAIA,uCAGA,UACE,gBACA,qBAEA,0CClBJ,gBACE,KAGF,qBACE,YAGF,CAHE,cAGF,gCAEE,mBACA,iEAEA,oCACA,wCAEA,sBACA,WAEA,CAFA,YAEA,8EAEA,mCAFA,iBAEA,6BAIA,wEAKA,sDAIE,CARF,mDAIA,CAIE,cAEF,8CAIA,oBAFE,iBAEF,8CAGE,eAEF,CAFE,YAEF,OAEE,kBAGJ,CAJI,eACA,CAFF,mBAKF,yCCjDE,oBACA,CAFA,iBAEA,uCAKE,iBACA,qCAGA,mBCZJ,CDWI,gBCXJ,6BAEE,eACA,sBAGA,eAEA,sBACA,oDACA,iGAMA,gBAFE,YAEF,8FAME,iJCnBF,YACA,gNAWE,gDAEF,iSAaE,kBACE,gHAKF,oCACE,eACF,CADE,UACF,8CACE,gDACF,wCACE,oBCxCJ,oBAEF,6BACE,QACE,kDAGF,yBACE,kDAmBA,kDAEF,CAhBA,+CAaA,CAbA,oBAaA,0FACE,CADF,gGAfF,cACE,gBACA,CAaA,0BAGA,mQACE,gBAGF,oMACE,iBACA,CAFF,eACE,CADF,gBAEE,aAGJ,iCAEE,CAFF,wCAEE,wBAUE,+VAIE,uEAHA,2BAGA,wXAKJ,iDAGF,CARM,+CACE,iDAIN,CALI,gBAQN,mHACE,gBAGF,2DACE,0EAOA,0EAGF,gBAEE,6DC/EA,kDACA,gCACA,qDAGA,qBACA,qDCFA,cACA,eAEA,yBAGF,sBAEE,iBACA,sNAWA,iBACE,kBACA,wRAgBA,kBAEA,iOAgBA,uCACE,uEAEA,kBAEF,qUAuBE,iDAIJ,CACA,geCxFF,4BAEE,CAQA,6JACA,iDAIA,sEAGA,mDAOF,iDAGE,4DAIA,8CACA,qDAEE,eAFF,cAEE,oBAEF,uBAFE,kCAGA,eACA,iBACA,mBAIA,mDACA,CAHA,uCAEA,CAJA,0CACA,CAIA,gBAJA,gBACA,oBADA,gBAIA,wBAEJ,gBAGE,6BACA,YAHA,iBAGA,gCACA,iEAEA,6CACA,sDACA,0BADA,wBACA,0BACA,oIAIA,mBAFA,YAEA,qBACA,0CAIE,uBAEF,CAHA,yBACE,CAEF,iDACE,mFAKJ,oCACE,CANE,aAKJ,CACE,qEAIA,YAFA,WAEA,CAHA,aACA,CAEA,gBACE,4BACA,sBADA,aACA,gCAMF,oCACA,yDACA,2CAEA,qBAGE,kBAEA,CACA,mCAIF,CARE,YACA,CAOF,iCAEE,CAPA,oBACA,CAQA,oBACE,uDAEJ,sDAGA,CAHA,cAGA,0BACE,oDAIA,oCACA,4BACA,sBAGA,cAEA,oFAGA,sBAEA,yDACE,CAIF,iBAJE,wBAIF,6CAHE,6CAKA,eACA,aACA,CADA,cACA,yCAGJ,kBACE,CAKA,iDAEA,CARF,aACE,4CAGA,kBAIA,wEAGA,wDAGA,kCAOA,iDAGA,CAPF,WAEE,sCAEA,CAJF,2CACE,CAMA,qCACA,+BARF,kBACE,qCAOA,iBAsBA,sBACE,CAvBF,WAKA,CACE,0DAIF,CALA,uDACE,CANF,sBAqBA,4CACA,CALA,gRAIA,YAEE,6CAEN,mCAEE,+CASA,6EAIA,4BChNA,SDmNA,qFCnNA,gDACA,sCAGA,qCACA,sDACA,CAKA,kDAGA,CARA,0CAQA,kBAGA,YACA,sBACA,iBAFA,gBADF,YACE,CAHA,SAKA,kBAEA,SAFA,iBAEA,uEAGA,CAEE,6CAFF,oCAgBI,CAdF,yBACE,qBACF,CAGF,oBACE,CAIF,WACE,CALA,2CAGA,uBACF,CACE,mFAGE,CALF,qBAEA,UAGE,gCAIF,sDAEA,CALE,oCAKF,yCC7CJ,oCACE,CD+CA,yXAQE,sCCrDJ,wCAGA,oCACE","sources":["webpack:///./node_modules/normalize.css/normalize.css","webpack:///./src/furo/assets/styles/base/_print.sass","webpack:///./src/furo/assets/styles/base/_screen-readers.sass","webpack:///./src/furo/assets/styles/base/_theme.sass","webpack:///./src/furo/assets/styles/variables/_fonts.scss","webpack:///./src/furo/assets/styles/variables/_spacing.scss","webpack:///./src/furo/assets/styles/variables/_icons.scss","webpack:///./src/furo/assets/styles/variables/_admonitions.scss","webpack:///./src/furo/assets/styles/variables/_colors.scss","webpack:///./src/furo/assets/styles/base/_typography.sass","webpack:///./src/furo/assets/styles/_scaffold.sass","webpack:///./src/furo/assets/styles/variables/_layout.scss","webpack:///./src/furo/assets/styles/content/_admonitions.sass","webpack:///./src/furo/assets/styles/content/_api.sass","webpack:///./src/furo/assets/styles/content/_blocks.sass","webpack:///./src/furo/assets/styles/content/_captions.sass","webpack:///./src/furo/assets/styles/content/_code.sass","webpack:///./src/furo/assets/styles/content/_footnotes.sass","webpack:///./src/furo/assets/styles/content/_images.sass","webpack:///./src/furo/assets/styles/content/_indexes.sass","webpack:///./src/furo/assets/styles/content/_lists.sass","webpack:///./src/furo/assets/styles/content/_math.sass","webpack:///./src/furo/assets/styles/content/_misc.sass","webpack:///./src/furo/assets/styles/content/_rubrics.sass","webpack:///./src/furo/assets/styles/content/_sidebar.sass","webpack:///./src/furo/assets/styles/content/_tables.sass","webpack:///./src/furo/assets/styles/content/_target.sass","webpack:///./src/furo/assets/styles/content/_gui-labels.sass","webpack:///./src/furo/assets/styles/components/_footer.sass","webpack:///./src/furo/assets/styles/components/_sidebar.sass","webpack:///./src/furo/assets/styles/components/_table_of_contents.sass","webpack:///./src/furo/assets/styles/_shame.sass"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n","// This file contains styles for managing print media.\n\n////////////////////////////////////////////////////////////////////////////////\n// Hide elements not relevant to print media.\n////////////////////////////////////////////////////////////////////////////////\n@media print\n // Hide icon container.\n .content-icon-container\n display: none !important\n\n // Hide showing header links if hovering over when printing.\n .headerlink\n display: none !important\n\n // Hide mobile header.\n .mobile-header\n display: none !important\n\n // Hide navigation links.\n .related-pages\n display: none !important\n\n////////////////////////////////////////////////////////////////////////////////\n// Tweaks related to decolorization.\n////////////////////////////////////////////////////////////////////////////////\n@media print\n // Apply a border around code which no longer have a color background.\n .highlight\n border: 0.1pt solid var(--color-foreground-border)\n\n////////////////////////////////////////////////////////////////////////////////\n// Avoid page break in some relevant cases.\n////////////////////////////////////////////////////////////////////////////////\n@media print\n ul, ol, dl, a, table, pre, blockquote, p\n page-break-inside: avoid\n\n h1, h2, h3, h4, h5, h6, img, figure, caption\n page-break-inside: avoid\n page-break-after: avoid\n\n ul, ol, dl\n page-break-before: avoid\n",".visually-hidden\n position: absolute !important\n width: 1px !important\n height: 1px !important\n padding: 0 !important\n margin: -1px !important\n overflow: hidden !important\n clip: rect(0,0,0,0) !important\n white-space: nowrap !important\n border: 0 !important\n color: var(--color-foreground-primary)\n background: var(--color-background-primary)\n\n:-moz-focusring\n outline: auto\n","// This file serves as the \"skeleton\" of the theming logic.\n//\n// This contains the bulk of the logic for handling dark mode, color scheme\n// toggling and the handling of color-scheme-specific hiding of elements.\n\nbody\n @include fonts\n @include spacing\n @include icons\n @include admonitions\n @include default-admonition(#651fff, \"abstract\")\n @include default-topic(#14B8A6, \"pencil\")\n\n @include colors\n\n.only-light\n display: block !important\nhtml body .only-dark\n display: none !important\n\n// Ignore dark-mode hints if print media.\n@media not print\n // Enable dark-mode, if requested.\n body[data-theme=\"dark\"]\n @include colors-dark\n\n html & .only-light\n display: none !important\n .only-dark\n display: block !important\n\n // Enable dark mode, unless explicitly told to avoid.\n @media (prefers-color-scheme: dark)\n body:not([data-theme=\"light\"])\n @include colors-dark\n\n html & .only-light\n display: none !important\n .only-dark\n display: block !important\n\n//\n// Theme toggle presentation\n//\nbody[data-theme=\"auto\"]\n .theme-toggle svg.theme-icon-when-auto-light\n display: block\n\n @media (prefers-color-scheme: dark)\n .theme-toggle svg.theme-icon-when-auto-dark\n display: block\n .theme-toggle svg.theme-icon-when-auto-light\n display: none\n\nbody[data-theme=\"dark\"]\n .theme-toggle svg.theme-icon-when-dark\n display: block\n\nbody[data-theme=\"light\"]\n .theme-toggle svg.theme-icon-when-light\n display: block\n","// Fonts used by this theme.\n//\n// There are basically two things here -- using the system font stack and\n// defining sizes for various elements in %ages. We could have also used `em`\n// but %age is easier to reason about for me.\n\n@mixin fonts {\n // These are adapted from https://systemfontstack.com/\n --font-stack: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,\n sans-serif, Apple Color Emoji, Segoe UI Emoji;\n --font-stack--monospace: \"SFMono-Regular\", Menlo, Consolas, Monaco,\n Liberation Mono, Lucida Console, monospace;\n --font-stack--headings: var(--font-stack);\n\n --font-size--normal: 100%;\n --font-size--small: 87.5%;\n --font-size--small--2: 81.25%;\n --font-size--small--3: 75%;\n --font-size--small--4: 62.5%;\n\n // Sidebar\n --sidebar-caption-font-size: var(--font-size--small--2);\n --sidebar-item-font-size: var(--font-size--small);\n --sidebar-search-input-font-size: var(--font-size--small);\n\n // Table of Contents\n --toc-font-size: var(--font-size--small--3);\n --toc-font-size--mobile: var(--font-size--normal);\n --toc-title-font-size: var(--font-size--small--4);\n\n // Admonitions\n //\n // These aren't defined in terms of %ages, since nesting these is permitted.\n --admonition-font-size: 0.8125rem;\n --admonition-title-font-size: 0.8125rem;\n\n // Code\n --code-font-size: var(--font-size--small--2);\n\n // API\n --api-font-size: var(--font-size--small);\n}\n","// Spacing for various elements on the page\n//\n// If the user wants to tweak things in a certain way, they are permitted to.\n// They also have to deal with the consequences though!\n\n@mixin spacing {\n // Header!\n --header-height: calc(\n var(--sidebar-item-line-height) + 4 * #{var(--sidebar-item-spacing-vertical)}\n );\n --header-padding: 0.5rem;\n\n // Sidebar\n --sidebar-tree-space-above: 1.5rem;\n --sidebar-caption-space-above: 1rem;\n\n --sidebar-item-line-height: 1rem;\n --sidebar-item-spacing-vertical: 0.5rem;\n --sidebar-item-spacing-horizontal: 1rem;\n --sidebar-item-height: calc(\n var(--sidebar-item-line-height) + 2 *#{var(--sidebar-item-spacing-vertical)}\n );\n\n --sidebar-expander-width: var(--sidebar-item-height); // be square\n\n --sidebar-search-space-above: 0.5rem;\n --sidebar-search-input-spacing-vertical: 0.5rem;\n --sidebar-search-input-spacing-horizontal: 0.5rem;\n --sidebar-search-input-height: 1rem;\n --sidebar-search-icon-size: var(--sidebar-search-input-height);\n\n // Table of Contents\n --toc-title-padding: 0.25rem 0;\n --toc-spacing-vertical: 1.5rem;\n --toc-spacing-horizontal: 1.5rem;\n --toc-item-spacing-vertical: 0.4rem;\n --toc-item-spacing-horizontal: 1rem;\n}\n","// Expose theme icons as CSS variables.\n\n$icons: (\n // Adapted from tabler-icons\n // url: https://tablericons.com/\n \"search\":\n url('data:image/svg+xml;charset=utf-8,'),\n // Factored out from mkdocs-material on 24-Aug-2020.\n // url: https://squidfunk.github.io/mkdocs-material/reference/admonitions/\n \"pencil\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"abstract\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"info\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"flame\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"question\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"warning\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"failure\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"spark\":\n url('data:image/svg+xml;charset=utf-8,')\n);\n\n@mixin icons {\n @each $name, $glyph in $icons {\n --icon-#{$name}: #{$glyph};\n }\n}\n","// Admonitions\n\n// Structure of these is:\n// admonition-class: color \"icon-name\";\n//\n// The colors are translated into CSS variables below. The icons are\n// used directly in the main declarations to set the `mask-image` in\n// the title.\n\n// prettier-ignore\n$admonitions: (\n // Each of these has an reST directives for it.\n \"caution\": #ff9100 \"spark\",\n \"warning\": #ff9100 \"warning\",\n \"danger\": #ff5252 \"spark\",\n \"attention\": #ff5252 \"warning\",\n \"error\": #ff5252 \"failure\",\n \"hint\": #00c852 \"question\",\n \"tip\": #00c852 \"info\",\n \"important\": #00bfa5 \"flame\",\n \"note\": #00b0ff \"pencil\",\n \"seealso\": #448aff \"info\",\n \"admonition-todo\": #808080 \"pencil\"\n);\n\n@mixin default-admonition($color, $icon-name) {\n --color-admonition-title: #{$color};\n --color-admonition-title-background: #{rgba($color, 0.2)};\n\n --icon-admonition-default: var(--icon-#{$icon-name});\n}\n\n@mixin default-topic($color, $icon-name) {\n --color-topic-title: #{$color};\n --color-topic-title-background: #{rgba($color, 0.2)};\n\n --icon-topic-default: var(--icon-#{$icon-name});\n}\n\n@mixin admonitions {\n @each $name, $values in $admonitions {\n --color-admonition-title--#{$name}: #{nth($values, 1)};\n --color-admonition-title-background--#{$name}: #{rgba(\n nth($values, 1),\n 0.2\n )};\n }\n}\n","// Colors used throughout this theme.\n//\n// The aim is to give the user more control. Thus, instead of hard-coding colors\n// in various parts of the stylesheet, the approach taken is to define all\n// colors as CSS variables and reusing them in all the places.\n//\n// `colors-dark` depends on `colors` being included at a lower specificity.\n\n@mixin colors {\n --color-problematic: #b30000;\n\n // Base Colors\n --color-foreground-primary: black; // for main text and headings\n --color-foreground-secondary: #5a5c63; // for secondary text\n --color-foreground-muted: #6b6f76; // for muted text\n --color-foreground-border: #878787; // for content borders\n\n --color-background-primary: white; // for content\n --color-background-secondary: #f8f9fb; // for navigation + ToC\n --color-background-hover: #efeff4ff; // for navigation-item hover\n --color-background-hover--transparent: #efeff400;\n --color-background-border: #eeebee; // for UI borders\n --color-background-item: #ccc; // for \"background\" items (eg: copybutton)\n\n // Announcements\n --color-announcement-background: #000000dd;\n --color-announcement-text: #eeebee;\n\n // Brand colors\n --color-brand-primary: #0a4bff;\n --color-brand-content: #2757dd;\n --color-brand-visited: #872ee0;\n\n // API documentation\n --color-api-background: var(--color-background-hover--transparent);\n --color-api-background-hover: var(--color-background-hover);\n --color-api-overall: var(--color-foreground-secondary);\n --color-api-name: var(--color-problematic);\n --color-api-pre-name: var(--color-problematic);\n --color-api-paren: var(--color-foreground-secondary);\n --color-api-keyword: var(--color-foreground-primary);\n\n --color-api-added: #21632c;\n --color-api-added-border: #38a84d;\n --color-api-changed: #046172;\n --color-api-changed-border: #06a1bc;\n --color-api-deprecated: #605706;\n --color-api-deprecated-border: #f0d90f;\n --color-api-removed: #b30000;\n --color-api-removed-border: #ff5c5c;\n\n --color-highlight-on-target: #ffffcc;\n\n // Inline code background\n --color-inline-code-background: var(--color-background-secondary);\n\n // Highlighted text (search)\n --color-highlighted-background: #ddeeff;\n --color-highlighted-text: var(--color-foreground-primary);\n\n // GUI Labels\n --color-guilabel-background: #ddeeff80;\n --color-guilabel-border: #bedaf580;\n --color-guilabel-text: var(--color-foreground-primary);\n\n // Admonitions!\n --color-admonition-background: transparent;\n\n //////////////////////////////////////////////////////////////////////////////\n // Everything below this should be one of:\n // - var(...)\n // - *-gradient(...)\n // - special literal values (eg: transparent, none)\n //////////////////////////////////////////////////////////////////////////////\n\n // Tables\n --color-table-header-background: var(--color-background-secondary);\n --color-table-border: var(--color-background-border);\n\n // Cards\n --color-card-border: var(--color-background-secondary);\n --color-card-background: transparent;\n --color-card-marginals-background: var(--color-background-secondary);\n\n // Header\n --color-header-background: var(--color-background-primary);\n --color-header-border: var(--color-background-border);\n --color-header-text: var(--color-foreground-primary);\n\n // Sidebar (left)\n --color-sidebar-background: var(--color-background-secondary);\n --color-sidebar-background-border: var(--color-background-border);\n\n --color-sidebar-brand-text: var(--color-foreground-primary);\n --color-sidebar-caption-text: var(--color-foreground-muted);\n --color-sidebar-link-text: var(--color-foreground-secondary);\n --color-sidebar-link-text--top-level: var(--color-brand-primary);\n\n --color-sidebar-item-background: var(--color-sidebar-background);\n --color-sidebar-item-background--current: var(\n --color-sidebar-item-background\n );\n --color-sidebar-item-background--hover: linear-gradient(\n 90deg,\n var(--color-background-hover--transparent) 0%,\n var(--color-background-hover) var(--sidebar-item-spacing-horizontal),\n var(--color-background-hover) 100%\n );\n\n --color-sidebar-item-expander-background: transparent;\n --color-sidebar-item-expander-background--hover: var(\n --color-background-hover\n );\n\n --color-sidebar-search-text: var(--color-foreground-primary);\n --color-sidebar-search-background: var(--color-background-secondary);\n --color-sidebar-search-background--focus: var(--color-background-primary);\n --color-sidebar-search-border: var(--color-background-border);\n --color-sidebar-search-icon: var(--color-foreground-muted);\n\n // Table of Contents (right)\n --color-toc-background: var(--color-background-primary);\n --color-toc-title-text: var(--color-foreground-muted);\n --color-toc-item-text: var(--color-foreground-secondary);\n --color-toc-item-text--hover: var(--color-foreground-primary);\n --color-toc-item-text--active: var(--color-brand-primary);\n\n // Actual page contents\n --color-content-foreground: var(--color-foreground-primary);\n --color-content-background: transparent;\n\n // Links\n --color-link: var(--color-brand-content);\n --color-link-underline: var(--color-background-border);\n --color-link--hover: var(--color-brand-content);\n --color-link-underline--hover: var(--color-foreground-border);\n\n --color-link--visited: var(--color-brand-visited);\n --color-link-underline--visited: var(--color-background-border);\n --color-link--visited--hover: var(--color-brand-visited);\n --color-link-underline--visited--hover: var(--color-foreground-border);\n}\n\n@mixin colors-dark {\n --color-problematic: #ee5151;\n\n // Base Colors\n --color-foreground-primary: #cfd0d0; // for main text and headings\n --color-foreground-secondary: #9ca0a5; // for secondary text\n --color-foreground-muted: #81868d; // for muted text\n --color-foreground-border: #666666; // for content borders\n\n --color-background-primary: #131416; // for content\n --color-background-secondary: #1a1c1e; // for navigation + ToC\n --color-background-hover: #1e2124ff; // for navigation-item hover\n --color-background-hover--transparent: #1e212400;\n --color-background-border: #303335; // for UI borders\n --color-background-item: #444; // for \"background\" items (eg: copybutton)\n\n // Announcements\n --color-announcement-background: #000000dd;\n --color-announcement-text: #eeebee;\n\n // Brand colors\n --color-brand-primary: #3d94ff;\n --color-brand-content: #5ca5ff;\n --color-brand-visited: #b27aeb;\n\n // Highlighted text (search)\n --color-highlighted-background: #083563;\n\n // GUI Labels\n --color-guilabel-background: #08356380;\n --color-guilabel-border: #13395f80;\n\n // API documentation\n --color-api-keyword: var(--color-foreground-secondary);\n --color-highlight-on-target: #333300;\n\n --color-api-added: #3db854;\n --color-api-added-border: #267334;\n --color-api-changed: #09b0ce;\n --color-api-changed-border: #056d80;\n --color-api-deprecated: #b1a10b;\n --color-api-deprecated-border: #6e6407;\n --color-api-removed: #ff7575;\n --color-api-removed-border: #b03b3b;\n\n // Admonitions\n --color-admonition-background: #18181a;\n\n // Cards\n --color-card-border: var(--color-background-secondary);\n --color-card-background: #18181a;\n --color-card-marginals-background: var(--color-background-hover);\n}\n","// This file contains the styling for making the content throughout the page,\n// including fonts, paragraphs, headings and spacing among these elements.\n\nbody\n font-family: var(--font-stack)\npre,\ncode,\nkbd,\nsamp\n font-family: var(--font-stack--monospace)\n\n// Make fonts look slightly nicer.\nbody\n -webkit-font-smoothing: antialiased\n -moz-osx-font-smoothing: grayscale\n\n// Line height from Bootstrap 4.1\narticle\n line-height: 1.5\n\n//\n// Headings\n//\nh1,\nh2,\nh3,\nh4,\nh5,\nh6\n line-height: 1.25\n font-family: var(--font-stack--headings)\n font-weight: bold\n\n border-radius: 0.5rem\n margin-top: 0.5rem\n margin-bottom: 0.5rem\n margin-left: -0.5rem\n margin-right: -0.5rem\n padding-left: 0.5rem\n padding-right: 0.5rem\n\n + p\n margin-top: 0\n\nh1\n font-size: 2.5em\n margin-top: 1.75rem\n margin-bottom: 1rem\nh2\n font-size: 2em\n margin-top: 1.75rem\nh3\n font-size: 1.5em\nh4\n font-size: 1.25em\nh5\n font-size: 1.125em\nh6\n font-size: 1em\n\nsmall\n opacity: 75%\n font-size: 80%\n\n// Paragraph\np\n margin-top: 0.5rem\n margin-bottom: 0.75rem\n\n// Horizontal rules\nhr.docutils\n height: 1px\n padding: 0\n margin: 2rem 0\n background-color: var(--color-background-border)\n border: 0\n\n.centered\n text-align: center\n\n// Links\na\n text-decoration: underline\n\n color: var(--color-link)\n text-decoration-color: var(--color-link-underline)\n\n &:visited\n color: var(--color-link--visited)\n text-decoration-color: var(--color-link-underline--visited)\n &:hover\n color: var(--color-link--visited--hover)\n text-decoration-color: var(--color-link-underline--visited--hover)\n\n &:hover\n color: var(--color-link--hover)\n text-decoration-color: var(--color-link-underline--hover)\n &.muted-link\n color: inherit\n &:hover\n color: var(--color-link--hover)\n text-decoration-color: var(--color-link-underline--hover)\n &:visited\n color: var(--color-link--visited--hover)\n text-decoration-color: var(--color-link-underline--visited--hover)\n","// This file contains the styles for the overall layouting of the documentation\n// skeleton, including the responsive changes as well as sidebar toggles.\n//\n// This is implemented as a mobile-last design, which isn't ideal, but it is\n// reasonably good-enough and I got pretty tired by the time I'd finished this\n// to move the rules around to fix this. Shouldn't take more than 3-4 hours,\n// if you know what you're doing tho.\n\n// HACK: Not all browsers account for the scrollbar width in media queries.\n// This results in horizontal scrollbars in the breakpoint where we go\n// from displaying everything to hiding the ToC. We accomodate for this by\n// adding a bit of padding to the TOC drawer, disabling the horizontal\n// scrollbar and allowing the scrollbars to cover the padding.\n// https://www.456bereastreet.com/archive/201301/media_query_width_and_vertical_scrollbars/\n\n// HACK: Always having the scrollbar visible, prevents certain browsers from\n// causing the content to stutter horizontally between taller-than-viewport and\n// not-taller-than-viewport pages.\n\nhtml\n overflow-x: hidden\n overflow-y: scroll\n scroll-behavior: smooth\n\n.sidebar-scroll, .toc-scroll, article[role=main] *\n // Override Firefox scrollbar style\n scrollbar-width: thin\n scrollbar-color: var(--color-foreground-border) transparent\n\n // Override Chrome scrollbar styles\n &::-webkit-scrollbar\n width: 0.25rem\n height: 0.25rem\n &::-webkit-scrollbar-thumb\n background-color: var(--color-foreground-border)\n border-radius: 0.125rem\n\n//\n// Overalls\n//\nhtml,\nbody\n height: 100%\n color: var(--color-foreground-primary)\n background: var(--color-background-primary)\n\n.skip-to-content\n position: fixed\n padding: 1rem\n border-radius: 1rem\n left: 0.25rem\n top: 0.25rem\n z-index: 40\n background: var(--color-background-primary)\n color: var(--color-foreground-primary)\n\n transform: translateY(-200%)\n transition: transform 300ms ease-in-out\n\n &:focus-within\n transform: translateY(0%)\n\narticle\n color: var(--color-content-foreground)\n background: var(--color-content-background)\n overflow-wrap: break-word\n\n.page\n display: flex\n // fill the viewport for pages with little content.\n min-height: 100%\n\n.mobile-header\n width: 100%\n height: var(--header-height)\n background-color: var(--color-header-background)\n color: var(--color-header-text)\n border-bottom: 1px solid var(--color-header-border)\n\n // Looks like sub-script/super-script have this, and we need this to\n // be \"on top\" of those.\n z-index: 10\n\n // We don't show the header on large screens.\n display: none\n\n // Add shadow when scrolled\n &.scrolled\n border-bottom: none\n box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.1), 0 0.2rem 0.4rem rgba(0, 0, 0, 0.2)\n\n .header-center\n a\n color: var(--color-header-text)\n text-decoration: none\n\n.main\n display: flex\n flex: 1\n\n// Sidebar (left) also covers the entire left portion of screen.\n.sidebar-drawer\n box-sizing: border-box\n\n border-right: 1px solid var(--color-sidebar-background-border)\n background: var(--color-sidebar-background)\n\n display: flex\n justify-content: flex-end\n // These next two lines took me two days to figure out.\n width: calc((100% - #{$full-width}) / 2 + #{$sidebar-width})\n min-width: $sidebar-width\n\n// Scroll-along sidebars\n.sidebar-container,\n.toc-drawer\n box-sizing: border-box\n width: $sidebar-width\n\n.toc-drawer\n background: var(--color-toc-background)\n // See HACK described on top of this document\n padding-right: 1rem\n\n.sidebar-sticky,\n.toc-sticky\n position: sticky\n top: 0\n height: min(100%, 100vh)\n height: 100vh\n\n display: flex\n flex-direction: column\n\n.sidebar-scroll,\n.toc-scroll\n flex-grow: 1\n flex-shrink: 1\n\n overflow: auto\n scroll-behavior: smooth\n\n// Central items.\n.content\n padding: 0 $content-padding\n width: $content-width\n\n display: flex\n flex-direction: column\n justify-content: space-between\n\n.icon\n display: inline-block\n height: 1rem\n width: 1rem\n svg\n width: 100%\n height: 100%\n\n//\n// Accommodate announcement banner\n//\n.announcement\n background-color: var(--color-announcement-background)\n color: var(--color-announcement-text)\n\n height: var(--header-height)\n display: flex\n align-items: center\n overflow-x: auto\n & + .page\n min-height: calc(100% - var(--header-height))\n\n.announcement-content\n box-sizing: border-box\n padding: 0.5rem\n min-width: 100%\n white-space: nowrap\n text-align: center\n\n a\n color: var(--color-announcement-text)\n text-decoration-color: var(--color-announcement-text)\n\n &:hover\n color: var(--color-announcement-text)\n text-decoration-color: var(--color-link--hover)\n\n////////////////////////////////////////////////////////////////////////////////\n// Toggles for theme\n////////////////////////////////////////////////////////////////////////////////\n.no-js .theme-toggle-container // don't show theme toggle if there's no JS\n display: none\n\n.theme-toggle-container\n display: flex\n\n.theme-toggle\n display: flex\n cursor: pointer\n border: none\n padding: 0\n background: transparent\n\n.theme-toggle svg\n height: 1.25rem\n width: 1.25rem\n color: var(--color-foreground-primary)\n display: none\n\n.theme-toggle-header\n display: flex\n align-items: center\n justify-content: center\n\n////////////////////////////////////////////////////////////////////////////////\n// Toggles for elements\n////////////////////////////////////////////////////////////////////////////////\n.toc-overlay-icon, .nav-overlay-icon\n display: none\n cursor: pointer\n\n .icon\n color: var(--color-foreground-secondary)\n height: 1.5rem\n width: 1.5rem\n\n.toc-header-icon, .nav-overlay-icon\n // for when we set display: flex\n justify-content: center\n align-items: center\n\n.toc-content-icon\n height: 1.5rem\n width: 1.5rem\n\n.content-icon-container\n float: right\n display: flex\n margin-top: 1.5rem\n margin-left: 1rem\n margin-bottom: 1rem\n gap: 0.5rem\n\n .edit-this-page, .view-this-page\n svg\n color: inherit\n height: 1.25rem\n width: 1.25rem\n\n.sidebar-toggle\n position: absolute\n display: none\n// \n.sidebar-toggle[name=\"__toc\"]\n left: 20px\n.sidebar-toggle:checked\n left: 40px\n// \n\n.overlay\n position: fixed\n top: 0\n width: 0\n height: 0\n\n transition: width 0ms, height 0ms, opacity 250ms ease-out\n\n opacity: 0\n background-color: rgba(0, 0, 0, 0.54)\n.sidebar-overlay\n z-index: 20\n.toc-overlay\n z-index: 40\n\n// Keep things on top and smooth.\n.sidebar-drawer\n z-index: 30\n transition: left 250ms ease-in-out\n.toc-drawer\n z-index: 50\n transition: right 250ms ease-in-out\n\n// Show the Sidebar\n#__navigation:checked\n & ~ .sidebar-overlay\n width: 100%\n height: 100%\n opacity: 1\n & ~ .page\n .sidebar-drawer\n top: 0\n left: 0\n // Show the toc sidebar\n#__toc:checked\n & ~ .toc-overlay\n width: 100%\n height: 100%\n opacity: 1\n & ~ .page\n .toc-drawer\n top: 0\n right: 0\n\n////////////////////////////////////////////////////////////////////////////////\n// Back to top\n////////////////////////////////////////////////////////////////////////////////\n.back-to-top\n text-decoration: none\n\n display: none\n position: fixed\n left: 0\n top: 1rem\n padding: 0.5rem\n padding-right: 0.75rem\n border-radius: 1rem\n font-size: 0.8125rem\n\n background: var(--color-background-primary)\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), #6b728080 0px 0px 1px 0px\n\n z-index: 10\n\n margin-left: 50%\n transform: translateX(-50%)\n svg\n height: 1rem\n width: 1rem\n fill: currentColor\n display: inline-block\n\n span\n margin-left: 0.25rem\n\n .show-back-to-top &\n display: flex\n align-items: center\n\n////////////////////////////////////////////////////////////////////////////////\n// Responsive layouting\n////////////////////////////////////////////////////////////////////////////////\n// Make things a bit bigger on bigger screens.\n@media (min-width: $full-width + $sidebar-width)\n html\n font-size: 110%\n\n@media (max-width: $full-width)\n // Collapse \"toc\" into the icon.\n .toc-content-icon\n display: flex\n .toc-drawer\n position: fixed\n height: 100vh\n top: 0\n right: -$sidebar-width\n border-left: 1px solid var(--color-background-muted)\n .toc-tree\n border-left: none\n font-size: var(--toc-font-size--mobile)\n\n // Accomodate for a changed content width.\n .sidebar-drawer\n width: calc((100% - #{$full-width - $sidebar-width}) / 2 + #{$sidebar-width})\n\n@media (max-width: $content-padded-width + $sidebar-width)\n // Center the page\n .content\n margin-left: auto\n margin-right: auto\n padding: 0 $content-padding--small\n\n@media (max-width: $content-padded-width--small + $sidebar-width)\n // Collapse \"navigation\".\n .nav-overlay-icon\n display: flex\n .sidebar-drawer\n position: fixed\n height: 100vh\n width: $sidebar-width\n\n top: 0\n left: -$sidebar-width\n\n // Swap which icon is visible.\n .toc-header-icon, .theme-toggle-header\n display: flex\n .toc-content-icon, .theme-toggle-content\n display: none\n\n // Show the header.\n .mobile-header\n position: sticky\n top: 0\n display: flex\n justify-content: space-between\n align-items: center\n\n .header-left,\n .header-right\n display: flex\n height: var(--header-height)\n padding: 0 var(--header-padding)\n label\n height: 100%\n width: 100%\n user-select: none\n\n .nav-overlay-icon .icon,\n .theme-toggle svg\n height: 1.5rem\n width: 1.5rem\n\n // Add a scroll margin for the content\n :target\n scroll-margin-top: calc(var(--header-height) + 2.5rem)\n\n // Show back-to-top below the header\n .back-to-top\n top: calc(var(--header-height) + 0.5rem)\n\n // Accommodate for the header.\n .page\n flex-direction: column\n justify-content: center\n\n@media (max-width: $content-width + 2* $content-padding--small)\n // Content should respect window limits.\n .content\n width: 100%\n overflow-x: auto\n\n@media (max-width: $content-width)\n article[role=main] aside.sidebar\n float: none\n width: 100%\n margin: 1rem 0\n","// Overall Layout Variables\n//\n// Because CSS variables can't be used in media queries. The fact that this\n// makes the layout non-user-configurable is a good thing.\n$content-padding: 3em;\n$content-padding--small: 1em;\n$content-width: 46em;\n$sidebar-width: 15em;\n$content-padded-width: $content-width + 2 * $content-padding;\n$content-padded-width--small: $content-width + 2 * $content-padding--small;\n$full-width: $content-padded-width + 2 * $sidebar-width;\n","//\n// The design here is strongly inspired by mkdocs-material.\n.admonition, .topic\n margin: 1rem auto\n padding: 0 0.5rem 0.5rem 0.5rem\n\n background: var(--color-admonition-background)\n\n border-radius: 0.2rem\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1)\n\n font-size: var(--admonition-font-size)\n\n overflow: hidden\n page-break-inside: avoid\n\n // First element should have no margin, since the title has it.\n > :nth-child(2)\n margin-top: 0\n\n // Last item should have no margin, since we'll control that w/ padding\n > :last-child\n margin-bottom: 0\n\n.admonition p.admonition-title,\np.topic-title\n position: relative\n margin: 0 -0.5rem 0.5rem\n padding-left: 2rem\n padding-right: .5rem\n padding-top: .4rem\n padding-bottom: .4rem\n\n font-weight: 500\n font-size: var(--admonition-title-font-size)\n line-height: 1.3\n\n // Our fancy icon\n &::before\n content: \"\"\n position: absolute\n left: 0.5rem\n width: 1rem\n height: 1rem\n\n// Default styles\np.admonition-title\n background-color: var(--color-admonition-title-background)\n &::before\n background-color: var(--color-admonition-title)\n mask-image: var(--icon-admonition-default)\n mask-repeat: no-repeat\n\np.topic-title\n background-color: var(--color-topic-title-background)\n &::before\n background-color: var(--color-topic-title)\n mask-image: var(--icon-topic-default)\n mask-repeat: no-repeat\n\n//\n// Variants\n//\n.admonition\n border-left: 0.2rem solid var(--color-admonition-title)\n\n @each $type, $value in $admonitions\n &.#{$type}\n border-left-color: var(--color-admonition-title--#{$type})\n > .admonition-title\n background-color: var(--color-admonition-title-background--#{$type})\n &::before\n background-color: var(--color-admonition-title--#{$type})\n mask-image: var(--icon-#{nth($value, 2)})\n\n.admonition-todo > .admonition-title\n text-transform: uppercase\n","// This file stylizes the API documentation (stuff generated by autodoc). It's\n// deeply nested due to how autodoc structures the HTML without enough classes\n// to select the relevant items.\n\n// API docs!\ndl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)\n // Tweak the spacing of all the things!\n dd\n margin-left: 2rem\n > :first-child\n margin-top: 0.125rem\n > :last-child\n margin-bottom: 0.75rem\n\n // This is used for the arguments\n .field-list\n margin-bottom: 0.75rem\n\n // \"Headings\" (like \"Parameters\" and \"Return\")\n > dt\n text-transform: uppercase\n font-size: var(--font-size--small)\n\n dd:empty\n margin-bottom: 0.5rem\n dd > ul\n margin-left: -1.2rem\n > li\n > p:nth-child(2)\n margin-top: 0\n // When the last-empty-paragraph follows a paragraph, it doesn't need\n // to augument the existing spacing.\n > p + p:last-child:empty\n margin-top: 0\n margin-bottom: 0\n\n // Colorize the elements\n > dt\n color: var(--color-api-overall)\n\n.sig:not(.sig-inline)\n font-weight: bold\n\n font-size: var(--api-font-size)\n font-family: var(--font-stack--monospace)\n\n margin-left: -0.25rem\n margin-right: -0.25rem\n padding-top: 0.25rem\n padding-bottom: 0.25rem\n padding-right: 0.5rem\n\n // These are intentionally em, to properly match the font size.\n padding-left: 3em\n text-indent: -2.5em\n\n border-radius: 0.25rem\n\n background: var(--color-api-background)\n transition: background 100ms ease-out\n\n &:hover\n background: var(--color-api-background-hover)\n\n // adjust the size of the [source] link on the right.\n a.reference\n .viewcode-link\n font-weight: normal\n width: 4.25rem\n\nem.property\n font-style: normal\n &:first-child\n color: var(--color-api-keyword)\n.sig-name\n color: var(--color-api-name)\n.sig-prename\n font-weight: normal\n color: var(--color-api-pre-name)\n.sig-paren\n color: var(--color-api-paren)\n.sig-param\n font-style: normal\n\ndiv.versionadded,\ndiv.versionchanged,\ndiv.deprecated,\ndiv.versionremoved\n border-left: 0.1875rem solid\n border-radius: 0.125rem\n\n padding-left: 0.75rem\n\n p\n margin-top: 0.125rem\n margin-bottom: 0.125rem\n\ndiv.versionadded\n border-color: var(--color-api-added-border)\n .versionmodified\n color: var(--color-api-added)\n\ndiv.versionchanged\n border-color: var(--color-api-changed-border)\n .versionmodified\n color: var(--color-api-changed)\n\ndiv.deprecated\n border-color: var(--color-api-deprecated-border)\n .versionmodified\n color: var(--color-api-deprecated)\n\ndiv.versionremoved\n border-color: var(--color-api-removed-border)\n .versionmodified\n color: var(--color-api-removed)\n\n// Align the [docs] and [source] to the right.\n.viewcode-link, .viewcode-back\n float: right\n text-align: right\n",".line-block\n margin-top: 0.5rem\n margin-bottom: 0.75rem\n .line-block\n margin-top: 0rem\n margin-bottom: 0rem\n padding-left: 1rem\n","// Captions\narticle p.caption,\ntable > caption,\n.code-block-caption\n font-size: var(--font-size--small)\n text-align: center\n\n// Caption above a TOCTree\n.toctree-wrapper.compound\n .caption, :not(.caption) > .caption-text\n font-size: var(--font-size--small)\n text-transform: uppercase\n\n text-align: initial\n margin-bottom: 0\n\n > ul\n margin-top: 0\n margin-bottom: 0\n","// Inline code\ncode.literal, .sig-inline\n background: var(--color-inline-code-background)\n border-radius: 0.2em\n // Make the font smaller, and use padding to recover.\n font-size: var(--font-size--small--2)\n padding: 0.1em 0.2em\n\n pre.literal-block &\n font-size: inherit\n padding: 0\n\n p &\n border: 1px solid var(--color-background-border)\n\n.sig-inline\n font-family: var(--font-stack--monospace)\n\n// Code and Literal Blocks\n$code-spacing-vertical: 0.625rem\n$code-spacing-horizontal: 0.875rem\n\n// Wraps every literal block + line numbers.\ndiv[class*=\" highlight-\"],\ndiv[class^=\"highlight-\"]\n margin: 1em 0\n display: flex\n\n .table-wrapper\n margin: 0\n padding: 0\n\npre\n margin: 0\n padding: 0\n overflow: auto\n\n // Needed to have more specificity than pygments' \"pre\" selector. :(\n article[role=\"main\"] .highlight &\n line-height: 1.5\n\n &.literal-block,\n .highlight &\n font-size: var(--code-font-size)\n padding: $code-spacing-vertical $code-spacing-horizontal\n\n // Make it look like all the other blocks.\n &.literal-block\n margin-top: 1rem\n margin-bottom: 1rem\n\n border-radius: 0.2rem\n background-color: var(--color-code-background)\n color: var(--color-code-foreground)\n\n// All code is always contained in this.\n.highlight\n width: 100%\n border-radius: 0.2rem\n\n // Make line numbers and prompts un-selectable.\n .gp, span.linenos\n user-select: none\n pointer-events: none\n\n // Expand the line-highlighting.\n .hll\n display: block\n margin-left: -$code-spacing-horizontal\n margin-right: -$code-spacing-horizontal\n padding-left: $code-spacing-horizontal\n padding-right: $code-spacing-horizontal\n\n/* Make code block captions be nicely integrated */\n.code-block-caption\n display: flex\n padding: $code-spacing-vertical $code-spacing-horizontal\n\n border-radius: 0.25rem\n border-bottom-left-radius: 0\n border-bottom-right-radius: 0\n font-weight: 300\n border-bottom: 1px solid\n\n background-color: var(--color-code-background)\n color: var(--color-code-foreground)\n border-color: var(--color-background-border)\n\n + div[class]\n margin-top: 0\n pre\n border-top-left-radius: 0\n border-top-right-radius: 0\n\n// When `html_codeblock_linenos_style` is table.\n.highlighttable\n width: 100%\n display: block\n tbody\n display: block\n\n tr\n display: flex\n\n // Line numbers\n td.linenos\n background-color: var(--color-code-background)\n color: var(--color-code-foreground)\n padding: $code-spacing-vertical $code-spacing-horizontal\n padding-right: 0\n border-top-left-radius: 0.2rem\n border-bottom-left-radius: 0.2rem\n\n .linenodiv\n padding-right: $code-spacing-horizontal\n font-size: var(--code-font-size)\n box-shadow: -0.0625rem 0 var(--color-foreground-border) inset\n\n // Actual code\n td.code\n padding: 0\n display: block\n flex: 1\n overflow: hidden\n\n .highlight\n border-top-left-radius: 0\n border-bottom-left-radius: 0\n\n// When `html_codeblock_linenos_style` is inline.\n.highlight\n span.linenos\n display: inline-block\n padding-left: 0\n padding-right: $code-spacing-horizontal\n margin-right: $code-spacing-horizontal\n box-shadow: -0.0625rem 0 var(--color-foreground-border) inset\n","// Inline Footnote Reference\n.footnote-reference\n font-size: var(--font-size--small--4)\n vertical-align: super\n\n// Definition list, listing the content of each note.\n// docutils <= 0.17\ndl.footnote.brackets\n font-size: var(--font-size--small)\n color: var(--color-foreground-secondary)\n\n display: grid\n grid-template-columns: max-content auto\n dt\n margin: 0\n > .fn-backref\n margin-left: 0.25rem\n\n &:after\n content: \":\"\n\n .brackets\n &:before\n content: \"[\"\n &:after\n content: \"]\"\n\n dd\n margin: 0\n padding: 0 1rem\n\n// docutils >= 0.18\naside.footnote\n font-size: var(--font-size--small)\n color: var(--color-foreground-secondary)\n\naside.footnote > span,\ndiv.citation > span\n float: left\n font-weight: 500\n padding-right: 0.25rem\n\naside.footnote > *:not(span),\ndiv.citation > p\n margin-left: 2rem\n","//\n// Figures\n//\nimg\n box-sizing: border-box\n max-width: 100%\n height: auto\n\narticle\n figure, .figure\n border-radius: 0.2rem\n\n margin: 0\n :last-child\n margin-bottom: 0\n\n .align-left\n float: left\n clear: left\n margin: 0 1rem 1rem\n\n .align-right\n float: right\n clear: right\n margin: 0 1rem 1rem\n\n .align-default,\n .align-center\n display: block\n text-align: center\n margin-left: auto\n margin-right: auto\n\n // WELL, table needs to be stylised like a table.\n table.align-default\n display: table\n text-align: initial\n",".genindex-jumpbox, .domainindex-jumpbox\n border-top: 1px solid var(--color-background-border)\n border-bottom: 1px solid var(--color-background-border)\n padding: 0.25rem\n\n.genindex-section, .domainindex-section\n h2\n margin-top: 0.75rem\n margin-bottom: 0.5rem\n ul\n margin-top: 0\n margin-bottom: 0\n","ul,\nol\n padding-left: 1.2rem\n\n // Space lists out like paragraphs\n margin-top: 1rem\n margin-bottom: 1rem\n // reduce margins within li.\n li\n > p:first-child\n margin-top: 0.25rem\n margin-bottom: 0.25rem\n\n > p:last-child\n margin-top: 0.25rem\n\n > ul,\n > ol\n margin-top: 0.5rem\n margin-bottom: 0.5rem\n\nol\n &.arabic\n list-style: decimal\n &.loweralpha\n list-style: lower-alpha\n &.upperalpha\n list-style: upper-alpha\n &.lowerroman\n list-style: lower-roman\n &.upperroman\n list-style: upper-roman\n\n// Don't space lists out when they're \"simple\" or in a `.. toctree::`\n.simple,\n.toctree-wrapper\n li\n > ul,\n > ol\n margin-top: 0\n margin-bottom: 0\n\n// Definition Lists\n.field-list,\n.option-list,\ndl:not([class]),\ndl.simple,\ndl.footnote,\ndl.glossary\n dt\n font-weight: 500\n margin-top: 0.25rem\n + dt\n margin-top: 0\n\n .classifier::before\n content: \":\"\n margin-left: 0.2rem\n margin-right: 0.2rem\n\n dd\n > p:first-child,\n ul\n margin-top: 0.125rem\n\n ul\n margin-bottom: 0.125rem\n",".math-wrapper\n width: 100%\n overflow-x: auto\n\ndiv.math\n position: relative\n text-align: center\n\n .headerlink,\n &:focus .headerlink\n display: none\n\n &:hover .headerlink\n display: inline-block\n\n span.eqno\n position: absolute\n right: 0.5rem\n top: 50%\n transform: translate(0, -50%)\n z-index: 1\n","// Abbreviations\nabbr[title]\n cursor: help\n\n// \"Problematic\" content, as identified by Sphinx\n.problematic\n color: var(--color-problematic)\n\n// Keyboard / Mouse \"instructions\"\nkbd:not(.compound)\n margin: 0 0.2rem\n padding: 0 0.2rem\n border-radius: 0.2rem\n border: 1px solid var(--color-foreground-border)\n color: var(--color-foreground-primary)\n vertical-align: text-bottom\n\n font-size: var(--font-size--small--3)\n display: inline-block\n\n box-shadow: 0 0.0625rem 0 rgba(0, 0, 0, 0.2), inset 0 0 0 0.125rem var(--color-background-primary)\n\n background-color: var(--color-background-secondary)\n\n// Blockquote\nblockquote\n border-left: 4px solid var(--color-background-border)\n background: var(--color-background-secondary)\n\n margin-left: 0\n margin-right: 0\n padding: 0.5rem 1rem\n\n .attribution\n font-weight: 600\n text-align: right\n\n &.pull-quote,\n &.highlights\n font-size: 1.25em\n\n &.epigraph,\n &.pull-quote\n border-left-width: 0\n border-radius: 0.5rem\n\n &.highlights\n border-left-width: 0\n background: transparent\n\n// Center align embedded-in-text images\np .reference img\n vertical-align: middle\n","p.rubric\n line-height: 1.25\n font-weight: bold\n font-size: 1.125em\n\n // For Numpy-style documentation that's got rubrics within it.\n // https://github.com/pradyunsg/furo/discussions/505\n dd &\n line-height: inherit\n font-weight: inherit\n\n font-size: var(--font-size--small)\n text-transform: uppercase\n","article .sidebar\n float: right\n clear: right\n width: 30%\n\n margin-left: 1rem\n margin-right: 0\n\n border-radius: 0.2rem\n background-color: var(--color-background-secondary)\n border: var(--color-background-border) 1px solid\n\n > *\n padding-left: 1rem\n padding-right: 1rem\n\n > ul, > ol // lists need additional padding, because bullets.\n padding-left: 2.2rem\n\n .sidebar-title\n margin: 0\n padding: 0.5rem 1rem\n border-bottom: var(--color-background-border) 1px solid\n\n font-weight: 500\n\n// TODO: subtitle\n// TODO: dedicated variables?\n","[role=main] .table-wrapper.container\n width: 100%\n overflow-x: auto\n margin-top: 1rem\n margin-bottom: 0.5rem\n padding: 0.2rem 0.2rem 0.75rem\n\ntable.docutils\n border-radius: 0.2rem\n border-spacing: 0\n border-collapse: collapse\n\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1)\n\n th\n background: var(--color-table-header-background)\n\n td,\n th\n // Space things out properly\n padding: 0 0.25rem\n\n // Get the borders looking just-right.\n border-left: 1px solid var(--color-table-border)\n border-right: 1px solid var(--color-table-border)\n border-bottom: 1px solid var(--color-table-border)\n\n p\n margin: 0.25rem\n\n &:first-child\n border-left: none\n &:last-child\n border-right: none\n\n // MyST-parser tables set these classes for control of column alignment\n &.text-left\n text-align: left\n &.text-right\n text-align: right\n &.text-center\n text-align: center\n",":target\n scroll-margin-top: 2.5rem\n\n@media (max-width: $full-width - $sidebar-width)\n :target\n scroll-margin-top: calc(2.5rem + var(--header-height))\n\n // When a heading is selected\n section > span:target\n scroll-margin-top: calc(2.8rem + var(--header-height))\n\n// Permalinks\n.headerlink\n font-weight: 100\n user-select: none\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\ndl dt,\np.caption,\nfigcaption p,\ntable > caption,\n.code-block-caption\n > .headerlink\n margin-left: 0.5rem\n visibility: hidden\n &:hover > .headerlink\n visibility: visible\n\n // Don't change to link-like, if someone adds the contents directive.\n > .toc-backref\n color: inherit\n text-decoration-line: none\n\n// Figure and table captions are special.\nfigure:hover > figcaption > p > .headerlink,\ntable:hover > caption > .headerlink\n visibility: visible\n\n:target >, // Regular section[id] style anchors\nspan:target ~ // Non-regular span[id] style \"extra\" anchors\n h1,\n h2,\n h3,\n h4,\n h5,\n h6\n &:nth-of-type(1)\n background-color: var(--color-highlight-on-target)\n // .headerlink\n // visibility: visible\n code.literal\n background-color: transparent\n\ntable:target > caption,\nfigure:target\n background-color: var(--color-highlight-on-target)\n\n// Inline page contents\n.this-will-duplicate-information-and-it-is-still-useful-here li :target\n background-color: var(--color-highlight-on-target)\n\n// Code block permalinks\n.literal-block-wrapper:target .code-block-caption\n background-color: var(--color-highlight-on-target)\n\n// When a definition list item is selected\n//\n// There isn't really an alternative to !important here, due to the\n// high-specificity of API documentation's selector.\ndt:target\n background-color: var(--color-highlight-on-target) !important\n\n// When a footnote reference is selected\n.footnote > dt:target + dd,\n.footnote-reference:target\n background-color: var(--color-highlight-on-target)\n",".guilabel\n background-color: var(--color-guilabel-background)\n border: 1px solid var(--color-guilabel-border)\n color: var(--color-guilabel-text)\n\n padding: 0 0.3em\n border-radius: 0.5em\n font-size: 0.9em\n","// This file contains the styles used for stylizing the footer that's shown\n// below the content.\n\nfooter\n font-size: var(--font-size--small)\n display: flex\n flex-direction: column\n\n margin-top: 2rem\n\n// Bottom of page information\n.bottom-of-page\n display: flex\n align-items: center\n justify-content: space-between\n\n margin-top: 1rem\n padding-top: 1rem\n padding-bottom: 1rem\n\n color: var(--color-foreground-secondary)\n border-top: 1px solid var(--color-background-border)\n\n line-height: 1.5\n\n @media (max-width: $content-width)\n text-align: center\n flex-direction: column-reverse\n gap: 0.25rem\n\n .left-details\n font-size: var(--font-size--small)\n\n .right-details\n display: flex\n flex-direction: column\n gap: 0.25rem\n text-align: right\n\n .icons\n display: flex\n justify-content: flex-end\n gap: 0.25rem\n font-size: 1rem\n\n a\n text-decoration: none\n\n svg,\n img\n font-size: 1.125rem\n height: 1em\n width: 1em\n\n// Next/Prev page information\n.related-pages\n a\n display: flex\n align-items: center\n\n text-decoration: none\n &:hover .page-info .title\n text-decoration: underline\n color: var(--color-link)\n text-decoration-color: var(--color-link-underline)\n\n svg.furo-related-icon,\n svg.furo-related-icon > use\n flex-shrink: 0\n\n color: var(--color-foreground-border)\n\n width: 0.75rem\n height: 0.75rem\n margin: 0 0.5rem\n\n &.next-page\n max-width: 50%\n\n float: right\n clear: right\n text-align: right\n\n &.prev-page\n max-width: 50%\n\n float: left\n clear: left\n\n svg\n transform: rotate(180deg)\n\n.page-info\n display: flex\n flex-direction: column\n overflow-wrap: anywhere\n\n .next-page &\n align-items: flex-end\n\n .context\n display: flex\n align-items: center\n\n padding-bottom: 0.1rem\n\n color: var(--color-foreground-muted)\n font-size: var(--font-size--small)\n text-decoration: none\n","// This file contains the styles for the contents of the left sidebar, which\n// contains the navigation tree, logo, search etc.\n\n////////////////////////////////////////////////////////////////////////////////\n// Brand on top of the scrollable tree.\n////////////////////////////////////////////////////////////////////////////////\n.sidebar-brand\n display: flex\n flex-direction: column\n flex-shrink: 0\n\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n text-decoration: none\n\n.sidebar-brand-text\n color: var(--color-sidebar-brand-text)\n overflow-wrap: break-word\n margin: var(--sidebar-item-spacing-vertical) 0\n font-size: 1.5rem\n\n.sidebar-logo-container\n margin: var(--sidebar-item-spacing-vertical) 0\n\n.sidebar-logo\n margin: 0 auto\n display: block\n max-width: 100%\n\n////////////////////////////////////////////////////////////////////////////////\n// Search\n////////////////////////////////////////////////////////////////////////////////\n.sidebar-search-container\n display: flex\n align-items: center\n margin-top: var(--sidebar-search-space-above)\n\n position: relative\n\n background: var(--color-sidebar-search-background)\n &:hover,\n &:focus-within\n background: var(--color-sidebar-search-background--focus)\n\n &::before\n content: \"\"\n position: absolute\n left: var(--sidebar-item-spacing-horizontal)\n width: var(--sidebar-search-icon-size)\n height: var(--sidebar-search-icon-size)\n\n background-color: var(--color-sidebar-search-icon)\n mask-image: var(--icon-search)\n\n.sidebar-search\n box-sizing: border-box\n\n border: none\n border-top: 1px solid var(--color-sidebar-search-border)\n border-bottom: 1px solid var(--color-sidebar-search-border)\n\n padding-top: var(--sidebar-search-input-spacing-vertical)\n padding-bottom: var(--sidebar-search-input-spacing-vertical)\n padding-right: var(--sidebar-search-input-spacing-horizontal)\n padding-left: calc(var(--sidebar-item-spacing-horizontal) + var(--sidebar-search-input-spacing-horizontal) + var(--sidebar-search-icon-size))\n\n width: 100%\n\n color: var(--color-sidebar-search-foreground)\n background: transparent\n z-index: 10\n\n &:focus\n outline: none\n\n &::placeholder\n font-size: var(--sidebar-search-input-font-size)\n\n//\n// Hide Search Matches link\n//\n#searchbox .highlight-link\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal) 0\n margin: 0\n text-align: center\n\n a\n color: var(--color-sidebar-search-icon)\n font-size: var(--font-size--small--2)\n\n////////////////////////////////////////////////////////////////////////////////\n// Structure/Skeleton of the navigation tree (left)\n////////////////////////////////////////////////////////////////////////////////\n.sidebar-tree\n font-size: var(--sidebar-item-font-size)\n margin-top: var(--sidebar-tree-space-above)\n margin-bottom: var(--sidebar-item-spacing-vertical)\n\n ul\n padding: 0\n margin-top: 0\n margin-bottom: 0\n\n display: flex\n flex-direction: column\n\n list-style: none\n\n li\n position: relative\n margin: 0\n\n > ul\n margin-left: var(--sidebar-item-spacing-horizontal)\n\n .icon\n color: var(--color-sidebar-link-text)\n\n .reference\n box-sizing: border-box\n color: var(--color-sidebar-link-text)\n\n // Fill the parent.\n display: inline-block\n line-height: var(--sidebar-item-line-height)\n text-decoration: none\n\n // Don't allow long words to cause wrapping.\n overflow-wrap: anywhere\n\n height: 100%\n width: 100%\n\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n\n &:hover\n color: var(--color-sidebar-link-text)\n background: var(--color-sidebar-item-background--hover)\n\n // Add a nice little \"external-link\" arrow here.\n &.external::after\n content: url('data:image/svg+xml,')\n margin: 0 0.25rem\n vertical-align: middle\n color: var(--color-sidebar-link-text)\n\n // Make the current page reference bold.\n .current-page > .reference\n font-weight: bold\n\n label\n position: absolute\n top: 0\n right: 0\n height: var(--sidebar-item-height)\n width: var(--sidebar-expander-width)\n\n cursor: pointer\n user-select: none\n\n display: flex\n justify-content: center\n align-items: center\n\n .caption, :not(.caption) > .caption-text\n font-size: var(--sidebar-caption-font-size)\n color: var(--color-sidebar-caption-text)\n\n font-weight: bold\n text-transform: uppercase\n\n margin: var(--sidebar-caption-space-above) 0 0 0\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n\n // If it has children, add a bit more padding to wrap the content to avoid\n // overlapping with the +Skip to content +
@@ -131,7 +174,8 @@
@@ -162,45 +206,43 @@
+ + cuda-python + v: + + +
+
+
+ +
@@ -215,11 +257,17 @@ Back to top
- +
@@ -229,15 +277,15 @@
-
+
-

Code of Conduct#

+

Code of Conduct

-

Overview#

+

Overview

Define the code of conduct followed and enforced for the CUDA Python project.

-

Our Pledge#

+

Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body @@ -246,7 +294,7 @@

Our Pledge -

Our Standards#

+

Our Standards

Examples of behavior that contributes to creating a positive environment include:

    @@ -269,7 +317,7 @@

    Our Standards -

    Our Responsibilities#

    +

    Our Responsibilities

    Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

    @@ -280,7 +328,7 @@

    Our Responsibilities

-

Scope#

+

Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail @@ -289,7 +337,7 @@

Scope# further defined and clarified by project maintainers.

-

Enforcement#

+

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at cuda-python-conduct@nvidia.com All @@ -303,7 +351,7 @@

Enforcement -

Attribution#

+

Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

For answers to common questions about this code of conduct, see @@ -325,14 +373,14 @@

Attribution - +
Previous
-
Motivation
+
CUDA Python Release notes
@@ -385,11 +433,9 @@

Attribution - - - - - +

+ + + \ No newline at end of file diff --git a/docs/12.6.1/contribute.html b/docs/12.6.1/contribute.html new file mode 100644 index 000000000..dd5de326b --- /dev/null +++ b/docs/12.6.1/contribute.html @@ -0,0 +1,348 @@ + + + + + + + + + + Contributing - CUDA Python 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+ +
+ +
+ +
+
+
+

Contributing

+

Thank you for your interest in contributing to CUDA Python! Based on the type of contribution, it will fall into two categories:

+
    +
  1. You want to report a bug, feature request, or documentation issue

    +
      +
    • File an issue +describing what you encountered or what you want to see changed.

    • +
    • The NVIDIA team will evaluate the issues and triage them, scheduling +them for a release. If you believe the issue needs priority attention +comment on the issue to notify the team.

    • +
    +
  2. +
  3. You want to implement a feature or bug-fix

    +
      +
    • At this time we do not accept code contributions.

    • +
    +
  4. +
+
+ +
+
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/12.6.1/genindex.html b/docs/12.6.1/genindex.html new file mode 100644 index 000000000..93cddf1af --- /dev/null +++ b/docs/12.6.1/genindex.html @@ -0,0 +1,315 @@ + + + + + + + + Index - CUDA Python 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+ +
+

Index

+
+
+ +
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/12.6.1/index.html b/docs/12.6.1/index.html new file mode 100644 index 000000000..a566ad6bc --- /dev/null +++ b/docs/12.6.1/index.html @@ -0,0 +1,365 @@ + + + + + + + + + + CUDA Python 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+ +
+ +
+ +
+
+
+

CUDA Python

+

CUDA Python is the home for accessing NVIDIA’s CUDA platform from Python. It consists of +multiple components:

+
    +
  • cuda.core: Pythonic access to CUDA runtime and other core functionalities

  • +
  • cuda.bindings: Low-level Python bindings to CUDA C APIs

  • +
  • cuda.cooperative: Pythonic exposure of CUB cooperative algorithms

  • +
  • cuda.parallel: Pythonic exposure of Thrust parallel algorithms

  • +
+

For access to NVIDIA Math Libraries, please refer to nvmath-python.

+

CUDA Python is currently undergoing an overhaul to improve existing and bring up new components. +All of the previously available functionalities from the cuda-python package will continue to +be available, please refer to the cuda.bindings documentation for installation guide and further detail.

+ +
+ +
+
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/12.6.1/objects.inv b/docs/12.6.1/objects.inv new file mode 100644 index 000000000..8ae152917 Binary files /dev/null and b/docs/12.6.1/objects.inv differ diff --git a/docs/12.6.1/release.html b/docs/12.6.1/release.html new file mode 100644 index 000000000..83c991a0d --- /dev/null +++ b/docs/12.6.1/release.html @@ -0,0 +1,348 @@ + + + + + + + + + + Release Notes - CUDA Python 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+ +
+ +
+ +
+ +
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/12.6.1/release/12.6.1-notes.html b/docs/12.6.1/release/12.6.1-notes.html new file mode 100644 index 000000000..313f79c36 --- /dev/null +++ b/docs/12.6.1/release/12.6.1-notes.html @@ -0,0 +1,373 @@ + + + + + + + + + + CUDA Python Release notes - CUDA Python 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+ +
+ +
+ +
+
+
+

CUDA Python Release notes

+

Released on Oct 7, 2024

+
+

Included components

+ +
+
+

Hightlights

+
    +
  • Internal layout refactoring to prepare for the cuda-python metapackage (Issue #90, +Issue #75)

  • +
+
+
+ +
+
+ +
+ +
+
+ + + + + \ No newline at end of file diff --git a/docs/12.6.1/search.html b/docs/12.6.1/search.html new file mode 100644 index 000000000..aa0cf8bfa --- /dev/null +++ b/docs/12.6.1/search.html @@ -0,0 +1,326 @@ + + + + + + + + + + +Search - CUDA Python 12.6.1 documentation + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+ + + +
+ +
+
+
+ + +
+
+ + Made with Sphinx and @pradyunsg's + + Furo + +
+
+ +
+
+ +
+
+ +
+
+ + + + + + + + \ No newline at end of file diff --git a/docs/12.6.1/searchindex.js b/docs/12.6.1/searchindex.js new file mode 100644 index 000000000..e29b9c4ca --- /dev/null +++ b/docs/12.6.1/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles": {"Attribution": [[0, "attribution"]], "CUDA Python": [[2, null]], "CUDA Python Release notes": [[4, null]], "Code of Conduct": [[0, null]], "Contents:": [[2, null]], "Contributing": [[1, null]], "Enforcement": [[0, "enforcement"]], "Hightlights": [[4, "hightlights"]], "Included components": [[4, "included-components"]], "Our Pledge": [[0, "our-pledge"]], "Our Responsibilities": [[0, "our-responsibilities"]], "Our Standards": [[0, "our-standards"]], "Overview": [[0, "overview"]], "Release Notes": [[3, null]], "Scope": [[0, "scope"]]}, "docnames": ["conduct", "contribute", "index", "release", "release/12.6.1-notes"], "envversion": {"sphinx": 64, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2}, "filenames": ["conduct.md", "contribute.md", "index.rst", "release.md", "release/12.6.1-notes.md"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"": [0, 2], "1": [0, 2, 3, 4], "12": [2, 3, 4], "2024": 4, "4": 0, "6": [2, 3, 4], "7": 4, "75": 4, "90": 4, "At": 1, "Being": 0, "For": [0, 2], "If": 1, "In": 0, "It": 2, "The": [0, 1], "about": 0, "abus": 0, "accept": [0, 1], "access": 2, "account": 0, "act": 0, "action": 0, "adapt": 0, "address": 0, "advanc": 0, "ag": 0, "algorithm": 2, "align": 0, "all": [0, 2], "an": [0, 1, 2], "ani": 0, "answer": 0, "api": 2, "appear": 0, "appli": 0, "appoint": 0, "appropri": 0, "ar": 0, "attack": 0, "attent": [0, 1], "attribut": 2, "avail": [0, 2], "ban": 0, "base": 1, "behavior": 0, "believ": 1, "best": 0, "bind": [2, 4], "bodi": 0, "both": 0, "bring": 2, "bug": 1, "c": 2, "categori": 1, "chang": 1, "characterist": 0, "circumst": 0, "clarifi": 0, "code": [1, 2], "com": 0, "comment": [0, 1], "commit": 0, "common": 0, "commun": 0, "complaint": 0, "compon": [2, 3], "conduct": 2, "confidenti": 0, "consid": 0, "consist": 2, "construct": 0, "contact": 0, "continu": 2, "contribut": [0, 2], "contributor": 0, "cooper": 2, "core": 2, "correct": 0, "could": 0, "coven": 0, "creat": 0, "critic": 0, "cub": 2, "cuda": [0, 1], "current": 2, "deem": 0, "defin": 0, "derogatori": 0, "describ": 1, "detail": [0, 2], "determin": 0, "differ": 0, "disabl": 0, "do": [0, 1], "document": [1, 2], "e": 0, "econom": 0, "edit": 0, "educ": 0, "electron": 0, "empathi": 0, "encount": 1, "enforc": 2, "environ": 0, "ethnic": 0, "evalu": 1, "event": 0, "everyon": 0, "exampl": 0, "exist": 2, "expect": 0, "experi": 0, "explicit": 0, "exposur": 2, "express": 0, "face": 0, "fair": 0, "faith": 0, "fall": 1, "faq": 0, "featur": 1, "file": 1, "fix": 1, "focus": 0, "follow": 0, "foster": 0, "free": 0, "from": [0, 2], "function": 2, "further": [0, 2], "gender": 0, "good": 0, "gracefulli": 0, "guid": 2, "harass": 0, "harm": 0, "have": 0, "hightlight": 3, "home": 2, "html": 0, "http": 0, "i": [0, 2], "ident": 0, "imageri": 0, "implement": 1, "improv": 2, "inappropri": 0, "incid": 0, "includ": [0, 3], "inclus": 0, "individu": 0, "inform": 0, "instal": 2, "instanc": 0, "insult": 0, "interest": [0, 1], "intern": 4, "investig": 0, "issu": [0, 1, 4], "its": 0, "languag": 0, "layout": 4, "leadership": 0, "level": [0, 2], "librari": 2, "low": 2, "mai": 0, "mail": 0, "maintain": 0, "make": 0, "math": 2, "media": 0, "member": 0, "metapackag": 4, "multipl": 2, "nation": 0, "necessari": 0, "need": 1, "new": 2, "note": 2, "notifi": 1, "nvidia": [0, 1, 2], "nvmath": 2, "oblig": 0, "oct": 4, "offens": 0, "offici": 0, "offlin": 0, "onlin": 0, "open": 0, "org": 0, "orient": 0, "other": [0, 2], "otherwis": 0, "our": 2, "overhaul": 2, "overview": 2, "packag": 2, "parallel": 2, "particip": 0, "perman": 0, "permiss": 0, "person": 0, "physic": 0, "platform": 2, "pleas": 2, "pledg": 2, "polici": 0, "polit": 0, "posit": 0, "post": 0, "prepar": 4, "previous": 2, "prioriti": 1, "privat": 0, "profession": 0, "project": 0, "public": 0, "publish": 0, "python": [0, 1], "question": 0, "race": 0, "reason": 0, "refactor": 4, "refer": 2, "regard": 0, "regardless": 0, "reject": 0, "releas": [1, 2], "religion": 0, "remov": 0, "repercuss": 0, "report": [0, 1], "repres": 0, "represent": 0, "request": 1, "respect": 0, "respons": 2, "result": 0, "review": 0, "right": 0, "runtim": 2, "schedul": 1, "scope": 2, "see": [0, 1], "separ": 0, "set": 0, "sex": 0, "sexual": 0, "show": 0, "size": 0, "social": 0, "socio": 0, "space": 0, "specif": 0, "standard": 2, "statu": 0, "take": 0, "team": [0, 1], "temporari": 0, "temporarili": 0, "thank": 1, "thei": 0, "them": 1, "thi": [0, 1], "threaten": 0, "thrust": 2, "time": 1, "toward": 0, "triag": 1, "troll": 0, "two": 1, "type": 1, "unaccept": 0, "undergo": 2, "unwelcom": 0, "up": 2, "us": 0, "version": 0, "via": 0, "viewpoint": 0, "want": 1, "we": [0, 1], "welcom": 0, "what": [0, 1], "when": 0, "which": 0, "who": 0, "wiki": 0, "within": 0, "without": 0, "www": 0, "you": 1, "your": 1}, "titles": ["Code of Conduct", "Contributing", "CUDA Python", "Release Notes", "CUDA Python Release notes"], "titleterms": {"attribut": 0, "code": 0, "compon": 4, "conduct": 0, "content": 2, "contribut": 1, "cuda": [2, 4], "enforc": 0, "hightlight": 4, "includ": 4, "note": [3, 4], "our": 0, "overview": 0, "pledg": 0, "python": [2, 4], "releas": [3, 4], "respons": 0, "scope": 0, "standard": 0}}) \ No newline at end of file diff --git a/docs/_sources/index.rst.txt b/docs/_sources/index.rst.txt deleted file mode 100644 index 278fa1651..000000000 --- a/docs/_sources/index.rst.txt +++ /dev/null @@ -1,28 +0,0 @@ -.. CUDA Python documentation master file, created by - sphinx-quickstart on Wed Jul 7 12:14:05 2021. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -CUDA Python Manual -======================================= - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - install.md - overview.md - motivation.md - conduct.md - contribute.md - release.md - api.rst - - - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/_sources/release/11.8.4-notes.md.txt b/docs/_sources/release/11.8.4-notes.md.txt deleted file mode 100644 index 9cae29158..000000000 --- a/docs/_sources/release/11.8.4-notes.md.txt +++ /dev/null @@ -1,32 +0,0 @@ -# CUDA Python 11.8.4 Release notes - -Released on October 7, 2024 - -## Hightlights -- Resolve [Issue #89](https://github.com/NVIDIA/cuda-python/issues/89): Fix getLocalRuntimeVersion searching for wrong libcudart version -- Resolve [Issue #90](https://github.com/NVIDIA/cuda-python/issues/90): Use new layout in preperation for cuda-python becoming a metapackage - -## Limitations - -### CUDA Functions Not Supported in this Release - -- Symbol APIs - - cudaGraphExecMemcpyNodeSetParamsFromSymbol - - cudaGraphExecMemcpyNodeSetParamsToSymbol - - cudaGraphAddMemcpyNodeToSymbol - - cudaGraphAddMemcpyNodeFromSymbol - - cudaGraphMemcpyNodeSetParamsToSymbol - - cudaGraphMemcpyNodeSetParamsFromSymbol - - cudaMemcpyToSymbol - - cudaMemcpyFromSymbol - - cudaMemcpyToSymbolAsync - - cudaMemcpyFromSymbolAsync - - cudaGetSymbolAddress - - cudaGetSymbolSize - - cudaGetFuncBySymbol -- Launch Options - - cudaLaunchKernel - - cudaLaunchCooperativeKernel - - cudaLaunchCooperativeKernelMultiDevice -- cudaSetValidDevices -- cudaVDPAUSetVDPAUDevice diff --git a/docs/_static/_sphinx_javascript_frameworks_compat.js b/docs/_static/_sphinx_javascript_frameworks_compat.js deleted file mode 100644 index 8549469dc..000000000 --- a/docs/_static/_sphinx_javascript_frameworks_compat.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * _sphinx_javascript_frameworks_compat.js - * ~~~~~~~~~~ - * - * Compatability shim for jQuery and underscores.js. - * - * WILL BE REMOVED IN Sphinx 6.0 - * xref RemovedInSphinx60Warning - * - */ - -/** - * select a different prefix for underscore - */ -$u = _.noConflict(); - - -/** - * small helper function to urldecode strings - * - * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL - */ -jQuery.urldecode = function(x) { - if (!x) { - return x - } - return decodeURIComponent(x.replace(/\+/g, ' ')); -}; - -/** - * small helper function to urlencode strings - */ -jQuery.urlencode = encodeURIComponent; - -/** - * This function returns the parsed url parameters of the - * current request. Multiple values per key are supported, - * it will always return arrays of strings for the value parts. - */ -jQuery.getQueryParameters = function(s) { - if (typeof s === 'undefined') - s = document.location.search; - var parts = s.substr(s.indexOf('?') + 1).split('&'); - var result = {}; - for (var i = 0; i < parts.length; i++) { - var tmp = parts[i].split('=', 2); - var key = jQuery.urldecode(tmp[0]); - var value = jQuery.urldecode(tmp[1]); - if (key in result) - result[key].push(value); - else - result[key] = [value]; - } - return result; -}; - -/** - * highlight a given string on a jquery object by wrapping it in - * span elements with the given class name. - */ -jQuery.fn.highlightText = function(text, className) { - function highlight(node, addItems) { - if (node.nodeType === 3) { - var val = node.nodeValue; - var pos = val.toLowerCase().indexOf(text); - if (pos >= 0 && - !jQuery(node.parentNode).hasClass(className) && - !jQuery(node.parentNode).hasClass("nohighlight")) { - var span; - var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.className = className; - } - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - node.parentNode.insertBefore(span, node.parentNode.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling)); - node.nodeValue = val.substr(0, pos); - if (isInSVG) { - var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); - var bbox = node.parentElement.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute('class', className); - addItems.push({ - "parent": node.parentNode, - "target": rect}); - } - } - } - else if (!jQuery(node).is("button, select, textarea")) { - jQuery.each(node.childNodes, function() { - highlight(this, addItems); - }); - } - } - var addItems = []; - var result = this.each(function() { - highlight(this, addItems); - }); - for (var i = 0; i < addItems.length; ++i) { - jQuery(addItems[i].parent).before(addItems[i].target); - } - return result; -}; - -/* - * backward compatibility for jQuery.browser - * This will be supported until firefox bug is fixed. - */ -if (!jQuery.browser) { - jQuery.uaMatch = function(ua) { - ua = ua.toLowerCase(); - - var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || - /(webkit)[ \/]([\w.]+)/.exec(ua) || - /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || - /(msie) ([\w.]+)/.exec(ua) || - ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || - []; - - return { - browser: match[ 1 ] || "", - version: match[ 2 ] || "0" - }; - }; - jQuery.browser = {}; - jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; -} diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js deleted file mode 100644 index c3db08d1c..000000000 --- a/docs/_static/doctools.js +++ /dev/null @@ -1,264 +0,0 @@ -/* - * doctools.js - * ~~~~~~~~~~~ - * - * Base JavaScript utilities for all Sphinx HTML documentation. - * - * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. - * :license: BSD, see LICENSE for details. - * - */ -"use strict"; - -const _ready = (callback) => { - if (document.readyState !== "loading") { - callback(); - } else { - document.addEventListener("DOMContentLoaded", callback); - } -}; - -/** - * highlight a given string on a node by wrapping it in - * span elements with the given class name. - */ -const _highlight = (node, addItems, text, className) => { - if (node.nodeType === Node.TEXT_NODE) { - const val = node.nodeValue; - const parent = node.parentNode; - const pos = val.toLowerCase().indexOf(text); - if ( - pos >= 0 && - !parent.classList.contains(className) && - !parent.classList.contains("nohighlight") - ) { - let span; - - const closestNode = parent.closest("body, svg, foreignObject"); - const isInSVG = closestNode && closestNode.matches("svg"); - if (isInSVG) { - span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); - } else { - span = document.createElement("span"); - span.classList.add(className); - } - - span.appendChild(document.createTextNode(val.substr(pos, text.length))); - parent.insertBefore( - span, - parent.insertBefore( - document.createTextNode(val.substr(pos + text.length)), - node.nextSibling - ) - ); - node.nodeValue = val.substr(0, pos); - - if (isInSVG) { - const rect = document.createElementNS( - "http://www.w3.org/2000/svg", - "rect" - ); - const bbox = parent.getBBox(); - rect.x.baseVal.value = bbox.x; - rect.y.baseVal.value = bbox.y; - rect.width.baseVal.value = bbox.width; - rect.height.baseVal.value = bbox.height; - rect.setAttribute("class", className); - addItems.push({ parent: parent, target: rect }); - } - } - } else if (node.matches && !node.matches("button, select, textarea")) { - node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); - } -}; -const _highlightText = (thisNode, text, className) => { - let addItems = []; - _highlight(thisNode, addItems, text, className); - addItems.forEach((obj) => - obj.parent.insertAdjacentElement("beforebegin", obj.target) - ); -}; - -/** - * Small JavaScript module for the documentation. - */ -const Documentation = { - init: () => { - Documentation.highlightSearchWords(); - Documentation.initDomainIndexTable(); - Documentation.initOnKeyListeners(); - }, - - /** - * i18n support - */ - TRANSLATIONS: {}, - PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), - LOCALE: "unknown", - - // gettext and ngettext don't access this so that the functions - // can safely bound to a different name (_ = Documentation.gettext) - gettext: (string) => { - const translated = Documentation.TRANSLATIONS[string]; - switch (typeof translated) { - case "undefined": - return string; // no translation - case "string": - return translated; // translation exists - default: - return translated[0]; // (singular, plural) translation tuple exists - } - }, - - ngettext: (singular, plural, n) => { - const translated = Documentation.TRANSLATIONS[singular]; - if (typeof translated !== "undefined") - return translated[Documentation.PLURAL_EXPR(n)]; - return n === 1 ? singular : plural; - }, - - addTranslations: (catalog) => { - Object.assign(Documentation.TRANSLATIONS, catalog.messages); - Documentation.PLURAL_EXPR = new Function( - "n", - `return (${catalog.plural_expr})` - ); - Documentation.LOCALE = catalog.locale; - }, - - /** - * highlight the search words provided in the url in the text - */ - highlightSearchWords: () => { - const highlight = - new URLSearchParams(window.location.search).get("highlight") || ""; - const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); - if (terms.length === 0) return; // nothing to do - - // There should never be more than one element matching "div.body" - const divBody = document.querySelectorAll("div.body"); - const body = divBody.length ? divBody[0] : document.querySelector("body"); - window.setTimeout(() => { - terms.forEach((term) => _highlightText(body, term, "highlighted")); - }, 10); - - const searchBox = document.getElementById("searchbox"); - if (searchBox === null) return; - searchBox.appendChild( - document - .createRange() - .createContextualFragment( - '" - ) - ); - }, - - /** - * helper function to hide the search marks again - */ - hideSearchWords: () => { - document - .querySelectorAll("#searchbox .highlight-link") - .forEach((el) => el.remove()); - document - .querySelectorAll("span.highlighted") - .forEach((el) => el.classList.remove("highlighted")); - const url = new URL(window.location); - url.searchParams.delete("highlight"); - window.history.replaceState({}, "", url); - }, - - /** - * helper function to focus on search bar - */ - focusSearchBar: () => { - document.querySelectorAll("input[name=q]")[0]?.focus(); - }, - - /** - * Initialise the domain index toggle buttons - */ - initDomainIndexTable: () => { - const toggler = (el) => { - const idNumber = el.id.substr(7); - const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); - if (el.src.substr(-9) === "minus.png") { - el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; - toggledRows.forEach((el) => (el.style.display = "none")); - } else { - el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; - toggledRows.forEach((el) => (el.style.display = "")); - } - }; - - const togglerElements = document.querySelectorAll("img.toggler"); - togglerElements.forEach((el) => - el.addEventListener("click", (event) => toggler(event.currentTarget)) - ); - togglerElements.forEach((el) => (el.style.display = "")); - if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); - }, - - initOnKeyListeners: () => { - // only install a listener if it is really needed - if ( - !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && - !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS - ) - return; - - const blacklistedElements = new Set([ - "TEXTAREA", - "INPUT", - "SELECT", - "BUTTON", - ]); - document.addEventListener("keydown", (event) => { - if (blacklistedElements.has(document.activeElement.tagName)) return; // bail for input elements - if (event.altKey || event.ctrlKey || event.metaKey) return; // bail with special keys - - if (!event.shiftKey) { - switch (event.key) { - case "ArrowLeft": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const prevLink = document.querySelector('link[rel="prev"]'); - if (prevLink && prevLink.href) { - window.location.href = prevLink.href; - event.preventDefault(); - } - break; - case "ArrowRight": - if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; - - const nextLink = document.querySelector('link[rel="next"]'); - if (nextLink && nextLink.href) { - window.location.href = nextLink.href; - event.preventDefault(); - } - break; - case "Escape": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.hideSearchWords(); - event.preventDefault(); - } - } - - // some keyboard layouts may need Shift to get / - switch (event.key) { - case "/": - if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; - Documentation.focusSearchBar(); - event.preventDefault(); - } - }); - }, -}; - -// quick alias for translations -const _ = Documentation.gettext; - -_ready(Documentation.init); diff --git a/docs/_static/jquery-3.6.0.js b/docs/_static/jquery-3.6.0.js deleted file mode 100644 index fc6c299b7..000000000 --- a/docs/_static/jquery-3.6.0.js +++ /dev/null @@ -1,10881 +0,0 @@ -/*! - * jQuery JavaScript Library v3.6.0 - * https://jquery.com/ - * - * Includes Sizzle.js - * https://sizzlejs.com/ - * - * Copyright OpenJS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2021-03-02T17:08Z - */ -( function( global, factory ) { - - "use strict"; - - if ( typeof module === "object" && typeof module.exports === "object" ) { - - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 -// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode -// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common -// enough that all such attempts are guarded in a try block. -"use strict"; - -var arr = []; - -var getProto = Object.getPrototypeOf; - -var slice = arr.slice; - -var flat = arr.flat ? function( array ) { - return arr.flat.call( array ); -} : function( array ) { - return arr.concat.apply( [], array ); -}; - - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var fnToString = hasOwn.toString; - -var ObjectFunctionString = fnToString.call( Object ); - -var support = {}; - -var isFunction = function isFunction( obj ) { - - // Support: Chrome <=57, Firefox <=52 - // In some browsers, typeof returns "function" for HTML elements - // (i.e., `typeof document.createElement( "object" ) === "function"`). - // We don't want to classify *any* DOM node as a function. - // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 - // Plus for old WebKit, typeof returns "function" for HTML collections - // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) - return typeof obj === "function" && typeof obj.nodeType !== "number" && - typeof obj.item !== "function"; - }; - - -var isWindow = function isWindow( obj ) { - return obj != null && obj === obj.window; - }; - - -var document = window.document; - - - - var preservedScriptAttributes = { - type: true, - src: true, - nonce: true, - noModule: true - }; - - function DOMEval( code, node, doc ) { - doc = doc || document; - - var i, val, - script = doc.createElement( "script" ); - - script.text = code; - if ( node ) { - for ( i in preservedScriptAttributes ) { - - // Support: Firefox 64+, Edge 18+ - // Some browsers don't support the "nonce" property on scripts. - // On the other hand, just using `getAttribute` is not enough as - // the `nonce` attribute is reset to an empty string whenever it - // becomes browsing-context connected. - // See https://github.com/whatwg/html/issues/2369 - // See https://html.spec.whatwg.org/#nonce-attributes - // The `node.getAttribute` check was added for the sake of - // `jQuery.globalEval` so that it can fake a nonce-containing node - // via an object. - val = node[ i ] || node.getAttribute && node.getAttribute( i ); - if ( val ) { - script.setAttribute( i, val ); - } - } - } - doc.head.appendChild( script ).parentNode.removeChild( script ); - } - - -function toType( obj ) { - if ( obj == null ) { - return obj + ""; - } - - // Support: Android <=2.3 only (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call( obj ) ] || "object" : - typeof obj; -} -/* global Symbol */ -// Defining this global in .eslintrc.json would create a danger of using the global -// unguarded in another place, it seems safer to define global only for this module - - - -var - version = "3.6.0", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }; - -jQuery.fn = jQuery.prototype = { - - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - - // Return all the elements in a clean array - if ( num == null ) { - return slice.call( this ); - } - - // Return just the one element from the set - return num < 0 ? this[ num + this.length ] : this[ num ]; - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - each: function( callback ) { - return jQuery.each( this, callback ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map( this, function( elem, i ) { - return callback.call( elem, i, elem ); - } ) ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - even: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return ( i + 1 ) % 2; - } ) ); - }, - - odd: function() { - return this.pushStack( jQuery.grep( this, function( _elem, i ) { - return i % 2; - } ) ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[ 0 ] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !isFunction( target ) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - - // Only deal with non-null/undefined values - if ( ( options = arguments[ i ] ) != null ) { - - // Extend the base object - for ( name in options ) { - copy = options[ name ]; - - // Prevent Object.prototype pollution - // Prevent never-ending loop - if ( name === "__proto__" || target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject( copy ) || - ( copyIsArray = Array.isArray( copy ) ) ) ) { - src = target[ name ]; - - // Ensure proper type for the source value - if ( copyIsArray && !Array.isArray( src ) ) { - clone = []; - } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { - clone = {}; - } else { - clone = src; - } - copyIsArray = false; - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend( { - - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isPlainObject: function( obj ) { - var proto, Ctor; - - // Detect obvious negatives - // Use toString instead of jQuery.type to catch host objects - if ( !obj || toString.call( obj ) !== "[object Object]" ) { - return false; - } - - proto = getProto( obj ); - - // Objects with no prototype (e.g., `Object.create( null )`) are plain - if ( !proto ) { - return true; - } - - // Objects with prototype are plain iff they were constructed by a global Object function - Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; - return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; - }, - - isEmptyObject: function( obj ) { - var name; - - for ( name in obj ) { - return false; - } - return true; - }, - - // Evaluates a script in a provided context; falls back to the global one - // if not specified. - globalEval: function( code, options, doc ) { - DOMEval( code, { nonce: options && options.nonce }, doc ); - }, - - each: function( obj, callback ) { - var length, i = 0; - - if ( isArrayLike( obj ) ) { - length = obj.length; - for ( ; i < length; i++ ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } else { - for ( i in obj ) { - if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { - break; - } - } - } - - return obj; - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArrayLike( Object( arr ) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var length, value, - i = 0, - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArrayLike( elems ) ) { - length = elems.length; - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return flat( ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -} ); - -if ( typeof Symbol === "function" ) { - jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; -} - -// Populate the class2type map -jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), - function( _i, name ) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); - } ); - -function isArrayLike( obj ) { - - // Support: real iOS 8.2 only (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = !!obj && "length" in obj && obj.length, - type = toType( obj ); - - if ( isFunction( obj ) || isWindow( obj ) ) { - return false; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.3.6 - * https://sizzlejs.com/ - * - * Copyright JS Foundation and other contributors - * Released under the MIT license - * https://js.foundation/ - * - * Date: 2021-02-16 - */ -( function( window ) { -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - nonnativeSelectorCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // Instance methods - hasOwn = ( {} ).hasOwnProperty, - arr = [], - pop = arr.pop, - pushNative = arr.push, - push = arr.push, - slice = arr.slice, - - // Use a stripped-down indexOf as it's faster than native - // https://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[ i ] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + - "ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - - // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram - identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + - "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + - - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - - // "Attribute values must be CSS identifiers [capture 5] - // or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + - whitespace + "*\\]", - - pseudos = ":(" + identifier + ")(?:\\((" + - - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + - whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + - "*" ), - rdescend = new RegExp( whitespace + "|>" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + identifier + ")" ), - "CLASS": new RegExp( "^\\.(" + identifier + ")" ), - "TAG": new RegExp( "^(" + identifier + "|[*])" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + - whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + - whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + - "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + - "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rhtml = /HTML$/i, - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - - // CSS escapes - // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), - funescape = function( escape, nonHex ) { - var high = "0x" + escape.slice( 1 ) - 0x10000; - - return nonHex ? - - // Strip the backslash prefix from a non-hex escape sequence - nonHex : - - // Replace a hexadecimal escape sequence with the encoded Unicode code point - // Support: IE <=11+ - // For values outside the Basic Multilingual Plane (BMP), manually construct a - // surrogate pair - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // CSS string/identifier serialization - // https://drafts.csswg.org/cssom/#common-serializing-idioms - rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, - fcssescape = function( ch, asCodePoint ) { - if ( asCodePoint ) { - - // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER - if ( ch === "\0" ) { - return "\uFFFD"; - } - - // Control characters and (dependent upon position) numbers get escaped as code points - return ch.slice( 0, -1 ) + "\\" + - ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; - } - - // Other potentially-special ASCII characters get backslash-escaped - return "\\" + ch; - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }, - - inDisabledFieldset = addCombinator( - function( elem ) { - return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; - }, - { dir: "parentNode", next: "legend" } - ); - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - ( arr = slice.call( preferredDoc.childNodes ) ), - preferredDoc.childNodes - ); - - // Support: Android<4.0 - // Detect silently failing push.apply - // eslint-disable-next-line no-unused-expressions - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - pushNative.apply( target, slice.call( els ) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - - // Can't trust NodeList.length - while ( ( target[ j++ ] = els[ i++ ] ) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var m, i, elem, nid, match, groups, newSelector, - newContext = context && context.ownerDocument, - - // nodeType defaults to 9, since context defaults to document - nodeType = context ? context.nodeType : 9; - - results = results || []; - - // Return early from calls with invalid selector or context - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - // Try to shortcut find operations (as opposed to filters) in HTML documents - if ( !seed ) { - setDocument( context ); - context = context || document; - - if ( documentIsHTML ) { - - // If the selector is sufficiently simple, try using a "get*By*" DOM method - // (excepting DocumentFragment context, where the methods don't exist) - if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { - - // ID selector - if ( ( m = match[ 1 ] ) ) { - - // Document context - if ( nodeType === 9 ) { - if ( ( elem = context.getElementById( m ) ) ) { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - - // Element context - } else { - - // Support: IE, Opera, Webkit - // TODO: identify versions - // getElementById can match elements by name instead of ID - if ( newContext && ( elem = newContext.getElementById( m ) ) && - contains( context, elem ) && - elem.id === m ) { - - results.push( elem ); - return results; - } - } - - // Type selector - } else if ( match[ 2 ] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Class selector - } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && - context.getElementsByClassName ) { - - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // Take advantage of querySelectorAll - if ( support.qsa && - !nonnativeSelectorCache[ selector + " " ] && - ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && - - // Support: IE 8 only - // Exclude object elements - ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { - - newSelector = selector; - newContext = context; - - // qSA considers elements outside a scoping root when evaluating child or - // descendant combinators, which is not what we want. - // In such cases, we work around the behavior by prefixing every selector in the - // list with an ID selector referencing the scope context. - // The technique has to be used as well when a leading combinator is used - // as such selectors are not recognized by querySelectorAll. - // Thanks to Andrew Dupont for this technique. - if ( nodeType === 1 && - ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { - - // Expand context for sibling selectors - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || - context; - - // We can use :scope instead of the ID hack if the browser - // supports it & if we're not changing the context. - if ( newContext !== context || !support.scope ) { - - // Capture the context ID, setting it first if necessary - if ( ( nid = context.getAttribute( "id" ) ) ) { - nid = nid.replace( rcssescape, fcssescape ); - } else { - context.setAttribute( "id", ( nid = expando ) ); - } - } - - // Prefix every selector in the list - groups = tokenize( selector ); - i = groups.length; - while ( i-- ) { - groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + - toSelector( groups[ i ] ); - } - newSelector = groups.join( "," ); - } - - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch ( qsaError ) { - nonnativeSelectorCache( selector, true ); - } finally { - if ( nid === expando ) { - context.removeAttribute( "id" ); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {function(string, object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return ( cache[ key + " " ] = value ); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created element and returns a boolean result - */ -function assert( fn ) { - var el = document.createElement( "fieldset" ); - - try { - return !!fn( el ); - } catch ( e ) { - return false; - } finally { - - // Remove from its parent by default - if ( el.parentNode ) { - el.parentNode.removeChild( el ); - } - - // release memory in IE - el = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split( "|" ), - i = arr.length; - - while ( i-- ) { - Expr.attrHandle[ arr[ i ] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - a.sourceIndex - b.sourceIndex; - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( ( cur = cur.nextSibling ) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return ( name === "input" || name === "button" ) && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for :enabled/:disabled - * @param {Boolean} disabled true for :disabled; false for :enabled - */ -function createDisabledPseudo( disabled ) { - - // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable - return function( elem ) { - - // Only certain elements can match :enabled or :disabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled - // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled - if ( "form" in elem ) { - - // Check for inherited disabledness on relevant non-disabled elements: - // * listed form-associated elements in a disabled fieldset - // https://html.spec.whatwg.org/multipage/forms.html#category-listed - // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled - // * option elements in a disabled optgroup - // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled - // All such elements have a "form" property. - if ( elem.parentNode && elem.disabled === false ) { - - // Option elements defer to a parent optgroup if present - if ( "label" in elem ) { - if ( "label" in elem.parentNode ) { - return elem.parentNode.disabled === disabled; - } else { - return elem.disabled === disabled; - } - } - - // Support: IE 6 - 11 - // Use the isDisabled shortcut property to check for disabled fieldset ancestors - return elem.isDisabled === disabled || - - // Where there is no isDisabled, check manually - /* jshint -W018 */ - elem.isDisabled !== !disabled && - inDisabledFieldset( elem ) === disabled; - } - - return elem.disabled === disabled; - - // Try to winnow out elements that can't be disabled before trusting the disabled property. - // Some victims get caught in our net (label, legend, menu, track), but it shouldn't - // even exist on them, let alone have a boolean value. - } else if ( "label" in elem ) { - return elem.disabled === disabled; - } - - // Remaining elements are neither :enabled nor :disabled - return false; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction( function( argument ) { - argument = +argument; - return markFunction( function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ ( j = matchIndexes[ i ] ) ] ) { - seed[ j ] = !( matches[ j ] = seed[ j ] ); - } - } - } ); - } ); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - var namespace = elem && elem.namespaceURI, - docElem = elem && ( elem.ownerDocument || elem ).documentElement; - - // Support: IE <=8 - // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes - // https://bugs.jquery.com/ticket/4833 - return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, subWindow, - doc = node ? node.ownerDocument || node : preferredDoc; - - // Return early if doc is invalid or already selected - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Update global variables - document = doc; - docElem = document.documentElement; - documentIsHTML = !isXML( document ); - - // Support: IE 9 - 11+, Edge 12 - 18+ - // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( preferredDoc != document && - ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { - - // Support: IE 11, Edge - if ( subWindow.addEventListener ) { - subWindow.addEventListener( "unload", unloadHandler, false ); - - // Support: IE 9 - 10 only - } else if ( subWindow.attachEvent ) { - subWindow.attachEvent( "onunload", unloadHandler ); - } - } - - // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, - // Safari 4 - 5 only, Opera <=11.6 - 12.x only - // IE/Edge & older browsers don't support the :scope pseudo-class. - // Support: Safari 6.0 only - // Safari 6.0 supports :scope but it's an alias of :root there. - support.scope = assert( function( el ) { - docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); - return typeof el.querySelectorAll !== "undefined" && - !el.querySelectorAll( ":scope fieldset div" ).length; - } ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert( function( el ) { - el.className = "i"; - return !el.getAttribute( "className" ); - } ); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert( function( el ) { - el.appendChild( document.createComment( "" ) ); - return !el.getElementsByTagName( "*" ).length; - } ); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( document.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programmatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert( function( el ) { - docElem.appendChild( el ).id = expando; - return !document.getElementsByName || !document.getElementsByName( expando ).length; - } ); - - // ID filter and find - if ( support.getById ) { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute( "id" ) === attrId; - }; - }; - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var elem = context.getElementById( id ); - return elem ? [ elem ] : []; - } - }; - } else { - Expr.filter[ "ID" ] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && - elem.getAttributeNode( "id" ); - return node && node.value === attrId; - }; - }; - - // Support: IE 6 - 7 only - // getElementById is not reliable as a find shortcut - Expr.find[ "ID" ] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var node, i, elems, - elem = context.getElementById( id ); - - if ( elem ) { - - // Verify the id attribute - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - - // Fall back on getElementsByName - elems = context.getElementsByName( id ); - i = 0; - while ( ( elem = elems[ i++ ] ) ) { - node = elem.getAttributeNode( "id" ); - if ( node && node.value === id ) { - return [ elem ]; - } - } - } - - return []; - } - }; - } - - // Tag - Expr.find[ "TAG" ] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See https://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { - - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert( function( el ) { - - var input; - - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // https://bugs.jquery.com/ticket/12359 - docElem.appendChild( el ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !el.querySelectorAll( "[selected]" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ - if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push( "~=" ); - } - - // Support: IE 11+, Edge 15 - 18+ - // IE 11/Edge don't find elements on a `[name='']` query in some cases. - // Adding a temporary attribute to the document before the selection works - // around the issue. - // Interestingly, IE 10 & older don't seem to have the issue. - input = document.createElement( "input" ); - input.setAttribute( "name", "" ); - el.appendChild( input ); - if ( !el.querySelectorAll( "[name='']" ).length ) { - rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + - whitespace + "*(?:''|\"\")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !el.querySelectorAll( ":checked" ).length ) { - rbuggyQSA.push( ":checked" ); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibling-combinator selector` fails - if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push( ".#.+[+~]" ); - } - - // Support: Firefox <=3.6 - 5 only - // Old Firefox doesn't throw on a badly-escaped identifier. - el.querySelectorAll( "\\\f" ); - rbuggyQSA.push( "[\\r\\n\\f]" ); - } ); - - assert( function( el ) { - el.innerHTML = "" + - ""; - - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = document.createElement( "input" ); - input.setAttribute( "type", "hidden" ); - el.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( el.querySelectorAll( "[name=d]" ).length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: IE9-11+ - // IE's :disabled selector does not pick up the children of disabled fieldsets - docElem.appendChild( el ).disabled = true; - if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Support: Opera 10 - 11 only - // Opera 10-11 does not throw on post-comma invalid pseudos - el.querySelectorAll( "*,:x" ); - rbuggyQSA.push( ",.*:" ); - } ); - } - - if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector ) ) ) ) { - - assert( function( el ) { - - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( el, "*" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( el, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - } ); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully self-exclusive - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - ) ); - } : - function( a, b ) { - if ( b ) { - while ( ( b = b.parentNode ) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { - - // Choose the first element that is related to our preferred document - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( a == document || a.ownerDocument == preferredDoc && - contains( preferredDoc, a ) ) { - return -1; - } - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( b == document || b.ownerDocument == preferredDoc && - contains( preferredDoc, b ) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - return a == document ? -1 : - b == document ? 1 : - /* eslint-enable eqeqeq */ - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( ( cur = cur.parentNode ) ) { - ap.unshift( cur ); - } - cur = b; - while ( ( cur = cur.parentNode ) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[ i ] === bp[ i ] ) { - i++; - } - - return i ? - - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[ i ], bp[ i ] ) : - - // Otherwise nodes in our document sort first - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - /* eslint-disable eqeqeq */ - ap[ i ] == preferredDoc ? -1 : - bp[ i ] == preferredDoc ? 1 : - /* eslint-enable eqeqeq */ - 0; - }; - - return document; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - setDocument( elem ); - - if ( support.matchesSelector && documentIsHTML && - !nonnativeSelectorCache[ expr + " " ] && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch ( e ) { - nonnativeSelectorCache( expr, true ); - } - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( context.ownerDocument || context ) != document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - - // Set document vars if needed - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( ( elem.ownerDocument || elem ) != document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; -}; - -Sizzle.escape = function( sel ) { - return ( sel + "" ).replace( rcssescape, fcssescape ); -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( ( elem = results[ i++ ] ) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - - // If no nodeType, this is expected to be an array - while ( ( node = elem[ i++ ] ) ) { - - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[ 1 ] = match[ 1 ].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[ 3 ] = ( match[ 3 ] || match[ 4 ] || - match[ 5 ] || "" ).replace( runescape, funescape ); - - if ( match[ 2 ] === "~=" ) { - match[ 3 ] = " " + match[ 3 ] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[ 1 ] = match[ 1 ].toLowerCase(); - - if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { - - // nth-* requires argument - if ( !match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[ 4 ] = +( match[ 4 ] ? - match[ 5 ] + ( match[ 6 ] || 1 ) : - 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); - match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); - - // other types prohibit arguments - } else if ( match[ 3 ] ) { - Sizzle.error( match[ 0 ] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[ 6 ] && match[ 2 ]; - - if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[ 3 ] ) { - match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - - // Get excess from tokenize (recursively) - ( excess = tokenize( unquoted, true ) ) && - - // advance to the next closing parenthesis - ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { - - // excess is a negative index - match[ 0 ] = match[ 0 ].slice( 0, excess ); - match[ 2 ] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { - return true; - } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - ( pattern = new RegExp( "(^|" + whitespace + - ")" + className + "(" + whitespace + "|$)" ) ) && classCache( - className, function( elem ) { - return pattern.test( - typeof elem.className === "string" && elem.className || - typeof elem.getAttribute !== "undefined" && - elem.getAttribute( "class" ) || - "" - ); - } ); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - /* eslint-disable max-len */ - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - /* eslint-enable max-len */ - - }; - }, - - "CHILD": function( type, what, _argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, _context, xml ) { - var cache, uniqueCache, outerCache, node, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType, - diff = false; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( ( node = node[ dir ] ) ) { - if ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) { - - return false; - } - } - - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - - // Seek `elem` from a previously-cached index - - // ...in a gzip-friendly way - node = parent; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex && cache[ 2 ]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( ( node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - } else { - - // Use previously-cached element index if available - if ( useCache ) { - - // ...in a gzip-friendly way - node = elem; - outerCache = node[ expando ] || ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - cache = uniqueCache[ type ] || []; - nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; - diff = nodeIndex; - } - - // xml :nth-child(...) - // or :nth-last-child(...) or :nth(-last)?-of-type(...) - if ( diff === false ) { - - // Use the same loop as above to seek `elem` from the start - while ( ( node = ++nodeIndex && node && node[ dir ] || - ( diff = nodeIndex = 0 ) || start.pop() ) ) { - - if ( ( ofType ? - node.nodeName.toLowerCase() === name : - node.nodeType === 1 ) && - ++diff ) { - - // Cache the index of each encountered element - if ( useCache ) { - outerCache = node[ expando ] || - ( node[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ node.uniqueID ] || - ( outerCache[ node.uniqueID ] = {} ); - - uniqueCache[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction( function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[ i ] ); - seed[ idx ] = !( matches[ idx ] = matched[ i ] ); - } - } ) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - - // Potentially complex pseudos - "not": markFunction( function( selector ) { - - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction( function( seed, matches, _context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( ( elem = unmatched[ i ] ) ) { - seed[ i ] = !( matches[ i ] = elem ); - } - } - } ) : - function( elem, _context, xml ) { - input[ 0 ] = elem; - matcher( input, null, xml, results ); - - // Don't keep the element (issue #299) - input[ 0 ] = null; - return !results.pop(); - }; - } ), - - "has": markFunction( function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - } ), - - "contains": markFunction( function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; - }; - } ), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - - // lang value must be a valid identifier - if ( !ridentifier.test( lang || "" ) ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( ( elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); - return false; - }; - } ), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && - ( !document.hasFocus || document.hasFocus() ) && - !!( elem.type || elem.href || ~elem.tabIndex ); - }, - - // Boolean properties - "enabled": createDisabledPseudo( false ), - "disabled": createDisabledPseudo( true ), - - "checked": function( elem ) { - - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return ( nodeName === "input" && !!elem.checked ) || - ( nodeName === "option" && !!elem.selected ); - }, - - "selected": function( elem ) { - - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - // eslint-disable-next-line no-unused-expressions - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos[ "empty" ]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( ( attr = elem.getAttribute( "type" ) ) == null || - attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo( function() { - return [ 0 ]; - } ), - - "last": createPositionalPseudo( function( _matchIndexes, length ) { - return [ length - 1 ]; - } ), - - "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - } ), - - "even": createPositionalPseudo( function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "odd": createPositionalPseudo( function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? - argument + length : - argument > length ? - length : - argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ), - - "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - } ) - } -}; - -Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || ( match = rcomma.exec( soFar ) ) ) { - if ( match ) { - - // Don't consume trailing commas as valid - soFar = soFar.slice( match[ 0 ].length ) || soFar; - } - groups.push( ( tokens = [] ) ); - } - - matched = false; - - // Combinators - if ( ( match = rcombinators.exec( soFar ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - - // Cast descendant combinators to space - type: match[ 0 ].replace( rtrim, " " ) - } ); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || - ( match = preFilters[ type ]( match ) ) ) ) { - matched = match.shift(); - tokens.push( { - value: matched, - type: type, - matches: match - } ); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[ i ].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - skip = combinator.next, - key = skip || dir, - checkNonElements = base && key === "parentNode", - doneName = done++; - - return combinator.first ? - - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - return false; - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, uniqueCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching - if ( xml ) { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( ( elem = elem[ dir ] ) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || ( elem[ expando ] = {} ); - - // Support: IE <9 only - // Defend against cloned attroperties (jQuery gh-1709) - uniqueCache = outerCache[ elem.uniqueID ] || - ( outerCache[ elem.uniqueID ] = {} ); - - if ( skip && skip === elem.nodeName.toLowerCase() ) { - elem = elem[ dir ] || elem; - } else if ( ( oldCache = uniqueCache[ key ] ) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return ( newCache[ 2 ] = oldCache[ 2 ] ); - } else { - - // Reuse newcache so results back-propagate to previous elements - uniqueCache[ key ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { - return true; - } - } - } - } - } - return false; - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[ i ]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[ 0 ]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[ i ], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( ( elem = unmatched[ i ] ) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction( function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( - selector || "*", - context.nodeType ? [ context ] : context, - [] - ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( ( elem = temp[ i ] ) ) { - matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) ) { - - // Restore matcherIn since elem is not yet a final match - temp.push( ( matcherIn[ i ] = elem ) ); - } - } - postFinder( null, ( matcherOut = [] ), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( ( elem = matcherOut[ i ] ) && - ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { - - seed[ temp ] = !( results[ temp ] = elem ); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - } ); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[ 0 ].type ], - implicitRelative = leadingRelative || Expr.relative[ " " ], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - ( checkContext = context ).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { - matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; - } else { - matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[ j ].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens - .slice( 0, i - 1 ) - .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), - - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), - len = elems.length; - - if ( outermost ) { - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - outermostContext = context == document || context || outermost; - } - - // Add elements passing elementMatchers directly to results - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - - // Support: IE 11+, Edge 17 - 18+ - // IE/Edge sometimes throw a "Permission denied" error when strict-comparing - // two documents; shallow comparisons work. - // eslint-disable-next-line eqeqeq - if ( !context && elem.ownerDocument != document ) { - setDocument( elem ); - xml = !documentIsHTML; - } - while ( ( matcher = elementMatchers[ j++ ] ) ) { - if ( matcher( elem, context || document, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - - // They will have gone through all possible matchers - if ( ( elem = !matcher && elem ) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // `i` is now the count of elements visited above, and adding it to `matchedCount` - // makes the latter nonnegative. - matchedCount += i; - - // Apply set filters to unmatched elements - // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` - // equals `i`), unless we didn't visit _any_ elements in the above loop because we have - // no element matchers and no seed. - // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that - // case, which will result in a "00" `matchedCount` that differs from `i` but is also - // numerically zero. - if ( bySet && i !== matchedCount ) { - j = 0; - while ( ( matcher = setMatchers[ j++ ] ) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !( unmatched[ i ] || setMatched[ i ] ) ) { - setMatched[ i ] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[ i ] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( - selector, - matcherFromGroupMatchers( elementMatchers, setMatchers ) - ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( ( selector = compiled.selector || selector ) ); - - results = results || []; - - // Try to minimize operations if there is only one selector in the list and no seed - // (the latter of which guarantees us context) - if ( match.length === 1 ) { - - // Reduce context if the leading compound selector is an ID - tokens = match[ 0 ] = match[ 0 ].slice( 0 ); - if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && - context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { - - context = ( Expr.find[ "ID" ]( token.matches[ 0 ] - .replace( runescape, funescape ), context ) || [] )[ 0 ]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[ i ]; - - // Abort if we hit a combinator - if ( Expr.relative[ ( type = token.type ) ] ) { - break; - } - if ( ( find = Expr.find[ type ] ) ) { - - // Search, expanding context for leading sibling combinators - if ( ( seed = find( - token.matches[ 0 ].replace( runescape, funescape ), - rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || - context - ) ) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - !context || rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert( function( el ) { - - // Should return 1, but returns 4 (following) - return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; -} ); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert( function( el ) { - el.innerHTML = ""; - return el.firstChild.getAttribute( "href" ) === "#"; -} ) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - } ); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert( function( el ) { - el.innerHTML = ""; - el.firstChild.setAttribute( "value", "" ); - return el.firstChild.getAttribute( "value" ) === ""; -} ) ) { - addHandle( "value", function( elem, _name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - } ); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert( function( el ) { - return el.getAttribute( "disabled" ) == null; -} ) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - ( val = elem.getAttributeNode( name ) ) && val.specified ? - val.value : - null; - } - } ); -} - -return Sizzle; - -} )( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; - -// Deprecated -jQuery.expr[ ":" ] = jQuery.expr.pseudos; -jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; -jQuery.escapeSelector = Sizzle.escape; - - - - -var dir = function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; -}; - - -var siblings = function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; -}; - - -var rneedsContext = jQuery.expr.match.needsContext; - - - -function nodeName( elem, name ) { - - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - -} -var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); - - - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - return !!qualifier.call( elem, i, elem ) !== not; - } ); - } - - // Single element - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - } ); - } - - // Arraylike of elements (jQuery, arguments, Array) - if ( typeof qualifier !== "string" ) { - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) > -1 ) !== not; - } ); - } - - // Filtered directly for both simple and complex selectors - return jQuery.filter( qualifier, elements, not ); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - if ( elems.length === 1 && elem.nodeType === 1 ) { - return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; - } - - return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - } ) ); -}; - -jQuery.fn.extend( { - find: function( selector ) { - var i, ret, - len = this.length, - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter( function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - } ) ); - } - - ret = this.pushStack( [] ); - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - return len > 1 ? jQuery.uniqueSort( ret ) : ret; - }, - filter: function( selector ) { - return this.pushStack( winnow( this, selector || [], false ) ); - }, - not: function( selector ) { - return this.pushStack( winnow( this, selector || [], true ) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -} ); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - // Shortcut simple #id case for speed - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, - - init = jQuery.fn.init = function( selector, context, root ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Method init() accepts an alternate rootjQuery - // so migrate can support jQuery.sub (gh-2101) - root = root || rootjQuery; - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[ 0 ] === "<" && - selector[ selector.length - 1 ] === ">" && - selector.length >= 3 ) { - - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && ( match[ 1 ] || !context ) ) { - - // HANDLE: $(html) -> $(array) - if ( match[ 1 ] ) { - context = context instanceof jQuery ? context[ 0 ] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[ 1 ], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - - // Properties of context are called as methods if possible - if ( isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[ 2 ] ); - - if ( elem ) { - - // Inject the element directly into the jQuery object - this[ 0 ] = elem; - this.length = 1; - } - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || root ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this[ 0 ] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( isFunction( selector ) ) { - return root.ready !== undefined ? - root.ready( selector ) : - - // Execute immediately if ready is not present - selector( jQuery ); - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend( { - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter( function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[ i ] ) ) { - return true; - } - } - } ); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - targets = typeof selectors !== "string" && jQuery( selectors ); - - // Positional selectors never match, since there's no _selection_ context - if ( !rneedsContext.test( selectors ) ) { - for ( ; i < l; i++ ) { - for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { - - // Always skip document fragments - if ( cur.nodeType < 11 && ( targets ? - targets.index( cur ) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector( cur, selectors ) ) ) { - - matched.push( cur ); - break; - } - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.uniqueSort( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter( selector ) - ); - } -} ); - -function sibling( cur, dir ) { - while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each( { - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, _i, until ) { - return dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, _i, until ) { - return dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, _i, until ) { - return dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return siblings( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return siblings( elem.firstChild ); - }, - contents: function( elem ) { - if ( elem.contentDocument != null && - - // Support: IE 11+ - // elements with no `data` attribute has an object - // `contentDocument` with a `null` prototype. - getProto( elem.contentDocument ) ) { - - return elem.contentDocument; - } - - // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only - // Treat the template element as a regular one in browsers that - // don't support it. - if ( nodeName( elem, "template" ) ) { - elem = elem.content || elem; - } - - return jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.uniqueSort( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -} ); -var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); - - - -// Convert String-formatted options into Object-formatted ones -function createOptions( options ) { - var object = {}; - jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { - object[ flag ] = true; - } ); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - createOptions( options ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - - // Last fire value for non-forgettable lists - memory, - - // Flag to know if list was already fired - fired, - - // Flag to prevent firing - locked, - - // Actual callback list - list = [], - - // Queue of execution data for repeatable lists - queue = [], - - // Index of currently firing callback (modified by add/remove as needed) - firingIndex = -1, - - // Fire callbacks - fire = function() { - - // Enforce single-firing - locked = locked || options.once; - - // Execute callbacks for all pending executions, - // respecting firingIndex overrides and runtime changes - fired = firing = true; - for ( ; queue.length; firingIndex = -1 ) { - memory = queue.shift(); - while ( ++firingIndex < list.length ) { - - // Run callback and check for early termination - if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && - options.stopOnFalse ) { - - // Jump to end and forget the data so .add doesn't re-fire - firingIndex = list.length; - memory = false; - } - } - } - - // Forget the data if we're done with it - if ( !options.memory ) { - memory = false; - } - - firing = false; - - // Clean up if we're done firing for good - if ( locked ) { - - // Keep an empty list if we have data for future add calls - if ( memory ) { - list = []; - - // Otherwise, this object is spent - } else { - list = ""; - } - } - }, - - // Actual Callbacks object - self = { - - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - - // If we have memory from a past run, we should fire after adding - if ( memory && !firing ) { - firingIndex = list.length - 1; - queue.push( memory ); - } - - ( function add( args ) { - jQuery.each( args, function( _, arg ) { - if ( isFunction( arg ) ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && toType( arg ) !== "string" ) { - - // Inspect recursively - add( arg ); - } - } ); - } )( arguments ); - - if ( memory && !firing ) { - fire(); - } - } - return this; - }, - - // Remove a callback from the list - remove: function() { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - - // Handle firing indexes - if ( index <= firingIndex ) { - firingIndex--; - } - } - } ); - return this; - }, - - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? - jQuery.inArray( fn, list ) > -1 : - list.length > 0; - }, - - // Remove all callbacks from the list - empty: function() { - if ( list ) { - list = []; - } - return this; - }, - - // Disable .fire and .add - // Abort any current/pending executions - // Clear all callbacks and values - disable: function() { - locked = queue = []; - list = memory = ""; - return this; - }, - disabled: function() { - return !list; - }, - - // Disable .fire - // Also disable .add unless we have memory (since it would have no effect) - // Abort any pending executions - lock: function() { - locked = queue = []; - if ( !memory && !firing ) { - list = memory = ""; - } - return this; - }, - locked: function() { - return !!locked; - }, - - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( !locked ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - queue.push( args ); - if ( !firing ) { - fire(); - } - } - return this; - }, - - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -function Identity( v ) { - return v; -} -function Thrower( ex ) { - throw ex; -} - -function adoptValue( value, resolve, reject, noValue ) { - var method; - - try { - - // Check for promise aspect first to privilege synchronous behavior - if ( value && isFunction( ( method = value.promise ) ) ) { - method.call( value ).done( resolve ).fail( reject ); - - // Other thenables - } else if ( value && isFunction( ( method = value.then ) ) ) { - method.call( value, resolve, reject ); - - // Other non-thenables - } else { - - // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: - // * false: [ value ].slice( 0 ) => resolve( value ) - // * true: [ value ].slice( 1 ) => resolve() - resolve.apply( undefined, [ value ].slice( noValue ) ); - } - - // For Promises/A+, convert exceptions into rejections - // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in - // Deferred#then to conditionally suppress rejection. - } catch ( value ) { - - // Support: Android 4.0 only - // Strict mode functions invoked without .call/.apply get global-object context - reject.apply( undefined, [ value ] ); - } -} - -jQuery.extend( { - - Deferred: function( func ) { - var tuples = [ - - // action, add listener, callbacks, - // ... .then handlers, argument index, [final state] - [ "notify", "progress", jQuery.Callbacks( "memory" ), - jQuery.Callbacks( "memory" ), 2 ], - [ "resolve", "done", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 0, "resolved" ], - [ "reject", "fail", jQuery.Callbacks( "once memory" ), - jQuery.Callbacks( "once memory" ), 1, "rejected" ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - "catch": function( fn ) { - return promise.then( null, fn ); - }, - - // Keep pipe for back-compat - pipe: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - - return jQuery.Deferred( function( newDefer ) { - jQuery.each( tuples, function( _i, tuple ) { - - // Map tuples (progress, done, fail) to arguments (done, fail, progress) - var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; - - // deferred.progress(function() { bind to newDefer or newDefer.notify }) - // deferred.done(function() { bind to newDefer or newDefer.resolve }) - // deferred.fail(function() { bind to newDefer or newDefer.reject }) - deferred[ tuple[ 1 ] ]( function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && isFunction( returned.promise ) ) { - returned.promise() - .progress( newDefer.notify ) - .done( newDefer.resolve ) - .fail( newDefer.reject ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( - this, - fn ? [ returned ] : arguments - ); - } - } ); - } ); - fns = null; - } ).promise(); - }, - then: function( onFulfilled, onRejected, onProgress ) { - var maxDepth = 0; - function resolve( depth, deferred, handler, special ) { - return function() { - var that = this, - args = arguments, - mightThrow = function() { - var returned, then; - - // Support: Promises/A+ section 2.3.3.3.3 - // https://promisesaplus.com/#point-59 - // Ignore double-resolution attempts - if ( depth < maxDepth ) { - return; - } - - returned = handler.apply( that, args ); - - // Support: Promises/A+ section 2.3.1 - // https://promisesaplus.com/#point-48 - if ( returned === deferred.promise() ) { - throw new TypeError( "Thenable self-resolution" ); - } - - // Support: Promises/A+ sections 2.3.3.1, 3.5 - // https://promisesaplus.com/#point-54 - // https://promisesaplus.com/#point-75 - // Retrieve `then` only once - then = returned && - - // Support: Promises/A+ section 2.3.4 - // https://promisesaplus.com/#point-64 - // Only check objects and functions for thenability - ( typeof returned === "object" || - typeof returned === "function" ) && - returned.then; - - // Handle a returned thenable - if ( isFunction( then ) ) { - - // Special processors (notify) just wait for resolution - if ( special ) { - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ) - ); - - // Normal processors (resolve) also hook into progress - } else { - - // ...and disregard older resolution values - maxDepth++; - - then.call( - returned, - resolve( maxDepth, deferred, Identity, special ), - resolve( maxDepth, deferred, Thrower, special ), - resolve( maxDepth, deferred, Identity, - deferred.notifyWith ) - ); - } - - // Handle all other returned values - } else { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Identity ) { - that = undefined; - args = [ returned ]; - } - - // Process the value(s) - // Default process is resolve - ( special || deferred.resolveWith )( that, args ); - } - }, - - // Only normal processors (resolve) catch and reject exceptions - process = special ? - mightThrow : - function() { - try { - mightThrow(); - } catch ( e ) { - - if ( jQuery.Deferred.exceptionHook ) { - jQuery.Deferred.exceptionHook( e, - process.stackTrace ); - } - - // Support: Promises/A+ section 2.3.3.3.4.1 - // https://promisesaplus.com/#point-61 - // Ignore post-resolution exceptions - if ( depth + 1 >= maxDepth ) { - - // Only substitute handlers pass on context - // and multiple values (non-spec behavior) - if ( handler !== Thrower ) { - that = undefined; - args = [ e ]; - } - - deferred.rejectWith( that, args ); - } - } - }; - - // Support: Promises/A+ section 2.3.3.3.1 - // https://promisesaplus.com/#point-57 - // Re-resolve promises immediately to dodge false rejection from - // subsequent errors - if ( depth ) { - process(); - } else { - - // Call an optional hook to record the stack, in case of exception - // since it's otherwise lost when execution goes async - if ( jQuery.Deferred.getStackHook ) { - process.stackTrace = jQuery.Deferred.getStackHook(); - } - window.setTimeout( process ); - } - }; - } - - return jQuery.Deferred( function( newDefer ) { - - // progress_handlers.add( ... ) - tuples[ 0 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onProgress ) ? - onProgress : - Identity, - newDefer.notifyWith - ) - ); - - // fulfilled_handlers.add( ... ) - tuples[ 1 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onFulfilled ) ? - onFulfilled : - Identity - ) - ); - - // rejected_handlers.add( ... ) - tuples[ 2 ][ 3 ].add( - resolve( - 0, - newDefer, - isFunction( onRejected ) ? - onRejected : - Thrower - ) - ); - } ).promise(); - }, - - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 5 ]; - - // promise.progress = list.add - // promise.done = list.add - // promise.fail = list.add - promise[ tuple[ 1 ] ] = list.add; - - // Handle state - if ( stateString ) { - list.add( - function() { - - // state = "resolved" (i.e., fulfilled) - // state = "rejected" - state = stateString; - }, - - // rejected_callbacks.disable - // fulfilled_callbacks.disable - tuples[ 3 - i ][ 2 ].disable, - - // rejected_handlers.disable - // fulfilled_handlers.disable - tuples[ 3 - i ][ 3 ].disable, - - // progress_callbacks.lock - tuples[ 0 ][ 2 ].lock, - - // progress_handlers.lock - tuples[ 0 ][ 3 ].lock - ); - } - - // progress_handlers.fire - // fulfilled_handlers.fire - // rejected_handlers.fire - list.add( tuple[ 3 ].fire ); - - // deferred.notify = function() { deferred.notifyWith(...) } - // deferred.resolve = function() { deferred.resolveWith(...) } - // deferred.reject = function() { deferred.rejectWith(...) } - deferred[ tuple[ 0 ] ] = function() { - deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); - return this; - }; - - // deferred.notifyWith = list.fireWith - // deferred.resolveWith = list.fireWith - // deferred.rejectWith = list.fireWith - deferred[ tuple[ 0 ] + "With" ] = list.fireWith; - } ); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( singleValue ) { - var - - // count of uncompleted subordinates - remaining = arguments.length, - - // count of unprocessed arguments - i = remaining, - - // subordinate fulfillment data - resolveContexts = Array( i ), - resolveValues = slice.call( arguments ), - - // the primary Deferred - primary = jQuery.Deferred(), - - // subordinate callback factory - updateFunc = function( i ) { - return function( value ) { - resolveContexts[ i ] = this; - resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( !( --remaining ) ) { - primary.resolveWith( resolveContexts, resolveValues ); - } - }; - }; - - // Single- and empty arguments are adopted like Promise.resolve - if ( remaining <= 1 ) { - adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, - !remaining ); - - // Use .then() to unwrap secondary thenables (cf. gh-3000) - if ( primary.state() === "pending" || - isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { - - return primary.then(); - } - } - - // Multiple arguments are aggregated like Promise.all array elements - while ( i-- ) { - adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); - } - - return primary.promise(); - } -} ); - - -// These usually indicate a programmer mistake during development, -// warn about them ASAP rather than swallowing them by default. -var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; - -jQuery.Deferred.exceptionHook = function( error, stack ) { - - // Support: IE 8 - 9 only - // Console exists when dev tools are open, which can happen at any time - if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { - window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); - } -}; - - - - -jQuery.readyException = function( error ) { - window.setTimeout( function() { - throw error; - } ); -}; - - - - -// The deferred used on DOM ready -var readyList = jQuery.Deferred(); - -jQuery.fn.ready = function( fn ) { - - readyList - .then( fn ) - - // Wrap jQuery.readyException in a function so that the lookup - // happens at the time of error handling instead of callback - // registration. - .catch( function( error ) { - jQuery.readyException( error ); - } ); - - return this; -}; - -jQuery.extend( { - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - } -} ); - -jQuery.ready.then = readyList.then; - -// The ready event handler and self cleanup method -function completed() { - document.removeEventListener( "DOMContentLoaded", completed ); - window.removeEventListener( "load", completed ); - jQuery.ready(); -} - -// Catch cases where $(document).ready() is called -// after the browser event has already occurred. -// Support: IE <=9 - 10 only -// Older IE sometimes signals "interactive" too soon -if ( document.readyState === "complete" || - ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { - - // Handle it asynchronously to allow scripts the opportunity to delay ready - window.setTimeout( jQuery.ready ); - -} else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed ); -} - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( toType( key ) === "object" ) { - chainable = true; - for ( i in key ) { - access( elems, fn, i, key[ i ], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, _key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( - elems[ i ], key, raw ? - value : - value.call( elems[ i ], i, fn( elems[ i ], key ) ) - ); - } - } - } - - if ( chainable ) { - return elems; - } - - // Gets - if ( bulk ) { - return fn.call( elems ); - } - - return len ? fn( elems[ 0 ], key ) : emptyGet; -}; - - -// Matches dashed string for camelizing -var rmsPrefix = /^-ms-/, - rdashAlpha = /-([a-z])/g; - -// Used by camelCase as callback to replace() -function fcamelCase( _all, letter ) { - return letter.toUpperCase(); -} - -// Convert dashed to camelCase; used by the css and data modules -// Support: IE <=9 - 11, Edge 12 - 15 -// Microsoft forgot to hump their vendor prefix (#9572) -function camelCase( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); -} -var acceptData = function( owner ) { - - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - - - -function Data() { - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; - -Data.prototype = { - - cache: function( owner ) { - - // Check if the owner object already has a cache - var value = owner[ this.expando ]; - - // If not, create one - if ( !value ) { - value = {}; - - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return an empty object. - if ( acceptData( owner ) ) { - - // If it is a node unlikely to be stringify-ed or looped over - // use plain assignment - if ( owner.nodeType ) { - owner[ this.expando ] = value; - - // Otherwise secure it in a non-enumerable property - // configurable must be true to allow the property to be - // deleted when data is removed - } else { - Object.defineProperty( owner, this.expando, { - value: value, - configurable: true - } ); - } - } - } - - return value; - }, - set: function( owner, data, value ) { - var prop, - cache = this.cache( owner ); - - // Handle: [ owner, key, value ] args - // Always use camelCase key (gh-2257) - if ( typeof data === "string" ) { - cache[ camelCase( data ) ] = value; - - // Handle: [ owner, { properties } ] args - } else { - - // Copy the properties one-by-one to the cache object - for ( prop in data ) { - cache[ camelCase( prop ) ] = data[ prop ]; - } - } - return cache; - }, - get: function( owner, key ) { - return key === undefined ? - this.cache( owner ) : - - // Always use camelCase key (gh-2257) - owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; - }, - access: function( owner, key, value ) { - - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ( ( key && typeof key === "string" ) && value === undefined ) ) { - - return this.get( owner, key ); - } - - // When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, - cache = owner[ this.expando ]; - - if ( cache === undefined ) { - return; - } - - if ( key !== undefined ) { - - // Support array or space separated string of keys - if ( Array.isArray( key ) ) { - - // If key is an array of keys... - // We always set camelCase keys, so remove that. - key = key.map( camelCase ); - } else { - key = camelCase( key ); - - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - key = key in cache ? - [ key ] : - ( key.match( rnothtmlwhite ) || [] ); - } - - i = key.length; - - while ( i-- ) { - delete cache[ key[ i ] ]; - } - } - - // Remove the expando if there's no more data - if ( key === undefined || jQuery.isEmptyObject( cache ) ) { - - // Support: Chrome <=35 - 45 - // Webkit & Blink performance suffers when deleting properties - // from DOM nodes, so set to undefined instead - // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) - if ( owner.nodeType ) { - owner[ this.expando ] = undefined; - } else { - delete owner[ this.expando ]; - } - } - }, - hasData: function( owner ) { - var cache = owner[ this.expando ]; - return cache !== undefined && !jQuery.isEmptyObject( cache ); - } -}; -var dataPriv = new Data(); - -var dataUser = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /[A-Z]/g; - -function getData( data ) { - if ( data === "true" ) { - return true; - } - - if ( data === "false" ) { - return false; - } - - if ( data === "null" ) { - return null; - } - - // Only convert to a number if it doesn't change the string - if ( data === +data + "" ) { - return +data; - } - - if ( rbrace.test( data ) ) { - return JSON.parse( data ); - } - - return data; -} - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = getData( data ); - } catch ( e ) {} - - // Make sure we set the data so it isn't changed later - dataUser.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend( { - hasData: function( elem ) { - return dataUser.hasData( elem ) || dataPriv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return dataUser.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - dataUser.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to dataPriv methods, these can be deprecated. - _data: function( elem, name, data ) { - return dataPriv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - dataPriv.remove( elem, name ); - } -} ); - -jQuery.fn.extend( { - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = dataUser.get( elem ); - - if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE 11 only - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = camelCase( name.slice( 5 ) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - dataPriv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each( function() { - dataUser.set( this, key ); - } ); - } - - return access( this, function( value ) { - var data; - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - - // Attempt to get data from the cache - // The key will always be camelCased in Data - data = dataUser.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, key ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each( function() { - - // We always store the camelCased key - dataUser.set( this, key, value ); - } ); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each( function() { - dataUser.remove( this, key ); - } ); - } -} ); - - -jQuery.extend( { - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = dataPriv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || Array.isArray( data ) ) { - queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { - empty: jQuery.Callbacks( "once memory" ).add( function() { - dataPriv.remove( elem, [ type + "queue", key ] ); - } ) - } ); - } -} ); - -jQuery.fn.extend( { - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[ 0 ], type ); - } - - return data === undefined ? - this : - this.each( function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - } ); - }, - dequeue: function( type ) { - return this.each( function() { - jQuery.dequeue( this, type ); - } ); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -} ); -var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; - -var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); - - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var documentElement = document.documentElement; - - - - var isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ); - }, - composed = { composed: true }; - - // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only - // Check attachment across shadow DOM boundaries when possible (gh-3504) - // Support: iOS 10.0-10.2 only - // Early iOS 10 versions support `attachShadow` but not `getRootNode`, - // leading to errors. We need to check for `getRootNode`. - if ( documentElement.getRootNode ) { - isAttached = function( elem ) { - return jQuery.contains( elem.ownerDocument, elem ) || - elem.getRootNode( composed ) === elem.ownerDocument; - }; - } -var isHiddenWithinTree = function( elem, el ) { - - // isHiddenWithinTree might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - - // Inline style trumps all - return elem.style.display === "none" || - elem.style.display === "" && - - // Otherwise, check computed style - // Support: Firefox <=43 - 45 - // Disconnected elements can have computed display: none, so first confirm that elem is - // in the document. - isAttached( elem ) && - - jQuery.css( elem, "display" ) === "none"; - }; - - - -function adjustCSS( elem, prop, valueParts, tween ) { - var adjusted, scale, - maxIterations = 20, - currentValue = tween ? - function() { - return tween.cur(); - } : - function() { - return jQuery.css( elem, prop, "" ); - }, - initial = currentValue(), - unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), - - // Starting value computation is required for potential unit mismatches - initialInUnit = elem.nodeType && - ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && - rcssNum.exec( jQuery.css( elem, prop ) ); - - if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { - - // Support: Firefox <=54 - // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) - initial = initial / 2; - - // Trust units reported by jQuery.css - unit = unit || initialInUnit[ 3 ]; - - // Iteratively approximate from a nonzero starting point - initialInUnit = +initial || 1; - - while ( maxIterations-- ) { - - // Evaluate and update our best guess (doubling guesses that zero out). - // Finish if the scale equals or crosses 1 (making the old*new product non-positive). - jQuery.style( elem, prop, initialInUnit + unit ); - if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { - maxIterations = 0; - } - initialInUnit = initialInUnit / scale; - - } - - initialInUnit = initialInUnit * 2; - jQuery.style( elem, prop, initialInUnit + unit ); - - // Make sure we update the tween properties later on - valueParts = valueParts || []; - } - - if ( valueParts ) { - initialInUnit = +initialInUnit || +initial || 0; - - // Apply relative offset (+=/-=) if specified - adjusted = valueParts[ 1 ] ? - initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : - +valueParts[ 2 ]; - if ( tween ) { - tween.unit = unit; - tween.start = initialInUnit; - tween.end = adjusted; - } - } - return adjusted; -} - - -var defaultDisplayMap = {}; - -function getDefaultDisplay( elem ) { - var temp, - doc = elem.ownerDocument, - nodeName = elem.nodeName, - display = defaultDisplayMap[ nodeName ]; - - if ( display ) { - return display; - } - - temp = doc.body.appendChild( doc.createElement( nodeName ) ); - display = jQuery.css( temp, "display" ); - - temp.parentNode.removeChild( temp ); - - if ( display === "none" ) { - display = "block"; - } - defaultDisplayMap[ nodeName ] = display; - - return display; -} - -function showHide( elements, show ) { - var display, elem, - values = [], - index = 0, - length = elements.length; - - // Determine new display value for elements that need to change - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - display = elem.style.display; - if ( show ) { - - // Since we force visibility upon cascade-hidden elements, an immediate (and slow) - // check is required in this first loop unless we have a nonempty display value (either - // inline or about-to-be-restored) - if ( display === "none" ) { - values[ index ] = dataPriv.get( elem, "display" ) || null; - if ( !values[ index ] ) { - elem.style.display = ""; - } - } - if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { - values[ index ] = getDefaultDisplay( elem ); - } - } else { - if ( display !== "none" ) { - values[ index ] = "none"; - - // Remember what we're overwriting - dataPriv.set( elem, "display", display ); - } - } - } - - // Set the display of the elements in a second loop to avoid constant reflow - for ( index = 0; index < length; index++ ) { - if ( values[ index ] != null ) { - elements[ index ].style.display = values[ index ]; - } - } - - return elements; -} - -jQuery.fn.extend( { - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each( function() { - if ( isHiddenWithinTree( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - } ); - } -} ); -var rcheckableType = ( /^(?:checkbox|radio)$/i ); - -var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); - -var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); - - - -( function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Android 4.0 - 4.3 only - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Android <=4.1 only - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE <=11 only - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; - - // Support: IE <=9 only - // IE <=9 replaces "; - support.option = !!div.lastChild; -} )(); - - -// We have to close these tags to support XHTML (#13200) -var wrapMap = { - - // XHTML parsers do not magically insert elements in the - // same way that tag soup parsers do. So we cannot shorten - // this by omitting or other required elements. - thead: [ 1, "", "
" ], - col: [ 2, "", "
" ], - tr: [ 2, "", "
" ], - td: [ 3, "", "
" ], - - _default: [ 0, "", "" ] -}; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: IE <=9 only -if ( !support.option ) { - wrapMap.optgroup = wrapMap.option = [ 1, "" ]; -} - - -function getAll( context, tag ) { - - // Support: IE <=9 - 11 only - // Use typeof to avoid zero-argument method invocation on host objects (#15151) - var ret; - - if ( typeof context.getElementsByTagName !== "undefined" ) { - ret = context.getElementsByTagName( tag || "*" ); - - } else if ( typeof context.querySelectorAll !== "undefined" ) { - ret = context.querySelectorAll( tag || "*" ); - - } else { - ret = []; - } - - if ( tag === undefined || tag && nodeName( context, tag ) ) { - return jQuery.merge( [ context ], ret ); - } - - return ret; -} - - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - dataPriv.set( - elems[ i ], - "globalEval", - !refElements || dataPriv.get( refElements[ i ], "globalEval" ) - ); - } -} - - -var rhtml = /<|&#?\w+;/; - -function buildFragment( elems, context, scripts, selection, ignored ) { - var elem, tmp, tag, wrap, attached, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( toType( elem ) === "object" ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( ( elem = nodes[ i++ ] ) ) { - - // Skip elements already in the context collection (trac-4087) - if ( selection && jQuery.inArray( elem, selection ) > -1 ) { - if ( ignored ) { - ignored.push( elem ); - } - continue; - } - - attached = isAttached( elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( attached ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( ( elem = tmp[ j++ ] ) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; -} - - -var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -// Support: IE <=9 - 11+ -// focus() and blur() are asynchronous, except when they are no-op. -// So expect focus to be synchronous when the element is already active, -// and blur to be synchronous when the element is not already active. -// (focus and blur are always synchronous in other supported browsers, -// this just defines when we can count on it). -function expectSync( elem, type ) { - return ( elem === safeActiveElement() ) === ( type === "focus" ); -} - -// Support: IE <=9 only -// Accessing document.activeElement can throw unexpectedly -// https://bugs.jquery.com/ticket/13393 -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -function on( elem, types, selector, data, fn, one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - on( elem, type, selector, data, types[ type ], one ); - } - return elem; - } - - if ( data == null && fn == null ) { - - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return elem; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return elem.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - } ); -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.get( elem ); - - // Only attach events to objects that accept data - if ( !acceptData( elem ) ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Ensure that invalid selectors throw exceptions at attach time - // Evaluate against documentElement in case elem is a non-element node (e.g., document) - if ( selector ) { - jQuery.find.matchesSelector( documentElement, selector ); - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !( events = elemData.events ) ) { - events = elemData.events = Object.create( null ); - } - if ( !( eventHandle = elemData.handle ) ) { - eventHandle = elemData.handle = function( e ) { - - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend( { - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join( "." ) - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !( handlers = events[ type ] ) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || - special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); - - if ( !elemData || !( events = elemData.events ) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[ t ] ) || []; - type = origType = tmp[ 1 ]; - namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[ 2 ] && - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || - selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || - special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove data and the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - dataPriv.remove( elem, "handle events" ); - } - }, - - dispatch: function( nativeEvent ) { - - var i, j, ret, matched, handleObj, handlerQueue, - args = new Array( arguments.length ), - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( nativeEvent ), - - handlers = ( - dataPriv.get( this, "events" ) || Object.create( null ) - )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[ 0 ] = event; - - for ( i = 1; i < arguments.length; i++ ) { - args[ i ] = arguments[ i ]; - } - - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( ( handleObj = matched.handlers[ j++ ] ) && - !event.isImmediatePropagationStopped() ) { - - // If the event is namespaced, then each handler is only invoked if it is - // specially universal or its namespaces are a superset of the event's. - if ( !event.rnamespace || handleObj.namespace === false || - event.rnamespace.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || - handleObj.handler ).apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( ( event.result = ret ) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, handleObj, sel, matchedHandlers, matchedSelectors, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - if ( delegateCount && - - // Support: IE <=9 - // Black-hole SVG instance trees (trac-13180) - cur.nodeType && - - // Support: Firefox <=42 - // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) - // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click - // Support: IE 11 only - // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) - !( event.type === "click" && event.button >= 1 ) ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { - matchedHandlers = []; - matchedSelectors = {}; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matchedSelectors[ sel ] === undefined ) { - matchedSelectors[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) > -1 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matchedSelectors[ sel ] ) { - matchedHandlers.push( handleObj ); - } - } - if ( matchedHandlers.length ) { - handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); - } - } - } - } - - // Add the remaining (directly-bound) handlers - cur = this; - if ( delegateCount < handlers.length ) { - handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); - } - - return handlerQueue; - }, - - addProp: function( name, hook ) { - Object.defineProperty( jQuery.Event.prototype, name, { - enumerable: true, - configurable: true, - - get: isFunction( hook ) ? - function() { - if ( this.originalEvent ) { - return hook( this.originalEvent ); - } - } : - function() { - if ( this.originalEvent ) { - return this.originalEvent[ name ]; - } - }, - - set: function( value ) { - Object.defineProperty( this, name, { - enumerable: true, - configurable: true, - writable: true, - value: value - } ); - } - } ); - }, - - fix: function( originalEvent ) { - return originalEvent[ jQuery.expando ] ? - originalEvent : - new jQuery.Event( originalEvent ); - }, - - special: { - load: { - - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - click: { - - // Utilize native event to ensure correct state for checkable inputs - setup: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Claim the first handler - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - // dataPriv.set( el, "click", ... ) - leverageNative( el, "click", returnTrue ); - } - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function( data ) { - - // For mutual compressibility with _default, replace `this` access with a local var. - // `|| data` is dead code meant only to preserve the variable through minification. - var el = this || data; - - // Force setup before triggering a click - if ( rcheckableType.test( el.type ) && - el.click && nodeName( el, "input" ) ) { - - leverageNative( el, "click" ); - } - - // Return non-false to allow normal event-path propagation - return true; - }, - - // For cross-browser consistency, suppress native .click() on links - // Also prevent it if we're currently inside a leveraged native-event stack - _default: function( event ) { - var target = event.target; - return rcheckableType.test( target.type ) && - target.click && nodeName( target, "input" ) && - dataPriv.get( target, "click" ) || - nodeName( target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - } -}; - -// Ensure the presence of an event listener that handles manually-triggered -// synthetic events by interrupting progress until reinvoked in response to -// *native* events that it fires directly, ensuring that state changes have -// already occurred before other listeners are invoked. -function leverageNative( el, type, expectSync ) { - - // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add - if ( !expectSync ) { - if ( dataPriv.get( el, type ) === undefined ) { - jQuery.event.add( el, type, returnTrue ); - } - return; - } - - // Register the controller as a special universal handler for all event namespaces - dataPriv.set( el, type, false ); - jQuery.event.add( el, type, { - namespace: false, - handler: function( event ) { - var notAsync, result, - saved = dataPriv.get( this, type ); - - if ( ( event.isTrigger & 1 ) && this[ type ] ) { - - // Interrupt processing of the outer synthetic .trigger()ed event - // Saved data should be false in such cases, but might be a leftover capture object - // from an async native handler (gh-4350) - if ( !saved.length ) { - - // Store arguments for use when handling the inner native event - // There will always be at least one argument (an event object), so this array - // will not be confused with a leftover capture object. - saved = slice.call( arguments ); - dataPriv.set( this, type, saved ); - - // Trigger the native event and capture its result - // Support: IE <=9 - 11+ - // focus() and blur() are asynchronous - notAsync = expectSync( this, type ); - this[ type ](); - result = dataPriv.get( this, type ); - if ( saved !== result || notAsync ) { - dataPriv.set( this, type, false ); - } else { - result = {}; - } - if ( saved !== result ) { - - // Cancel the outer synthetic event - event.stopImmediatePropagation(); - event.preventDefault(); - - // Support: Chrome 86+ - // In Chrome, if an element having a focusout handler is blurred by - // clicking outside of it, it invokes the handler synchronously. If - // that handler calls `.remove()` on the element, the data is cleared, - // leaving `result` undefined. We need to guard against this. - return result && result.value; - } - - // If this is an inner synthetic event for an event with a bubbling surrogate - // (focus or blur), assume that the surrogate already propagated from triggering the - // native event and prevent that from happening again here. - // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the - // bubbling surrogate propagates *after* the non-bubbling base), but that seems - // less bad than duplication. - } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { - event.stopPropagation(); - } - - // If this is a native event triggered above, everything is now in order - // Fire an inner synthetic event with the original arguments - } else if ( saved.length ) { - - // ...and capture the result - dataPriv.set( this, type, { - value: jQuery.event.trigger( - - // Support: IE <=9 - 11+ - // Extend with the prototype to reset the above stopImmediatePropagation() - jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), - saved.slice( 1 ), - this - ) - } ); - - // Abort handling of the native event - event.stopImmediatePropagation(); - } - } - } ); -} - -jQuery.removeEvent = function( elem, type, handle ) { - - // This "if" is needed for plain objects - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle ); - } -}; - -jQuery.Event = function( src, props ) { - - // Allow instantiation without the 'new' keyword - if ( !( this instanceof jQuery.Event ) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - - // Support: Android <=2.3 only - src.returnValue === false ? - returnTrue : - returnFalse; - - // Create target properties - // Support: Safari <=6 - 7 only - // Target should not be a text node (#504, #13143) - this.target = ( src.target && src.target.nodeType === 3 ) ? - src.target.parentNode : - src.target; - - this.currentTarget = src.currentTarget; - this.relatedTarget = src.relatedTarget; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || Date.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - constructor: jQuery.Event, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - isSimulated: false, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && !this.isSimulated ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && !this.isSimulated ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Includes all common event props including KeyEvent and MouseEvent specific props -jQuery.each( { - altKey: true, - bubbles: true, - cancelable: true, - changedTouches: true, - ctrlKey: true, - detail: true, - eventPhase: true, - metaKey: true, - pageX: true, - pageY: true, - shiftKey: true, - view: true, - "char": true, - code: true, - charCode: true, - key: true, - keyCode: true, - button: true, - buttons: true, - clientX: true, - clientY: true, - offsetX: true, - offsetY: true, - pointerId: true, - pointerType: true, - screenX: true, - screenY: true, - targetTouches: true, - toElement: true, - touches: true, - which: true -}, jQuery.event.addProp ); - -jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { - jQuery.event.special[ type ] = { - - // Utilize native event if possible so blur/focus sequence is correct - setup: function() { - - // Claim the first handler - // dataPriv.set( this, "focus", ... ) - // dataPriv.set( this, "blur", ... ) - leverageNative( this, type, expectSync ); - - // Return false to allow normal processing in the caller - return false; - }, - trigger: function() { - - // Force setup before trigger - leverageNative( this, type ); - - // Return non-false to allow normal event-path propagation - return true; - }, - - // Suppress native focus or blur as it's already being fired - // in leverageNative. - _default: function() { - return true; - }, - - delegateType: delegateType - }; -} ); - -// Create mouseenter/leave events using mouseover/out and event-time checks -// so that event delegation works in jQuery. -// Do the same for pointerenter/pointerleave and pointerover/pointerout -// -// Support: Safari 7 only -// Safari sends mouseenter too often; see: -// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 -// for the description of the bug (it existed in older Chrome versions as well). -jQuery.each( { - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mouseenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -} ); - -jQuery.fn.extend( { - - on: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn ); - }, - one: function( types, selector, data, fn ) { - return on( this, types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? - handleObj.origType + "." + handleObj.namespace : - handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each( function() { - jQuery.event.remove( this, types, fn, selector ); - } ); - } -} ); - - -var - - // Support: IE <=10 - 11, Edge 12 - 13 only - // In IE/Edge using regex groups here causes severe slowdowns. - // See https://connect.microsoft.com/IE/feedback/details/1736512/ - rnoInnerhtml = /\s*$/g; - -// Prefer a tbody over its parent table for containing new rows -function manipulationTarget( elem, content ) { - if ( nodeName( elem, "table" ) && - nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { - - return jQuery( elem ).children( "tbody" )[ 0 ] || elem; - } - - return elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { - elem.type = elem.type.slice( 5 ); - } else { - elem.removeAttribute( "type" ); - } - - return elem; -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( dataPriv.hasData( src ) ) { - pdataOld = dataPriv.get( src ); - events = pdataOld.events; - - if ( events ) { - dataPriv.remove( dest, "handle events" ); - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( dataUser.hasData( src ) ) { - udataOld = dataUser.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - dataUser.set( dest, udataCur ); - } -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -function domManip( collection, args, callback, ignored ) { - - // Flatten any nested arrays - args = flat( args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = collection.length, - iNoClone = l - 1, - value = args[ 0 ], - valueIsFunction = isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( valueIsFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return collection.each( function( index ) { - var self = collection.eq( index ); - if ( valueIsFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - domManip( self, args, callback, ignored ); - } ); - } - - if ( l ) { - fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - // Require either new content or an interest in ignored elements to invoke the callback - if ( first || ignored ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item - // instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - - // Support: Android <=4.0 only, PhantomJS 1 only - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( collection[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !dataPriv.access( node, "globalEval" ) && - jQuery.contains( doc, node ) ) { - - if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { - - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl && !node.noModule ) { - jQuery._evalUrl( node.src, { - nonce: node.nonce || node.getAttribute( "nonce" ) - }, doc ); - } - } else { - DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); - } - } - } - } - } - } - - return collection; -} - -function remove( elem, selector, keepData ) { - var node, - nodes = selector ? jQuery.filter( selector, elem ) : elem, - i = 0; - - for ( ; ( node = nodes[ i ] ) != null; i++ ) { - if ( !keepData && node.nodeType === 1 ) { - jQuery.cleanData( getAll( node ) ); - } - - if ( node.parentNode ) { - if ( keepData && isAttached( node ) ) { - setGlobalEval( getAll( node, "script" ) ); - } - node.parentNode.removeChild( node ); - } - } - - return elem; -} - -jQuery.extend( { - htmlPrefilter: function( html ) { - return html; - }, - - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = isAttached( elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - cleanData: function( elems ) { - var data, elem, type, - special = jQuery.event.special, - i = 0; - - for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { - if ( acceptData( elem ) ) { - if ( ( data = elem[ dataPriv.expando ] ) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataPriv.expando ] = undefined; - } - if ( elem[ dataUser.expando ] ) { - - // Support: Chrome <=35 - 45+ - // Assign undefined instead of using delete, see Data#remove - elem[ dataUser.expando ] = undefined; - } - } - } - } -} ); - -jQuery.fn.extend( { - detach: function( selector ) { - return remove( this, selector, true ); - }, - - remove: function( selector ) { - return remove( this, selector ); - }, - - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each( function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - } ); - }, null, value, arguments.length ); - }, - - append: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - } ); - }, - - prepend: function() { - return domManip( this, arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - } ); - }, - - before: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - } ); - }, - - after: function() { - return domManip( this, arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - } ); - }, - - empty: function() { - var elem, - i = 0; - - for ( ; ( elem = this[ i ] ) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - } ); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = jQuery.htmlPrefilter( value ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch ( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var ignored = []; - - // Make the changes, replacing each non-ignored context element with the new content - return domManip( this, arguments, function( elem ) { - var parent = this.parentNode; - - if ( jQuery.inArray( this, ignored ) < 0 ) { - jQuery.cleanData( getAll( this ) ); - if ( parent ) { - parent.replaceChild( elem, this ); - } - } - - // Force callback invocation - }, ignored ); - } -} ); - -jQuery.each( { - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: Android <=4.0 only, PhantomJS 1 only - // .get() because push.apply(_, arraylike) throws on ancient WebKit - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -} ); -var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); - -var getStyles = function( elem ) { - - // Support: IE <=11 only, Firefox <=30 (#15098, #14150) - // IE throws on elements created in popups - // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" - var view = elem.ownerDocument.defaultView; - - if ( !view || !view.opener ) { - view = window; - } - - return view.getComputedStyle( elem ); - }; - -var swap = function( elem, options, callback ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.call( elem ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; -}; - - -var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); - - - -( function() { - - // Executing both pixelPosition & boxSizingReliable tests require only one layout - // so they're executed at the same time to save the second computation. - function computeStyleTests() { - - // This is a singleton, we need to execute it only once - if ( !div ) { - return; - } - - container.style.cssText = "position:absolute;left:-11111px;width:60px;" + - "margin-top:1px;padding:0;border:0"; - div.style.cssText = - "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + - "margin:auto;border:1px;padding:1px;" + - "width:60%;top:1%"; - documentElement.appendChild( container ).appendChild( div ); - - var divStyle = window.getComputedStyle( div ); - pixelPositionVal = divStyle.top !== "1%"; - - // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 - reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; - - // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 - // Some styles come back with percentage values, even though they shouldn't - div.style.right = "60%"; - pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; - - // Support: IE 9 - 11 only - // Detect misreporting of content dimensions for box-sizing:border-box elements - boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; - - // Support: IE 9 only - // Detect overflow:scroll screwiness (gh-3699) - // Support: Chrome <=64 - // Don't get tricked when zoom affects offsetWidth (gh-4029) - div.style.position = "absolute"; - scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; - - documentElement.removeChild( container ); - - // Nullify the div so it wouldn't be stored in the memory and - // it will also be a sign that checks already performed - div = null; - } - - function roundPixelMeasures( measure ) { - return Math.round( parseFloat( measure ) ); - } - - var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, - reliableTrDimensionsVal, reliableMarginLeftVal, - container = document.createElement( "div" ), - div = document.createElement( "div" ); - - // Finish early in limited (non-browser) environments - if ( !div.style ) { - return; - } - - // Support: IE <=9 - 11 only - // Style of cloned element affects source element cloned (#8908) - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - jQuery.extend( support, { - boxSizingReliable: function() { - computeStyleTests(); - return boxSizingReliableVal; - }, - pixelBoxStyles: function() { - computeStyleTests(); - return pixelBoxStylesVal; - }, - pixelPosition: function() { - computeStyleTests(); - return pixelPositionVal; - }, - reliableMarginLeft: function() { - computeStyleTests(); - return reliableMarginLeftVal; - }, - scrollboxSize: function() { - computeStyleTests(); - return scrollboxSizeVal; - }, - - // Support: IE 9 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Behavior in IE 9 is more subtle than in newer versions & it passes - // some versions of this test; make sure not to make it pass there! - // - // Support: Firefox 70+ - // Only Firefox includes border widths - // in computed dimensions. (gh-4529) - reliableTrDimensions: function() { - var table, tr, trChild, trStyle; - if ( reliableTrDimensionsVal == null ) { - table = document.createElement( "table" ); - tr = document.createElement( "tr" ); - trChild = document.createElement( "div" ); - - table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; - tr.style.cssText = "border:1px solid"; - - // Support: Chrome 86+ - // Height set through cssText does not get applied. - // Computed height then comes back as 0. - tr.style.height = "1px"; - trChild.style.height = "9px"; - - // Support: Android 8 Chrome 86+ - // In our bodyBackground.html iframe, - // display for all div elements is set to "inline", - // which causes a problem only in Android 8 Chrome 86. - // Ensuring the div is display: block - // gets around this issue. - trChild.style.display = "block"; - - documentElement - .appendChild( table ) - .appendChild( tr ) - .appendChild( trChild ); - - trStyle = window.getComputedStyle( tr ); - reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + - parseInt( trStyle.borderTopWidth, 10 ) + - parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; - - documentElement.removeChild( table ); - } - return reliableTrDimensionsVal; - } - } ); -} )(); - - -function curCSS( elem, name, computed ) { - var width, minWidth, maxWidth, ret, - - // Support: Firefox 51+ - // Retrieving style before computed somehow - // fixes an issue with getting wrong values - // on detached elements - style = elem.style; - - computed = computed || getStyles( elem ); - - // getPropertyValue is needed for: - // .css('filter') (IE 9 only, #12537) - // .css('--customProperty) (#3144) - if ( computed ) { - ret = computed.getPropertyValue( name ) || computed[ name ]; - - if ( ret === "" && !isAttached( elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Android Browser returns percentage for some values, - // but width seems to be reliably pixels. - // This is against the CSSOM draft spec: - // https://drafts.csswg.org/cssom/#resolved-values - if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret !== undefined ? - - // Support: IE <=9 - 11 only - // IE returns zIndex value as an integer. - ret + "" : - ret; -} - - -function addGetHookIf( conditionFn, hookFn ) { - - // Define the hook, we'll check on the first run if it's really needed. - return { - get: function() { - if ( conditionFn() ) { - - // Hook not needed (or it's not possible to use it due - // to missing dependency), remove it. - delete this.get; - return; - } - - // Hook needed; redefine it so that the support test is not executed again. - return ( this.get = hookFn ).apply( this, arguments ); - } - }; -} - - -var cssPrefixes = [ "Webkit", "Moz", "ms" ], - emptyStyle = document.createElement( "div" ).style, - vendorProps = {}; - -// Return a vendor-prefixed property or undefined -function vendorPropName( name ) { - - // Check for vendor prefixed names - var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in emptyStyle ) { - return name; - } - } -} - -// Return a potentially-mapped jQuery.cssProps or vendor prefixed property -function finalPropName( name ) { - var final = jQuery.cssProps[ name ] || vendorProps[ name ]; - - if ( final ) { - return final; - } - if ( name in emptyStyle ) { - return name; - } - return vendorProps[ name ] = vendorPropName( name ) || name; -} - - -var - - // Swappable if display is none or starts with table - // except "table", "table-cell", or "table-caption" - // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rcustomProp = /^--/, - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: "0", - fontWeight: "400" - }; - -function setPositiveNumber( _elem, value, subtract ) { - - // Any relative (+/-) values have already been - // normalized at this point - var matches = rcssNum.exec( value ); - return matches ? - - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : - value; -} - -function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { - var i = dimension === "width" ? 1 : 0, - extra = 0, - delta = 0; - - // Adjustment may not be necessary - if ( box === ( isBorderBox ? "border" : "content" ) ) { - return 0; - } - - for ( ; i < 4; i += 2 ) { - - // Both box models exclude margin - if ( box === "margin" ) { - delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); - } - - // If we get here with a content-box, we're seeking "padding" or "border" or "margin" - if ( !isBorderBox ) { - - // Add padding - delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // For "border" or "margin", add border - if ( box !== "padding" ) { - delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - - // But still keep track of it otherwise - } else { - extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - - // If we get here with a border-box (content + padding + border), we're seeking "content" or - // "padding" or "margin" - } else { - - // For "content", subtract padding - if ( box === "content" ) { - delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // For "content" or "padding", subtract border - if ( box !== "margin" ) { - delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - // Account for positive content-box scroll gutter when requested by providing computedVal - if ( !isBorderBox && computedVal >= 0 ) { - - // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border - // Assuming integer scroll gutter, subtract the rest and round down - delta += Math.max( 0, Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - computedVal - - delta - - extra - - 0.5 - - // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter - // Use an explicit zero to avoid NaN (gh-3964) - ) ) || 0; - } - - return delta; -} - -function getWidthOrHeight( elem, dimension, extra ) { - - // Start with computed style - var styles = getStyles( elem ), - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). - // Fake content-box until we know it's needed to know the true value. - boxSizingNeeded = !support.boxSizingReliable() || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - valueIsBorderBox = isBorderBox, - - val = curCSS( elem, dimension, styles ), - offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); - - // Support: Firefox <=54 - // Return a confounding non-pixel value or feign ignorance, as appropriate. - if ( rnumnonpx.test( val ) ) { - if ( !extra ) { - return val; - } - val = "auto"; - } - - - // Support: IE 9 - 11 only - // Use offsetWidth/offsetHeight for when box sizing is unreliable. - // In those cases, the computed value can be trusted to be border-box. - if ( ( !support.boxSizingReliable() && isBorderBox || - - // Support: IE 10 - 11+, Edge 15 - 18+ - // IE/Edge misreport `getComputedStyle` of table rows with width/height - // set in CSS while `offset*` properties report correct values. - // Interestingly, in some cases IE 9 doesn't suffer from this issue. - !support.reliableTrDimensions() && nodeName( elem, "tr" ) || - - // Fall back to offsetWidth/offsetHeight when value is "auto" - // This happens for inline elements with no explicit setting (gh-3571) - val === "auto" || - - // Support: Android <=4.1 - 4.3 only - // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) - !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && - - // Make sure the element is visible & connected - elem.getClientRects().length ) { - - isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // Where available, offsetWidth/offsetHeight approximate border box dimensions. - // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the - // retrieved value as a content box dimension. - valueIsBorderBox = offsetProp in elem; - if ( valueIsBorderBox ) { - val = elem[ offsetProp ]; - } - } - - // Normalize "" and auto - val = parseFloat( val ) || 0; - - // Adjust for the element's box model - return ( val + - boxModelAdjustment( - elem, - dimension, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles, - - // Provide the current computed size to request scroll gutter calculation (gh-3589) - val - ) - ) + "px"; -} - -jQuery.extend( { - - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "animationIterationCount": true, - "columnCount": true, - "fillOpacity": true, - "flexGrow": true, - "flexShrink": true, - "fontWeight": true, - "gridArea": true, - "gridColumn": true, - "gridColumnEnd": true, - "gridColumnStart": true, - "gridRow": true, - "gridRowEnd": true, - "gridRowStart": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: {}, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ), - style = elem.style; - - // Make sure that we're working with the right name. We don't - // want to query the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Gets hook for the prefixed version, then unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // Convert "+=" or "-=" to relative numbers (#7345) - if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { - value = adjustCSS( elem, name, ret ); - - // Fixes bug #9237 - type = "number"; - } - - // Make sure that null and NaN values aren't set (#7116) - if ( value == null || value !== value ) { - return; - } - - // If a number was passed in, add the unit (except for certain CSS properties) - // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append - // "px" to a few hardcoded values. - if ( type === "number" && !isCustomProp ) { - value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); - } - - // background-* props affect original clone's values - if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !( "set" in hooks ) || - ( value = hooks.set( elem, value, extra ) ) !== undefined ) { - - if ( isCustomProp ) { - style.setProperty( name, value ); - } else { - style[ name ] = value; - } - } - - } else { - - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && - ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { - - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var val, num, hooks, - origName = camelCase( name ), - isCustomProp = rcustomProp.test( name ); - - // Make sure that we're working with the right name. We don't - // want to modify the value if it is a CSS custom property - // since they are user-defined. - if ( !isCustomProp ) { - name = finalPropName( origName ); - } - - // Try prefixed name followed by the unprefixed name - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - // Convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Make numeric if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || isFinite( num ) ? num || 0 : val; - } - - return val; - } -} ); - -jQuery.each( [ "height", "width" ], function( _i, dimension ) { - jQuery.cssHooks[ dimension ] = { - get: function( elem, computed, extra ) { - if ( computed ) { - - // Certain elements can have dimension info if we invisibly show them - // but it must have a current display style that would benefit - return rdisplayswap.test( jQuery.css( elem, "display" ) ) && - - // Support: Safari 8+ - // Table columns in Safari have non-zero offsetWidth & zero - // getBoundingClientRect().width unless display is changed. - // Support: IE <=11 only - // Running getBoundingClientRect on a disconnected node - // in IE throws an error. - ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? - swap( elem, cssShow, function() { - return getWidthOrHeight( elem, dimension, extra ); - } ) : - getWidthOrHeight( elem, dimension, extra ); - } - }, - - set: function( elem, value, extra ) { - var matches, - styles = getStyles( elem ), - - // Only read styles.position if the test has a chance to fail - // to avoid forcing a reflow. - scrollboxSizeBuggy = !support.scrollboxSize() && - styles.position === "absolute", - - // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) - boxSizingNeeded = scrollboxSizeBuggy || extra, - isBorderBox = boxSizingNeeded && - jQuery.css( elem, "boxSizing", false, styles ) === "border-box", - subtract = extra ? - boxModelAdjustment( - elem, - dimension, - extra, - isBorderBox, - styles - ) : - 0; - - // Account for unreliable border-box dimensions by comparing offset* to computed and - // faking a content-box to get border and padding (gh-3699) - if ( isBorderBox && scrollboxSizeBuggy ) { - subtract -= Math.ceil( - elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - - parseFloat( styles[ dimension ] ) - - boxModelAdjustment( elem, dimension, "border", false, styles ) - - 0.5 - ); - } - - // Convert to pixels if value adjustment is needed - if ( subtract && ( matches = rcssNum.exec( value ) ) && - ( matches[ 3 ] || "px" ) !== "px" ) { - - elem.style[ dimension ] = value; - value = jQuery.css( elem, dimension ); - } - - return setPositiveNumber( elem, value, subtract ); - } - }; -} ); - -jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, - function( elem, computed ) { - if ( computed ) { - return ( parseFloat( curCSS( elem, "marginLeft" ) ) || - elem.getBoundingClientRect().left - - swap( elem, { marginLeft: 0 }, function() { - return elem.getBoundingClientRect().left; - } ) - ) + "px"; - } - } -); - -// These hooks are used by animate to expand properties -jQuery.each( { - margin: "", - padding: "", - border: "Width" -}, function( prefix, suffix ) { - jQuery.cssHooks[ prefix + suffix ] = { - expand: function( value ) { - var i = 0, - expanded = {}, - - // Assumes a single number if not a string - parts = typeof value === "string" ? value.split( " " ) : [ value ]; - - for ( ; i < 4; i++ ) { - expanded[ prefix + cssExpand[ i ] + suffix ] = - parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; - } - - return expanded; - } - }; - - if ( prefix !== "margin" ) { - jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; - } -} ); - -jQuery.fn.extend( { - css: function( name, value ) { - return access( this, function( elem, name, value ) { - var styles, len, - map = {}, - i = 0; - - if ( Array.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - } -} ); - - -function Tween( elem, options, prop, end, easing ) { - return new Tween.prototype.init( elem, options, prop, end, easing ); -} -jQuery.Tween = Tween; - -Tween.prototype = { - constructor: Tween, - init: function( elem, options, prop, end, easing, unit ) { - this.elem = elem; - this.prop = prop; - this.easing = easing || jQuery.easing._default; - this.options = options; - this.start = this.now = this.cur(); - this.end = end; - this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); - }, - cur: function() { - var hooks = Tween.propHooks[ this.prop ]; - - return hooks && hooks.get ? - hooks.get( this ) : - Tween.propHooks._default.get( this ); - }, - run: function( percent ) { - var eased, - hooks = Tween.propHooks[ this.prop ]; - - if ( this.options.duration ) { - this.pos = eased = jQuery.easing[ this.easing ]( - percent, this.options.duration * percent, 0, 1, this.options.duration - ); - } else { - this.pos = eased = percent; - } - this.now = ( this.end - this.start ) * eased + this.start; - - if ( this.options.step ) { - this.options.step.call( this.elem, this.now, this ); - } - - if ( hooks && hooks.set ) { - hooks.set( this ); - } else { - Tween.propHooks._default.set( this ); - } - return this; - } -}; - -Tween.prototype.init.prototype = Tween.prototype; - -Tween.propHooks = { - _default: { - get: function( tween ) { - var result; - - // Use a property on the element directly when it is not a DOM element, - // or when there is no matching style property that exists. - if ( tween.elem.nodeType !== 1 || - tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { - return tween.elem[ tween.prop ]; - } - - // Passing an empty string as a 3rd parameter to .css will automatically - // attempt a parseFloat and fallback to a string if the parse fails. - // Simple values such as "10px" are parsed to Float; - // complex values such as "rotate(1rad)" are returned as-is. - result = jQuery.css( tween.elem, tween.prop, "" ); - - // Empty strings, null, undefined and "auto" are converted to 0. - return !result || result === "auto" ? 0 : result; - }, - set: function( tween ) { - - // Use step hook for back compat. - // Use cssHook if its there. - // Use .style if available and use plain properties where available. - if ( jQuery.fx.step[ tween.prop ] ) { - jQuery.fx.step[ tween.prop ]( tween ); - } else if ( tween.elem.nodeType === 1 && ( - jQuery.cssHooks[ tween.prop ] || - tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { - jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); - } else { - tween.elem[ tween.prop ] = tween.now; - } - } - } -}; - -// Support: IE <=9 only -// Panic based approach to setting things on disconnected nodes -Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { - set: function( tween ) { - if ( tween.elem.nodeType && tween.elem.parentNode ) { - tween.elem[ tween.prop ] = tween.now; - } - } -}; - -jQuery.easing = { - linear: function( p ) { - return p; - }, - swing: function( p ) { - return 0.5 - Math.cos( p * Math.PI ) / 2; - }, - _default: "swing" -}; - -jQuery.fx = Tween.prototype.init; - -// Back compat <1.8 extension point -jQuery.fx.step = {}; - - - - -var - fxNow, inProgress, - rfxtypes = /^(?:toggle|show|hide)$/, - rrun = /queueHooks$/; - -function schedule() { - if ( inProgress ) { - if ( document.hidden === false && window.requestAnimationFrame ) { - window.requestAnimationFrame( schedule ); - } else { - window.setTimeout( schedule, jQuery.fx.interval ); - } - - jQuery.fx.tick(); - } -} - -// Animations created synchronously will run synchronously -function createFxNow() { - window.setTimeout( function() { - fxNow = undefined; - } ); - return ( fxNow = Date.now() ); -} - -// Generate parameters to create a standard animation -function genFx( type, includeWidth ) { - var which, - i = 0, - attrs = { height: type }; - - // If we include width, step value is 1 to do all cssExpand values, - // otherwise step value is 2 to skip over Left and Right - includeWidth = includeWidth ? 1 : 0; - for ( ; i < 4; i += 2 - includeWidth ) { - which = cssExpand[ i ]; - attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; - } - - if ( includeWidth ) { - attrs.opacity = attrs.width = type; - } - - return attrs; -} - -function createTween( value, prop, animation ) { - var tween, - collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), - index = 0, - length = collection.length; - for ( ; index < length; index++ ) { - if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { - - // We're done with this property - return tween; - } - } -} - -function defaultPrefilter( elem, props, opts ) { - var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, - isBox = "width" in props || "height" in props, - anim = this, - orig = {}, - style = elem.style, - hidden = elem.nodeType && isHiddenWithinTree( elem ), - dataShow = dataPriv.get( elem, "fxshow" ); - - // Queue-skipping animations hijack the fx hooks - if ( !opts.queue ) { - hooks = jQuery._queueHooks( elem, "fx" ); - if ( hooks.unqueued == null ) { - hooks.unqueued = 0; - oldfire = hooks.empty.fire; - hooks.empty.fire = function() { - if ( !hooks.unqueued ) { - oldfire(); - } - }; - } - hooks.unqueued++; - - anim.always( function() { - - // Ensure the complete handler is called before this completes - anim.always( function() { - hooks.unqueued--; - if ( !jQuery.queue( elem, "fx" ).length ) { - hooks.empty.fire(); - } - } ); - } ); - } - - // Detect show/hide animations - for ( prop in props ) { - value = props[ prop ]; - if ( rfxtypes.test( value ) ) { - delete props[ prop ]; - toggle = toggle || value === "toggle"; - if ( value === ( hidden ? "hide" : "show" ) ) { - - // Pretend to be hidden if this is a "show" and - // there is still data from a stopped show/hide - if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { - hidden = true; - - // Ignore all other no-op show/hide data - } else { - continue; - } - } - orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); - } - } - - // Bail out if this is a no-op like .hide().hide() - propTween = !jQuery.isEmptyObject( props ); - if ( !propTween && jQuery.isEmptyObject( orig ) ) { - return; - } - - // Restrict "overflow" and "display" styles during box animations - if ( isBox && elem.nodeType === 1 ) { - - // Support: IE <=9 - 11, Edge 12 - 15 - // Record all 3 overflow attributes because IE does not infer the shorthand - // from identically-valued overflowX and overflowY and Edge just mirrors - // the overflowX value there. - opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; - - // Identify a display type, preferring old show/hide data over the CSS cascade - restoreDisplay = dataShow && dataShow.display; - if ( restoreDisplay == null ) { - restoreDisplay = dataPriv.get( elem, "display" ); - } - display = jQuery.css( elem, "display" ); - if ( display === "none" ) { - if ( restoreDisplay ) { - display = restoreDisplay; - } else { - - // Get nonempty value(s) by temporarily forcing visibility - showHide( [ elem ], true ); - restoreDisplay = elem.style.display || restoreDisplay; - display = jQuery.css( elem, "display" ); - showHide( [ elem ] ); - } - } - - // Animate inline elements as inline-block - if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { - if ( jQuery.css( elem, "float" ) === "none" ) { - - // Restore the original display value at the end of pure show/hide animations - if ( !propTween ) { - anim.done( function() { - style.display = restoreDisplay; - } ); - if ( restoreDisplay == null ) { - display = style.display; - restoreDisplay = display === "none" ? "" : display; - } - } - style.display = "inline-block"; - } - } - } - - if ( opts.overflow ) { - style.overflow = "hidden"; - anim.always( function() { - style.overflow = opts.overflow[ 0 ]; - style.overflowX = opts.overflow[ 1 ]; - style.overflowY = opts.overflow[ 2 ]; - } ); - } - - // Implement show/hide animations - propTween = false; - for ( prop in orig ) { - - // General show/hide setup for this element animation - if ( !propTween ) { - if ( dataShow ) { - if ( "hidden" in dataShow ) { - hidden = dataShow.hidden; - } - } else { - dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); - } - - // Store hidden/visible for toggle so `.stop().toggle()` "reverses" - if ( toggle ) { - dataShow.hidden = !hidden; - } - - // Show elements before animating them - if ( hidden ) { - showHide( [ elem ], true ); - } - - /* eslint-disable no-loop-func */ - - anim.done( function() { - - /* eslint-enable no-loop-func */ - - // The final step of a "hide" animation is actually hiding the element - if ( !hidden ) { - showHide( [ elem ] ); - } - dataPriv.remove( elem, "fxshow" ); - for ( prop in orig ) { - jQuery.style( elem, prop, orig[ prop ] ); - } - } ); - } - - // Per-property setup - propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); - if ( !( prop in dataShow ) ) { - dataShow[ prop ] = propTween.start; - if ( hidden ) { - propTween.end = propTween.start; - propTween.start = 0; - } - } - } -} - -function propFilter( props, specialEasing ) { - var index, name, easing, value, hooks; - - // camelCase, specialEasing and expand cssHook pass - for ( index in props ) { - name = camelCase( index ); - easing = specialEasing[ name ]; - value = props[ index ]; - if ( Array.isArray( value ) ) { - easing = value[ 1 ]; - value = props[ index ] = value[ 0 ]; - } - - if ( index !== name ) { - props[ name ] = value; - delete props[ index ]; - } - - hooks = jQuery.cssHooks[ name ]; - if ( hooks && "expand" in hooks ) { - value = hooks.expand( value ); - delete props[ name ]; - - // Not quite $.extend, this won't overwrite existing keys. - // Reusing 'index' because we have the correct "name" - for ( index in value ) { - if ( !( index in props ) ) { - props[ index ] = value[ index ]; - specialEasing[ index ] = easing; - } - } - } else { - specialEasing[ name ] = easing; - } - } -} - -function Animation( elem, properties, options ) { - var result, - stopped, - index = 0, - length = Animation.prefilters.length, - deferred = jQuery.Deferred().always( function() { - - // Don't match elem in the :animated selector - delete tick.elem; - } ), - tick = function() { - if ( stopped ) { - return false; - } - var currentTime = fxNow || createFxNow(), - remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), - - // Support: Android 2.3 only - // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) - temp = remaining / animation.duration || 0, - percent = 1 - temp, - index = 0, - length = animation.tweens.length; - - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( percent ); - } - - deferred.notifyWith( elem, [ animation, percent, remaining ] ); - - // If there's more to do, yield - if ( percent < 1 && length ) { - return remaining; - } - - // If this was an empty animation, synthesize a final progress notification - if ( !length ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - } - - // Resolve the animation and report its conclusion - deferred.resolveWith( elem, [ animation ] ); - return false; - }, - animation = deferred.promise( { - elem: elem, - props: jQuery.extend( {}, properties ), - opts: jQuery.extend( true, { - specialEasing: {}, - easing: jQuery.easing._default - }, options ), - originalProperties: properties, - originalOptions: options, - startTime: fxNow || createFxNow(), - duration: options.duration, - tweens: [], - createTween: function( prop, end ) { - var tween = jQuery.Tween( elem, animation.opts, prop, end, - animation.opts.specialEasing[ prop ] || animation.opts.easing ); - animation.tweens.push( tween ); - return tween; - }, - stop: function( gotoEnd ) { - var index = 0, - - // If we are going to the end, we want to run all the tweens - // otherwise we skip this part - length = gotoEnd ? animation.tweens.length : 0; - if ( stopped ) { - return this; - } - stopped = true; - for ( ; index < length; index++ ) { - animation.tweens[ index ].run( 1 ); - } - - // Resolve when we played the last frame; otherwise, reject - if ( gotoEnd ) { - deferred.notifyWith( elem, [ animation, 1, 0 ] ); - deferred.resolveWith( elem, [ animation, gotoEnd ] ); - } else { - deferred.rejectWith( elem, [ animation, gotoEnd ] ); - } - return this; - } - } ), - props = animation.props; - - propFilter( props, animation.opts.specialEasing ); - - for ( ; index < length; index++ ) { - result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); - if ( result ) { - if ( isFunction( result.stop ) ) { - jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = - result.stop.bind( result ); - } - return result; - } - } - - jQuery.map( props, createTween, animation ); - - if ( isFunction( animation.opts.start ) ) { - animation.opts.start.call( elem, animation ); - } - - // Attach callbacks from options - animation - .progress( animation.opts.progress ) - .done( animation.opts.done, animation.opts.complete ) - .fail( animation.opts.fail ) - .always( animation.opts.always ); - - jQuery.fx.timer( - jQuery.extend( tick, { - elem: elem, - anim: animation, - queue: animation.opts.queue - } ) - ); - - return animation; -} - -jQuery.Animation = jQuery.extend( Animation, { - - tweeners: { - "*": [ function( prop, value ) { - var tween = this.createTween( prop, value ); - adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); - return tween; - } ] - }, - - tweener: function( props, callback ) { - if ( isFunction( props ) ) { - callback = props; - props = [ "*" ]; - } else { - props = props.match( rnothtmlwhite ); - } - - var prop, - index = 0, - length = props.length; - - for ( ; index < length; index++ ) { - prop = props[ index ]; - Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; - Animation.tweeners[ prop ].unshift( callback ); - } - }, - - prefilters: [ defaultPrefilter ], - - prefilter: function( callback, prepend ) { - if ( prepend ) { - Animation.prefilters.unshift( callback ); - } else { - Animation.prefilters.push( callback ); - } - } -} ); - -jQuery.speed = function( speed, easing, fn ) { - var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { - complete: fn || !fn && easing || - isFunction( speed ) && speed, - duration: speed, - easing: fn && easing || easing && !isFunction( easing ) && easing - }; - - // Go to the end state if fx are off - if ( jQuery.fx.off ) { - opt.duration = 0; - - } else { - if ( typeof opt.duration !== "number" ) { - if ( opt.duration in jQuery.fx.speeds ) { - opt.duration = jQuery.fx.speeds[ opt.duration ]; - - } else { - opt.duration = jQuery.fx.speeds._default; - } - } - } - - // Normalize opt.queue - true/undefined/null -> "fx" - if ( opt.queue == null || opt.queue === true ) { - opt.queue = "fx"; - } - - // Queueing - opt.old = opt.complete; - - opt.complete = function() { - if ( isFunction( opt.old ) ) { - opt.old.call( this ); - } - - if ( opt.queue ) { - jQuery.dequeue( this, opt.queue ); - } - }; - - return opt; -}; - -jQuery.fn.extend( { - fadeTo: function( speed, to, easing, callback ) { - - // Show any hidden elements after setting opacity to 0 - return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() - - // Animate to the value specified - .end().animate( { opacity: to }, speed, easing, callback ); - }, - animate: function( prop, speed, easing, callback ) { - var empty = jQuery.isEmptyObject( prop ), - optall = jQuery.speed( speed, easing, callback ), - doAnimation = function() { - - // Operate on a copy of prop so per-property easing won't be lost - var anim = Animation( this, jQuery.extend( {}, prop ), optall ); - - // Empty animations, or finishing resolves immediately - if ( empty || dataPriv.get( this, "finish" ) ) { - anim.stop( true ); - } - }; - - doAnimation.finish = doAnimation; - - return empty || optall.queue === false ? - this.each( doAnimation ) : - this.queue( optall.queue, doAnimation ); - }, - stop: function( type, clearQueue, gotoEnd ) { - var stopQueue = function( hooks ) { - var stop = hooks.stop; - delete hooks.stop; - stop( gotoEnd ); - }; - - if ( typeof type !== "string" ) { - gotoEnd = clearQueue; - clearQueue = type; - type = undefined; - } - if ( clearQueue ) { - this.queue( type || "fx", [] ); - } - - return this.each( function() { - var dequeue = true, - index = type != null && type + "queueHooks", - timers = jQuery.timers, - data = dataPriv.get( this ); - - if ( index ) { - if ( data[ index ] && data[ index ].stop ) { - stopQueue( data[ index ] ); - } - } else { - for ( index in data ) { - if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { - stopQueue( data[ index ] ); - } - } - } - - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && - ( type == null || timers[ index ].queue === type ) ) { - - timers[ index ].anim.stop( gotoEnd ); - dequeue = false; - timers.splice( index, 1 ); - } - } - - // Start the next in the queue if the last step wasn't forced. - // Timers currently will call their complete callbacks, which - // will dequeue but only if they were gotoEnd. - if ( dequeue || !gotoEnd ) { - jQuery.dequeue( this, type ); - } - } ); - }, - finish: function( type ) { - if ( type !== false ) { - type = type || "fx"; - } - return this.each( function() { - var index, - data = dataPriv.get( this ), - queue = data[ type + "queue" ], - hooks = data[ type + "queueHooks" ], - timers = jQuery.timers, - length = queue ? queue.length : 0; - - // Enable finishing flag on private data - data.finish = true; - - // Empty the queue first - jQuery.queue( this, type, [] ); - - if ( hooks && hooks.stop ) { - hooks.stop.call( this, true ); - } - - // Look for any active animations, and finish them - for ( index = timers.length; index--; ) { - if ( timers[ index ].elem === this && timers[ index ].queue === type ) { - timers[ index ].anim.stop( true ); - timers.splice( index, 1 ); - } - } - - // Look for any animations in the old queue and finish them - for ( index = 0; index < length; index++ ) { - if ( queue[ index ] && queue[ index ].finish ) { - queue[ index ].finish.call( this ); - } - } - - // Turn off finishing flag - delete data.finish; - } ); - } -} ); - -jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { - var cssFn = jQuery.fn[ name ]; - jQuery.fn[ name ] = function( speed, easing, callback ) { - return speed == null || typeof speed === "boolean" ? - cssFn.apply( this, arguments ) : - this.animate( genFx( name, true ), speed, easing, callback ); - }; -} ); - -// Generate shortcuts for custom animations -jQuery.each( { - slideDown: genFx( "show" ), - slideUp: genFx( "hide" ), - slideToggle: genFx( "toggle" ), - fadeIn: { opacity: "show" }, - fadeOut: { opacity: "hide" }, - fadeToggle: { opacity: "toggle" } -}, function( name, props ) { - jQuery.fn[ name ] = function( speed, easing, callback ) { - return this.animate( props, speed, easing, callback ); - }; -} ); - -jQuery.timers = []; -jQuery.fx.tick = function() { - var timer, - i = 0, - timers = jQuery.timers; - - fxNow = Date.now(); - - for ( ; i < timers.length; i++ ) { - timer = timers[ i ]; - - // Run the timer and safely remove it when done (allowing for external removal) - if ( !timer() && timers[ i ] === timer ) { - timers.splice( i--, 1 ); - } - } - - if ( !timers.length ) { - jQuery.fx.stop(); - } - fxNow = undefined; -}; - -jQuery.fx.timer = function( timer ) { - jQuery.timers.push( timer ); - jQuery.fx.start(); -}; - -jQuery.fx.interval = 13; -jQuery.fx.start = function() { - if ( inProgress ) { - return; - } - - inProgress = true; - schedule(); -}; - -jQuery.fx.stop = function() { - inProgress = null; -}; - -jQuery.fx.speeds = { - slow: 600, - fast: 200, - - // Default speed - _default: 400 -}; - - -// Based off of the plugin by Clint Helfers, with permission. -// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ -jQuery.fn.delay = function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = window.setTimeout( next, time ); - hooks.stop = function() { - window.clearTimeout( timeout ); - }; - } ); -}; - - -( function() { - var input = document.createElement( "input" ), - select = document.createElement( "select" ), - opt = select.appendChild( document.createElement( "option" ) ); - - input.type = "checkbox"; - - // Support: Android <=4.3 only - // Default value for a checkbox should be "on" - support.checkOn = input.value !== ""; - - // Support: IE <=11 only - // Must access selectedIndex to make default options select - support.optSelected = opt.selected; - - // Support: IE <=11 only - // An input loses its value after becoming a radio - input = document.createElement( "input" ); - input.value = "t"; - input.type = "radio"; - support.radioValue = input.value === "t"; -} )(); - - -var boolHook, - attrHandle = jQuery.expr.attrHandle; - -jQuery.fn.extend( { - attr: function( name, value ) { - return access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each( function() { - jQuery.removeAttr( this, name ); - } ); - } -} ); - -jQuery.extend( { - attr: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set attributes on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === "undefined" ) { - return jQuery.prop( elem, name, value ); - } - - // Attribute hooks are determined by the lowercase version - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - hooks = jQuery.attrHooks[ name.toLowerCase() ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); - } - - if ( value !== undefined ) { - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return; - } - - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - elem.setAttribute( name, value + "" ); - return value; - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? undefined : ret; - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !support.radioValue && value === "radio" && - nodeName( elem, "input" ) ) { - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - removeAttr: function( elem, value ) { - var name, - i = 0, - - // Attribute names can contain non-HTML whitespace characters - // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 - attrNames = value && value.match( rnothtmlwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( ( name = attrNames[ i++ ] ) ) { - elem.removeAttribute( name ); - } - } - } -} ); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - elem.setAttribute( name, name ); - } - return name; - } -}; - -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { - var getter = attrHandle[ name ] || jQuery.find.attr; - - attrHandle[ name ] = function( elem, name, isXML ) { - var ret, handle, - lowercaseName = name.toLowerCase(); - - if ( !isXML ) { - - // Avoid an infinite loop by temporarily removing this function from the getter - handle = attrHandle[ lowercaseName ]; - attrHandle[ lowercaseName ] = ret; - ret = getter( elem, name, isXML ) != null ? - lowercaseName : - null; - attrHandle[ lowercaseName ] = handle; - } - return ret; - }; -} ); - - - - -var rfocusable = /^(?:input|select|textarea|button)$/i, - rclickable = /^(?:a|area)$/i; - -jQuery.fn.extend( { - prop: function( name, value ) { - return access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - return this.each( function() { - delete this[ jQuery.propFix[ name ] || name ]; - } ); - } -} ); - -jQuery.extend( { - prop: function( elem, name, value ) { - var ret, hooks, - nType = elem.nodeType; - - // Don't get/set properties on text, comment and attribute nodes - if ( nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && - ( ret = hooks.set( elem, value, name ) ) !== undefined ) { - return ret; - } - - return ( elem[ name ] = value ); - } - - if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { - return ret; - } - - return elem[ name ]; - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - - // Support: IE <=9 - 11 only - // elem.tabIndex doesn't always return the - // correct value when it hasn't been explicitly set - // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - if ( tabindex ) { - return parseInt( tabindex, 10 ); - } - - if ( - rfocusable.test( elem.nodeName ) || - rclickable.test( elem.nodeName ) && - elem.href - ) { - return 0; - } - - return -1; - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - } -} ); - -// Support: IE <=11 only -// Accessing the selectedIndex property -// forces the browser to respect setting selected -// on the option -// The getter ensures a default option is selected -// when in an optgroup -// eslint rule "no-unused-expressions" is disabled for this code -// since it considers such accessions noop -if ( !support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent && parent.parentNode ) { - parent.parentNode.selectedIndex; - } - return null; - }, - set: function( elem ) { - - /* eslint no-unused-expressions: "off" */ - - var parent = elem.parentNode; - if ( parent ) { - parent.selectedIndex; - - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - } - }; -} - -jQuery.each( [ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -} ); - - - - - // Strip and collapse whitespace according to HTML spec - // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace - function stripAndCollapse( value ) { - var tokens = value.match( rnothtmlwhite ) || []; - return tokens.join( " " ); - } - - -function getClass( elem ) { - return elem.getAttribute && elem.getAttribute( "class" ) || ""; -} - -function classesToArray( value ) { - if ( Array.isArray( value ) ) { - return value; - } - if ( typeof value === "string" ) { - return value.match( rnothtmlwhite ) || []; - } - return []; -} - -jQuery.fn.extend( { - addClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, curValue, clazz, j, finalValue, - i = 0; - - if ( isFunction( value ) ) { - return this.each( function( j ) { - jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); - } ); - } - - if ( !arguments.length ) { - return this.attr( "class", "" ); - } - - classes = classesToArray( value ); - - if ( classes.length ) { - while ( ( elem = this[ i++ ] ) ) { - curValue = getClass( elem ); - - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); - - if ( cur ) { - j = 0; - while ( ( clazz = classes[ j++ ] ) ) { - - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) > -1 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - - // Only assign if different to avoid unneeded rendering. - finalValue = stripAndCollapse( cur ); - if ( curValue !== finalValue ) { - elem.setAttribute( "class", finalValue ); - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isValidValue = type === "string" || Array.isArray( value ); - - if ( typeof stateVal === "boolean" && isValidValue ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( isFunction( value ) ) { - return this.each( function( i ) { - jQuery( this ).toggleClass( - value.call( this, i, getClass( this ), stateVal ), - stateVal - ); - } ); - } - - return this.each( function() { - var className, i, self, classNames; - - if ( isValidValue ) { - - // Toggle individual class names - i = 0; - self = jQuery( this ); - classNames = classesToArray( value ); - - while ( ( className = classNames[ i++ ] ) ) { - - // Check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( value === undefined || type === "boolean" ) { - className = getClass( this ); - if ( className ) { - - // Store className if set - dataPriv.set( this, "__className__", className ); - } - - // If the element has a class name or if we're passed `false`, - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - if ( this.setAttribute ) { - this.setAttribute( "class", - className || value === false ? - "" : - dataPriv.get( this, "__className__" ) || "" - ); - } - } - } ); - }, - - hasClass: function( selector ) { - var className, elem, - i = 0; - - className = " " + selector + " "; - while ( ( elem = this[ i++ ] ) ) { - if ( elem.nodeType === 1 && - ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { - return true; - } - } - - return false; - } -} ); - - - - -var rreturn = /\r/g; - -jQuery.fn.extend( { - val: function( value ) { - var hooks, ret, valueIsFunction, - elem = this[ 0 ]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || - jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && - "get" in hooks && - ( ret = hooks.get( elem, "value" ) ) !== undefined - ) { - return ret; - } - - ret = elem.value; - - // Handle most common string cases - if ( typeof ret === "string" ) { - return ret.replace( rreturn, "" ); - } - - // Handle cases where value is null/undef or number - return ret == null ? "" : ret; - } - - return; - } - - valueIsFunction = isFunction( value ); - - return this.each( function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( valueIsFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - - } else if ( typeof val === "number" ) { - val += ""; - - } else if ( Array.isArray( val ) ) { - val = jQuery.map( val, function( value ) { - return value == null ? "" : value + ""; - } ); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - } ); - } -} ); - -jQuery.extend( { - valHooks: { - option: { - get: function( elem ) { - - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - - // Support: IE <=10 - 11 only - // option.text throws exceptions (#14686, #14858) - // Strip and collapse whitespace - // https://html.spec.whatwg.org/#strip-and-collapse-whitespace - stripAndCollapse( jQuery.text( elem ) ); - } - }, - select: { - get: function( elem ) { - var value, option, i, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one", - values = one ? null : [], - max = one ? index + 1 : options.length; - - if ( index < 0 ) { - i = max; - - } else { - i = one ? index : 0; - } - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // Support: IE <=9 only - // IE8-9 doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - - // Don't return options that are disabled or in a disabled optgroup - !option.disabled && - ( !option.parentNode.disabled || - !nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - - /* eslint-disable no-cond-assign */ - - if ( option.selected = - jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 - ) { - optionSet = true; - } - - /* eslint-enable no-cond-assign */ - } - - // Force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - } -} ); - -// Radios and checkboxes getter/setter -jQuery.each( [ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( Array.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); - } - } - }; - if ( !support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - return elem.getAttribute( "value" ) === null ? "on" : elem.value; - }; - } -} ); - - - - -// Return jQuery for attributes-only inclusion - - -support.focusin = "onfocusin" in window; - - -var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - stopPropagationCallback = function( e ) { - e.stopPropagation(); - }; - -jQuery.extend( jQuery.event, { - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; - - cur = lastElement = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf( "." ) > -1 ) { - - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split( "." ); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf( ":" ) < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join( "." ); - event.rnamespace = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === ( elem.ownerDocument || document ) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { - lastElement = cur; - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && - dataPriv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( ( !special._default || - special._default.apply( eventPath.pop(), data ) === false ) && - acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - - if ( event.isPropagationStopped() ) { - lastElement.addEventListener( type, stopPropagationCallback ); - } - - elem[ type ](); - - if ( event.isPropagationStopped() ) { - lastElement.removeEventListener( type, stopPropagationCallback ); - } - - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - // Piggyback on a donor event to simulate a different one - // Used only for `focus(in | out)` events - simulate: function( type, elem, event ) { - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true - } - ); - - jQuery.event.trigger( e, null, elem ); - } - -} ); - -jQuery.fn.extend( { - - trigger: function( type, data ) { - return this.each( function() { - jQuery.event.trigger( type, data, this ); - } ); - }, - triggerHandler: function( type, data ) { - var elem = this[ 0 ]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -} ); - - -// Support: Firefox <=44 -// Firefox doesn't have focus(in | out) events -// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 -// -// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 -// focus(in | out) events fire after focus & blur events, -// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order -// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 -if ( !support.focusin ) { - jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - - // Handle: regular nodes (via `this.ownerDocument`), window - // (via `this.document`) & document (via `this`). - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this.document || this, - attaches = dataPriv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - dataPriv.remove( doc, fix ); - - } else { - dataPriv.access( doc, fix, attaches ); - } - } - }; - } ); -} -var location = window.location; - -var nonce = { guid: Date.now() }; - -var rquery = ( /\?/ ); - - - -// Cross-browser xml parsing -jQuery.parseXML = function( data ) { - var xml, parserErrorElem; - if ( !data || typeof data !== "string" ) { - return null; - } - - // Support: IE 9 - 11 only - // IE throws on parseFromString with invalid input. - try { - xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); - } catch ( e ) {} - - parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; - if ( !xml || parserErrorElem ) { - jQuery.error( "Invalid XML: " + ( - parserErrorElem ? - jQuery.map( parserErrorElem.childNodes, function( el ) { - return el.textContent; - } ).join( "\n" ) : - data - ) ); - } - return xml; -}; - - -var - rbracket = /\[\]$/, - rCRLF = /\r?\n/g, - rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, - rsubmittable = /^(?:input|select|textarea|keygen)/i; - -function buildParams( prefix, obj, traditional, add ) { - var name; - - if ( Array.isArray( obj ) ) { - - // Serialize array item. - jQuery.each( obj, function( i, v ) { - if ( traditional || rbracket.test( prefix ) ) { - - // Treat each array item as a scalar. - add( prefix, v ); - - } else { - - // Item is non-scalar (array or object), encode its numeric index. - buildParams( - prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", - v, - traditional, - add - ); - } - } ); - - } else if ( !traditional && toType( obj ) === "object" ) { - - // Serialize object item. - for ( name in obj ) { - buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); - } - - } else { - - // Serialize scalar item. - add( prefix, obj ); - } -} - -// Serialize an array of form elements or a set of -// key/values into a query string -jQuery.param = function( a, traditional ) { - var prefix, - s = [], - add = function( key, valueOrFunction ) { - - // If value is a function, invoke it and use its return value - var value = isFunction( valueOrFunction ) ? - valueOrFunction() : - valueOrFunction; - - s[ s.length ] = encodeURIComponent( key ) + "=" + - encodeURIComponent( value == null ? "" : value ); - }; - - if ( a == null ) { - return ""; - } - - // If an array was passed in, assume that it is an array of form elements. - if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { - - // Serialize the form elements - jQuery.each( a, function() { - add( this.name, this.value ); - } ); - - } else { - - // If traditional, encode the "old" way (the way 1.3.2 or older - // did it), otherwise encode params recursively. - for ( prefix in a ) { - buildParams( prefix, a[ prefix ], traditional, add ); - } - } - - // Return the resulting serialization - return s.join( "&" ); -}; - -jQuery.fn.extend( { - serialize: function() { - return jQuery.param( this.serializeArray() ); - }, - serializeArray: function() { - return this.map( function() { - - // Can add propHook for "elements" to filter or add form elements - var elements = jQuery.prop( this, "elements" ); - return elements ? jQuery.makeArray( elements ) : this; - } ).filter( function() { - var type = this.type; - - // Use .is( ":disabled" ) so that fieldset[disabled] works - return this.name && !jQuery( this ).is( ":disabled" ) && - rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && - ( this.checked || !rcheckableType.test( type ) ); - } ).map( function( _i, elem ) { - var val = jQuery( this ).val(); - - if ( val == null ) { - return null; - } - - if ( Array.isArray( val ) ) { - return jQuery.map( val, function( val ) { - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ); - } - - return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; - } ).get(); - } -} ); - - -var - r20 = /%20/g, - rhash = /#.*$/, - rantiCache = /([?&])_=[^&]*/, - rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, - - // #7653, #8125, #8152: local protocol detection - rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, - rnoContent = /^(?:GET|HEAD)$/, - rprotocol = /^\/\//, - - /* Prefilters - * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) - * 2) These are called: - * - BEFORE asking for a transport - * - AFTER param serialization (s.data is a string if s.processData is true) - * 3) key is the dataType - * 4) the catchall symbol "*" can be used - * 5) execution will start with transport dataType and THEN continue down to "*" if needed - */ - prefilters = {}, - - /* Transports bindings - * 1) key is the dataType - * 2) the catchall symbol "*" can be used - * 3) selection will start with transport dataType and THEN go to "*" if needed - */ - transports = {}, - - // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression - allTypes = "*/".concat( "*" ), - - // Anchor tag for parsing the document origin - originAnchor = document.createElement( "a" ); - -originAnchor.href = location.href; - -// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport -function addToPrefiltersOrTransports( structure ) { - - // dataTypeExpression is optional and defaults to "*" - return function( dataTypeExpression, func ) { - - if ( typeof dataTypeExpression !== "string" ) { - func = dataTypeExpression; - dataTypeExpression = "*"; - } - - var dataType, - i = 0, - dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; - - if ( isFunction( func ) ) { - - // For each dataType in the dataTypeExpression - while ( ( dataType = dataTypes[ i++ ] ) ) { - - // Prepend if requested - if ( dataType[ 0 ] === "+" ) { - dataType = dataType.slice( 1 ) || "*"; - ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); - - // Otherwise append - } else { - ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); - } - } - } - }; -} - -// Base inspection function for prefilters and transports -function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { - - var inspected = {}, - seekingTransport = ( structure === transports ); - - function inspect( dataType ) { - var selected; - inspected[ dataType ] = true; - jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { - var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); - if ( typeof dataTypeOrTransport === "string" && - !seekingTransport && !inspected[ dataTypeOrTransport ] ) { - - options.dataTypes.unshift( dataTypeOrTransport ); - inspect( dataTypeOrTransport ); - return false; - } else if ( seekingTransport ) { - return !( selected = dataTypeOrTransport ); - } - } ); - return selected; - } - - return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); -} - -// A special extend for ajax options -// that takes "flat" options (not to be deep extended) -// Fixes #9887 -function ajaxExtend( target, src ) { - var key, deep, - flatOptions = jQuery.ajaxSettings.flatOptions || {}; - - for ( key in src ) { - if ( src[ key ] !== undefined ) { - ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; - } - } - if ( deep ) { - jQuery.extend( true, target, deep ); - } - - return target; -} - -/* Handles responses to an ajax request: - * - finds the right dataType (mediates between content-type and expected dataType) - * - returns the corresponding response - */ -function ajaxHandleResponses( s, jqXHR, responses ) { - - var ct, type, finalDataType, firstDataType, - contents = s.contents, - dataTypes = s.dataTypes; - - // Remove auto dataType and get content-type in the process - while ( dataTypes[ 0 ] === "*" ) { - dataTypes.shift(); - if ( ct === undefined ) { - ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); - } - } - - // Check if we're dealing with a known content-type - if ( ct ) { - for ( type in contents ) { - if ( contents[ type ] && contents[ type ].test( ct ) ) { - dataTypes.unshift( type ); - break; - } - } - } - - // Check to see if we have a response for the expected dataType - if ( dataTypes[ 0 ] in responses ) { - finalDataType = dataTypes[ 0 ]; - } else { - - // Try convertible dataTypes - for ( type in responses ) { - if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { - finalDataType = type; - break; - } - if ( !firstDataType ) { - firstDataType = type; - } - } - - // Or just use first one - finalDataType = finalDataType || firstDataType; - } - - // If we found a dataType - // We add the dataType to the list if needed - // and return the corresponding response - if ( finalDataType ) { - if ( finalDataType !== dataTypes[ 0 ] ) { - dataTypes.unshift( finalDataType ); - } - return responses[ finalDataType ]; - } -} - -/* Chain conversions given the request and the original response - * Also sets the responseXXX fields on the jqXHR instance - */ -function ajaxConvert( s, response, jqXHR, isSuccess ) { - var conv2, current, conv, tmp, prev, - converters = {}, - - // Work with a copy of dataTypes in case we need to modify it for conversion - dataTypes = s.dataTypes.slice(); - - // Create converters map with lowercased keys - if ( dataTypes[ 1 ] ) { - for ( conv in s.converters ) { - converters[ conv.toLowerCase() ] = s.converters[ conv ]; - } - } - - current = dataTypes.shift(); - - // Convert to each sequential dataType - while ( current ) { - - if ( s.responseFields[ current ] ) { - jqXHR[ s.responseFields[ current ] ] = response; - } - - // Apply the dataFilter if provided - if ( !prev && isSuccess && s.dataFilter ) { - response = s.dataFilter( response, s.dataType ); - } - - prev = current; - current = dataTypes.shift(); - - if ( current ) { - - // There's only work to do if current dataType is non-auto - if ( current === "*" ) { - - current = prev; - - // Convert response if prev dataType is non-auto and differs from current - } else if ( prev !== "*" && prev !== current ) { - - // Seek a direct converter - conv = converters[ prev + " " + current ] || converters[ "* " + current ]; - - // If none found, seek a pair - if ( !conv ) { - for ( conv2 in converters ) { - - // If conv2 outputs current - tmp = conv2.split( " " ); - if ( tmp[ 1 ] === current ) { - - // If prev can be converted to accepted input - conv = converters[ prev + " " + tmp[ 0 ] ] || - converters[ "* " + tmp[ 0 ] ]; - if ( conv ) { - - // Condense equivalence converters - if ( conv === true ) { - conv = converters[ conv2 ]; - - // Otherwise, insert the intermediate dataType - } else if ( converters[ conv2 ] !== true ) { - current = tmp[ 0 ]; - dataTypes.unshift( tmp[ 1 ] ); - } - break; - } - } - } - } - - // Apply converter (if not an equivalence) - if ( conv !== true ) { - - // Unless errors are allowed to bubble, catch and return them - if ( conv && s.throws ) { - response = conv( response ); - } else { - try { - response = conv( response ); - } catch ( e ) { - return { - state: "parsererror", - error: conv ? e : "No conversion from " + prev + " to " + current - }; - } - } - } - } - } - } - - return { state: "success", data: response }; -} - -jQuery.extend( { - - // Counter for holding the number of active queries - active: 0, - - // Last-Modified header cache for next request - lastModified: {}, - etag: {}, - - ajaxSettings: { - url: location.href, - type: "GET", - isLocal: rlocalProtocol.test( location.protocol ), - global: true, - processData: true, - async: true, - contentType: "application/x-www-form-urlencoded; charset=UTF-8", - - /* - timeout: 0, - data: null, - dataType: null, - username: null, - password: null, - cache: null, - throws: false, - traditional: false, - headers: {}, - */ - - accepts: { - "*": allTypes, - text: "text/plain", - html: "text/html", - xml: "application/xml, text/xml", - json: "application/json, text/javascript" - }, - - contents: { - xml: /\bxml\b/, - html: /\bhtml/, - json: /\bjson\b/ - }, - - responseFields: { - xml: "responseXML", - text: "responseText", - json: "responseJSON" - }, - - // Data converters - // Keys separate source (or catchall "*") and destination types with a single space - converters: { - - // Convert anything to text - "* text": String, - - // Text to html (true = no transformation) - "text html": true, - - // Evaluate text as a json expression - "text json": JSON.parse, - - // Parse text as xml - "text xml": jQuery.parseXML - }, - - // For options that shouldn't be deep extended: - // you can add your own custom options here if - // and when you create one that shouldn't be - // deep extended (see ajaxExtend) - flatOptions: { - url: true, - context: true - } - }, - - // Creates a full fledged settings object into target - // with both ajaxSettings and settings fields. - // If target is omitted, writes into ajaxSettings. - ajaxSetup: function( target, settings ) { - return settings ? - - // Building a settings object - ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : - - // Extending ajaxSettings - ajaxExtend( jQuery.ajaxSettings, target ); - }, - - ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), - ajaxTransport: addToPrefiltersOrTransports( transports ), - - // Main method - ajax: function( url, options ) { - - // If url is an object, simulate pre-1.5 signature - if ( typeof url === "object" ) { - options = url; - url = undefined; - } - - // Force options to be an object - options = options || {}; - - var transport, - - // URL without anti-cache param - cacheURL, - - // Response headers - responseHeadersString, - responseHeaders, - - // timeout handle - timeoutTimer, - - // Url cleanup var - urlAnchor, - - // Request state (becomes false upon send and true upon completion) - completed, - - // To know if global events are to be dispatched - fireGlobals, - - // Loop variable - i, - - // uncached part of the url - uncached, - - // Create the final options object - s = jQuery.ajaxSetup( {}, options ), - - // Callbacks context - callbackContext = s.context || s, - - // Context for global events is callbackContext if it is a DOM node or jQuery collection - globalEventContext = s.context && - ( callbackContext.nodeType || callbackContext.jquery ) ? - jQuery( callbackContext ) : - jQuery.event, - - // Deferreds - deferred = jQuery.Deferred(), - completeDeferred = jQuery.Callbacks( "once memory" ), - - // Status-dependent callbacks - statusCode = s.statusCode || {}, - - // Headers (they are sent all at once) - requestHeaders = {}, - requestHeadersNames = {}, - - // Default abort message - strAbort = "canceled", - - // Fake xhr - jqXHR = { - readyState: 0, - - // Builds headers hashtable if needed - getResponseHeader: function( key ) { - var match; - if ( completed ) { - if ( !responseHeaders ) { - responseHeaders = {}; - while ( ( match = rheaders.exec( responseHeadersString ) ) ) { - responseHeaders[ match[ 1 ].toLowerCase() + " " ] = - ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) - .concat( match[ 2 ] ); - } - } - match = responseHeaders[ key.toLowerCase() + " " ]; - } - return match == null ? null : match.join( ", " ); - }, - - // Raw string - getAllResponseHeaders: function() { - return completed ? responseHeadersString : null; - }, - - // Caches the header - setRequestHeader: function( name, value ) { - if ( completed == null ) { - name = requestHeadersNames[ name.toLowerCase() ] = - requestHeadersNames[ name.toLowerCase() ] || name; - requestHeaders[ name ] = value; - } - return this; - }, - - // Overrides response content-type header - overrideMimeType: function( type ) { - if ( completed == null ) { - s.mimeType = type; - } - return this; - }, - - // Status-dependent callbacks - statusCode: function( map ) { - var code; - if ( map ) { - if ( completed ) { - - // Execute the appropriate callbacks - jqXHR.always( map[ jqXHR.status ] ); - } else { - - // Lazy-add the new callbacks in a way that preserves old ones - for ( code in map ) { - statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; - } - } - } - return this; - }, - - // Cancel the request - abort: function( statusText ) { - var finalText = statusText || strAbort; - if ( transport ) { - transport.abort( finalText ); - } - done( 0, finalText ); - return this; - } - }; - - // Attach deferreds - deferred.promise( jqXHR ); - - // Add protocol if not provided (prefilters might expect it) - // Handle falsy url in the settings object (#10093: consistency with old signature) - // We also use the url parameter if available - s.url = ( ( url || s.url || location.href ) + "" ) - .replace( rprotocol, location.protocol + "//" ); - - // Alias method option to type as per ticket #12004 - s.type = options.method || options.type || s.method || s.type; - - // Extract dataTypes list - s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; - - // A cross-domain request is in order when the origin doesn't match the current origin. - if ( s.crossDomain == null ) { - urlAnchor = document.createElement( "a" ); - - // Support: IE <=8 - 11, Edge 12 - 15 - // IE throws exception on accessing the href property if url is malformed, - // e.g. http://example.com:80x/ - try { - urlAnchor.href = s.url; - - // Support: IE <=8 - 11 only - // Anchor's host property isn't correctly set when s.url is relative - urlAnchor.href = urlAnchor.href; - s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== - urlAnchor.protocol + "//" + urlAnchor.host; - } catch ( e ) { - - // If there is an error parsing the URL, assume it is crossDomain, - // it can be rejected by the transport if it is invalid - s.crossDomain = true; - } - } - - // Convert data if not already a string - if ( s.data && s.processData && typeof s.data !== "string" ) { - s.data = jQuery.param( s.data, s.traditional ); - } - - // Apply prefilters - inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); - - // If request was aborted inside a prefilter, stop there - if ( completed ) { - return jqXHR; - } - - // We can fire global events as of now if asked to - // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) - fireGlobals = jQuery.event && s.global; - - // Watch for a new set of requests - if ( fireGlobals && jQuery.active++ === 0 ) { - jQuery.event.trigger( "ajaxStart" ); - } - - // Uppercase the type - s.type = s.type.toUpperCase(); - - // Determine if request has content - s.hasContent = !rnoContent.test( s.type ); - - // Save the URL in case we're toying with the If-Modified-Since - // and/or If-None-Match header later on - // Remove hash to simplify url manipulation - cacheURL = s.url.replace( rhash, "" ); - - // More options handling for requests with no content - if ( !s.hasContent ) { - - // Remember the hash so we can put it back - uncached = s.url.slice( cacheURL.length ); - - // If data is available and should be processed, append data to url - if ( s.data && ( s.processData || typeof s.data === "string" ) ) { - cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; - - // #9682: remove data so that it's not used in an eventual retry - delete s.data; - } - - // Add or update anti-cache param if needed - if ( s.cache === false ) { - cacheURL = cacheURL.replace( rantiCache, "$1" ); - uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + - uncached; - } - - // Put hash and anti-cache on the URL that will be requested (gh-1732) - s.url = cacheURL + uncached; - - // Change '%20' to '+' if this is encoded form body content (gh-2658) - } else if ( s.data && s.processData && - ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { - s.data = s.data.replace( r20, "+" ); - } - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - if ( jQuery.lastModified[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); - } - if ( jQuery.etag[ cacheURL ] ) { - jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); - } - } - - // Set the correct header, if data is being sent - if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { - jqXHR.setRequestHeader( "Content-Type", s.contentType ); - } - - // Set the Accepts header for the server, depending on the dataType - jqXHR.setRequestHeader( - "Accept", - s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? - s.accepts[ s.dataTypes[ 0 ] ] + - ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : - s.accepts[ "*" ] - ); - - // Check for headers option - for ( i in s.headers ) { - jqXHR.setRequestHeader( i, s.headers[ i ] ); - } - - // Allow custom headers/mimetypes and early abort - if ( s.beforeSend && - ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { - - // Abort if not done already and return - return jqXHR.abort(); - } - - // Aborting is no longer a cancellation - strAbort = "abort"; - - // Install callbacks on deferreds - completeDeferred.add( s.complete ); - jqXHR.done( s.success ); - jqXHR.fail( s.error ); - - // Get transport - transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); - - // If no transport, we auto-abort - if ( !transport ) { - done( -1, "No Transport" ); - } else { - jqXHR.readyState = 1; - - // Send global event - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); - } - - // If request was aborted inside ajaxSend, stop there - if ( completed ) { - return jqXHR; - } - - // Timeout - if ( s.async && s.timeout > 0 ) { - timeoutTimer = window.setTimeout( function() { - jqXHR.abort( "timeout" ); - }, s.timeout ); - } - - try { - completed = false; - transport.send( requestHeaders, done ); - } catch ( e ) { - - // Rethrow post-completion exceptions - if ( completed ) { - throw e; - } - - // Propagate others as results - done( -1, e ); - } - } - - // Callback for when everything is done - function done( status, nativeStatusText, responses, headers ) { - var isSuccess, success, error, response, modified, - statusText = nativeStatusText; - - // Ignore repeat invocations - if ( completed ) { - return; - } - - completed = true; - - // Clear timeout if it exists - if ( timeoutTimer ) { - window.clearTimeout( timeoutTimer ); - } - - // Dereference transport for early garbage collection - // (no matter how long the jqXHR object will be used) - transport = undefined; - - // Cache response headers - responseHeadersString = headers || ""; - - // Set readyState - jqXHR.readyState = status > 0 ? 4 : 0; - - // Determine if successful - isSuccess = status >= 200 && status < 300 || status === 304; - - // Get response data - if ( responses ) { - response = ajaxHandleResponses( s, jqXHR, responses ); - } - - // Use a noop converter for missing script but not if jsonp - if ( !isSuccess && - jQuery.inArray( "script", s.dataTypes ) > -1 && - jQuery.inArray( "json", s.dataTypes ) < 0 ) { - s.converters[ "text script" ] = function() {}; - } - - // Convert no matter what (that way responseXXX fields are always set) - response = ajaxConvert( s, response, jqXHR, isSuccess ); - - // If successful, handle type chaining - if ( isSuccess ) { - - // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. - if ( s.ifModified ) { - modified = jqXHR.getResponseHeader( "Last-Modified" ); - if ( modified ) { - jQuery.lastModified[ cacheURL ] = modified; - } - modified = jqXHR.getResponseHeader( "etag" ); - if ( modified ) { - jQuery.etag[ cacheURL ] = modified; - } - } - - // if no content - if ( status === 204 || s.type === "HEAD" ) { - statusText = "nocontent"; - - // if not modified - } else if ( status === 304 ) { - statusText = "notmodified"; - - // If we have data, let's convert it - } else { - statusText = response.state; - success = response.data; - error = response.error; - isSuccess = !error; - } - } else { - - // Extract error from statusText and normalize for non-aborts - error = statusText; - if ( status || !statusText ) { - statusText = "error"; - if ( status < 0 ) { - status = 0; - } - } - } - - // Set data for the fake xhr object - jqXHR.status = status; - jqXHR.statusText = ( nativeStatusText || statusText ) + ""; - - // Success/Error - if ( isSuccess ) { - deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); - } else { - deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); - } - - // Status-dependent callbacks - jqXHR.statusCode( statusCode ); - statusCode = undefined; - - if ( fireGlobals ) { - globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", - [ jqXHR, s, isSuccess ? success : error ] ); - } - - // Complete - completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); - - if ( fireGlobals ) { - globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); - - // Handle the global AJAX counter - if ( !( --jQuery.active ) ) { - jQuery.event.trigger( "ajaxStop" ); - } - } - } - - return jqXHR; - }, - - getJSON: function( url, data, callback ) { - return jQuery.get( url, data, callback, "json" ); - }, - - getScript: function( url, callback ) { - return jQuery.get( url, undefined, callback, "script" ); - } -} ); - -jQuery.each( [ "get", "post" ], function( _i, method ) { - jQuery[ method ] = function( url, data, callback, type ) { - - // Shift arguments if data argument was omitted - if ( isFunction( data ) ) { - type = type || callback; - callback = data; - data = undefined; - } - - // The url can be an options object (which then must have .url) - return jQuery.ajax( jQuery.extend( { - url: url, - type: method, - dataType: type, - data: data, - success: callback - }, jQuery.isPlainObject( url ) && url ) ); - }; -} ); - -jQuery.ajaxPrefilter( function( s ) { - var i; - for ( i in s.headers ) { - if ( i.toLowerCase() === "content-type" ) { - s.contentType = s.headers[ i ] || ""; - } - } -} ); - - -jQuery._evalUrl = function( url, options, doc ) { - return jQuery.ajax( { - url: url, - - // Make this explicit, since user can override this through ajaxSetup (#11264) - type: "GET", - dataType: "script", - cache: true, - async: false, - global: false, - - // Only evaluate the response if it is successful (gh-4126) - // dataFilter is not invoked for failure responses, so using it instead - // of the default converter is kludgy but it works. - converters: { - "text script": function() {} - }, - dataFilter: function( response ) { - jQuery.globalEval( response, options, doc ); - } - } ); -}; - - -jQuery.fn.extend( { - wrapAll: function( html ) { - var wrap; - - if ( this[ 0 ] ) { - if ( isFunction( html ) ) { - html = html.call( this[ 0 ] ); - } - - // The elements to wrap the target around - wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); - - if ( this[ 0 ].parentNode ) { - wrap.insertBefore( this[ 0 ] ); - } - - wrap.map( function() { - var elem = this; - - while ( elem.firstElementChild ) { - elem = elem.firstElementChild; - } - - return elem; - } ).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( isFunction( html ) ) { - return this.each( function( i ) { - jQuery( this ).wrapInner( html.call( this, i ) ); - } ); - } - - return this.each( function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - } ); - }, - - wrap: function( html ) { - var htmlIsFunction = isFunction( html ); - - return this.each( function( i ) { - jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); - } ); - }, - - unwrap: function( selector ) { - this.parent( selector ).not( "body" ).each( function() { - jQuery( this ).replaceWith( this.childNodes ); - } ); - return this; - } -} ); - - -jQuery.expr.pseudos.hidden = function( elem ) { - return !jQuery.expr.pseudos.visible( elem ); -}; -jQuery.expr.pseudos.visible = function( elem ) { - return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); -}; - - - - -jQuery.ajaxSettings.xhr = function() { - try { - return new window.XMLHttpRequest(); - } catch ( e ) {} -}; - -var xhrSuccessStatus = { - - // File protocol always yields status code 0, assume 200 - 0: 200, - - // Support: IE <=9 only - // #1450: sometimes IE returns 1223 when it should be 204 - 1223: 204 - }, - xhrSupported = jQuery.ajaxSettings.xhr(); - -support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); -support.ajax = xhrSupported = !!xhrSupported; - -jQuery.ajaxTransport( function( options ) { - var callback, errorCallback; - - // Cross domain only allowed if supported through XMLHttpRequest - if ( support.cors || xhrSupported && !options.crossDomain ) { - return { - send: function( headers, complete ) { - var i, - xhr = options.xhr(); - - xhr.open( - options.type, - options.url, - options.async, - options.username, - options.password - ); - - // Apply custom fields if provided - if ( options.xhrFields ) { - for ( i in options.xhrFields ) { - xhr[ i ] = options.xhrFields[ i ]; - } - } - - // Override mime type if needed - if ( options.mimeType && xhr.overrideMimeType ) { - xhr.overrideMimeType( options.mimeType ); - } - - // X-Requested-With header - // For cross-domain requests, seeing as conditions for a preflight are - // akin to a jigsaw puzzle, we simply never set it to be sure. - // (it can always be set on a per-request basis or even using ajaxSetup) - // For same-domain requests, won't change header if already provided. - if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { - headers[ "X-Requested-With" ] = "XMLHttpRequest"; - } - - // Set headers - for ( i in headers ) { - xhr.setRequestHeader( i, headers[ i ] ); - } - - // Callback - callback = function( type ) { - return function() { - if ( callback ) { - callback = errorCallback = xhr.onload = - xhr.onerror = xhr.onabort = xhr.ontimeout = - xhr.onreadystatechange = null; - - if ( type === "abort" ) { - xhr.abort(); - } else if ( type === "error" ) { - - // Support: IE <=9 only - // On a manual native abort, IE9 throws - // errors on any property access that is not readyState - if ( typeof xhr.status !== "number" ) { - complete( 0, "error" ); - } else { - complete( - - // File: protocol always yields status 0; see #8605, #14207 - xhr.status, - xhr.statusText - ); - } - } else { - complete( - xhrSuccessStatus[ xhr.status ] || xhr.status, - xhr.statusText, - - // Support: IE <=9 only - // IE9 has no XHR2 but throws on binary (trac-11426) - // For XHR2 non-text, let the caller handle it (gh-2498) - ( xhr.responseType || "text" ) !== "text" || - typeof xhr.responseText !== "string" ? - { binary: xhr.response } : - { text: xhr.responseText }, - xhr.getAllResponseHeaders() - ); - } - } - }; - }; - - // Listen to events - xhr.onload = callback(); - errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); - - // Support: IE 9 only - // Use onreadystatechange to replace onabort - // to handle uncaught aborts - if ( xhr.onabort !== undefined ) { - xhr.onabort = errorCallback; - } else { - xhr.onreadystatechange = function() { - - // Check readyState before timeout as it changes - if ( xhr.readyState === 4 ) { - - // Allow onerror to be called first, - // but that will not handle a native abort - // Also, save errorCallback to a variable - // as xhr.onerror cannot be accessed - window.setTimeout( function() { - if ( callback ) { - errorCallback(); - } - } ); - } - }; - } - - // Create the abort callback - callback = callback( "abort" ); - - try { - - // Do send the request (this may raise an exception) - xhr.send( options.hasContent && options.data || null ); - } catch ( e ) { - - // #14683: Only rethrow if this hasn't been notified as an error yet - if ( callback ) { - throw e; - } - } - }, - - abort: function() { - if ( callback ) { - callback(); - } - } - }; - } -} ); - - - - -// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) -jQuery.ajaxPrefilter( function( s ) { - if ( s.crossDomain ) { - s.contents.script = false; - } -} ); - -// Install script dataType -jQuery.ajaxSetup( { - accepts: { - script: "text/javascript, application/javascript, " + - "application/ecmascript, application/x-ecmascript" - }, - contents: { - script: /\b(?:java|ecma)script\b/ - }, - converters: { - "text script": function( text ) { - jQuery.globalEval( text ); - return text; - } - } -} ); - -// Handle cache's special case and crossDomain -jQuery.ajaxPrefilter( "script", function( s ) { - if ( s.cache === undefined ) { - s.cache = false; - } - if ( s.crossDomain ) { - s.type = "GET"; - } -} ); - -// Bind script tag hack transport -jQuery.ajaxTransport( "script", function( s ) { - - // This transport only deals with cross domain or forced-by-attrs requests - if ( s.crossDomain || s.scriptAttrs ) { - var script, callback; - return { - send: function( _, complete ) { - script = jQuery( " - - - - - Contents - - - - - - Menu - - - - - - - - Expand - - - - - - Light mode - - - - - - - - - - - - - - Dark mode - - - - - - - Auto light/dark mode - - - - - - - - - - - - - - - - - - - -
-
-
- -
- -
-
- -
- -
-
- -
-
-
- - - - - Back to top - -
- -
- -
- -
-
-
-

CUDA Python API Reference#

-
-

CaptionHolder:

- -
-
- -
-
- -
- -
-
- - - - - - - \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/.buildinfo b/docs/cuda-bindings/12.6.1/.buildinfo new file mode 100644 index 000000000..680ba2e66 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. +config: f0b78aa0082896fe129b6bdf124b79dc +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/cuda-bindings/12.6.1/.doctrees/api.doctree b/docs/cuda-bindings/12.6.1/.doctrees/api.doctree new file mode 100644 index 000000000..550847c88 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/api.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/environment.pickle b/docs/cuda-bindings/12.6.1/.doctrees/environment.pickle new file mode 100644 index 000000000..982543b34 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/environment.pickle differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/index.doctree b/docs/cuda-bindings/12.6.1/.doctrees/index.doctree new file mode 100644 index 000000000..780abf6ea Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/index.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/install.doctree b/docs/cuda-bindings/12.6.1/.doctrees/install.doctree new file mode 100644 index 000000000..6e306570c Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/install.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/module/driver.doctree b/docs/cuda-bindings/12.6.1/.doctrees/module/driver.doctree new file mode 100644 index 000000000..14224762a Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/module/driver.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/module/nvrtc.doctree b/docs/cuda-bindings/12.6.1/.doctrees/module/nvrtc.doctree new file mode 100644 index 000000000..5154f5e3a Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/module/nvrtc.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/module/runtime.doctree b/docs/cuda-bindings/12.6.1/.doctrees/module/runtime.doctree new file mode 100644 index 000000000..a7836d817 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/module/runtime.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/motivation.doctree b/docs/cuda-bindings/12.6.1/.doctrees/motivation.doctree new file mode 100644 index 000000000..60b21b5bd Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/motivation.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/overview.doctree b/docs/cuda-bindings/12.6.1/.doctrees/overview.doctree new file mode 100644 index 000000000..b6bef45e0 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/overview.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release.doctree new file mode 100644 index 000000000..f5d0e20bf Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.4.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.4.0-notes.doctree new file mode 100644 index 000000000..24331326e Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.4.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.5.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.5.0-notes.doctree new file mode 100644 index 000000000..4d77131cb Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.5.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.6.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.6.0-notes.doctree new file mode 100644 index 000000000..4177480f9 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.6.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.6.1-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.6.1-notes.doctree new file mode 100644 index 000000000..4b83c56df Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.6.1-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.7.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.7.0-notes.doctree new file mode 100644 index 000000000..91b6bbd59 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.7.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.7.1-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.7.1-notes.doctree new file mode 100644 index 000000000..74080ead1 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.7.1-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.0-notes.doctree new file mode 100644 index 000000000..435ee6604 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.1-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.1-notes.doctree new file mode 100644 index 000000000..a0ef8f302 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.1-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.2-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.2-notes.doctree new file mode 100644 index 000000000..5883b718a Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.2-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.3-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.3-notes.doctree new file mode 100644 index 000000000..4ee821e36 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.3-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.4-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.4-notes.doctree new file mode 100644 index 000000000..dcd4d7362 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.4-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.5-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.5-notes.doctree new file mode 100644 index 000000000..650ce849a Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/11.8.5-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.0.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.0.0-notes.doctree new file mode 100644 index 000000000..580116f00 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.0.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.1.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.1.0-notes.doctree new file mode 100644 index 000000000..11d0d61ad Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.1.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.2.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.2.0-notes.doctree new file mode 100644 index 000000000..e5336dd34 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.2.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.2.1-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.2.1-notes.doctree new file mode 100644 index 000000000..622319d1c Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.2.1-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.3.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.3.0-notes.doctree new file mode 100644 index 000000000..2b9bd591f Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.3.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.4.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.4.0-notes.doctree new file mode 100644 index 000000000..fe5cb2471 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.4.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.5.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.5.0-notes.doctree new file mode 100644 index 000000000..c8f7cc9dd Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.5.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.0-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.0-notes.doctree new file mode 100644 index 000000000..5997dad7e Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.0-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.1-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.1-notes.doctree new file mode 100644 index 000000000..19dacd2c6 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.1-notes.doctree differ diff --git a/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.2-notes.doctree b/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.2-notes.doctree new file mode 100644 index 000000000..d274ec61a Binary files /dev/null and b/docs/cuda-bindings/12.6.1/.doctrees/release/12.6.2-notes.doctree differ diff --git a/docs/_images/Nsigth-Compute-CLI-625x473.png b/docs/cuda-bindings/12.6.1/_images/Nsigth-Compute-CLI-625x473.png similarity index 100% rename from docs/_images/Nsigth-Compute-CLI-625x473.png rename to docs/cuda-bindings/12.6.1/_images/Nsigth-Compute-CLI-625x473.png diff --git a/docs/_sources/api.rst.txt b/docs/cuda-bindings/12.6.1/_sources/api.rst.txt similarity index 100% rename from docs/_sources/api.rst.txt rename to docs/cuda-bindings/12.6.1/_sources/api.rst.txt diff --git a/docs/cuda-bindings/12.6.1/_sources/index.rst.txt b/docs/cuda-bindings/12.6.1/_sources/index.rst.txt new file mode 100644 index 000000000..b5bcdd0da --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_sources/index.rst.txt @@ -0,0 +1,20 @@ +``cuda.bindings``: Low-level Python Bindings for CUDA +===================================================== + +.. toctree:: + :maxdepth: 2 + :caption: Contents: + + install.md + overview.md + motivation.md + release.md + api.rst + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/_sources/install.md.txt b/docs/cuda-bindings/12.6.1/_sources/install.md.txt similarity index 100% rename from docs/_sources/install.md.txt rename to docs/cuda-bindings/12.6.1/_sources/install.md.txt diff --git a/docs/_sources/module/driver.rst.txt b/docs/cuda-bindings/12.6.1/_sources/module/driver.rst.txt similarity index 99% rename from docs/_sources/module/driver.rst.txt rename to docs/cuda-bindings/12.6.1/_sources/module/driver.rst.txt index 694c81c78..c70f742dc 100644 --- a/docs/_sources/module/driver.rst.txt +++ b/docs/cuda-bindings/12.6.1/_sources/module/driver.rst.txt @@ -5487,7 +5487,6 @@ Data types used by CUDA driver .. autoclass:: cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_v1 .. autoclass:: cuda.bindings.driver.CUDA_HOST_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_v2 -.. autoclass:: cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS .. autoclass:: cuda.bindings.driver.CUgraphEdgeData .. autoclass:: cuda.bindings.driver.CUDA_GRAPH_INSTANTIATE_PARAMS .. autoclass:: cuda.bindings.driver.CUlaunchMemSyncDomainMap @@ -5586,10 +5585,6 @@ Data types used by CUDA driver CUDA API version number -.. autoattribute:: cuda.bindings.driver.CU_UUID_HAS_BEEN_DEFINED - - CUDA UUID types - .. autoattribute:: cuda.bindings.driver.CU_IPC_HANDLE_SIZE CUDA IPC handle size @@ -5619,7 +5614,6 @@ Data types used by CUDA driver See details of the \link_sync_behavior .. autoattribute:: cuda.bindings.driver.CU_COMPUTE_ACCELERATED_TARGET_BASE -.. autoattribute:: cuda.bindings.driver.CUDA_CB .. autoattribute:: cuda.bindings.driver.CU_GRAPH_COND_ASSIGN_DEFAULT Conditional node handle flags Default value is applied when graph is launched. @@ -6708,8 +6702,6 @@ Even if the green contexts have disjoint SM partitions, it is not guaranteed tha Streaming multiprocessors related information .. autoclass:: cuda.bindings.driver.CUdevResourceDesc -.. autoclass:: cuda.bindings.driver.CUdevSmResource -.. autofunction:: cuda.bindings.driver._CONCAT_OUTER .. autofunction:: cuda.bindings.driver.cuGreenCtxCreate .. autofunction:: cuda.bindings.driver.cuGreenCtxDestroy .. autofunction:: cuda.bindings.driver.cuCtxFromGreenCtx @@ -6724,8 +6716,6 @@ Even if the green contexts have disjoint SM partitions, it is not guaranteed tha .. autofunction:: cuda.bindings.driver.cuGreenCtxStreamCreate .. autoattribute:: cuda.bindings.driver.RESOURCE_ABI_VERSION .. autoattribute:: cuda.bindings.driver.RESOURCE_ABI_EXTERNAL_BYTES -.. autoattribute:: cuda.bindings.driver._CONCAT_INNER -.. autoattribute:: cuda.bindings.driver._CONCAT_OUTER EGL Interoperability -------------------- diff --git a/docs/_sources/module/nvrtc.rst.txt b/docs/cuda-bindings/12.6.1/_sources/module/nvrtc.rst.txt similarity index 100% rename from docs/_sources/module/nvrtc.rst.txt rename to docs/cuda-bindings/12.6.1/_sources/module/nvrtc.rst.txt diff --git a/docs/_sources/module/runtime.rst.txt b/docs/cuda-bindings/12.6.1/_sources/module/runtime.rst.txt similarity index 99% rename from docs/_sources/module/runtime.rst.txt rename to docs/cuda-bindings/12.6.1/_sources/module/runtime.rst.txt index 55687b683..3eaeb695a 100644 --- a/docs/_sources/module/runtime.rst.txt +++ b/docs/cuda-bindings/12.6.1/_sources/module/runtime.rst.txt @@ -4964,7 +4964,6 @@ Data types used by CUDA Runtime .. autoclass:: cuda.bindings.runtime.cudaGraphExecUpdateResultInfo .. autoclass:: cuda.bindings.runtime.cudaGraphDeviceNode_t .. autoclass:: cuda.bindings.runtime.cudaLaunchMemSyncDomainMap -.. autoclass:: cuda.bindings.runtime.cudaLaunchAttributeValue .. autoclass:: cuda.bindings.runtime.cudaLaunchAttribute .. autoclass:: cuda.bindings.runtime.cudaAsyncCallbackHandle_t .. autoclass:: cuda.bindings.runtime.cudaAsyncNotificationInfo_t @@ -5199,11 +5198,6 @@ Data types used by CUDA Runtime Indicates that the layered sparse CUDA array or CUDA mipmapped array has a single mip tail region for all layers -.. autoattribute:: cuda.bindings.runtime.CUDART_CB -.. autoattribute:: cuda.bindings.runtime.CU_UUID_HAS_BEEN_DEFINED - - CUDA UUID types - .. autoattribute:: cuda.bindings.runtime.CUDA_IPC_HANDLE_SIZE CUDA IPC Handle Size diff --git a/docs/_sources/motivation.md.txt b/docs/cuda-bindings/12.6.1/_sources/motivation.md.txt similarity index 100% rename from docs/_sources/motivation.md.txt rename to docs/cuda-bindings/12.6.1/_sources/motivation.md.txt diff --git a/docs/_sources/overview.md.txt b/docs/cuda-bindings/12.6.1/_sources/overview.md.txt similarity index 100% rename from docs/_sources/overview.md.txt rename to docs/cuda-bindings/12.6.1/_sources/overview.md.txt diff --git a/docs/_sources/release.md.txt b/docs/cuda-bindings/12.6.1/_sources/release.md.txt similarity index 91% rename from docs/_sources/release.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release.md.txt index c3ae5a30a..69f361a25 100644 --- a/docs/_sources/release.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release.md.txt @@ -5,6 +5,7 @@ maxdepth: 3 --- + 12.6.2 12.6.1 12.6.0 12.5.0 @@ -14,6 +15,7 @@ maxdepth: 3 12.2.0 12.1.0 12.0.0 + 11.8.5 11.8.4 11.8.3 11.8.2 diff --git a/docs/_sources/release/11.4.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.4.0-notes.md.txt similarity index 98% rename from docs/_sources/release/11.4.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.4.0-notes.md.txt index f76116889..9eaa4eff0 100644 --- a/docs/_sources/release/11.4.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.4.0-notes.md.txt @@ -2,7 +2,7 @@ Released on August 16, 2021 -## Hightlights +## Highlights - Initial EA release for CUDA Python - Supports all platforms that CUDA is supported - Supports all CUDA 11.x releases diff --git a/docs/_sources/release/11.5.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.5.0-notes.md.txt similarity index 99% rename from docs/_sources/release/11.5.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.5.0-notes.md.txt index a7f8fddca..130cb17d0 100644 --- a/docs/_sources/release/11.5.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.5.0-notes.md.txt @@ -2,7 +2,7 @@ Released on October 18, 2021 -## Hightlights +## Highlights - PyPi support - Conda support - GA release for CUDA Python diff --git a/docs/_sources/release/11.6.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.6.0-notes.md.txt similarity index 99% rename from docs/_sources/release/11.6.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.6.0-notes.md.txt index 60a9d9205..664da1624 100644 --- a/docs/_sources/release/11.6.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.6.0-notes.md.txt @@ -2,7 +2,7 @@ Released on Januray 12, 2022 -## Hightlights +## Highlights - Support CUDA Toolkit 11.6 - Support Profiler APIs - Support Graphic APIs (EGL, GL, VDPAU) diff --git a/docs/_sources/release/11.6.1-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.6.1-notes.md.txt similarity index 98% rename from docs/_sources/release/11.6.1-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.6.1-notes.md.txt index bc2ba3293..ddd6ff510 100644 --- a/docs/_sources/release/11.6.1-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.6.1-notes.md.txt @@ -2,7 +2,7 @@ Released on March 18, 2022 -## Hightlights +## Highlights - Fix string decomposition for WSL library load ## Limitations diff --git a/docs/_sources/release/11.7.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.7.0-notes.md.txt similarity index 98% rename from docs/_sources/release/11.7.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.7.0-notes.md.txt index 91ab215e0..22500c7a2 100644 --- a/docs/_sources/release/11.7.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.7.0-notes.md.txt @@ -2,7 +2,7 @@ Released on May 11, 2022 -## Hightlights +## Highlights - Support CUDA Toolkit 11.7 ## Limitations diff --git a/docs/_sources/release/11.7.1-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.7.1-notes.md.txt similarity index 99% rename from docs/_sources/release/11.7.1-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.7.1-notes.md.txt index 8d07b19df..2997c9da5 100644 --- a/docs/_sources/release/11.7.1-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.7.1-notes.md.txt @@ -2,7 +2,7 @@ Released on June 29, 2022 -## Hightlights +## Highlights - Fix error propagation in CUDA Runtime bindings - Resolves [issue #22](https://github.com/NVIDIA/cuda-python/issues/22) diff --git a/docs/_sources/release/11.8.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.8.0-notes.md.txt similarity index 98% rename from docs/_sources/release/11.8.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.8.0-notes.md.txt index f860e5fb6..c5bf9f71c 100644 --- a/docs/_sources/release/11.8.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.8.0-notes.md.txt @@ -2,7 +2,7 @@ Released on October 3, 2022 -## Hightlights +## Highlights - Support CUDA Toolkit 11.8 - Source builds allow for missing types and APIs - Resolves source builds for mobile platforms diff --git a/docs/_sources/release/11.8.1-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.8.1-notes.md.txt similarity index 98% rename from docs/_sources/release/11.8.1-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.8.1-notes.md.txt index 94565355c..f7c2e7d45 100644 --- a/docs/_sources/release/11.8.1-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.8.1-notes.md.txt @@ -2,7 +2,7 @@ Released on November 4, 2022 -## Hightlights +## Highlights - Resolves [issue #27](https://github.com/NVIDIA/cuda-python/issues/27) - Update install instructions to use latest CTK diff --git a/docs/_sources/release/11.8.2-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.8.2-notes.md.txt similarity index 98% rename from docs/_sources/release/11.8.2-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.8.2-notes.md.txt index 84d781b5f..f9d165565 100644 --- a/docs/_sources/release/11.8.2-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.8.2-notes.md.txt @@ -2,7 +2,7 @@ Released on May 18, 2023 -## Hightlights +## Highlights - Open libcuda.so.1 instead of libcuda.so ## Limitations diff --git a/docs/_sources/release/11.8.3-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.8.3-notes.md.txt similarity index 98% rename from docs/_sources/release/11.8.3-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/11.8.3-notes.md.txt index 91bbc4914..a8ff840c1 100644 --- a/docs/_sources/release/11.8.3-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.8.3-notes.md.txt @@ -2,7 +2,7 @@ Released on October 23, 2023 -## Hightlights +## Highlights - Compatability with Cython 3 - New API cudart.getLocalRuntimeVersion() - Modernize build config diff --git a/docs/cuda-bindings/12.6.1/_sources/release/11.8.4-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.8.4-notes.md.txt new file mode 100644 index 000000000..13767998f --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.8.4-notes.md.txt @@ -0,0 +1,54 @@ +# CUDA Python 11.8.4 Release notes + +Released on October 7, 2024 + +## Highlights +- Resolve [Issue #89](https://github.com/NVIDIA/cuda-python/issues/89): Fix getLocalRuntimeVersion searching for wrong libcudart version +- Resolve [Issue #90](https://github.com/NVIDIA/cuda-python/issues/90): Use new layout in preperation for cuda-python becoming a metapackage + +## CUDA namespace cleanup with a new module layout + +[Issue #75](https://github.com/NVIDIA/cuda-python/issues/75) explains in detail what the new module layout is, what problem it fixes and how it impacts the users. However for the sake of completeness, this release notes will highlight key points of this change. + +Before this change, `cuda-python` was tightly coupled to CUDA Toolkit releases and all new features would inherit this coupling regardless of their applicability. As we develop new features, this coupling was becoming overly restrictive and motivated a new solution: Convert `cuda-python` into a metapackage where we use `cuda` as a namespace with existing bindings code moved to a `cuda_bindings` subpackage. + +This patch release applies the new module layout for the bindings as follows: +- `cuda.cuda` -> `cuda.bindings.driver` +- `cuda.ccuda` -> `cuda.bindings.cydriver` +- `cuda.cudart` -> `cuda.bindings.runtime` +- `cuda.ccudart` -> `cuda.bindings.cyruntime` +- `cuda.nvrtc` -> `cuda.bindings.nvrtc` +- `cuda.cnvrtc` -> `cuda.bindings.cynvrtc` + +Deprecation warnings are turned on as a notice to switch to the new module layout. + +```{note} This is non-breaking, backwards compatible change. All old module path will continue work as they "forward" user calls towards the new layout. +``` + +## Limitations + +### Know issues +- [Issue #215](https://github.com/NVIDIA/cuda-python/issues/215) + +### CUDA Functions Not Supported in this Release + +- Symbol APIs + - cudaGraphExecMemcpyNodeSetParamsFromSymbol + - cudaGraphExecMemcpyNodeSetParamsToSymbol + - cudaGraphAddMemcpyNodeToSymbol + - cudaGraphAddMemcpyNodeFromSymbol + - cudaGraphMemcpyNodeSetParamsToSymbol + - cudaGraphMemcpyNodeSetParamsFromSymbol + - cudaMemcpyToSymbol + - cudaMemcpyFromSymbol + - cudaMemcpyToSymbolAsync + - cudaMemcpyFromSymbolAsync + - cudaGetSymbolAddress + - cudaGetSymbolSize + - cudaGetFuncBySymbol +- Launch Options + - cudaLaunchKernel + - cudaLaunchCooperativeKernel + - cudaLaunchCooperativeKernelMultiDevice +- cudaSetValidDevices +- cudaVDPAUSetVDPAUDevice diff --git a/docs/cuda-bindings/12.6.1/_sources/release/11.8.5-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/11.8.5-notes.md.txt new file mode 100644 index 000000000..446164593 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_sources/release/11.8.5-notes.md.txt @@ -0,0 +1,31 @@ +# CUDA Python 11.8.5 Release notes + +Released on November 5, 2024 + +## Highlights +- Resolve [Issue #215](https://github.com/NVIDIA/cuda-python/issues/215): module 'cuda.ccudart' has no attribute '__pyx_capi__' + +## Limitations + +### CUDA Functions Not Supported in this Release + +- Symbol APIs + - cudaGraphExecMemcpyNodeSetParamsFromSymbol + - cudaGraphExecMemcpyNodeSetParamsToSymbol + - cudaGraphAddMemcpyNodeToSymbol + - cudaGraphAddMemcpyNodeFromSymbol + - cudaGraphMemcpyNodeSetParamsToSymbol + - cudaGraphMemcpyNodeSetParamsFromSymbol + - cudaMemcpyToSymbol + - cudaMemcpyFromSymbol + - cudaMemcpyToSymbolAsync + - cudaMemcpyFromSymbolAsync + - cudaGetSymbolAddress + - cudaGetSymbolSize + - cudaGetFuncBySymbol +- Launch Options + - cudaLaunchKernel + - cudaLaunchCooperativeKernel + - cudaLaunchCooperativeKernelMultiDevice +- cudaSetValidDevices +- cudaVDPAUSetVDPAUDevice diff --git a/docs/_sources/release/12.0.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.0.0-notes.md.txt similarity index 98% rename from docs/_sources/release/12.0.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.0.0-notes.md.txt index df1bf1f90..9f2ae2587 100644 --- a/docs/_sources/release/12.0.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.0.0-notes.md.txt @@ -2,7 +2,7 @@ Released on December 8, 2022 -## Hightlights +## Highlights - Rebase to CUDA Toolkit 12.0 - Fix example from [MR28](https://github.com/NVIDIA/cuda-python/pull/28) - Apply [MR35](https://github.com/NVIDIA/cuda-python/pull/35) diff --git a/docs/_sources/release/12.1.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.1.0-notes.md.txt similarity index 98% rename from docs/_sources/release/12.1.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.1.0-notes.md.txt index aec56999e..94310bb51 100644 --- a/docs/_sources/release/12.1.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.1.0-notes.md.txt @@ -2,7 +2,7 @@ Released on February 28, 2023 -## Hightlights +## Highlights - Rebase to CUDA Toolkit 12.1 - Resolve [Issue #41](https://github.com/NVIDIA/cuda-python/issues/41): Add support for Python 3.11 - Resolve [Issue #42](https://github.com/NVIDIA/cuda-python/issues/42): Dropping Python 3.7 diff --git a/docs/_sources/release/12.2.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.2.0-notes.md.txt similarity index 98% rename from docs/_sources/release/12.2.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.2.0-notes.md.txt index d6bd66751..39e37b9a8 100644 --- a/docs/_sources/release/12.2.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.2.0-notes.md.txt @@ -2,7 +2,7 @@ Released on June 28, 2023 -## Hightlights +## Highlights - Rebase to CUDA Toolkit 12.2 - Resolve [Issue #44](https://github.com/NVIDIA/cuda-python/issues/44): nogil must be at the end of the function signature line - Resolve [Issue #45](https://github.com/NVIDIA/cuda-python/issues/45): Error with pyparsing when no CUDA is found diff --git a/docs/_sources/release/12.2.1-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.2.1-notes.md.txt similarity index 98% rename from docs/_sources/release/12.2.1-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.2.1-notes.md.txt index 41704a566..3a89af85c 100644 --- a/docs/_sources/release/12.2.1-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.2.1-notes.md.txt @@ -2,7 +2,7 @@ Released on January 8, 2024 -## Hightlights +## Highlights - Compatibility with Cython 3 ## Limitations diff --git a/docs/_sources/release/12.3.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.3.0-notes.md.txt similarity index 98% rename from docs/_sources/release/12.3.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.3.0-notes.md.txt index 016ee0dec..15bcdb978 100644 --- a/docs/_sources/release/12.3.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.3.0-notes.md.txt @@ -2,7 +2,7 @@ Released on October 19, 2023 -## Hightlights +## Highlights - Rebase to CUDA Toolkit 12.3 - Resolve [Issue #16](https://github.com/NVIDIA/cuda-python/issues/16): cuda.cudart.cudaRuntimeGetVersion() hard-codes the runtime version, rather than querying the runtime - New API cudart.getLocalRuntimeVersion() diff --git a/docs/_sources/release/12.4.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.4.0-notes.md.txt similarity index 98% rename from docs/_sources/release/12.4.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.4.0-notes.md.txt index 6daedb209..191ecc644 100644 --- a/docs/_sources/release/12.4.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.4.0-notes.md.txt @@ -2,7 +2,7 @@ Released on March 5, 2024 -## Hightlights +## Highlights - Rebase to CUDA Toolkit 12.4 - Add PyPI/Conda support for Python 12 diff --git a/docs/_sources/release/12.5.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.5.0-notes.md.txt similarity index 98% rename from docs/_sources/release/12.5.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.5.0-notes.md.txt index 701f0320a..b0e527a8a 100644 --- a/docs/_sources/release/12.5.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.5.0-notes.md.txt @@ -2,7 +2,7 @@ Released on May 21, 2024 -## Hightlights +## Highlights - Rebase to CUDA Toolkit 12.5 - Resolve [Issue #58](https://github.com/NVIDIA/cuda-python/issues/58): Interop between CUdeviceptr and Runtime diff --git a/docs/_sources/release/12.6.0-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.6.0-notes.md.txt similarity index 98% rename from docs/_sources/release/12.6.0-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.6.0-notes.md.txt index 2531e89b9..466e2eec1 100644 --- a/docs/_sources/release/12.6.0-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.6.0-notes.md.txt @@ -2,7 +2,7 @@ Released on August 1, 2024 -## Hightlights +## Highlights - Rebase to CUDA Toolkit 12.6 - Resolve [Issue #32](https://github.com/NVIDIA/cuda-python/issues/32): Add 'pywin32' as Windows requirement - Resolve [Issue #72](https://github.com/NVIDIA/cuda-python/issues/72): Allow both lists and tuples as parameter diff --git a/docs/_sources/release/12.6.1-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.6.1-notes.md.txt similarity index 96% rename from docs/_sources/release/12.6.1-notes.md.txt rename to docs/cuda-bindings/12.6.1/_sources/release/12.6.1-notes.md.txt index bf1962136..360047125 100644 --- a/docs/_sources/release/12.6.1-notes.md.txt +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.6.1-notes.md.txt @@ -2,7 +2,7 @@ Released on October 7, 2024 -## Hightlights +## Highlights - Resolve [Issue #90](https://github.com/NVIDIA/cuda-python/issues/90): Use new layout in preparation for cuda-python becoming a metapackage - Resolve [Issue #75](https://github.com/NVIDIA/cuda-python/issues/75): CUDA namespace cleanup @@ -27,6 +27,9 @@ Deprecation warnings are turned on as a notice to switch to the new module layou ## Limitations +### Know issues +- [Issue #215](https://github.com/NVIDIA/cuda-python/issues/215) + ### CUDA Functions Not Supported in this Release - Symbol APIs diff --git a/docs/cuda-bindings/12.6.1/_sources/release/12.6.2-notes.md.txt b/docs/cuda-bindings/12.6.1/_sources/release/12.6.2-notes.md.txt new file mode 100644 index 000000000..06fe110bf --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_sources/release/12.6.2-notes.md.txt @@ -0,0 +1,33 @@ +# CUDA Python 12.6.2 Release notes + +Released on November 5, 2024 + +## Highlights +- Resolve [Issue #215](https://github.com/NVIDIA/cuda-python/issues/215): module 'cuda.ccudart' has no attribute '__pyx_capi__' + +## Limitations + +### CUDA Functions Not Supported in this Release + +- Symbol APIs + - cudaGraphExecMemcpyNodeSetParamsFromSymbol + - cudaGraphExecMemcpyNodeSetParamsToSymbol + - cudaGraphAddMemcpyNodeToSymbol + - cudaGraphAddMemcpyNodeFromSymbol + - cudaGraphMemcpyNodeSetParamsToSymbol + - cudaGraphMemcpyNodeSetParamsFromSymbol + - cudaMemcpyToSymbol + - cudaMemcpyFromSymbol + - cudaMemcpyToSymbolAsync + - cudaMemcpyFromSymbolAsync + - cudaGetSymbolAddress + - cudaGetSymbolSize + - cudaGetFuncBySymbol +- Launch Options + - cudaLaunchKernel + - cudaLaunchCooperativeKernel + - cudaLaunchCooperativeKernelMultiDevice +- cudaSetValidDevices +- cudaVDPAUSetVDPAUDevice +- cudaFuncGetName +- cudaFuncGetParamInfo diff --git a/docs/cuda-bindings/12.6.1/_static/basic.css b/docs/cuda-bindings/12.6.1/_static/basic.css new file mode 100644 index 000000000..7ebbd6d07 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/basic.css @@ -0,0 +1,914 @@ +/* + * Sphinx stylesheet -- basic theme. + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin-top: 10px; +} + +ul.search li { + padding: 5px 0; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/_static/debug.css b/docs/cuda-bindings/12.6.1/_static/debug.css new file mode 100644 index 000000000..74d4aec33 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/debug.css @@ -0,0 +1,69 @@ +/* + This CSS file should be overridden by the theme authors. It's + meant for debugging and developing the skeleton that this theme provides. +*/ +body { + font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, + "Apple Color Emoji", "Segoe UI Emoji"; + background: lavender; +} +.sb-announcement { + background: rgb(131, 131, 131); +} +.sb-announcement__inner { + background: black; + color: white; +} +.sb-header { + background: lightskyblue; +} +.sb-header__inner { + background: royalblue; + color: white; +} +.sb-header-secondary { + background: lightcyan; +} +.sb-header-secondary__inner { + background: cornflowerblue; + color: white; +} +.sb-sidebar-primary { + background: lightgreen; +} +.sb-main { + background: blanchedalmond; +} +.sb-main__inner { + background: antiquewhite; +} +.sb-header-article { + background: lightsteelblue; +} +.sb-article-container { + background: snow; +} +.sb-article-main { + background: white; +} +.sb-footer-article { + background: lightpink; +} +.sb-sidebar-secondary { + background: lightgoldenrodyellow; +} +.sb-footer-content { + background: plum; +} +.sb-footer-content__inner { + background: palevioletred; +} +.sb-footer { + background: pink; +} +.sb-footer__inner { + background: salmon; +} +.sb-article { + background: white; +} diff --git a/docs/cuda-bindings/12.6.1/_static/doctools.js b/docs/cuda-bindings/12.6.1/_static/doctools.js new file mode 100644 index 000000000..0398ebb9f --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/doctools.js @@ -0,0 +1,149 @@ +/* + * Base JavaScript utilities for all Sphinx HTML documentation. + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/docs/cuda-bindings/12.6.1/_static/documentation_options.js b/docs/cuda-bindings/12.6.1/_static/documentation_options.js new file mode 100644 index 000000000..1baa85dc0 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '12.6.1', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/_static/file.png b/docs/cuda-bindings/12.6.1/_static/file.png new file mode 100644 index 000000000..a858a410e Binary files /dev/null and b/docs/cuda-bindings/12.6.1/_static/file.png differ diff --git a/docs/_static/images/Nsigth-Compute-CLI-625x473.png b/docs/cuda-bindings/12.6.1/_static/images/Nsigth-Compute-CLI-625x473.png similarity index 100% rename from docs/_static/images/Nsigth-Compute-CLI-625x473.png rename to docs/cuda-bindings/12.6.1/_static/images/Nsigth-Compute-CLI-625x473.png diff --git a/docs/cuda-bindings/12.6.1/_static/javascripts/version_dropdown.js b/docs/cuda-bindings/12.6.1/_static/javascripts/version_dropdown.js new file mode 100644 index 000000000..29860a8f8 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/javascripts/version_dropdown.js @@ -0,0 +1,58 @@ +function change_current_version(event) { + event.preventDefault(); + + var selectedVersion = event.target.textContent; + var currentVersion = document.getElementById('currentVersion'); + + // need to update both the on-screen state and the internal (persistent) storage + currentVersion.textContent = selectedVersion; + sessionStorage.setItem("currentVersion", selectedVersion); + + // Navigate to the clicked URL + window.location.href = event.target.href; +} + + +function add_version_dropdown(jsonLoc, targetLoc, currentVersion) { + var otherVersionsDiv = document.getElementById('otherVersions'); + + fetch(jsonLoc) + .then(function(response) { + return response.json(); + }) + .then(function(data) { + var versions = data; + + if (Object.keys(versions).length >= 1) { + var dlElement = document.createElement('dl'); + var dtElement = document.createElement('dt'); + dtElement.textContent = 'Versions'; + dlElement.appendChild(dtElement); + + for (var ver in versions) { + var url = versions[ver]; + var ddElement = document.createElement('dd'); + var aElement = document.createElement('a'); + aElement.setAttribute('href', targetLoc + url); + aElement.textContent = ver; + + if (ver === currentVersion) { + var strongElement = document.createElement('strong'); + strongElement.appendChild(aElement); + aElement = strongElement; + } + + ddElement.appendChild(aElement); + // Attach event listeners to version links + ddElement.addEventListener('click', change_current_version); + dlElement.appendChild(ddElement); + } + + otherVersionsDiv.innerHTML = ''; + otherVersionsDiv.appendChild(dlElement); + } + }) + .catch(function(error) { + console.error('Error fetching version.json:', error); + }); +} diff --git a/docs/cuda-bindings/12.6.1/_static/language_data.js b/docs/cuda-bindings/12.6.1/_static/language_data.js new file mode 100644 index 000000000..c7fe6c6fa --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/language_data.js @@ -0,0 +1,192 @@ +/* + * This script contains the language-specific data used by searchtools.js, + * namely the list of stopwords, stemmer, scorer and splitter. + */ + +var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; + + +/* Non-minified version is copied as a separate JS file, if available */ + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/docs/cuda-bindings/12.6.1/_static/logo-dark-mode.png b/docs/cuda-bindings/12.6.1/_static/logo-dark-mode.png new file mode 100644 index 000000000..6b005a283 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/_static/logo-dark-mode.png differ diff --git a/docs/cuda-bindings/12.6.1/_static/logo-light-mode.png b/docs/cuda-bindings/12.6.1/_static/logo-light-mode.png new file mode 100644 index 000000000..c07d6848c Binary files /dev/null and b/docs/cuda-bindings/12.6.1/_static/logo-light-mode.png differ diff --git a/docs/cuda-bindings/12.6.1/_static/minus.png b/docs/cuda-bindings/12.6.1/_static/minus.png new file mode 100644 index 000000000..d96755fda Binary files /dev/null and b/docs/cuda-bindings/12.6.1/_static/minus.png differ diff --git a/docs/cuda-bindings/12.6.1/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css b/docs/cuda-bindings/12.6.1/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css new file mode 100644 index 000000000..335663106 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/mystnb.4510f1fc1dee50b3e5859aac5469c37c29e427902b24a333a5f9fcb2f0b3ac41.css @@ -0,0 +1,2342 @@ +/* Variables */ +:root { + --mystnb-source-bg-color: #f7f7f7; + --mystnb-stdout-bg-color: #fcfcfc; + --mystnb-stderr-bg-color: #fdd; + --mystnb-traceback-bg-color: #fcfcfc; + --mystnb-source-border-color: #ccc; + --mystnb-source-margin-color: green; + --mystnb-stdout-border-color: #f7f7f7; + --mystnb-stderr-border-color: #f7f7f7; + --mystnb-traceback-border-color: #ffd6d6; + --mystnb-hide-prompt-opacity: 70%; + --mystnb-source-border-radius: .4em; + --mystnb-source-border-width: 1px; +} + +/* Whole cell */ +div.container.cell { + padding-left: 0; + margin-bottom: 1em; +} + +/* Removing all background formatting so we can control at the div level */ +.cell_input div.highlight, +.cell_output pre, +.cell_input pre, +.cell_output .output { + border: none; + box-shadow: none; +} + +.cell_output .output pre, +.cell_input pre { + margin: 0px; +} + +/* Input cells */ +div.cell div.cell_input, +div.cell details.above-input>summary { + padding-left: 0em; + padding-right: 0em; + border: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid; + background-color: var(--mystnb-source-bg-color); + border-left-color: var(--mystnb-source-margin-color); + border-left-width: medium; + border-radius: var(--mystnb-source-border-radius); +} + +div.cell_input>div, +div.cell_output div.output>div.highlight { + margin: 0em !important; + border: none !important; +} + +/* All cell outputs */ +.cell_output { + padding-left: 1em; + padding-right: 0em; + margin-top: 1em; +} + +/* Text outputs from cells */ +.cell_output .output.text_plain, +.cell_output .output.traceback, +.cell_output .output.stream, +.cell_output .output.stderr { + margin-top: 1em; + margin-bottom: 0em; + box-shadow: none; +} + +.cell_output .output.text_plain, +.cell_output .output.stream { + background: var(--mystnb-stdout-bg-color); + border: 1px solid var(--mystnb-stdout-border-color); +} + +.cell_output .output.stderr { + background: var(--mystnb-stderr-bg-color); + border: 1px solid var(--mystnb-stderr-border-color); +} + +.cell_output .output.traceback { + background: var(--mystnb-traceback-bg-color); + border: 1px solid var(--mystnb-traceback-border-color); +} + +/* Collapsible cell content */ +div.cell details.above-input div.cell_input { + border-top-left-radius: 0; + border-top-right-radius: 0; + border-top: var(--mystnb-source-border-width) var(--mystnb-source-border-color) dashed; +} + +div.cell div.cell_input.above-output-prompt { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; +} + +div.cell details.above-input>summary { + border-bottom-left-radius: 0; + border-bottom-right-radius: 0; + border-bottom: var(--mystnb-source-border-width) var(--mystnb-source-border-color) dashed; + padding-left: 1em; + margin-bottom: 0; +} + +div.cell details.above-output>summary { + background-color: var(--mystnb-source-bg-color); + padding-left: 1em; + padding-right: 0em; + border: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid; + border-radius: var(--mystnb-source-border-radius); + border-left-color: var(--mystnb-source-margin-color); + border-left-width: medium; +} + +div.cell details.below-input>summary { + background-color: var(--mystnb-source-bg-color); + padding-left: 1em; + padding-right: 0em; + border: var(--mystnb-source-border-width) var(--mystnb-source-border-color) solid; + border-top: none; + border-bottom-left-radius: var(--mystnb-source-border-radius); + border-bottom-right-radius: var(--mystnb-source-border-radius); + border-left-color: var(--mystnb-source-margin-color); + border-left-width: medium; +} + +div.cell details.hide>summary>span { + opacity: var(--mystnb-hide-prompt-opacity); +} + +div.cell details.hide[open]>summary>span.collapsed { + display: none; +} + +div.cell details.hide:not([open])>summary>span.expanded { + display: none; +} + +@keyframes collapsed-fade-in { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} +div.cell details.hide[open]>summary~* { + -moz-animation: collapsed-fade-in 0.3s ease-in-out; + -webkit-animation: collapsed-fade-in 0.3s ease-in-out; + animation: collapsed-fade-in 0.3s ease-in-out; +} + +/* Math align to the left */ +.cell_output .MathJax_Display { + text-align: left !important; +} + +/* Pandas tables. Pulled from the Jupyter / nbsphinx CSS */ +div.cell_output table { + border: none; + border-collapse: collapse; + border-spacing: 0; + color: black; + font-size: 1em; + table-layout: fixed; +} + +div.cell_output thead { + border-bottom: 1px solid black; + vertical-align: bottom; +} + +div.cell_output tr, +div.cell_output th, +div.cell_output td { + text-align: right; + vertical-align: middle; + padding: 0.5em 0.5em; + line-height: normal; + white-space: normal; + max-width: none; + border: none; +} + +div.cell_output th { + font-weight: bold; +} + +div.cell_output tbody tr:nth-child(odd) { + background: #f5f5f5; +} + +div.cell_output tbody tr:hover { + background: rgba(66, 165, 245, 0.2); +} + +/** source code line numbers **/ +span.linenos { + opacity: 0.5; +} + +/* Inline text from `paste` operation */ + +span.pasted-text { + font-weight: bold; +} + +span.pasted-inline img { + max-height: 2em; +} + +tbody span.pasted-inline img { + max-height: none; +} + +/* Font colors for translated ANSI escape sequences +Color values are copied from Jupyter Notebook +https://github.com/jupyter/notebook/blob/52581f8eda9b319eb0390ac77fe5903c38f81e3e/notebook/static/notebook/less/ansicolors.less#L14-L21 +Background colors from +https://nbsphinx.readthedocs.io/en/latest/code-cells.html#ANSI-Colors +*/ +div.highlight .-Color-Bold { + font-weight: bold; +} + +div.highlight .-Color[class*=-Black] { + color: #3E424D +} + +div.highlight .-Color[class*=-Red] { + color: #E75C58 +} + +div.highlight .-Color[class*=-Green] { + color: #00A250 +} + +div.highlight .-Color[class*=-Yellow] { + color: #DDB62B +} + +div.highlight .-Color[class*=-Blue] { + color: #208FFB +} + +div.highlight .-Color[class*=-Magenta] { + color: #D160C4 +} + +div.highlight .-Color[class*=-Cyan] { + color: #60C6C8 +} + +div.highlight .-Color[class*=-White] { + color: #C5C1B4 +} + +div.highlight .-Color[class*=-BGBlack] { + background-color: #3E424D +} + +div.highlight .-Color[class*=-BGRed] { + background-color: #E75C58 +} + +div.highlight .-Color[class*=-BGGreen] { + background-color: #00A250 +} + +div.highlight .-Color[class*=-BGYellow] { + background-color: #DDB62B +} + +div.highlight .-Color[class*=-BGBlue] { + background-color: #208FFB +} + +div.highlight .-Color[class*=-BGMagenta] { + background-color: #D160C4 +} + +div.highlight .-Color[class*=-BGCyan] { + background-color: #60C6C8 +} + +div.highlight .-Color[class*=-BGWhite] { + background-color: #C5C1B4 +} + +/* Font colors for 8-bit ANSI */ + +div.highlight .-Color[class*=-C0] { + color: #000000 +} + +div.highlight .-Color[class*=-BGC0] { + background-color: #000000 +} + +div.highlight .-Color[class*=-C1] { + color: #800000 +} + +div.highlight .-Color[class*=-BGC1] { + background-color: #800000 +} + +div.highlight .-Color[class*=-C2] { + color: #008000 +} + +div.highlight .-Color[class*=-BGC2] { + background-color: #008000 +} + +div.highlight .-Color[class*=-C3] { + color: #808000 +} + +div.highlight .-Color[class*=-BGC3] { + background-color: #808000 +} + +div.highlight .-Color[class*=-C4] { + color: #000080 +} + +div.highlight .-Color[class*=-BGC4] { + background-color: #000080 +} + +div.highlight .-Color[class*=-C5] { + color: #800080 +} + +div.highlight .-Color[class*=-BGC5] { + background-color: #800080 +} + +div.highlight .-Color[class*=-C6] { + color: #008080 +} + +div.highlight .-Color[class*=-BGC6] { + background-color: #008080 +} + +div.highlight .-Color[class*=-C7] { + color: #C0C0C0 +} + +div.highlight .-Color[class*=-BGC7] { + background-color: #C0C0C0 +} + +div.highlight .-Color[class*=-C8] { + color: #808080 +} + +div.highlight .-Color[class*=-BGC8] { + background-color: #808080 +} + +div.highlight .-Color[class*=-C9] { + color: #FF0000 +} + +div.highlight .-Color[class*=-BGC9] { + background-color: #FF0000 +} + +div.highlight .-Color[class*=-C10] { + color: #00FF00 +} + +div.highlight .-Color[class*=-BGC10] { + background-color: #00FF00 +} + +div.highlight .-Color[class*=-C11] { + color: #FFFF00 +} + +div.highlight .-Color[class*=-BGC11] { + background-color: #FFFF00 +} + +div.highlight .-Color[class*=-C12] { + color: #0000FF +} + +div.highlight .-Color[class*=-BGC12] { + background-color: #0000FF +} + +div.highlight .-Color[class*=-C13] { + color: #FF00FF +} + +div.highlight .-Color[class*=-BGC13] { + background-color: #FF00FF +} + +div.highlight .-Color[class*=-C14] { + color: #00FFFF +} + +div.highlight .-Color[class*=-BGC14] { + background-color: #00FFFF +} + +div.highlight .-Color[class*=-C15] { + color: #FFFFFF +} + +div.highlight .-Color[class*=-BGC15] { + background-color: #FFFFFF +} + +div.highlight .-Color[class*=-C16] { + color: #000000 +} + +div.highlight .-Color[class*=-BGC16] { + background-color: #000000 +} + +div.highlight .-Color[class*=-C17] { + color: #00005F +} + +div.highlight .-Color[class*=-BGC17] { + background-color: #00005F +} + +div.highlight .-Color[class*=-C18] { + color: #000087 +} + +div.highlight .-Color[class*=-BGC18] { + background-color: #000087 +} + +div.highlight .-Color[class*=-C19] { + color: #0000AF +} + +div.highlight .-Color[class*=-BGC19] { + background-color: #0000AF +} + +div.highlight .-Color[class*=-C20] { + color: #0000D7 +} + +div.highlight .-Color[class*=-BGC20] { + background-color: #0000D7 +} + +div.highlight .-Color[class*=-C21] { + color: #0000FF +} + +div.highlight .-Color[class*=-BGC21] { + background-color: #0000FF +} + +div.highlight .-Color[class*=-C22] { + color: #005F00 +} + +div.highlight .-Color[class*=-BGC22] { + background-color: #005F00 +} + +div.highlight .-Color[class*=-C23] { + color: #005F5F +} + +div.highlight .-Color[class*=-BGC23] { + background-color: #005F5F +} + +div.highlight .-Color[class*=-C24] { + color: #005F87 +} + +div.highlight .-Color[class*=-BGC24] { + background-color: #005F87 +} + +div.highlight .-Color[class*=-C25] { + color: #005FAF +} + +div.highlight .-Color[class*=-BGC25] { + background-color: #005FAF +} + +div.highlight .-Color[class*=-C26] { + color: #005FD7 +} + +div.highlight .-Color[class*=-BGC26] { + background-color: #005FD7 +} + +div.highlight .-Color[class*=-C27] { + color: #005FFF +} + +div.highlight .-Color[class*=-BGC27] { + background-color: #005FFF +} + +div.highlight .-Color[class*=-C28] { + color: #008700 +} + +div.highlight .-Color[class*=-BGC28] { + background-color: #008700 +} + +div.highlight .-Color[class*=-C29] { + color: #00875F +} + +div.highlight .-Color[class*=-BGC29] { + background-color: #00875F +} + +div.highlight .-Color[class*=-C30] { + color: #008787 +} + +div.highlight .-Color[class*=-BGC30] { + background-color: #008787 +} + +div.highlight .-Color[class*=-C31] { + color: #0087AF +} + +div.highlight .-Color[class*=-BGC31] { + background-color: #0087AF +} + +div.highlight .-Color[class*=-C32] { + color: #0087D7 +} + +div.highlight .-Color[class*=-BGC32] { + background-color: #0087D7 +} + +div.highlight .-Color[class*=-C33] { + color: #0087FF +} + +div.highlight .-Color[class*=-BGC33] { + background-color: #0087FF +} + +div.highlight .-Color[class*=-C34] { + color: #00AF00 +} + +div.highlight .-Color[class*=-BGC34] { + background-color: #00AF00 +} + +div.highlight .-Color[class*=-C35] { + color: #00AF5F +} + +div.highlight .-Color[class*=-BGC35] { + background-color: #00AF5F +} + +div.highlight .-Color[class*=-C36] { + color: #00AF87 +} + +div.highlight .-Color[class*=-BGC36] { + background-color: #00AF87 +} + +div.highlight .-Color[class*=-C37] { + color: #00AFAF +} + +div.highlight .-Color[class*=-BGC37] { + background-color: #00AFAF +} + +div.highlight .-Color[class*=-C38] { + color: #00AFD7 +} + +div.highlight .-Color[class*=-BGC38] { + background-color: #00AFD7 +} + +div.highlight .-Color[class*=-C39] { + color: #00AFFF +} + +div.highlight .-Color[class*=-BGC39] { + background-color: #00AFFF +} + +div.highlight .-Color[class*=-C40] { + color: #00D700 +} + +div.highlight .-Color[class*=-BGC40] { + background-color: #00D700 +} + +div.highlight .-Color[class*=-C41] { + color: #00D75F +} + +div.highlight .-Color[class*=-BGC41] { + background-color: #00D75F +} + +div.highlight .-Color[class*=-C42] { + color: #00D787 +} + +div.highlight .-Color[class*=-BGC42] { + background-color: #00D787 +} + +div.highlight .-Color[class*=-C43] { + color: #00D7AF +} + +div.highlight .-Color[class*=-BGC43] { + background-color: #00D7AF +} + +div.highlight .-Color[class*=-C44] { + color: #00D7D7 +} + +div.highlight .-Color[class*=-BGC44] { + background-color: #00D7D7 +} + +div.highlight .-Color[class*=-C45] { + color: #00D7FF +} + +div.highlight .-Color[class*=-BGC45] { + background-color: #00D7FF +} + +div.highlight .-Color[class*=-C46] { + color: #00FF00 +} + +div.highlight .-Color[class*=-BGC46] { + background-color: #00FF00 +} + +div.highlight .-Color[class*=-C47] { + color: #00FF5F +} + +div.highlight .-Color[class*=-BGC47] { + background-color: #00FF5F +} + +div.highlight .-Color[class*=-C48] { + color: #00FF87 +} + +div.highlight .-Color[class*=-BGC48] { + background-color: #00FF87 +} + +div.highlight .-Color[class*=-C49] { + color: #00FFAF +} + +div.highlight .-Color[class*=-BGC49] { + background-color: #00FFAF +} + +div.highlight .-Color[class*=-C50] { + color: #00FFD7 +} + +div.highlight .-Color[class*=-BGC50] { + background-color: #00FFD7 +} + +div.highlight .-Color[class*=-C51] { + color: #00FFFF +} + +div.highlight .-Color[class*=-BGC51] { + background-color: #00FFFF +} + +div.highlight .-Color[class*=-C52] { + color: #5F0000 +} + +div.highlight .-Color[class*=-BGC52] { + background-color: #5F0000 +} + +div.highlight .-Color[class*=-C53] { + color: #5F005F +} + +div.highlight .-Color[class*=-BGC53] { + background-color: #5F005F +} + +div.highlight .-Color[class*=-C54] { + color: #5F0087 +} + +div.highlight .-Color[class*=-BGC54] { + background-color: #5F0087 +} + +div.highlight .-Color[class*=-C55] { + color: #5F00AF +} + +div.highlight .-Color[class*=-BGC55] { + background-color: #5F00AF +} + +div.highlight .-Color[class*=-C56] { + color: #5F00D7 +} + +div.highlight .-Color[class*=-BGC56] { + background-color: #5F00D7 +} + +div.highlight .-Color[class*=-C57] { + color: #5F00FF +} + +div.highlight .-Color[class*=-BGC57] { + background-color: #5F00FF +} + +div.highlight .-Color[class*=-C58] { + color: #5F5F00 +} + +div.highlight .-Color[class*=-BGC58] { + background-color: #5F5F00 +} + +div.highlight .-Color[class*=-C59] { + color: #5F5F5F +} + +div.highlight .-Color[class*=-BGC59] { + background-color: #5F5F5F +} + +div.highlight .-Color[class*=-C60] { + color: #5F5F87 +} + +div.highlight .-Color[class*=-BGC60] { + background-color: #5F5F87 +} + +div.highlight .-Color[class*=-C61] { + color: #5F5FAF +} + +div.highlight .-Color[class*=-BGC61] { + background-color: #5F5FAF +} + +div.highlight .-Color[class*=-C62] { + color: #5F5FD7 +} + +div.highlight .-Color[class*=-BGC62] { + background-color: #5F5FD7 +} + +div.highlight .-Color[class*=-C63] { + color: #5F5FFF +} + +div.highlight .-Color[class*=-BGC63] { + background-color: #5F5FFF +} + +div.highlight .-Color[class*=-C64] { + color: #5F8700 +} + +div.highlight .-Color[class*=-BGC64] { + background-color: #5F8700 +} + +div.highlight .-Color[class*=-C65] { + color: #5F875F +} + +div.highlight .-Color[class*=-BGC65] { + background-color: #5F875F +} + +div.highlight .-Color[class*=-C66] { + color: #5F8787 +} + +div.highlight .-Color[class*=-BGC66] { + background-color: #5F8787 +} + +div.highlight .-Color[class*=-C67] { + color: #5F87AF +} + +div.highlight .-Color[class*=-BGC67] { + background-color: #5F87AF +} + +div.highlight .-Color[class*=-C68] { + color: #5F87D7 +} + +div.highlight .-Color[class*=-BGC68] { + background-color: #5F87D7 +} + +div.highlight .-Color[class*=-C69] { + color: #5F87FF +} + +div.highlight .-Color[class*=-BGC69] { + background-color: #5F87FF +} + +div.highlight .-Color[class*=-C70] { + color: #5FAF00 +} + +div.highlight .-Color[class*=-BGC70] { + background-color: #5FAF00 +} + +div.highlight .-Color[class*=-C71] { + color: #5FAF5F +} + +div.highlight .-Color[class*=-BGC71] { + background-color: #5FAF5F +} + +div.highlight .-Color[class*=-C72] { + color: #5FAF87 +} + +div.highlight .-Color[class*=-BGC72] { + background-color: #5FAF87 +} + +div.highlight .-Color[class*=-C73] { + color: #5FAFAF +} + +div.highlight .-Color[class*=-BGC73] { + background-color: #5FAFAF +} + +div.highlight .-Color[class*=-C74] { + color: #5FAFD7 +} + +div.highlight .-Color[class*=-BGC74] { + background-color: #5FAFD7 +} + +div.highlight .-Color[class*=-C75] { + color: #5FAFFF +} + +div.highlight .-Color[class*=-BGC75] { + background-color: #5FAFFF +} + +div.highlight .-Color[class*=-C76] { + color: #5FD700 +} + +div.highlight .-Color[class*=-BGC76] { + background-color: #5FD700 +} + +div.highlight .-Color[class*=-C77] { + color: #5FD75F +} + +div.highlight .-Color[class*=-BGC77] { + background-color: #5FD75F +} + +div.highlight .-Color[class*=-C78] { + color: #5FD787 +} + +div.highlight .-Color[class*=-BGC78] { + background-color: #5FD787 +} + +div.highlight .-Color[class*=-C79] { + color: #5FD7AF +} + +div.highlight .-Color[class*=-BGC79] { + background-color: #5FD7AF +} + +div.highlight .-Color[class*=-C80] { + color: #5FD7D7 +} + +div.highlight .-Color[class*=-BGC80] { + background-color: #5FD7D7 +} + +div.highlight .-Color[class*=-C81] { + color: #5FD7FF +} + +div.highlight .-Color[class*=-BGC81] { + background-color: #5FD7FF +} + +div.highlight .-Color[class*=-C82] { + color: #5FFF00 +} + +div.highlight .-Color[class*=-BGC82] { + background-color: #5FFF00 +} + +div.highlight .-Color[class*=-C83] { + color: #5FFF5F +} + +div.highlight .-Color[class*=-BGC83] { + background-color: #5FFF5F +} + +div.highlight .-Color[class*=-C84] { + color: #5FFF87 +} + +div.highlight .-Color[class*=-BGC84] { + background-color: #5FFF87 +} + +div.highlight .-Color[class*=-C85] { + color: #5FFFAF +} + +div.highlight .-Color[class*=-BGC85] { + background-color: #5FFFAF +} + +div.highlight .-Color[class*=-C86] { + color: #5FFFD7 +} + +div.highlight .-Color[class*=-BGC86] { + background-color: #5FFFD7 +} + +div.highlight .-Color[class*=-C87] { + color: #5FFFFF +} + +div.highlight .-Color[class*=-BGC87] { + background-color: #5FFFFF +} + +div.highlight .-Color[class*=-C88] { + color: #870000 +} + +div.highlight .-Color[class*=-BGC88] { + background-color: #870000 +} + +div.highlight .-Color[class*=-C89] { + color: #87005F +} + +div.highlight .-Color[class*=-BGC89] { + background-color: #87005F +} + +div.highlight .-Color[class*=-C90] { + color: #870087 +} + +div.highlight .-Color[class*=-BGC90] { + background-color: #870087 +} + +div.highlight .-Color[class*=-C91] { + color: #8700AF +} + +div.highlight .-Color[class*=-BGC91] { + background-color: #8700AF +} + +div.highlight .-Color[class*=-C92] { + color: #8700D7 +} + +div.highlight .-Color[class*=-BGC92] { + background-color: #8700D7 +} + +div.highlight .-Color[class*=-C93] { + color: #8700FF +} + +div.highlight .-Color[class*=-BGC93] { + background-color: #8700FF +} + +div.highlight .-Color[class*=-C94] { + color: #875F00 +} + +div.highlight .-Color[class*=-BGC94] { + background-color: #875F00 +} + +div.highlight .-Color[class*=-C95] { + color: #875F5F +} + +div.highlight .-Color[class*=-BGC95] { + background-color: #875F5F +} + +div.highlight .-Color[class*=-C96] { + color: #875F87 +} + +div.highlight .-Color[class*=-BGC96] { + background-color: #875F87 +} + +div.highlight .-Color[class*=-C97] { + color: #875FAF +} + +div.highlight .-Color[class*=-BGC97] { + background-color: #875FAF +} + +div.highlight .-Color[class*=-C98] { + color: #875FD7 +} + +div.highlight .-Color[class*=-BGC98] { + background-color: #875FD7 +} + +div.highlight .-Color[class*=-C99] { + color: #875FFF +} + +div.highlight .-Color[class*=-BGC99] { + background-color: #875FFF +} + +div.highlight .-Color[class*=-C100] { + color: #878700 +} + +div.highlight .-Color[class*=-BGC100] { + background-color: #878700 +} + +div.highlight .-Color[class*=-C101] { + color: #87875F +} + +div.highlight .-Color[class*=-BGC101] { + background-color: #87875F +} + +div.highlight .-Color[class*=-C102] { + color: #878787 +} + +div.highlight .-Color[class*=-BGC102] { + background-color: #878787 +} + +div.highlight .-Color[class*=-C103] { + color: #8787AF +} + +div.highlight .-Color[class*=-BGC103] { + background-color: #8787AF +} + +div.highlight .-Color[class*=-C104] { + color: #8787D7 +} + +div.highlight .-Color[class*=-BGC104] { + background-color: #8787D7 +} + +div.highlight .-Color[class*=-C105] { + color: #8787FF +} + +div.highlight .-Color[class*=-BGC105] { + background-color: #8787FF +} + +div.highlight .-Color[class*=-C106] { + color: #87AF00 +} + +div.highlight .-Color[class*=-BGC106] { + background-color: #87AF00 +} + +div.highlight .-Color[class*=-C107] { + color: #87AF5F +} + +div.highlight .-Color[class*=-BGC107] { + background-color: #87AF5F +} + +div.highlight .-Color[class*=-C108] { + color: #87AF87 +} + +div.highlight .-Color[class*=-BGC108] { + background-color: #87AF87 +} + +div.highlight .-Color[class*=-C109] { + color: #87AFAF +} + +div.highlight .-Color[class*=-BGC109] { + background-color: #87AFAF +} + +div.highlight .-Color[class*=-C110] { + color: #87AFD7 +} + +div.highlight .-Color[class*=-BGC110] { + background-color: #87AFD7 +} + +div.highlight .-Color[class*=-C111] { + color: #87AFFF +} + +div.highlight .-Color[class*=-BGC111] { + background-color: #87AFFF +} + +div.highlight .-Color[class*=-C112] { + color: #87D700 +} + +div.highlight .-Color[class*=-BGC112] { + background-color: #87D700 +} + +div.highlight .-Color[class*=-C113] { + color: #87D75F +} + +div.highlight .-Color[class*=-BGC113] { + background-color: #87D75F +} + +div.highlight .-Color[class*=-C114] { + color: #87D787 +} + +div.highlight .-Color[class*=-BGC114] { + background-color: #87D787 +} + +div.highlight .-Color[class*=-C115] { + color: #87D7AF +} + +div.highlight .-Color[class*=-BGC115] { + background-color: #87D7AF +} + +div.highlight .-Color[class*=-C116] { + color: #87D7D7 +} + +div.highlight .-Color[class*=-BGC116] { + background-color: #87D7D7 +} + +div.highlight .-Color[class*=-C117] { + color: #87D7FF +} + +div.highlight .-Color[class*=-BGC117] { + background-color: #87D7FF +} + +div.highlight .-Color[class*=-C118] { + color: #87FF00 +} + +div.highlight .-Color[class*=-BGC118] { + background-color: #87FF00 +} + +div.highlight .-Color[class*=-C119] { + color: #87FF5F +} + +div.highlight .-Color[class*=-BGC119] { + background-color: #87FF5F +} + +div.highlight .-Color[class*=-C120] { + color: #87FF87 +} + +div.highlight .-Color[class*=-BGC120] { + background-color: #87FF87 +} + +div.highlight .-Color[class*=-C121] { + color: #87FFAF +} + +div.highlight .-Color[class*=-BGC121] { + background-color: #87FFAF +} + +div.highlight .-Color[class*=-C122] { + color: #87FFD7 +} + +div.highlight .-Color[class*=-BGC122] { + background-color: #87FFD7 +} + +div.highlight .-Color[class*=-C123] { + color: #87FFFF +} + +div.highlight .-Color[class*=-BGC123] { + background-color: #87FFFF +} + +div.highlight .-Color[class*=-C124] { + color: #AF0000 +} + +div.highlight .-Color[class*=-BGC124] { + background-color: #AF0000 +} + +div.highlight .-Color[class*=-C125] { + color: #AF005F +} + +div.highlight .-Color[class*=-BGC125] { + background-color: #AF005F +} + +div.highlight .-Color[class*=-C126] { + color: #AF0087 +} + +div.highlight .-Color[class*=-BGC126] { + background-color: #AF0087 +} + +div.highlight .-Color[class*=-C127] { + color: #AF00AF +} + +div.highlight .-Color[class*=-BGC127] { + background-color: #AF00AF +} + +div.highlight .-Color[class*=-C128] { + color: #AF00D7 +} + +div.highlight .-Color[class*=-BGC128] { + background-color: #AF00D7 +} + +div.highlight .-Color[class*=-C129] { + color: #AF00FF +} + +div.highlight .-Color[class*=-BGC129] { + background-color: #AF00FF +} + +div.highlight .-Color[class*=-C130] { + color: #AF5F00 +} + +div.highlight .-Color[class*=-BGC130] { + background-color: #AF5F00 +} + +div.highlight .-Color[class*=-C131] { + color: #AF5F5F +} + +div.highlight .-Color[class*=-BGC131] { + background-color: #AF5F5F +} + +div.highlight .-Color[class*=-C132] { + color: #AF5F87 +} + +div.highlight .-Color[class*=-BGC132] { + background-color: #AF5F87 +} + +div.highlight .-Color[class*=-C133] { + color: #AF5FAF +} + +div.highlight .-Color[class*=-BGC133] { + background-color: #AF5FAF +} + +div.highlight .-Color[class*=-C134] { + color: #AF5FD7 +} + +div.highlight .-Color[class*=-BGC134] { + background-color: #AF5FD7 +} + +div.highlight .-Color[class*=-C135] { + color: #AF5FFF +} + +div.highlight .-Color[class*=-BGC135] { + background-color: #AF5FFF +} + +div.highlight .-Color[class*=-C136] { + color: #AF8700 +} + +div.highlight .-Color[class*=-BGC136] { + background-color: #AF8700 +} + +div.highlight .-Color[class*=-C137] { + color: #AF875F +} + +div.highlight .-Color[class*=-BGC137] { + background-color: #AF875F +} + +div.highlight .-Color[class*=-C138] { + color: #AF8787 +} + +div.highlight .-Color[class*=-BGC138] { + background-color: #AF8787 +} + +div.highlight .-Color[class*=-C139] { + color: #AF87AF +} + +div.highlight .-Color[class*=-BGC139] { + background-color: #AF87AF +} + +div.highlight .-Color[class*=-C140] { + color: #AF87D7 +} + +div.highlight .-Color[class*=-BGC140] { + background-color: #AF87D7 +} + +div.highlight .-Color[class*=-C141] { + color: #AF87FF +} + +div.highlight .-Color[class*=-BGC141] { + background-color: #AF87FF +} + +div.highlight .-Color[class*=-C142] { + color: #AFAF00 +} + +div.highlight .-Color[class*=-BGC142] { + background-color: #AFAF00 +} + +div.highlight .-Color[class*=-C143] { + color: #AFAF5F +} + +div.highlight .-Color[class*=-BGC143] { + background-color: #AFAF5F +} + +div.highlight .-Color[class*=-C144] { + color: #AFAF87 +} + +div.highlight .-Color[class*=-BGC144] { + background-color: #AFAF87 +} + +div.highlight .-Color[class*=-C145] { + color: #AFAFAF +} + +div.highlight .-Color[class*=-BGC145] { + background-color: #AFAFAF +} + +div.highlight .-Color[class*=-C146] { + color: #AFAFD7 +} + +div.highlight .-Color[class*=-BGC146] { + background-color: #AFAFD7 +} + +div.highlight .-Color[class*=-C147] { + color: #AFAFFF +} + +div.highlight .-Color[class*=-BGC147] { + background-color: #AFAFFF +} + +div.highlight .-Color[class*=-C148] { + color: #AFD700 +} + +div.highlight .-Color[class*=-BGC148] { + background-color: #AFD700 +} + +div.highlight .-Color[class*=-C149] { + color: #AFD75F +} + +div.highlight .-Color[class*=-BGC149] { + background-color: #AFD75F +} + +div.highlight .-Color[class*=-C150] { + color: #AFD787 +} + +div.highlight .-Color[class*=-BGC150] { + background-color: #AFD787 +} + +div.highlight .-Color[class*=-C151] { + color: #AFD7AF +} + +div.highlight .-Color[class*=-BGC151] { + background-color: #AFD7AF +} + +div.highlight .-Color[class*=-C152] { + color: #AFD7D7 +} + +div.highlight .-Color[class*=-BGC152] { + background-color: #AFD7D7 +} + +div.highlight .-Color[class*=-C153] { + color: #AFD7FF +} + +div.highlight .-Color[class*=-BGC153] { + background-color: #AFD7FF +} + +div.highlight .-Color[class*=-C154] { + color: #AFFF00 +} + +div.highlight .-Color[class*=-BGC154] { + background-color: #AFFF00 +} + +div.highlight .-Color[class*=-C155] { + color: #AFFF5F +} + +div.highlight .-Color[class*=-BGC155] { + background-color: #AFFF5F +} + +div.highlight .-Color[class*=-C156] { + color: #AFFF87 +} + +div.highlight .-Color[class*=-BGC156] { + background-color: #AFFF87 +} + +div.highlight .-Color[class*=-C157] { + color: #AFFFAF +} + +div.highlight .-Color[class*=-BGC157] { + background-color: #AFFFAF +} + +div.highlight .-Color[class*=-C158] { + color: #AFFFD7 +} + +div.highlight .-Color[class*=-BGC158] { + background-color: #AFFFD7 +} + +div.highlight .-Color[class*=-C159] { + color: #AFFFFF +} + +div.highlight .-Color[class*=-BGC159] { + background-color: #AFFFFF +} + +div.highlight .-Color[class*=-C160] { + color: #D70000 +} + +div.highlight .-Color[class*=-BGC160] { + background-color: #D70000 +} + +div.highlight .-Color[class*=-C161] { + color: #D7005F +} + +div.highlight .-Color[class*=-BGC161] { + background-color: #D7005F +} + +div.highlight .-Color[class*=-C162] { + color: #D70087 +} + +div.highlight .-Color[class*=-BGC162] { + background-color: #D70087 +} + +div.highlight .-Color[class*=-C163] { + color: #D700AF +} + +div.highlight .-Color[class*=-BGC163] { + background-color: #D700AF +} + +div.highlight .-Color[class*=-C164] { + color: #D700D7 +} + +div.highlight .-Color[class*=-BGC164] { + background-color: #D700D7 +} + +div.highlight .-Color[class*=-C165] { + color: #D700FF +} + +div.highlight .-Color[class*=-BGC165] { + background-color: #D700FF +} + +div.highlight .-Color[class*=-C166] { + color: #D75F00 +} + +div.highlight .-Color[class*=-BGC166] { + background-color: #D75F00 +} + +div.highlight .-Color[class*=-C167] { + color: #D75F5F +} + +div.highlight .-Color[class*=-BGC167] { + background-color: #D75F5F +} + +div.highlight .-Color[class*=-C168] { + color: #D75F87 +} + +div.highlight .-Color[class*=-BGC168] { + background-color: #D75F87 +} + +div.highlight .-Color[class*=-C169] { + color: #D75FAF +} + +div.highlight .-Color[class*=-BGC169] { + background-color: #D75FAF +} + +div.highlight .-Color[class*=-C170] { + color: #D75FD7 +} + +div.highlight .-Color[class*=-BGC170] { + background-color: #D75FD7 +} + +div.highlight .-Color[class*=-C171] { + color: #D75FFF +} + +div.highlight .-Color[class*=-BGC171] { + background-color: #D75FFF +} + +div.highlight .-Color[class*=-C172] { + color: #D78700 +} + +div.highlight .-Color[class*=-BGC172] { + background-color: #D78700 +} + +div.highlight .-Color[class*=-C173] { + color: #D7875F +} + +div.highlight .-Color[class*=-BGC173] { + background-color: #D7875F +} + +div.highlight .-Color[class*=-C174] { + color: #D78787 +} + +div.highlight .-Color[class*=-BGC174] { + background-color: #D78787 +} + +div.highlight .-Color[class*=-C175] { + color: #D787AF +} + +div.highlight .-Color[class*=-BGC175] { + background-color: #D787AF +} + +div.highlight .-Color[class*=-C176] { + color: #D787D7 +} + +div.highlight .-Color[class*=-BGC176] { + background-color: #D787D7 +} + +div.highlight .-Color[class*=-C177] { + color: #D787FF +} + +div.highlight .-Color[class*=-BGC177] { + background-color: #D787FF +} + +div.highlight .-Color[class*=-C178] { + color: #D7AF00 +} + +div.highlight .-Color[class*=-BGC178] { + background-color: #D7AF00 +} + +div.highlight .-Color[class*=-C179] { + color: #D7AF5F +} + +div.highlight .-Color[class*=-BGC179] { + background-color: #D7AF5F +} + +div.highlight .-Color[class*=-C180] { + color: #D7AF87 +} + +div.highlight .-Color[class*=-BGC180] { + background-color: #D7AF87 +} + +div.highlight .-Color[class*=-C181] { + color: #D7AFAF +} + +div.highlight .-Color[class*=-BGC181] { + background-color: #D7AFAF +} + +div.highlight .-Color[class*=-C182] { + color: #D7AFD7 +} + +div.highlight .-Color[class*=-BGC182] { + background-color: #D7AFD7 +} + +div.highlight .-Color[class*=-C183] { + color: #D7AFFF +} + +div.highlight .-Color[class*=-BGC183] { + background-color: #D7AFFF +} + +div.highlight .-Color[class*=-C184] { + color: #D7D700 +} + +div.highlight .-Color[class*=-BGC184] { + background-color: #D7D700 +} + +div.highlight .-Color[class*=-C185] { + color: #D7D75F +} + +div.highlight .-Color[class*=-BGC185] { + background-color: #D7D75F +} + +div.highlight .-Color[class*=-C186] { + color: #D7D787 +} + +div.highlight .-Color[class*=-BGC186] { + background-color: #D7D787 +} + +div.highlight .-Color[class*=-C187] { + color: #D7D7AF +} + +div.highlight .-Color[class*=-BGC187] { + background-color: #D7D7AF +} + +div.highlight .-Color[class*=-C188] { + color: #D7D7D7 +} + +div.highlight .-Color[class*=-BGC188] { + background-color: #D7D7D7 +} + +div.highlight .-Color[class*=-C189] { + color: #D7D7FF +} + +div.highlight .-Color[class*=-BGC189] { + background-color: #D7D7FF +} + +div.highlight .-Color[class*=-C190] { + color: #D7FF00 +} + +div.highlight .-Color[class*=-BGC190] { + background-color: #D7FF00 +} + +div.highlight .-Color[class*=-C191] { + color: #D7FF5F +} + +div.highlight .-Color[class*=-BGC191] { + background-color: #D7FF5F +} + +div.highlight .-Color[class*=-C192] { + color: #D7FF87 +} + +div.highlight .-Color[class*=-BGC192] { + background-color: #D7FF87 +} + +div.highlight .-Color[class*=-C193] { + color: #D7FFAF +} + +div.highlight .-Color[class*=-BGC193] { + background-color: #D7FFAF +} + +div.highlight .-Color[class*=-C194] { + color: #D7FFD7 +} + +div.highlight .-Color[class*=-BGC194] { + background-color: #D7FFD7 +} + +div.highlight .-Color[class*=-C195] { + color: #D7FFFF +} + +div.highlight .-Color[class*=-BGC195] { + background-color: #D7FFFF +} + +div.highlight .-Color[class*=-C196] { + color: #FF0000 +} + +div.highlight .-Color[class*=-BGC196] { + background-color: #FF0000 +} + +div.highlight .-Color[class*=-C197] { + color: #FF005F +} + +div.highlight .-Color[class*=-BGC197] { + background-color: #FF005F +} + +div.highlight .-Color[class*=-C198] { + color: #FF0087 +} + +div.highlight .-Color[class*=-BGC198] { + background-color: #FF0087 +} + +div.highlight .-Color[class*=-C199] { + color: #FF00AF +} + +div.highlight .-Color[class*=-BGC199] { + background-color: #FF00AF +} + +div.highlight .-Color[class*=-C200] { + color: #FF00D7 +} + +div.highlight .-Color[class*=-BGC200] { + background-color: #FF00D7 +} + +div.highlight .-Color[class*=-C201] { + color: #FF00FF +} + +div.highlight .-Color[class*=-BGC201] { + background-color: #FF00FF +} + +div.highlight .-Color[class*=-C202] { + color: #FF5F00 +} + +div.highlight .-Color[class*=-BGC202] { + background-color: #FF5F00 +} + +div.highlight .-Color[class*=-C203] { + color: #FF5F5F +} + +div.highlight .-Color[class*=-BGC203] { + background-color: #FF5F5F +} + +div.highlight .-Color[class*=-C204] { + color: #FF5F87 +} + +div.highlight .-Color[class*=-BGC204] { + background-color: #FF5F87 +} + +div.highlight .-Color[class*=-C205] { + color: #FF5FAF +} + +div.highlight .-Color[class*=-BGC205] { + background-color: #FF5FAF +} + +div.highlight .-Color[class*=-C206] { + color: #FF5FD7 +} + +div.highlight .-Color[class*=-BGC206] { + background-color: #FF5FD7 +} + +div.highlight .-Color[class*=-C207] { + color: #FF5FFF +} + +div.highlight .-Color[class*=-BGC207] { + background-color: #FF5FFF +} + +div.highlight .-Color[class*=-C208] { + color: #FF8700 +} + +div.highlight .-Color[class*=-BGC208] { + background-color: #FF8700 +} + +div.highlight .-Color[class*=-C209] { + color: #FF875F +} + +div.highlight .-Color[class*=-BGC209] { + background-color: #FF875F +} + +div.highlight .-Color[class*=-C210] { + color: #FF8787 +} + +div.highlight .-Color[class*=-BGC210] { + background-color: #FF8787 +} + +div.highlight .-Color[class*=-C211] { + color: #FF87AF +} + +div.highlight .-Color[class*=-BGC211] { + background-color: #FF87AF +} + +div.highlight .-Color[class*=-C212] { + color: #FF87D7 +} + +div.highlight .-Color[class*=-BGC212] { + background-color: #FF87D7 +} + +div.highlight .-Color[class*=-C213] { + color: #FF87FF +} + +div.highlight .-Color[class*=-BGC213] { + background-color: #FF87FF +} + +div.highlight .-Color[class*=-C214] { + color: #FFAF00 +} + +div.highlight .-Color[class*=-BGC214] { + background-color: #FFAF00 +} + +div.highlight .-Color[class*=-C215] { + color: #FFAF5F +} + +div.highlight .-Color[class*=-BGC215] { + background-color: #FFAF5F +} + +div.highlight .-Color[class*=-C216] { + color: #FFAF87 +} + +div.highlight .-Color[class*=-BGC216] { + background-color: #FFAF87 +} + +div.highlight .-Color[class*=-C217] { + color: #FFAFAF +} + +div.highlight .-Color[class*=-BGC217] { + background-color: #FFAFAF +} + +div.highlight .-Color[class*=-C218] { + color: #FFAFD7 +} + +div.highlight .-Color[class*=-BGC218] { + background-color: #FFAFD7 +} + +div.highlight .-Color[class*=-C219] { + color: #FFAFFF +} + +div.highlight .-Color[class*=-BGC219] { + background-color: #FFAFFF +} + +div.highlight .-Color[class*=-C220] { + color: #FFD700 +} + +div.highlight .-Color[class*=-BGC220] { + background-color: #FFD700 +} + +div.highlight .-Color[class*=-C221] { + color: #FFD75F +} + +div.highlight .-Color[class*=-BGC221] { + background-color: #FFD75F +} + +div.highlight .-Color[class*=-C222] { + color: #FFD787 +} + +div.highlight .-Color[class*=-BGC222] { + background-color: #FFD787 +} + +div.highlight .-Color[class*=-C223] { + color: #FFD7AF +} + +div.highlight .-Color[class*=-BGC223] { + background-color: #FFD7AF +} + +div.highlight .-Color[class*=-C224] { + color: #FFD7D7 +} + +div.highlight .-Color[class*=-BGC224] { + background-color: #FFD7D7 +} + +div.highlight .-Color[class*=-C225] { + color: #FFD7FF +} + +div.highlight .-Color[class*=-BGC225] { + background-color: #FFD7FF +} + +div.highlight .-Color[class*=-C226] { + color: #FFFF00 +} + +div.highlight .-Color[class*=-BGC226] { + background-color: #FFFF00 +} + +div.highlight .-Color[class*=-C227] { + color: #FFFF5F +} + +div.highlight .-Color[class*=-BGC227] { + background-color: #FFFF5F +} + +div.highlight .-Color[class*=-C228] { + color: #FFFF87 +} + +div.highlight .-Color[class*=-BGC228] { + background-color: #FFFF87 +} + +div.highlight .-Color[class*=-C229] { + color: #FFFFAF +} + +div.highlight .-Color[class*=-BGC229] { + background-color: #FFFFAF +} + +div.highlight .-Color[class*=-C230] { + color: #FFFFD7 +} + +div.highlight .-Color[class*=-BGC230] { + background-color: #FFFFD7 +} + +div.highlight .-Color[class*=-C231] { + color: #FFFFFF +} + +div.highlight .-Color[class*=-BGC231] { + background-color: #FFFFFF +} + +div.highlight .-Color[class*=-C232] { + color: #080808 +} + +div.highlight .-Color[class*=-BGC232] { + background-color: #080808 +} + +div.highlight .-Color[class*=-C233] { + color: #121212 +} + +div.highlight .-Color[class*=-BGC233] { + background-color: #121212 +} + +div.highlight .-Color[class*=-C234] { + color: #1C1C1C +} + +div.highlight .-Color[class*=-BGC234] { + background-color: #1C1C1C +} + +div.highlight .-Color[class*=-C235] { + color: #262626 +} + +div.highlight .-Color[class*=-BGC235] { + background-color: #262626 +} + +div.highlight .-Color[class*=-C236] { + color: #303030 +} + +div.highlight .-Color[class*=-BGC236] { + background-color: #303030 +} + +div.highlight .-Color[class*=-C237] { + color: #3A3A3A +} + +div.highlight .-Color[class*=-BGC237] { + background-color: #3A3A3A +} + +div.highlight .-Color[class*=-C238] { + color: #444444 +} + +div.highlight .-Color[class*=-BGC238] { + background-color: #444444 +} + +div.highlight .-Color[class*=-C239] { + color: #4E4E4E +} + +div.highlight .-Color[class*=-BGC239] { + background-color: #4E4E4E +} + +div.highlight .-Color[class*=-C240] { + color: #585858 +} + +div.highlight .-Color[class*=-BGC240] { + background-color: #585858 +} + +div.highlight .-Color[class*=-C241] { + color: #626262 +} + +div.highlight .-Color[class*=-BGC241] { + background-color: #626262 +} + +div.highlight .-Color[class*=-C242] { + color: #6C6C6C +} + +div.highlight .-Color[class*=-BGC242] { + background-color: #6C6C6C +} + +div.highlight .-Color[class*=-C243] { + color: #767676 +} + +div.highlight .-Color[class*=-BGC243] { + background-color: #767676 +} + +div.highlight .-Color[class*=-C244] { + color: #808080 +} + +div.highlight .-Color[class*=-BGC244] { + background-color: #808080 +} + +div.highlight .-Color[class*=-C245] { + color: #8A8A8A +} + +div.highlight .-Color[class*=-BGC245] { + background-color: #8A8A8A +} + +div.highlight .-Color[class*=-C246] { + color: #949494 +} + +div.highlight .-Color[class*=-BGC246] { + background-color: #949494 +} + +div.highlight .-Color[class*=-C247] { + color: #9E9E9E +} + +div.highlight .-Color[class*=-BGC247] { + background-color: #9E9E9E +} + +div.highlight .-Color[class*=-C248] { + color: #A8A8A8 +} + +div.highlight .-Color[class*=-BGC248] { + background-color: #A8A8A8 +} + +div.highlight .-Color[class*=-C249] { + color: #B2B2B2 +} + +div.highlight .-Color[class*=-BGC249] { + background-color: #B2B2B2 +} + +div.highlight .-Color[class*=-C250] { + color: #BCBCBC +} + +div.highlight .-Color[class*=-BGC250] { + background-color: #BCBCBC +} + +div.highlight .-Color[class*=-C251] { + color: #C6C6C6 +} + +div.highlight .-Color[class*=-BGC251] { + background-color: #C6C6C6 +} + +div.highlight .-Color[class*=-C252] { + color: #D0D0D0 +} + +div.highlight .-Color[class*=-BGC252] { + background-color: #D0D0D0 +} + +div.highlight .-Color[class*=-C253] { + color: #DADADA +} + +div.highlight .-Color[class*=-BGC253] { + background-color: #DADADA +} + +div.highlight .-Color[class*=-C254] { + color: #E4E4E4 +} + +div.highlight .-Color[class*=-BGC254] { + background-color: #E4E4E4 +} + +div.highlight .-Color[class*=-C255] { + color: #EEEEEE +} + +div.highlight .-Color[class*=-BGC255] { + background-color: #EEEEEE +} diff --git a/docs/cuda-bindings/12.6.1/_static/plus.png b/docs/cuda-bindings/12.6.1/_static/plus.png new file mode 100644 index 000000000..7107cec93 Binary files /dev/null and b/docs/cuda-bindings/12.6.1/_static/plus.png differ diff --git a/docs/cuda-bindings/12.6.1/_static/pygments.css b/docs/cuda-bindings/12.6.1/_static/pygments.css new file mode 100644 index 000000000..02b4b1281 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/pygments.css @@ -0,0 +1,258 @@ +.highlight pre { line-height: 125%; } +.highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +.highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +.highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +.highlight .hll { background-color: #ffffcc } +.highlight { background: #f8f8f8; } +.highlight .c { color: #8f5902; font-style: italic } /* Comment */ +.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */ +.highlight .g { color: #000000 } /* Generic */ +.highlight .k { color: #204a87; font-weight: bold } /* Keyword */ +.highlight .l { color: #000000 } /* Literal */ +.highlight .n { color: #000000 } /* Name */ +.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */ +.highlight .x { color: #000000 } /* Other */ +.highlight .p { color: #000000; font-weight: bold } /* Punctuation */ +.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */ +.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */ +.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */ +.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */ +.highlight .gd { color: #a40000 } /* Generic.Deleted */ +.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */ +.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +.highlight .gr { color: #ef2929 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #000000; font-style: italic } /* Generic.Output */ +.highlight .gp { color: #8f5902 } /* Generic.Prompt */ +.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */ +.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */ +.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */ +.highlight .ld { color: #000000 } /* Literal.Date */ +.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */ +.highlight .s { color: #4e9a06 } /* Literal.String */ +.highlight .na { color: #c4a000 } /* Name.Attribute */ +.highlight .nb { color: #204a87 } /* Name.Builtin */ +.highlight .nc { color: #000000 } /* Name.Class */ +.highlight .no { color: #000000 } /* Name.Constant */ +.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #ce5c00 } /* Name.Entity */ +.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */ +.highlight .nf { color: #000000 } /* Name.Function */ +.highlight .nl { color: #f57900 } /* Name.Label */ +.highlight .nn { color: #000000 } /* Name.Namespace */ +.highlight .nx { color: #000000 } /* Name.Other */ +.highlight .py { color: #000000 } /* Name.Property */ +.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #000000 } /* Name.Variable */ +.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */ +.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */ +.highlight .w { color: #f8f8f8 } /* Text.Whitespace */ +.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */ +.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */ +.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */ +.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */ +.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */ +.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */ +.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */ +.highlight .sc { color: #4e9a06 } /* Literal.String.Char */ +.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */ +.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */ +.highlight .se { color: #4e9a06 } /* Literal.String.Escape */ +.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */ +.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */ +.highlight .sx { color: #4e9a06 } /* Literal.String.Other */ +.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */ +.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */ +.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */ +.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #000000 } /* Name.Function.Magic */ +.highlight .vc { color: #000000 } /* Name.Variable.Class */ +.highlight .vg { color: #000000 } /* Name.Variable.Global */ +.highlight .vi { color: #000000 } /* Name.Variable.Instance */ +.highlight .vm { color: #000000 } /* Name.Variable.Magic */ +.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */ +@media not print { +body[data-theme="dark"] .highlight pre { line-height: 125%; } +body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body[data-theme="dark"] .highlight .hll { background-color: #404040 } +body[data-theme="dark"] .highlight { background: #202020; color: #d0d0d0 } +body[data-theme="dark"] .highlight .c { color: #ababab; font-style: italic } /* Comment */ +body[data-theme="dark"] .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +body[data-theme="dark"] .highlight .esc { color: #d0d0d0 } /* Escape */ +body[data-theme="dark"] .highlight .g { color: #d0d0d0 } /* Generic */ +body[data-theme="dark"] .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ +body[data-theme="dark"] .highlight .l { color: #d0d0d0 } /* Literal */ +body[data-theme="dark"] .highlight .n { color: #d0d0d0 } /* Name */ +body[data-theme="dark"] .highlight .o { color: #d0d0d0 } /* Operator */ +body[data-theme="dark"] .highlight .x { color: #d0d0d0 } /* Other */ +body[data-theme="dark"] .highlight .p { color: #d0d0d0 } /* Punctuation */ +body[data-theme="dark"] .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ +body[data-theme="dark"] .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ +body[data-theme="dark"] .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ +body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ +body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ +body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +body[data-theme="dark"] .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ +body[data-theme="dark"] .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body[data-theme="dark"] .highlight .gr { color: #ff3a3a } /* Generic.Error */ +body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ +body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */ +body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ +body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ +body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ +body[data-theme="dark"] .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ +body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ +body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ +body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ +body[data-theme="dark"] .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ +body[data-theme="dark"] .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ +body[data-theme="dark"] .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ +body[data-theme="dark"] .highlight .ld { color: #d0d0d0 } /* Literal.Date */ +body[data-theme="dark"] .highlight .m { color: #51b2fd } /* Literal.Number */ +body[data-theme="dark"] .highlight .s { color: #ed9d13 } /* Literal.String */ +body[data-theme="dark"] .highlight .na { color: #bbbbbb } /* Name.Attribute */ +body[data-theme="dark"] .highlight .nb { color: #2fbccd } /* Name.Builtin */ +body[data-theme="dark"] .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ +body[data-theme="dark"] .highlight .no { color: #40ffff } /* Name.Constant */ +body[data-theme="dark"] .highlight .nd { color: #ffa500 } /* Name.Decorator */ +body[data-theme="dark"] .highlight .ni { color: #d0d0d0 } /* Name.Entity */ +body[data-theme="dark"] .highlight .ne { color: #bbbbbb } /* Name.Exception */ +body[data-theme="dark"] .highlight .nf { color: #71adff } /* Name.Function */ +body[data-theme="dark"] .highlight .nl { color: #d0d0d0 } /* Name.Label */ +body[data-theme="dark"] .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ +body[data-theme="dark"] .highlight .nx { color: #d0d0d0 } /* Name.Other */ +body[data-theme="dark"] .highlight .py { color: #d0d0d0 } /* Name.Property */ +body[data-theme="dark"] .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ +body[data-theme="dark"] .highlight .nv { color: #40ffff } /* Name.Variable */ +body[data-theme="dark"] .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ +body[data-theme="dark"] .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ +body[data-theme="dark"] .highlight .w { color: #666666 } /* Text.Whitespace */ +body[data-theme="dark"] .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ +body[data-theme="dark"] .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ +body[data-theme="dark"] .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ +body[data-theme="dark"] .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ +body[data-theme="dark"] .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ +body[data-theme="dark"] .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ +body[data-theme="dark"] .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ +body[data-theme="dark"] .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ +body[data-theme="dark"] .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ +body[data-theme="dark"] .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ +body[data-theme="dark"] .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ +body[data-theme="dark"] .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ +body[data-theme="dark"] .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ +body[data-theme="dark"] .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ +body[data-theme="dark"] .highlight .sx { color: #ffa500 } /* Literal.String.Other */ +body[data-theme="dark"] .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ +body[data-theme="dark"] .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ +body[data-theme="dark"] .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ +body[data-theme="dark"] .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ +body[data-theme="dark"] .highlight .fm { color: #71adff } /* Name.Function.Magic */ +body[data-theme="dark"] .highlight .vc { color: #40ffff } /* Name.Variable.Class */ +body[data-theme="dark"] .highlight .vg { color: #40ffff } /* Name.Variable.Global */ +body[data-theme="dark"] .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ +body[data-theme="dark"] .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ +body[data-theme="dark"] .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ +@media (prefers-color-scheme: dark) { +body:not([data-theme="light"]) .highlight pre { line-height: 125%; } +body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +body:not([data-theme="light"]) .highlight .hll { background-color: #404040 } +body:not([data-theme="light"]) .highlight { background: #202020; color: #d0d0d0 } +body:not([data-theme="light"]) .highlight .c { color: #ababab; font-style: italic } /* Comment */ +body:not([data-theme="light"]) .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ +body:not([data-theme="light"]) .highlight .esc { color: #d0d0d0 } /* Escape */ +body:not([data-theme="light"]) .highlight .g { color: #d0d0d0 } /* Generic */ +body:not([data-theme="light"]) .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */ +body:not([data-theme="light"]) .highlight .l { color: #d0d0d0 } /* Literal */ +body:not([data-theme="light"]) .highlight .n { color: #d0d0d0 } /* Name */ +body:not([data-theme="light"]) .highlight .o { color: #d0d0d0 } /* Operator */ +body:not([data-theme="light"]) .highlight .x { color: #d0d0d0 } /* Other */ +body:not([data-theme="light"]) .highlight .p { color: #d0d0d0 } /* Punctuation */ +body:not([data-theme="light"]) .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */ +body:not([data-theme="light"]) .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */ +body:not([data-theme="light"]) .highlight .cp { color: #ff3a3a; font-weight: bold } /* Comment.Preproc */ +body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */ +body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */ +body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */ +body:not([data-theme="light"]) .highlight .gd { color: #ff3a3a } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */ +body:not([data-theme="light"]) .highlight .ges { color: #d0d0d0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body:not([data-theme="light"]) .highlight .gr { color: #ff3a3a } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */ +body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ +body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */ +body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */ +body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */ +body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */ +body:not([data-theme="light"]) .highlight .gt { color: #ff3a3a } /* Generic.Traceback */ +body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */ +body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */ +body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */ +body:not([data-theme="light"]) .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */ +body:not([data-theme="light"]) .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */ +body:not([data-theme="light"]) .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */ +body:not([data-theme="light"]) .highlight .ld { color: #d0d0d0 } /* Literal.Date */ +body:not([data-theme="light"]) .highlight .m { color: #51b2fd } /* Literal.Number */ +body:not([data-theme="light"]) .highlight .s { color: #ed9d13 } /* Literal.String */ +body:not([data-theme="light"]) .highlight .na { color: #bbbbbb } /* Name.Attribute */ +body:not([data-theme="light"]) .highlight .nb { color: #2fbccd } /* Name.Builtin */ +body:not([data-theme="light"]) .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */ +body:not([data-theme="light"]) .highlight .no { color: #40ffff } /* Name.Constant */ +body:not([data-theme="light"]) .highlight .nd { color: #ffa500 } /* Name.Decorator */ +body:not([data-theme="light"]) .highlight .ni { color: #d0d0d0 } /* Name.Entity */ +body:not([data-theme="light"]) .highlight .ne { color: #bbbbbb } /* Name.Exception */ +body:not([data-theme="light"]) .highlight .nf { color: #71adff } /* Name.Function */ +body:not([data-theme="light"]) .highlight .nl { color: #d0d0d0 } /* Name.Label */ +body:not([data-theme="light"]) .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */ +body:not([data-theme="light"]) .highlight .nx { color: #d0d0d0 } /* Name.Other */ +body:not([data-theme="light"]) .highlight .py { color: #d0d0d0 } /* Name.Property */ +body:not([data-theme="light"]) .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */ +body:not([data-theme="light"]) .highlight .nv { color: #40ffff } /* Name.Variable */ +body:not([data-theme="light"]) .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */ +body:not([data-theme="light"]) .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */ +body:not([data-theme="light"]) .highlight .w { color: #666666 } /* Text.Whitespace */ +body:not([data-theme="light"]) .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */ +body:not([data-theme="light"]) .highlight .mf { color: #51b2fd } /* Literal.Number.Float */ +body:not([data-theme="light"]) .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */ +body:not([data-theme="light"]) .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */ +body:not([data-theme="light"]) .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */ +body:not([data-theme="light"]) .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */ +body:not([data-theme="light"]) .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */ +body:not([data-theme="light"]) .highlight .sc { color: #ed9d13 } /* Literal.String.Char */ +body:not([data-theme="light"]) .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */ +body:not([data-theme="light"]) .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */ +body:not([data-theme="light"]) .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */ +body:not([data-theme="light"]) .highlight .se { color: #ed9d13 } /* Literal.String.Escape */ +body:not([data-theme="light"]) .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */ +body:not([data-theme="light"]) .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */ +body:not([data-theme="light"]) .highlight .sx { color: #ffa500 } /* Literal.String.Other */ +body:not([data-theme="light"]) .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */ +body:not([data-theme="light"]) .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */ +body:not([data-theme="light"]) .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */ +body:not([data-theme="light"]) .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */ +body:not([data-theme="light"]) .highlight .fm { color: #71adff } /* Name.Function.Magic */ +body:not([data-theme="light"]) .highlight .vc { color: #40ffff } /* Name.Variable.Class */ +body:not([data-theme="light"]) .highlight .vg { color: #40ffff } /* Name.Variable.Global */ +body:not([data-theme="light"]) .highlight .vi { color: #40ffff } /* Name.Variable.Instance */ +body:not([data-theme="light"]) .highlight .vm { color: #40ffff } /* Name.Variable.Magic */ +body:not([data-theme="light"]) .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */ +} +} \ No newline at end of file diff --git a/docs/.nojekyll b/docs/cuda-bindings/12.6.1/_static/scripts/furo-extensions.js similarity index 100% rename from docs/.nojekyll rename to docs/cuda-bindings/12.6.1/_static/scripts/furo-extensions.js diff --git a/docs/cuda-bindings/12.6.1/_static/scripts/furo.js b/docs/cuda-bindings/12.6.1/_static/scripts/furo.js new file mode 100644 index 000000000..0abb2afac --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/scripts/furo.js @@ -0,0 +1,3 @@ +/*! For license information please see furo.js.LICENSE.txt */ +(()=>{var t={856:function(t,e,n){var o,r;r=void 0!==n.g?n.g:"undefined"!=typeof window?window:this,o=function(){return function(t){"use strict";var e={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},n=function(t,e,n){if(n.settings.events){var o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(o)}},o=function(t){var e=0;if(t.offsetParent)for(;t;)e+=t.offsetTop,t=t.offsetParent;return e>=0?e:0},r=function(t){t&&t.sort((function(t,e){return o(t.content)=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},l=function(t,e){var n=t[t.length-1];if(function(t,e){return!(!s()||!c(t.content,e,!0))}(n,e))return n;for(var o=t.length-1;o>=0;o--)if(c(t[o].content,e))return t[o]},a=function(t,e){if(e.nested&&t.parentNode){var n=t.parentNode.closest("li");n&&(n.classList.remove(e.nestedClass),a(n,e))}},i=function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.remove(e.navClass),t.content.classList.remove(e.contentClass),a(o,e),n("gumshoeDeactivate",o,{link:t.nav,content:t.content,settings:e}))}},u=function(t,e){if(e.nested){var n=t.parentNode.closest("li");n&&(n.classList.add(e.nestedClass),u(n,e))}};return function(o,c){var s,a,d,f,m,v={setup:function(){s=document.querySelectorAll(o),a=[],Array.prototype.forEach.call(s,(function(t){var e=document.getElementById(decodeURIComponent(t.hash.substr(1)));e&&a.push({nav:t,content:e})})),r(a)},detect:function(){var t=l(a,m);t?d&&t.content===d.content||(i(d,m),function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.add(e.navClass),t.content.classList.add(e.contentClass),u(o,e),n("gumshoeActivate",o,{link:t.nav,content:t.content,settings:e}))}}(t,m),d=t):d&&(i(d,m),d=null)}},h=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame(v.detect)},g=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame((function(){r(a),v.detect()}))};return v.destroy=function(){d&&i(d,m),t.removeEventListener("scroll",h,!1),m.reflow&&t.removeEventListener("resize",g,!1),a=null,s=null,d=null,f=null,m=null},m=function(){var t={};return Array.prototype.forEach.call(arguments,(function(e){for(var n in e){if(!e.hasOwnProperty(n))return;t[n]=e[n]}})),t}(e,c||{}),v.setup(),v.detect(),t.addEventListener("scroll",h,!1),m.reflow&&t.addEventListener("resize",g,!1),v}}(r)}.apply(e,[]),void 0===o||(t.exports=o)}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var c=e[o]={exports:{}};return t[o].call(c.exports,c,c.exports,n),c.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(856),e=n.n(t),o=null,r=null,c=document.documentElement.scrollTop;const s=64;function l(){const t=localStorage.getItem("theme")||"auto";var e;"light"!==(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"auto"===t?"light":"light"==t?"dark":"auto":"auto"===t?"dark":"dark"==t?"light":"auto")&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto"),document.body.dataset.theme=e,localStorage.setItem("theme",e),console.log(`Changed to ${e} mode.`)}function a(){!function(){const t=document.getElementsByClassName("theme-toggle");Array.from(t).forEach((t=>{t.addEventListener("click",l)}))}(),function(){let t=0,e=!1;window.addEventListener("scroll",(function(n){t=window.scrollY,e||(window.requestAnimationFrame((function(){var n;(function(t){const e=Math.floor(r.getBoundingClientRect().top);console.log(`headerTop: ${e}`),0==e&&t!=e?r.classList.add("scrolled"):r.classList.remove("scrolled")})(n=t),function(t){tc&&document.documentElement.classList.remove("show-back-to-top"),c=t}(n),function(t){null!==o&&(0==t?o.scrollTo(0,0):Math.ceil(t)>=Math.floor(document.documentElement.scrollHeight-window.innerHeight)?o.scrollTo(0,o.scrollHeight):document.querySelector(".scroll-current"))}(n),e=!1})),e=!0)})),window.scroll()}(),null!==o&&new(e())(".toc-tree a",{reflow:!0,recursive:!0,navClass:"scroll-current",offset:()=>{let t=parseFloat(getComputedStyle(document.documentElement).fontSize);return r.getBoundingClientRect().height+2.5*t+1}})}document.addEventListener("DOMContentLoaded",(function(){document.body.parentNode.classList.remove("no-js"),r=document.querySelector("header"),o=document.querySelector(".toc-scroll"),a()}))})()})(); +//# sourceMappingURL=furo.js.map \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/_static/scripts/furo.js.LICENSE.txt b/docs/cuda-bindings/12.6.1/_static/scripts/furo.js.LICENSE.txt new file mode 100644 index 000000000..1632189c7 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/scripts/furo.js.LICENSE.txt @@ -0,0 +1,7 @@ +/*! + * gumshoejs v5.1.2 (patched by @pradyunsg) + * A simple, framework-agnostic scrollspy script. + * (c) 2019 Chris Ferdinandi + * MIT License + * http://github.com/cferdinandi/gumshoe + */ diff --git a/docs/cuda-bindings/12.6.1/_static/scripts/furo.js.map b/docs/cuda-bindings/12.6.1/_static/scripts/furo.js.map new file mode 100644 index 000000000..80ea12b85 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/scripts/furo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/furo.js","mappings":";iCAAA,MAQWA,SAWS,IAAX,EAAAC,EACH,EAAAA,EACkB,oBAAXC,OACLA,OACAC,KAbO,EAAF,WACP,OAaJ,SAAUD,GACR,aAMA,IAAIE,EAAW,CAEbC,SAAU,SACVC,aAAc,SAGdC,QAAQ,EACRC,YAAa,SAGbC,OAAQ,EACRC,QAAQ,EAGRC,QAAQ,GA6BNC,EAAY,SAAUC,EAAMC,EAAMC,GAEpC,GAAKA,EAAOC,SAASL,OAArB,CAGA,IAAIM,EAAQ,IAAIC,YAAYL,EAAM,CAChCM,SAAS,EACTC,YAAY,EACZL,OAAQA,IAIVD,EAAKO,cAAcJ,EAVgB,CAWrC,EAOIK,EAAe,SAAUR,GAC3B,IAAIS,EAAW,EACf,GAAIT,EAAKU,aACP,KAAOV,GACLS,GAAYT,EAAKW,UACjBX,EAAOA,EAAKU,aAGhB,OAAOD,GAAY,EAAIA,EAAW,CACpC,EAMIG,EAAe,SAAUC,GACvBA,GACFA,EAASC,MAAK,SAAUC,EAAOC,GAG7B,OAFcR,EAAaO,EAAME,SACnBT,EAAaQ,EAAMC,UACF,EACxB,CACT,GAEJ,EAwCIC,EAAW,SAAUlB,EAAME,EAAUiB,GACvC,IAAIC,EAASpB,EAAKqB,wBACd1B,EAnCU,SAAUO,GAExB,MAA+B,mBAApBA,EAASP,OACX2B,WAAWpB,EAASP,UAItB2B,WAAWpB,EAASP,OAC7B,CA2Be4B,CAAUrB,GACvB,OAAIiB,EAEAK,SAASJ,EAAOD,OAAQ,KACvB/B,EAAOqC,aAAeC,SAASC,gBAAgBC,cAG7CJ,SAASJ,EAAOS,IAAK,KAAOlC,CACrC,EAMImC,EAAa,WACf,OACEC,KAAKC,KAAK5C,EAAOqC,YAAcrC,EAAO6C,cAnCjCF,KAAKG,IACVR,SAASS,KAAKC,aACdV,SAASC,gBAAgBS,aACzBV,SAASS,KAAKE,aACdX,SAASC,gBAAgBU,aACzBX,SAASS,KAAKP,aACdF,SAASC,gBAAgBC,aAkC7B,EAmBIU,EAAY,SAAUzB,EAAUX,GAClC,IAAIqC,EAAO1B,EAASA,EAAS2B,OAAS,GACtC,GAbgB,SAAUC,EAAMvC,GAChC,SAAI4B,MAAgBZ,EAASuB,EAAKxB,QAASf,GAAU,GAEvD,CAUMwC,CAAYH,EAAMrC,GAAW,OAAOqC,EACxC,IAAK,IAAII,EAAI9B,EAAS2B,OAAS,EAAGG,GAAK,EAAGA,IACxC,GAAIzB,EAASL,EAAS8B,GAAG1B,QAASf,GAAW,OAAOW,EAAS8B,EAEjE,EAOIC,EAAmB,SAAUC,EAAK3C,GAEpC,GAAKA,EAAST,QAAWoD,EAAIC,WAA7B,CAGA,IAAIC,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASR,aAG7BkD,EAAiBG,EAAI7C,GAV0B,CAWjD,EAOIiD,EAAa,SAAUC,EAAOlD,GAEhC,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASX,UAC7B6D,EAAMnC,QAAQgC,UAAUC,OAAOhD,EAASV,cAGxCoD,EAAiBG,EAAI7C,GAGrBJ,EAAU,oBAAqBiD,EAAI,CACjCM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,IAjBM,CAmBpB,EAOIoD,EAAiB,SAAUT,EAAK3C,GAElC,GAAKA,EAAST,OAAd,CAGA,IAAIsD,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASR,aAG1B4D,EAAeP,EAAI7C,GAVS,CAW9B,EA6LA,OA1JkB,SAAUsD,EAAUC,GAKpC,IACIC,EAAU7C,EAAU8C,EAASC,EAAS1D,EADtC2D,EAAa,CAUjBA,MAAmB,WAEjBH,EAAWhC,SAASoC,iBAAiBN,GAGrC3C,EAAW,GAGXkD,MAAMC,UAAUC,QAAQC,KAAKR,GAAU,SAAUjB,GAE/C,IAAIxB,EAAUS,SAASyC,eACrBC,mBAAmB3B,EAAK4B,KAAKC,OAAO,KAEjCrD,GAGLJ,EAAS0D,KAAK,CACZ1B,IAAKJ,EACLxB,QAASA,GAEb,IAGAL,EAAaC,EACf,EAKAgD,OAAoB,WAElB,IAAIW,EAASlC,EAAUzB,EAAUX,GAG5BsE,EASDb,GAAWa,EAAOvD,UAAY0C,EAAQ1C,UAG1CkC,EAAWQ,EAASzD,GAzFT,SAAUkD,EAAOlD,GAE9B,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASX,UAC1B6D,EAAMnC,QAAQgC,UAAUM,IAAIrD,EAASV,cAGrC8D,EAAeP,EAAI7C,GAGnBJ,EAAU,kBAAmBiD,EAAI,CAC/BM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,IAjBM,CAmBpB,CAqEIuE,CAASD,EAAQtE,GAGjByD,EAAUa,GAfJb,IACFR,EAAWQ,EAASzD,GACpByD,EAAU,KAchB,GAMIe,EAAgB,SAAUvE,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,sBAAsBf,EAAWgB,OACpD,EAMIC,EAAgB,SAAU3E,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,uBAAsB,WACrChE,EAAaC,GACbgD,EAAWgB,QACb,GACF,EAkDA,OA7CAhB,EAAWkB,QAAU,WAEfpB,GACFR,EAAWQ,EAASzD,GAItBd,EAAO4F,oBAAoB,SAAUN,GAAe,GAChDxE,EAASN,QACXR,EAAO4F,oBAAoB,SAAUF,GAAe,GAItDjE,EAAW,KACX6C,EAAW,KACXC,EAAU,KACVC,EAAU,KACV1D,EAAW,IACb,EAOEA,EA3XS,WACX,IAAI+E,EAAS,CAAC,EAOd,OANAlB,MAAMC,UAAUC,QAAQC,KAAKgB,WAAW,SAAUC,GAChD,IAAK,IAAIC,KAAOD,EAAK,CACnB,IAAKA,EAAIE,eAAeD,GAAM,OAC9BH,EAAOG,GAAOD,EAAIC,EACpB,CACF,IACOH,CACT,CAkXeK,CAAOhG,EAAUmE,GAAW,CAAC,GAGxCI,EAAW0B,QAGX1B,EAAWgB,SAGXzF,EAAOoG,iBAAiB,SAAUd,GAAe,GAC7CxE,EAASN,QACXR,EAAOoG,iBAAiB,SAAUV,GAAe,GAS9CjB,CACT,CAOF,CArcW4B,CAAQvG,EAChB,UAFM,SAEN,uBCXDwG,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAU1B,KAAK8B,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAGpEK,EAAOD,OACf,CCrBAJ,EAAoBO,EAAKF,IACxB,IAAIG,EAASH,GAAUA,EAAOI,WAC7B,IAAOJ,EAAiB,QACxB,IAAM,EAEP,OADAL,EAAoBU,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdR,EAAoBU,EAAI,CAACN,EAASQ,KACjC,IAAI,IAAInB,KAAOmB,EACXZ,EAAoBa,EAAED,EAAYnB,KAASO,EAAoBa,EAAET,EAASX,IAC5EqB,OAAOC,eAAeX,EAASX,EAAK,CAAEuB,YAAY,EAAMC,IAAKL,EAAWnB,IAE1E,ECNDO,EAAoBxG,EAAI,WACvB,GAA0B,iBAAf0H,WAAyB,OAAOA,WAC3C,IACC,OAAOxH,MAAQ,IAAIyH,SAAS,cAAb,EAChB,CAAE,MAAOC,GACR,GAAsB,iBAAX3H,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxBuG,EAAoBa,EAAI,CAACrB,EAAK6B,IAAUP,OAAOzC,UAAUqB,eAAenB,KAAKiB,EAAK6B,4CCK9EC,EAAY,KACZC,EAAS,KACTC,EAAgBzF,SAASC,gBAAgByF,UAC7C,MAAMC,EAAmB,GA8EzB,SAASC,IACP,MAAMC,EAAeC,aAAaC,QAAQ,UAAY,OAZxD,IAAkBC,EACH,WADGA,EAaItI,OAAOuI,WAAW,gCAAgCC,QAI/C,SAAjBL,EACO,QACgB,SAAhBA,EACA,OAEA,OAIU,SAAjBA,EACO,OACgB,QAAhBA,EACA,QAEA,SA9BoB,SAATG,GAA4B,SAATA,IACzCG,QAAQC,MAAM,2BAA2BJ,yBACzCA,EAAO,QAGThG,SAASS,KAAK4F,QAAQC,MAAQN,EAC9BF,aAAaS,QAAQ,QAASP,GAC9BG,QAAQK,IAAI,cAAcR,UA0B5B,CAkDA,SAASnC,KART,WAEE,MAAM4C,EAAUzG,SAAS0G,uBAAuB,gBAChDrE,MAAMsE,KAAKF,GAASlE,SAASqE,IAC3BA,EAAI9C,iBAAiB,QAAS8B,EAAe,GAEjD,CAGEiB,GA9CF,WAEE,IAAIC,EAA6B,EAC7BC,GAAU,EAEdrJ,OAAOoG,iBAAiB,UAAU,SAAUuB,GAC1CyB,EAA6BpJ,OAAOsJ,QAE/BD,IACHrJ,OAAOwF,uBAAsB,WAzDnC,IAAuB+D,GAxDvB,SAAgCA,GAC9B,MAAMC,EAAY7G,KAAK8G,MAAM3B,EAAO7F,wBAAwBQ,KAE5DgG,QAAQK,IAAI,cAAcU,KACT,GAAbA,GAAkBD,GAAaC,EACjC1B,EAAOjE,UAAUM,IAAI,YAErB2D,EAAOjE,UAAUC,OAAO,WAE5B,EAgDE4F,CADqBH,EA0DDH,GAvGtB,SAAmCG,GAC7BA,EAAYtB,EACd3F,SAASC,gBAAgBsB,UAAUC,OAAO,oBAEtCyF,EAAYxB,EACdzF,SAASC,gBAAgBsB,UAAUM,IAAI,oBAC9BoF,EAAYxB,GACrBzF,SAASC,gBAAgBsB,UAAUC,OAAO,oBAG9CiE,EAAgBwB,CAClB,CAoCEI,CAA0BJ,GAlC5B,SAA6BA,GACT,OAAd1B,IAKa,GAAb0B,EACF1B,EAAU+B,SAAS,EAAG,GAGtBjH,KAAKC,KAAK2G,IACV5G,KAAK8G,MAAMnH,SAASC,gBAAgBS,aAAehD,OAAOqC,aAE1DwF,EAAU+B,SAAS,EAAG/B,EAAU7E,cAGhBV,SAASuH,cAAc,mBAc3C,CAKEC,CAAoBP,GAwDdF,GAAU,CACZ,IAEAA,GAAU,EAEd,IACArJ,OAAO+J,QACT,CA6BEC,GA1BkB,OAAdnC,GAKJ,IAAI,IAAJ,CAAY,cAAe,CACzBrH,QAAQ,EACRyJ,WAAW,EACX9J,SAAU,iBACVI,OAAQ,KACN,IAAI2J,EAAMhI,WAAWiI,iBAAiB7H,SAASC,iBAAiB6H,UAChE,OAAOtC,EAAO7F,wBAAwBoI,OAAS,IAAMH,EAAM,CAAC,GAiBlE,CAcA5H,SAAS8D,iBAAiB,oBAT1B,WACE9D,SAASS,KAAKW,WAAWG,UAAUC,OAAO,SAE1CgE,EAASxF,SAASuH,cAAc,UAChChC,EAAYvF,SAASuH,cAAc,eAEnC1D,GACF","sources":["webpack:///./src/furo/assets/scripts/gumshoe-patched.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./src/furo/assets/scripts/furo.js"],"sourcesContent":["/*!\n * gumshoejs v5.1.2 (patched by @pradyunsg)\n * A simple, framework-agnostic scrollspy script.\n * (c) 2019 Chris Ferdinandi\n * MIT License\n * http://github.com/cferdinandi/gumshoe\n */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], function () {\n return factory(root);\n });\n } else if (typeof exports === \"object\") {\n module.exports = factory(root);\n } else {\n root.Gumshoe = factory(root);\n }\n})(\n typeof global !== \"undefined\"\n ? global\n : typeof window !== \"undefined\"\n ? window\n : this,\n function (window) {\n \"use strict\";\n\n //\n // Defaults\n //\n\n var defaults = {\n // Active classes\n navClass: \"active\",\n contentClass: \"active\",\n\n // Nested navigation\n nested: false,\n nestedClass: \"active\",\n\n // Offset & reflow\n offset: 0,\n reflow: false,\n\n // Event support\n events: true,\n };\n\n //\n // Methods\n //\n\n /**\n * Merge two or more objects together.\n * @param {Object} objects The objects to merge together\n * @returns {Object} Merged values of defaults and options\n */\n var extend = function () {\n var merged = {};\n Array.prototype.forEach.call(arguments, function (obj) {\n for (var key in obj) {\n if (!obj.hasOwnProperty(key)) return;\n merged[key] = obj[key];\n }\n });\n return merged;\n };\n\n /**\n * Emit a custom event\n * @param {String} type The event type\n * @param {Node} elem The element to attach the event to\n * @param {Object} detail Any details to pass along with the event\n */\n var emitEvent = function (type, elem, detail) {\n // Make sure events are enabled\n if (!detail.settings.events) return;\n\n // Create a new event\n var event = new CustomEvent(type, {\n bubbles: true,\n cancelable: true,\n detail: detail,\n });\n\n // Dispatch the event\n elem.dispatchEvent(event);\n };\n\n /**\n * Get an element's distance from the top of the Document.\n * @param {Node} elem The element\n * @return {Number} Distance from the top in pixels\n */\n var getOffsetTop = function (elem) {\n var location = 0;\n if (elem.offsetParent) {\n while (elem) {\n location += elem.offsetTop;\n elem = elem.offsetParent;\n }\n }\n return location >= 0 ? location : 0;\n };\n\n /**\n * Sort content from first to last in the DOM\n * @param {Array} contents The content areas\n */\n var sortContents = function (contents) {\n if (contents) {\n contents.sort(function (item1, item2) {\n var offset1 = getOffsetTop(item1.content);\n var offset2 = getOffsetTop(item2.content);\n if (offset1 < offset2) return -1;\n return 1;\n });\n }\n };\n\n /**\n * Get the offset to use for calculating position\n * @param {Object} settings The settings for this instantiation\n * @return {Float} The number of pixels to offset the calculations\n */\n var getOffset = function (settings) {\n // if the offset is a function run it\n if (typeof settings.offset === \"function\") {\n return parseFloat(settings.offset());\n }\n\n // Otherwise, return it as-is\n return parseFloat(settings.offset);\n };\n\n /**\n * Get the document element's height\n * @private\n * @returns {Number}\n */\n var getDocumentHeight = function () {\n return Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.offsetHeight,\n document.body.clientHeight,\n document.documentElement.clientHeight,\n );\n };\n\n /**\n * Determine if an element is in view\n * @param {Node} elem The element\n * @param {Object} settings The settings for this instantiation\n * @param {Boolean} bottom If true, check if element is above bottom of viewport instead\n * @return {Boolean} Returns true if element is in the viewport\n */\n var isInView = function (elem, settings, bottom) {\n var bounds = elem.getBoundingClientRect();\n var offset = getOffset(settings);\n if (bottom) {\n return (\n parseInt(bounds.bottom, 10) <\n (window.innerHeight || document.documentElement.clientHeight)\n );\n }\n return parseInt(bounds.top, 10) <= offset;\n };\n\n /**\n * Check if at the bottom of the viewport\n * @return {Boolean} If true, page is at the bottom of the viewport\n */\n var isAtBottom = function () {\n if (\n Math.ceil(window.innerHeight + window.pageYOffset) >=\n getDocumentHeight()\n )\n return true;\n return false;\n };\n\n /**\n * Check if the last item should be used (even if not at the top of the page)\n * @param {Object} item The last item\n * @param {Object} settings The settings for this instantiation\n * @return {Boolean} If true, use the last item\n */\n var useLastItem = function (item, settings) {\n if (isAtBottom() && isInView(item.content, settings, true)) return true;\n return false;\n };\n\n /**\n * Get the active content\n * @param {Array} contents The content areas\n * @param {Object} settings The settings for this instantiation\n * @return {Object} The content area and matching navigation link\n */\n var getActive = function (contents, settings) {\n var last = contents[contents.length - 1];\n if (useLastItem(last, settings)) return last;\n for (var i = contents.length - 1; i >= 0; i--) {\n if (isInView(contents[i].content, settings)) return contents[i];\n }\n };\n\n /**\n * Deactivate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var deactivateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested || !nav.parentNode) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Remove the active class\n li.classList.remove(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n deactivateNested(li, settings);\n };\n\n /**\n * Deactivate a nav and content area\n * @param {Object} items The nav item and content to deactivate\n * @param {Object} settings The settings for this instantiation\n */\n var deactivate = function (items, settings) {\n // Make sure there are items to deactivate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Remove the active class from the nav and content\n li.classList.remove(settings.navClass);\n items.content.classList.remove(settings.contentClass);\n\n // Deactivate any parent navs in a nested navigation\n deactivateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeDeactivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Activate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var activateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Add the active class\n li.classList.add(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n activateNested(li, settings);\n };\n\n /**\n * Activate a nav and content area\n * @param {Object} items The nav item and content to activate\n * @param {Object} settings The settings for this instantiation\n */\n var activate = function (items, settings) {\n // Make sure there are items to activate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Add the active class to the nav and content\n li.classList.add(settings.navClass);\n items.content.classList.add(settings.contentClass);\n\n // Activate any parent navs in a nested navigation\n activateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeActivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Create the Constructor object\n * @param {String} selector The selector to use for navigation items\n * @param {Object} options User options and settings\n */\n var Constructor = function (selector, options) {\n //\n // Variables\n //\n\n var publicAPIs = {};\n var navItems, contents, current, timeout, settings;\n\n //\n // Methods\n //\n\n /**\n * Set variables from DOM elements\n */\n publicAPIs.setup = function () {\n // Get all nav items\n navItems = document.querySelectorAll(selector);\n\n // Create contents array\n contents = [];\n\n // Loop through each item, get it's matching content, and push to the array\n Array.prototype.forEach.call(navItems, function (item) {\n // Get the content for the nav item\n var content = document.getElementById(\n decodeURIComponent(item.hash.substr(1)),\n );\n if (!content) return;\n\n // Push to the contents array\n contents.push({\n nav: item,\n content: content,\n });\n });\n\n // Sort contents by the order they appear in the DOM\n sortContents(contents);\n };\n\n /**\n * Detect which content is currently active\n */\n publicAPIs.detect = function () {\n // Get the active content\n var active = getActive(contents, settings);\n\n // if there's no active content, deactivate and bail\n if (!active) {\n if (current) {\n deactivate(current, settings);\n current = null;\n }\n return;\n }\n\n // If the active content is the one currently active, do nothing\n if (current && active.content === current.content) return;\n\n // Deactivate the current content and activate the new content\n deactivate(current, settings);\n activate(active, settings);\n\n // Update the currently active content\n current = active;\n };\n\n /**\n * Detect the active content on scroll\n * Debounced for performance\n */\n var scrollHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(publicAPIs.detect);\n };\n\n /**\n * Update content sorting on resize\n * Debounced for performance\n */\n var resizeHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(function () {\n sortContents(contents);\n publicAPIs.detect();\n });\n };\n\n /**\n * Destroy the current instantiation\n */\n publicAPIs.destroy = function () {\n // Undo DOM changes\n if (current) {\n deactivate(current, settings);\n }\n\n // Remove event listeners\n window.removeEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.removeEventListener(\"resize\", resizeHandler, false);\n }\n\n // Reset variables\n contents = null;\n navItems = null;\n current = null;\n timeout = null;\n settings = null;\n };\n\n /**\n * Initialize the current instantiation\n */\n var init = function () {\n // Merge user options into defaults\n settings = extend(defaults, options || {});\n\n // Setup variables based on the current DOM\n publicAPIs.setup();\n\n // Find the currently active content\n publicAPIs.detect();\n\n // Setup event listeners\n window.addEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.addEventListener(\"resize\", resizeHandler, false);\n }\n };\n\n //\n // Initialize and return the public APIs\n //\n\n init();\n return publicAPIs;\n };\n\n //\n // Return the Constructor\n //\n\n return Constructor;\n },\n);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import Gumshoe from \"./gumshoe-patched.js\";\n\n////////////////////////////////////////////////////////////////////////////////\n// Scroll Handling\n////////////////////////////////////////////////////////////////////////////////\nvar tocScroll = null;\nvar header = null;\nvar lastScrollTop = document.documentElement.scrollTop;\nconst GO_TO_TOP_OFFSET = 64;\n\nfunction scrollHandlerForHeader(positionY) {\n const headerTop = Math.floor(header.getBoundingClientRect().top);\n\n console.log(`headerTop: ${headerTop}`);\n if (headerTop == 0 && positionY != headerTop) {\n header.classList.add(\"scrolled\");\n } else {\n header.classList.remove(\"scrolled\");\n }\n}\n\nfunction scrollHandlerForBackToTop(positionY) {\n if (positionY < GO_TO_TOP_OFFSET) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n } else {\n if (positionY < lastScrollTop) {\n document.documentElement.classList.add(\"show-back-to-top\");\n } else if (positionY > lastScrollTop) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n }\n }\n lastScrollTop = positionY;\n}\n\nfunction scrollHandlerForTOC(positionY) {\n if (tocScroll === null) {\n return;\n }\n\n // top of page.\n if (positionY == 0) {\n tocScroll.scrollTo(0, 0);\n } else if (\n // bottom of page.\n Math.ceil(positionY) >=\n Math.floor(document.documentElement.scrollHeight - window.innerHeight)\n ) {\n tocScroll.scrollTo(0, tocScroll.scrollHeight);\n } else {\n // somewhere in the middle.\n const current = document.querySelector(\".scroll-current\");\n if (current == null) {\n return;\n }\n\n // https://github.com/pypa/pip/issues/9159 This breaks scroll behaviours.\n // // scroll the currently \"active\" heading in toc, into view.\n // const rect = current.getBoundingClientRect();\n // if (0 > rect.top) {\n // current.scrollIntoView(true); // the argument is \"alignTop\"\n // } else if (rect.bottom > window.innerHeight) {\n // current.scrollIntoView(false);\n // }\n }\n}\n\nfunction scrollHandler(positionY) {\n scrollHandlerForHeader(positionY);\n scrollHandlerForBackToTop(positionY);\n scrollHandlerForTOC(positionY);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Theme Toggle\n////////////////////////////////////////////////////////////////////////////////\nfunction setTheme(mode) {\n if (mode !== \"light\" && mode !== \"dark\" && mode !== \"auto\") {\n console.error(`Got invalid theme mode: ${mode}. Resetting to auto.`);\n mode = \"auto\";\n }\n\n document.body.dataset.theme = mode;\n localStorage.setItem(\"theme\", mode);\n console.log(`Changed to ${mode} mode.`);\n}\n\nfunction cycleThemeOnce() {\n const currentTheme = localStorage.getItem(\"theme\") || \"auto\";\n const prefersDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n\n if (prefersDark) {\n // Auto (dark) -> Light -> Dark\n if (currentTheme === \"auto\") {\n setTheme(\"light\");\n } else if (currentTheme == \"light\") {\n setTheme(\"dark\");\n } else {\n setTheme(\"auto\");\n }\n } else {\n // Auto (light) -> Dark -> Light\n if (currentTheme === \"auto\") {\n setTheme(\"dark\");\n } else if (currentTheme == \"dark\") {\n setTheme(\"light\");\n } else {\n setTheme(\"auto\");\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Setup\n////////////////////////////////////////////////////////////////////////////////\nfunction setupScrollHandler() {\n // Taken from https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event\n let last_known_scroll_position = 0;\n let ticking = false;\n\n window.addEventListener(\"scroll\", function (e) {\n last_known_scroll_position = window.scrollY;\n\n if (!ticking) {\n window.requestAnimationFrame(function () {\n scrollHandler(last_known_scroll_position);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n window.scroll();\n}\n\nfunction setupScrollSpy() {\n if (tocScroll === null) {\n return;\n }\n\n // Scrollspy -- highlight table on contents, based on scroll\n new Gumshoe(\".toc-tree a\", {\n reflow: true,\n recursive: true,\n navClass: \"scroll-current\",\n offset: () => {\n let rem = parseFloat(getComputedStyle(document.documentElement).fontSize);\n return header.getBoundingClientRect().height + 2.5 * rem + 1;\n },\n });\n}\n\nfunction setupTheme() {\n // Attach event handlers for toggling themes\n const buttons = document.getElementsByClassName(\"theme-toggle\");\n Array.from(buttons).forEach((btn) => {\n btn.addEventListener(\"click\", cycleThemeOnce);\n });\n}\n\nfunction setup() {\n setupTheme();\n setupScrollHandler();\n setupScrollSpy();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Main entrypoint\n////////////////////////////////////////////////////////////////////////////////\nfunction main() {\n document.body.parentNode.classList.remove(\"no-js\");\n\n header = document.querySelector(\"header\");\n tocScroll = document.querySelector(\".toc-scroll\");\n\n setup();\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", main);\n"],"names":["root","g","window","this","defaults","navClass","contentClass","nested","nestedClass","offset","reflow","events","emitEvent","type","elem","detail","settings","event","CustomEvent","bubbles","cancelable","dispatchEvent","getOffsetTop","location","offsetParent","offsetTop","sortContents","contents","sort","item1","item2","content","isInView","bottom","bounds","getBoundingClientRect","parseFloat","getOffset","parseInt","innerHeight","document","documentElement","clientHeight","top","isAtBottom","Math","ceil","pageYOffset","max","body","scrollHeight","offsetHeight","getActive","last","length","item","useLastItem","i","deactivateNested","nav","parentNode","li","closest","classList","remove","deactivate","items","link","activateNested","add","selector","options","navItems","current","timeout","publicAPIs","querySelectorAll","Array","prototype","forEach","call","getElementById","decodeURIComponent","hash","substr","push","active","activate","scrollHandler","cancelAnimationFrame","requestAnimationFrame","detect","resizeHandler","destroy","removeEventListener","merged","arguments","obj","key","hasOwnProperty","extend","setup","addEventListener","factory","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","globalThis","Function","e","prop","tocScroll","header","lastScrollTop","scrollTop","GO_TO_TOP_OFFSET","cycleThemeOnce","currentTheme","localStorage","getItem","mode","matchMedia","matches","console","error","dataset","theme","setItem","log","buttons","getElementsByClassName","from","btn","setupTheme","last_known_scroll_position","ticking","scrollY","positionY","headerTop","floor","scrollHandlerForHeader","scrollHandlerForBackToTop","scrollTo","querySelector","scrollHandlerForTOC","scroll","setupScrollHandler","recursive","rem","getComputedStyle","fontSize","height"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/_static/searchtools.js b/docs/cuda-bindings/12.6.1/_static/searchtools.js new file mode 100644 index 000000000..2c774d17a --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/searchtools.js @@ -0,0 +1,632 @@ +/* + * Sphinx JavaScript utilities for the full-text search. + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename, kind] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +// Global search result kind enum, used by themes to style search results. +class SearchResultKind { + static get index() { return "index"; } + static get object() { return "object"; } + static get text() { return "text"; } + static get title() { return "title"; } +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping + */ +const _escapeRegExp = (string) => + string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string + +const _displayItem = (item, searchTerms, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename, kind] = item; + + let listItem = document.createElement("li"); + // Add a class representing the item's type: + // can be used by a theme's CSS selector for styling + // See SearchResultKind for the class names. + listItem.classList.add(`kind-${kind}`); + let requestUrl; + let linkUrl; + if (docBuilder === "dirhtml") { + // dirhtml builder + let dirname = docName + "/"; + if (dirname.match(/\/index\/$/)) + dirname = dirname.substring(0, dirname.length - 6); + else if (dirname === "index/") dirname = ""; + requestUrl = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + docName + docFileSuffix; + linkUrl = docName + docLinkSuffix; + } + let linkEl = listItem.appendChild(document.createElement("a")); + linkEl.href = linkUrl + anchor; + linkEl.dataset.score = score; + linkEl.innerHTML = title; + if (descr) { + listItem.appendChild(document.createElement("span")).innerHTML = + " (" + descr + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + Search.output.appendChild(listItem); +}; +const _finishSearch = (resultCount) => { + Search.stopPulse(); + Search.title.innerText = _("Search Results"); + if (!resultCount) + Search.status.innerText = Documentation.gettext( + "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." + ); + else + Search.status.innerText = Documentation.ngettext( + "Search finished, found one page matching the search query.", + "Search finished, found ${resultCount} pages matching the search query.", + resultCount, + ).replace('${resultCount}', resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // results left, load the summary and display it + // this is intended to be dynamic (don't sub resultsCount) + if (results.length) { + _displayItem(results.pop(), searchTerms, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * Default splitQuery function. Can be overridden in ``sphinx.search`` with a + * custom function per language. + * + * The regular expression works by splitting the string on consecutive characters + * that are not Unicode letters, numbers, underscores, or emoji characters. + * This is the same as ``\W+`` in Python, preserving the surrogate pair area. + */ +if (typeof splitQuery === "undefined") { + var splitQuery = (query) => query + .split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu) + .filter(term => term) // remove remaining empty strings +} + +/** + * Search Module + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.setAttribute("role", "list"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + Search.title = out.appendChild(searchText); + Search.dots = Search.title.appendChild(document.createElement("span")); + Search.status = out.appendChild(searchSummary); + Search.output = out.appendChild(searchList); + + const searchProgress = document.getElementById("search-progress"); + // Some themes don't use the search progress node + if (searchProgress) { + searchProgress.innerText = _("Preparing search..."); + } + Search.startPulse(); + + // index already loaded, the browser was quick! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename, kind]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score + boost, + filenames[file], + SearchResultKind.title, + ]); + } + } + } + + // search for explicit entries in index directives + for (const [entry, foundEntries] of Object.entries(indexEntries)) { + if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { + for (const [file, id, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + SearchResultKind.index, + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // remove duplicate search results + // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept + let seen = new Set(); + results = results.reverse().reduce((acc, result) => { + let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(','); + if (!seen.has(resultStr)) { + acc.push(result); + seen.add(resultStr); + } + return acc; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const parts = fullnameLower.split("."); + + // check for different match types: exact matches of full name or + // "last name" (i.e. last dotted part) + if (fullnameLower === object || parts.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + const title = titles[match[0]]; + + // If more than one term searched for, we require other words to be + // found in the name/title/description + const otherTerms = new Set(objectTerms); + otherTerms.delete(object); + if (otherTerms.size > 0) { + const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase(); + if ( + [...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0) + ) + return; + } + + let anchor = match[3]; + if (anchor === "") anchor = fullname; + else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname; + + const descr = objName + _(", in ") + title; + + // add custom score for some objects according to scorer + if (Scorer.objPrio.hasOwnProperty(match[2])) + score += Scorer.objPrio[match[2]]; + else score += Scorer.objPrioDefault; + + results.push([ + docNames[match[0]], + fullname, + "#" + anchor, + descr, + score, + filenames[match[0]], + SearchResultKind.object, + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + const arr = [ + { files: terms[word], score: Scorer.term }, + { files: titleTerms[word], score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, {}); + scoreMap.get(file)[word] = record.score; + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w])); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + SearchResultKind.text, + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/docs/cuda-bindings/12.6.1/_static/skeleton.css b/docs/cuda-bindings/12.6.1/_static/skeleton.css new file mode 100644 index 000000000..467c878c6 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/skeleton.css @@ -0,0 +1,296 @@ +/* Some sane resets. */ +html { + height: 100%; +} + +body { + margin: 0; + min-height: 100%; +} + +/* All the flexbox magic! */ +body, +.sb-announcement, +.sb-content, +.sb-main, +.sb-container, +.sb-container__inner, +.sb-article-container, +.sb-footer-content, +.sb-header, +.sb-header-secondary, +.sb-footer { + display: flex; +} + +/* These order things vertically */ +body, +.sb-main, +.sb-article-container { + flex-direction: column; +} + +/* Put elements in the center */ +.sb-header, +.sb-header-secondary, +.sb-container, +.sb-content, +.sb-footer, +.sb-footer-content { + justify-content: center; +} +/* Put elements at the ends */ +.sb-article-container { + justify-content: space-between; +} + +/* These elements grow. */ +.sb-main, +.sb-content, +.sb-container, +article { + flex-grow: 1; +} + +/* Because padding making this wider is not fun */ +article { + box-sizing: border-box; +} + +/* The announcements element should never be wider than the page. */ +.sb-announcement { + max-width: 100%; +} + +.sb-sidebar-primary, +.sb-sidebar-secondary { + flex-shrink: 0; + width: 17rem; +} + +.sb-announcement__inner { + justify-content: center; + + box-sizing: border-box; + height: 3rem; + + overflow-x: auto; + white-space: nowrap; +} + +/* Sidebars, with checkbox-based toggle */ +.sb-sidebar-primary, +.sb-sidebar-secondary { + position: fixed; + height: 100%; + top: 0; +} + +.sb-sidebar-primary { + left: -17rem; + transition: left 250ms ease-in-out; +} +.sb-sidebar-secondary { + right: -17rem; + transition: right 250ms ease-in-out; +} + +.sb-sidebar-toggle { + display: none; +} +.sb-sidebar-overlay { + position: fixed; + top: 0; + width: 0; + height: 0; + + transition: width 0ms ease 250ms, height 0ms ease 250ms, opacity 250ms ease; + + opacity: 0; + background-color: rgba(0, 0, 0, 0.54); +} + +#sb-sidebar-toggle--primary:checked + ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--primary"], +#sb-sidebar-toggle--secondary:checked + ~ .sb-sidebar-overlay[for="sb-sidebar-toggle--secondary"] { + width: 100%; + height: 100%; + opacity: 1; + transition: width 0ms ease, height 0ms ease, opacity 250ms ease; +} + +#sb-sidebar-toggle--primary:checked ~ .sb-container .sb-sidebar-primary { + left: 0; +} +#sb-sidebar-toggle--secondary:checked ~ .sb-container .sb-sidebar-secondary { + right: 0; +} + +/* Full-width mode */ +.drop-secondary-sidebar-for-full-width-content + .hide-when-secondary-sidebar-shown { + display: none !important; +} +.drop-secondary-sidebar-for-full-width-content .sb-sidebar-secondary { + display: none !important; +} + +/* Mobile views */ +.sb-page-width { + width: 100%; +} + +.sb-article-container, +.sb-footer-content__inner, +.drop-secondary-sidebar-for-full-width-content .sb-article, +.drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 100vw; +} + +.sb-article, +.match-content-width { + padding: 0 1rem; + box-sizing: border-box; +} + +@media (min-width: 32rem) { + .sb-article, + .match-content-width { + padding: 0 2rem; + } +} + +/* Tablet views */ +@media (min-width: 42rem) { + .sb-article-container { + width: auto; + } + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 42rem; + } + .sb-article, + .match-content-width { + width: 42rem; + } +} +@media (min-width: 46rem) { + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 46rem; + } + .sb-article, + .match-content-width { + width: 46rem; + } +} +@media (min-width: 50rem) { + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 50rem; + } + .sb-article, + .match-content-width { + width: 50rem; + } +} + +/* Tablet views */ +@media (min-width: 59rem) { + .sb-sidebar-secondary { + position: static; + } + .hide-when-secondary-sidebar-shown { + display: none !important; + } + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 59rem; + } + .sb-article, + .match-content-width { + width: 42rem; + } +} +@media (min-width: 63rem) { + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 63rem; + } + .sb-article, + .match-content-width { + width: 46rem; + } +} +@media (min-width: 67rem) { + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 67rem; + } + .sb-article, + .match-content-width { + width: 50rem; + } +} + +/* Desktop views */ +@media (min-width: 76rem) { + .sb-sidebar-primary { + position: static; + } + .hide-when-primary-sidebar-shown { + display: none !important; + } + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 59rem; + } + .sb-article, + .match-content-width { + width: 42rem; + } +} + +/* Full desktop views */ +@media (min-width: 80rem) { + .sb-article, + .match-content-width { + width: 46rem; + } + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 63rem; + } +} + +@media (min-width: 84rem) { + .sb-article, + .match-content-width { + width: 50rem; + } + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 67rem; + } +} + +@media (min-width: 88rem) { + .sb-footer-content__inner, + .drop-secondary-sidebar-for-full-width-content .sb-article, + .drop-secondary-sidebar-for-full-width-content .match-content-width { + width: 67rem; + } + .sb-page-width { + width: 88rem; + } +} diff --git a/docs/cuda-bindings/12.6.1/_static/sphinx_highlight.js b/docs/cuda-bindings/12.6.1/_static/sphinx_highlight.js new file mode 100644 index 000000000..8a96c69a1 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* Highlighting utilities for Sphinx HTML documentation. */ +"use strict"; + +const SPHINX_HIGHLIGHT_ENABLED = true + +/** + * highlight a given string on a node by wrapping it in + * span elements with the given class name. + */ +const _highlight = (node, addItems, text, className) => { + if (node.nodeType === Node.TEXT_NODE) { + const val = node.nodeValue; + const parent = node.parentNode; + const pos = val.toLowerCase().indexOf(text); + if ( + pos >= 0 && + !parent.classList.contains(className) && + !parent.classList.contains("nohighlight") + ) { + let span; + + const closestNode = parent.closest("body, svg, foreignObject"); + const isInSVG = closestNode && closestNode.matches("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.classList.add(className); + } + + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + if (isInSVG) { + const rect = document.createElementNS( + "http://www.w3.org/2000/svg", + "rect" + ); + const bbox = parent.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute("class", className); + addItems.push({ parent: parent, target: rect }); + } + } + } else if (node.matches && !node.matches("button, select, textarea")) { + node.childNodes.forEach((el) => _highlight(el, addItems, text, className)); + } +}; +const _highlightText = (thisNode, text, className) => { + let addItems = []; + _highlight(thisNode, addItems, text, className); + addItems.forEach((obj) => + obj.parent.insertAdjacentElement("beforebegin", obj.target) + ); +}; + +/** + * Small JavaScript module for the documentation. + */ +const SphinxHighlight = { + + /** + * highlight the search words provided in localstorage in the text + */ + highlightSearchWords: () => { + if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight + + // get and clear terms from localstorage + const url = new URL(window.location); + const highlight = + localStorage.getItem("sphinx_highlight_terms") + || url.searchParams.get("highlight") + || ""; + localStorage.removeItem("sphinx_highlight_terms") + url.searchParams.delete("highlight"); + window.history.replaceState({}, "", url); + + // get individual terms from highlight string + const terms = highlight.toLowerCase().split(/\s+/).filter(x => x); + if (terms.length === 0) return; // nothing to do + + // There should never be more than one element matching "div.body" + const divBody = document.querySelectorAll("div.body"); + const body = divBody.length ? divBody[0] : document.querySelector("body"); + window.setTimeout(() => { + terms.forEach((term) => _highlightText(body, term, "highlighted")); + }, 10); + + const searchBox = document.getElementById("searchbox"); + if (searchBox === null) return; + searchBox.appendChild( + document + .createRange() + .createContextualFragment( + '" + ) + ); + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords: () => { + document + .querySelectorAll("#searchbox .highlight-link") + .forEach((el) => el.remove()); + document + .querySelectorAll("span.highlighted") + .forEach((el) => el.classList.remove("highlighted")); + localStorage.removeItem("sphinx_highlight_terms") + }, + + initEscapeListener: () => { + // only install a listener if it is really needed + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return; + if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) { + SphinxHighlight.hideSearchWords(); + event.preventDefault(); + } + }); + }, +}; + +_ready(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/docs/cuda-bindings/12.6.1/_static/styles/furo-extensions.css b/docs/cuda-bindings/12.6.1/_static/styles/furo-extensions.css new file mode 100644 index 000000000..822958761 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/styles/furo-extensions.css @@ -0,0 +1,2 @@ +#furo-sidebar-ad-placement{padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)}#furo-sidebar-ad-placement .ethical-sidebar{background:var(--color-background-secondary);border:none;box-shadow:none}#furo-sidebar-ad-placement .ethical-sidebar:hover{background:var(--color-background-hover)}#furo-sidebar-ad-placement .ethical-sidebar a{color:var(--color-foreground-primary)}#furo-sidebar-ad-placement .ethical-callout a{color:var(--color-foreground-secondary)!important}#furo-readthedocs-versions{background:transparent;display:block;position:static;width:100%}#furo-readthedocs-versions .rst-versions{background:#1a1c1e}#furo-readthedocs-versions .rst-current-version{background:var(--color-sidebar-item-background);cursor:unset}#furo-readthedocs-versions .rst-current-version:hover{background:var(--color-sidebar-item-background)}#furo-readthedocs-versions .rst-current-version .fa-book{color:var(--color-foreground-primary)}#furo-readthedocs-versions>.rst-other-versions{padding:0}#furo-readthedocs-versions>.rst-other-versions small{opacity:1}#furo-readthedocs-versions .injected .rst-versions{position:unset}#furo-readthedocs-versions:focus-within,#furo-readthedocs-versions:hover{box-shadow:0 0 0 1px var(--color-sidebar-background-border)}#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:hover .rst-current-version{background:#1a1c1e;font-size:inherit;height:auto;line-height:inherit;padding:12px;text-align:right}#furo-readthedocs-versions:focus-within .rst-current-version .fa-book,#furo-readthedocs-versions:hover .rst-current-version .fa-book{color:#fff;float:left}#furo-readthedocs-versions:focus-within .fa-caret-down,#furo-readthedocs-versions:hover .fa-caret-down{display:none}#furo-readthedocs-versions:focus-within .injected,#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:focus-within .rst-other-versions,#furo-readthedocs-versions:hover .injected,#furo-readthedocs-versions:hover .rst-current-version,#furo-readthedocs-versions:hover .rst-other-versions{display:block}#furo-readthedocs-versions:focus-within>.rst-current-version,#furo-readthedocs-versions:hover>.rst-current-version{display:none}.highlight:hover button.copybtn{color:var(--color-code-foreground)}.highlight button.copybtn{align-items:center;background-color:var(--color-code-background);border:none;color:var(--color-background-item);cursor:pointer;height:1.25em;right:.5rem;top:.625rem;transition:color .3s,opacity .3s;width:1.25em}.highlight button.copybtn:hover{background-color:var(--color-code-background);color:var(--color-brand-content)}.highlight button.copybtn:after{background-color:transparent;color:var(--color-code-foreground);display:none}.highlight button.copybtn.success{color:#22863a;transition:color 0ms}.highlight button.copybtn.success:after{display:block}.highlight button.copybtn svg{padding:0}body{--sd-color-primary:var(--color-brand-primary);--sd-color-primary-highlight:var(--color-brand-content);--sd-color-primary-text:var(--color-background-primary);--sd-color-shadow:rgba(0,0,0,.05);--sd-color-card-border:var(--color-card-border);--sd-color-card-border-hover:var(--color-brand-content);--sd-color-card-background:var(--color-card-background);--sd-color-card-text:var(--color-foreground-primary);--sd-color-card-header:var(--color-card-marginals-background);--sd-color-card-footer:var(--color-card-marginals-background);--sd-color-tabs-label-active:var(--color-brand-content);--sd-color-tabs-label-hover:var(--color-foreground-muted);--sd-color-tabs-label-inactive:var(--color-foreground-muted);--sd-color-tabs-underline-active:var(--color-brand-content);--sd-color-tabs-underline-hover:var(--color-foreground-border);--sd-color-tabs-underline-inactive:var(--color-background-border);--sd-color-tabs-overline:var(--color-background-border);--sd-color-tabs-underline:var(--color-background-border)}.sd-tab-content{box-shadow:0 -2px var(--sd-color-tabs-overline),0 1px var(--sd-color-tabs-underline)}.sd-card{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)}.sd-shadow-sm{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-md{box-shadow:0 .3rem .75rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-lg{box-shadow:0 .6rem 1.5rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-card-hover:hover{transform:none}.sd-cards-carousel{gap:.25rem;padding:.25rem}body{--tabs--label-text:var(--color-foreground-muted);--tabs--label-text--hover:var(--color-foreground-muted);--tabs--label-text--active:var(--color-brand-content);--tabs--label-text--active--hover:var(--color-brand-content);--tabs--label-background:transparent;--tabs--label-background--hover:transparent;--tabs--label-background--active:transparent;--tabs--label-background--active--hover:transparent;--tabs--padding-x:0.25em;--tabs--margin-x:1em;--tabs--border:var(--color-background-border);--tabs--label-border:transparent;--tabs--label-border--hover:var(--color-foreground-muted);--tabs--label-border--active:var(--color-brand-content);--tabs--label-border--active--hover:var(--color-brand-content)}[role=main] .container{max-width:none;padding-left:0;padding-right:0}.shadow.docutils{border:none;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1)!important}.sphinx-bs .card{background-color:var(--color-background-secondary);color:var(--color-foreground)} +/*# sourceMappingURL=furo-extensions.css.map*/ \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/_static/styles/furo-extensions.css.map b/docs/cuda-bindings/12.6.1/_static/styles/furo-extensions.css.map new file mode 100644 index 000000000..c26eac7f5 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/styles/furo-extensions.css.map @@ -0,0 +1 @@ +{"version":3,"file":"styles/furo-extensions.css","mappings":"AAGA,2BACE,oFACA,4CAKE,6CAHA,YACA,eAEA,CACA,kDACE,yCAEF,8CACE,sCAEJ,8CACE,kDAEJ,2BAGE,uBACA,cAHA,gBACA,UAEA,CAGA,yCACE,mBAEF,gDAEE,gDADA,YACA,CACA,sDACE,gDACF,yDACE,sCAEJ,+CACE,UACA,qDACE,UAGF,mDACE,eAEJ,yEAEE,4DAEA,mHASE,mBAPA,kBAEA,YADA,oBAGA,aADA,gBAIA,CAEA,qIAEE,WADA,UACA,CAEJ,uGACE,aAEF,iUAGE,cAEF,mHACE,aC1EJ,gCACE,mCAEF,0BAEE,mBAUA,8CACA,YAFA,mCAKA,eAZA,cAIA,YADA,YAYA,iCAdA,YAcA,CAEA,gCAEE,8CADA,gCACA,CAEF,gCAGE,6BADA,mCADA,YAEA,CAEF,kCAEE,cADA,oBACA,CACA,wCACE,cAEJ,8BACE,UCzCN,KAEE,6CAA8C,CAC9C,uDAAwD,CACxD,uDAAwD,CAGxD,iCAAsC,CAGtC,+CAAgD,CAChD,uDAAwD,CACxD,uDAAwD,CACxD,oDAAqD,CACrD,6DAA8D,CAC9D,6DAA8D,CAG9D,uDAAwD,CACxD,yDAA0D,CAC1D,4DAA6D,CAC7D,2DAA4D,CAC5D,8DAA+D,CAC/D,iEAAkE,CAClE,uDAAwD,CACxD,wDAAyD,CAG3D,gBACE,qFAGF,SACE,6EAEF,cACE,uFAEF,cACE,uFAEF,cACE,uFAGF,qBACE,eAEF,mBACE,WACA,eChDF,KACE,gDAAiD,CACjD,uDAAwD,CACxD,qDAAsD,CACtD,4DAA6D,CAC7D,oCAAqC,CACrC,2CAA4C,CAC5C,4CAA6C,CAC7C,mDAAoD,CACpD,wBAAyB,CACzB,oBAAqB,CACrB,6CAA8C,CAC9C,gCAAiC,CACjC,yDAA0D,CAC1D,uDAAwD,CACxD,8DAA+D,CCbjE,uBACE,eACA,eACA,gBAGF,iBACE,YACA,+EAGF,iBACE,mDACA","sources":["webpack:///./src/furo/assets/styles/extensions/_readthedocs.sass","webpack:///./src/furo/assets/styles/extensions/_copybutton.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-design.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-inline-tabs.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-panels.sass"],"sourcesContent":["// This file contains the styles used for tweaking how ReadTheDoc's embedded\n// contents would show up inside the theme.\n\n#furo-sidebar-ad-placement\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n .ethical-sidebar\n // Remove the border and box-shadow.\n border: none\n box-shadow: none\n // Manage the background colors.\n background: var(--color-background-secondary)\n &:hover\n background: var(--color-background-hover)\n // Ensure the text is legible.\n a\n color: var(--color-foreground-primary)\n\n .ethical-callout a\n color: var(--color-foreground-secondary) !important\n\n#furo-readthedocs-versions\n position: static\n width: 100%\n background: transparent\n display: block\n\n // Make the background color fit with the theme's aesthetic.\n .rst-versions\n background: rgb(26, 28, 30)\n\n .rst-current-version\n cursor: unset\n background: var(--color-sidebar-item-background)\n &:hover\n background: var(--color-sidebar-item-background)\n .fa-book\n color: var(--color-foreground-primary)\n\n > .rst-other-versions\n padding: 0\n small\n opacity: 1\n\n .injected\n .rst-versions\n position: unset\n\n &:hover,\n &:focus-within\n box-shadow: 0 0 0 1px var(--color-sidebar-background-border)\n\n .rst-current-version\n // Undo the tweaks done in RTD's CSS\n font-size: inherit\n line-height: inherit\n height: auto\n text-align: right\n padding: 12px\n\n // Match the rest of the body\n background: #1a1c1e\n\n .fa-book\n float: left\n color: white\n\n .fa-caret-down\n display: none\n\n .rst-current-version,\n .rst-other-versions,\n .injected\n display: block\n\n > .rst-current-version\n display: none\n",".highlight\n &:hover button.copybtn\n color: var(--color-code-foreground)\n\n button.copybtn\n // Align things correctly\n align-items: center\n\n height: 1.25em\n width: 1.25em\n\n top: 0.625rem // $code-spacing-vertical\n right: 0.5rem\n\n // Make it look better\n color: var(--color-background-item)\n background-color: var(--color-code-background)\n border: none\n\n // Change to cursor to make it obvious that you can click on it\n cursor: pointer\n\n // Transition smoothly, for aesthetics\n transition: color 300ms, opacity 300ms\n\n &:hover\n color: var(--color-brand-content)\n background-color: var(--color-code-background)\n\n &::after\n display: none\n color: var(--color-code-foreground)\n background-color: transparent\n\n &.success\n transition: color 0ms\n color: #22863a\n &::after\n display: block\n\n svg\n padding: 0\n","body\n // Colors\n --sd-color-primary: var(--color-brand-primary)\n --sd-color-primary-highlight: var(--color-brand-content)\n --sd-color-primary-text: var(--color-background-primary)\n\n // Shadows\n --sd-color-shadow: rgba(0, 0, 0, 0.05)\n\n // Cards\n --sd-color-card-border: var(--color-card-border)\n --sd-color-card-border-hover: var(--color-brand-content)\n --sd-color-card-background: var(--color-card-background)\n --sd-color-card-text: var(--color-foreground-primary)\n --sd-color-card-header: var(--color-card-marginals-background)\n --sd-color-card-footer: var(--color-card-marginals-background)\n\n // Tabs\n --sd-color-tabs-label-active: var(--color-brand-content)\n --sd-color-tabs-label-hover: var(--color-foreground-muted)\n --sd-color-tabs-label-inactive: var(--color-foreground-muted)\n --sd-color-tabs-underline-active: var(--color-brand-content)\n --sd-color-tabs-underline-hover: var(--color-foreground-border)\n --sd-color-tabs-underline-inactive: var(--color-background-border)\n --sd-color-tabs-overline: var(--color-background-border)\n --sd-color-tabs-underline: var(--color-background-border)\n\n// Tabs\n.sd-tab-content\n box-shadow: 0 -2px var(--sd-color-tabs-overline), 0 1px var(--sd-color-tabs-underline)\n\n// Shadows\n.sd-card // Have a shadow by default\n box-shadow: 0 0.1rem 0.25rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1)\n\n.sd-shadow-sm\n box-shadow: 0 0.1rem 0.25rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n.sd-shadow-md\n box-shadow: 0 0.3rem 0.75rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n.sd-shadow-lg\n box-shadow: 0 0.6rem 1.5rem var(--sd-color-shadow), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n// Cards\n.sd-card-hover:hover // Don't change scale on hover\n transform: none\n\n.sd-cards-carousel // Have a bit of gap in the carousel by default\n gap: 0.25rem\n padding: 0.25rem\n","// This file contains styles to tweak sphinx-inline-tabs to work well with Furo.\n\nbody\n --tabs--label-text: var(--color-foreground-muted)\n --tabs--label-text--hover: var(--color-foreground-muted)\n --tabs--label-text--active: var(--color-brand-content)\n --tabs--label-text--active--hover: var(--color-brand-content)\n --tabs--label-background: transparent\n --tabs--label-background--hover: transparent\n --tabs--label-background--active: transparent\n --tabs--label-background--active--hover: transparent\n --tabs--padding-x: 0.25em\n --tabs--margin-x: 1em\n --tabs--border: var(--color-background-border)\n --tabs--label-border: transparent\n --tabs--label-border--hover: var(--color-foreground-muted)\n --tabs--label-border--active: var(--color-brand-content)\n --tabs--label-border--active--hover: var(--color-brand-content)\n","// This file contains styles to tweak sphinx-panels to work well with Furo.\n\n// sphinx-panels includes Bootstrap 4, which uses .container which can conflict\n// with docutils' `.. container::` directive.\n[role=\"main\"] .container\n max-width: initial\n padding-left: initial\n padding-right: initial\n\n// Make the panels look nicer!\n.shadow.docutils\n border: none\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1) !important\n\n// Make panel colors respond to dark mode\n.sphinx-bs .card\n background-color: var(--color-background-secondary)\n color: var(--color-foreground)\n"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/_static/styles/furo.css b/docs/cuda-bindings/12.6.1/_static/styles/furo.css new file mode 100644 index 000000000..05a56b17f --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/styles/furo.css @@ -0,0 +1,2 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}@media print{.content-icon-container,.headerlink,.mobile-header,.related-pages{display:none!important}.highlight{border:.1pt solid var(--color-foreground-border)}a,blockquote,dl,ol,p,pre,table,ul{page-break-inside:avoid}caption,figure,h1,h2,h3,h4,h5,h6,img{page-break-after:avoid;page-break-inside:avoid}dl,ol,ul{page-break-before:avoid}}.visually-hidden{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;background:var(--color-background-primary);border:0!important;color:var(--color-foreground-primary);white-space:nowrap!important}:-moz-focusring{outline:auto}body{--font-stack:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--font-stack--monospace:"SFMono-Regular",Menlo,Consolas,Monaco,Liberation Mono,Lucida Console,monospace;--font-stack--headings:var(--font-stack);--font-size--normal:100%;--font-size--small:87.5%;--font-size--small--2:81.25%;--font-size--small--3:75%;--font-size--small--4:62.5%;--sidebar-caption-font-size:var(--font-size--small--2);--sidebar-item-font-size:var(--font-size--small);--sidebar-search-input-font-size:var(--font-size--small);--toc-font-size:var(--font-size--small--3);--toc-font-size--mobile:var(--font-size--normal);--toc-title-font-size:var(--font-size--small--4);--admonition-font-size:0.8125rem;--admonition-title-font-size:0.8125rem;--code-font-size:var(--font-size--small--2);--api-font-size:var(--font-size--small);--header-height:calc(var(--sidebar-item-line-height) + var(--sidebar-item-spacing-vertical)*4);--header-padding:0.5rem;--sidebar-tree-space-above:1.5rem;--sidebar-caption-space-above:1rem;--sidebar-item-line-height:1rem;--sidebar-item-spacing-vertical:0.5rem;--sidebar-item-spacing-horizontal:1rem;--sidebar-item-height:calc(var(--sidebar-item-line-height) + var(--sidebar-item-spacing-vertical)*2);--sidebar-expander-width:var(--sidebar-item-height);--sidebar-search-space-above:0.5rem;--sidebar-search-input-spacing-vertical:0.5rem;--sidebar-search-input-spacing-horizontal:0.5rem;--sidebar-search-input-height:1rem;--sidebar-search-icon-size:var(--sidebar-search-input-height);--toc-title-padding:0.25rem 0;--toc-spacing-vertical:1.5rem;--toc-spacing-horizontal:1.5rem;--toc-item-spacing-vertical:0.4rem;--toc-item-spacing-horizontal:1rem;--icon-search:url('data:image/svg+xml;charset=utf-8,');--icon-pencil:url('data:image/svg+xml;charset=utf-8,');--icon-abstract:url('data:image/svg+xml;charset=utf-8,');--icon-info:url('data:image/svg+xml;charset=utf-8,');--icon-flame:url('data:image/svg+xml;charset=utf-8,');--icon-question:url('data:image/svg+xml;charset=utf-8,');--icon-warning:url('data:image/svg+xml;charset=utf-8,');--icon-failure:url('data:image/svg+xml;charset=utf-8,');--icon-spark:url('data:image/svg+xml;charset=utf-8,');--color-admonition-title--caution:#ff9100;--color-admonition-title-background--caution:rgba(255,145,0,.2);--color-admonition-title--warning:#ff9100;--color-admonition-title-background--warning:rgba(255,145,0,.2);--color-admonition-title--danger:#ff5252;--color-admonition-title-background--danger:rgba(255,82,82,.2);--color-admonition-title--attention:#ff5252;--color-admonition-title-background--attention:rgba(255,82,82,.2);--color-admonition-title--error:#ff5252;--color-admonition-title-background--error:rgba(255,82,82,.2);--color-admonition-title--hint:#00c852;--color-admonition-title-background--hint:rgba(0,200,82,.2);--color-admonition-title--tip:#00c852;--color-admonition-title-background--tip:rgba(0,200,82,.2);--color-admonition-title--important:#00bfa5;--color-admonition-title-background--important:rgba(0,191,165,.2);--color-admonition-title--note:#00b0ff;--color-admonition-title-background--note:rgba(0,176,255,.2);--color-admonition-title--seealso:#448aff;--color-admonition-title-background--seealso:rgba(68,138,255,.2);--color-admonition-title--admonition-todo:grey;--color-admonition-title-background--admonition-todo:hsla(0,0%,50%,.2);--color-admonition-title:#651fff;--color-admonition-title-background:rgba(101,31,255,.2);--icon-admonition-default:var(--icon-abstract);--color-topic-title:#14b8a6;--color-topic-title-background:rgba(20,184,166,.2);--icon-topic-default:var(--icon-pencil);--color-problematic:#b30000;--color-foreground-primary:#000;--color-foreground-secondary:#5a5c63;--color-foreground-muted:#6b6f76;--color-foreground-border:#878787;--color-background-primary:#fff;--color-background-secondary:#f8f9fb;--color-background-hover:#efeff4;--color-background-hover--transparent:#efeff400;--color-background-border:#eeebee;--color-background-item:#ccc;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#0a4bff;--color-brand-content:#2757dd;--color-brand-visited:#872ee0;--color-api-background:var(--color-background-hover--transparent);--color-api-background-hover:var(--color-background-hover);--color-api-overall:var(--color-foreground-secondary);--color-api-name:var(--color-problematic);--color-api-pre-name:var(--color-problematic);--color-api-paren:var(--color-foreground-secondary);--color-api-keyword:var(--color-foreground-primary);--color-api-added:#21632c;--color-api-added-border:#38a84d;--color-api-changed:#046172;--color-api-changed-border:#06a1bc;--color-api-deprecated:#605706;--color-api-deprecated-border:#f0d90f;--color-api-removed:#b30000;--color-api-removed-border:#ff5c5c;--color-highlight-on-target:#ffc;--color-inline-code-background:var(--color-background-secondary);--color-highlighted-background:#def;--color-highlighted-text:var(--color-foreground-primary);--color-guilabel-background:#ddeeff80;--color-guilabel-border:#bedaf580;--color-guilabel-text:var(--color-foreground-primary);--color-admonition-background:transparent;--color-table-header-background:var(--color-background-secondary);--color-table-border:var(--color-background-border);--color-card-border:var(--color-background-secondary);--color-card-background:transparent;--color-card-marginals-background:var(--color-background-secondary);--color-header-background:var(--color-background-primary);--color-header-border:var(--color-background-border);--color-header-text:var(--color-foreground-primary);--color-sidebar-background:var(--color-background-secondary);--color-sidebar-background-border:var(--color-background-border);--color-sidebar-brand-text:var(--color-foreground-primary);--color-sidebar-caption-text:var(--color-foreground-muted);--color-sidebar-link-text:var(--color-foreground-secondary);--color-sidebar-link-text--top-level:var(--color-brand-primary);--color-sidebar-item-background:var(--color-sidebar-background);--color-sidebar-item-background--current:var( --color-sidebar-item-background );--color-sidebar-item-background--hover:linear-gradient(90deg,var(--color-background-hover--transparent) 0%,var(--color-background-hover) var(--sidebar-item-spacing-horizontal),var(--color-background-hover) 100%);--color-sidebar-item-expander-background:transparent;--color-sidebar-item-expander-background--hover:var( --color-background-hover );--color-sidebar-search-text:var(--color-foreground-primary);--color-sidebar-search-background:var(--color-background-secondary);--color-sidebar-search-background--focus:var(--color-background-primary);--color-sidebar-search-border:var(--color-background-border);--color-sidebar-search-icon:var(--color-foreground-muted);--color-toc-background:var(--color-background-primary);--color-toc-title-text:var(--color-foreground-muted);--color-toc-item-text:var(--color-foreground-secondary);--color-toc-item-text--hover:var(--color-foreground-primary);--color-toc-item-text--active:var(--color-brand-primary);--color-content-foreground:var(--color-foreground-primary);--color-content-background:transparent;--color-link:var(--color-brand-content);--color-link-underline:var(--color-background-border);--color-link--hover:var(--color-brand-content);--color-link-underline--hover:var(--color-foreground-border);--color-link--visited:var(--color-brand-visited);--color-link-underline--visited:var(--color-background-border);--color-link--visited--hover:var(--color-brand-visited);--color-link-underline--visited--hover:var(--color-foreground-border)}.only-light{display:block!important}html body .only-dark{display:none!important}@media not print{body[data-theme=dark]{--color-problematic:#ee5151;--color-foreground-primary:#cfd0d0;--color-foreground-secondary:#9ca0a5;--color-foreground-muted:#81868d;--color-foreground-border:#666;--color-background-primary:#131416;--color-background-secondary:#1a1c1e;--color-background-hover:#1e2124;--color-background-hover--transparent:#1e212400;--color-background-border:#303335;--color-background-item:#444;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#3d94ff;--color-brand-content:#5ca5ff;--color-brand-visited:#b27aeb;--color-highlighted-background:#083563;--color-guilabel-background:#08356380;--color-guilabel-border:#13395f80;--color-api-keyword:var(--color-foreground-secondary);--color-highlight-on-target:#330;--color-api-added:#3db854;--color-api-added-border:#267334;--color-api-changed:#09b0ce;--color-api-changed-border:#056d80;--color-api-deprecated:#b1a10b;--color-api-deprecated-border:#6e6407;--color-api-removed:#ff7575;--color-api-removed-border:#b03b3b;--color-admonition-background:#18181a;--color-card-border:var(--color-background-secondary);--color-card-background:#18181a;--color-card-marginals-background:var(--color-background-hover)}html body[data-theme=dark] .only-light{display:none!important}body[data-theme=dark] .only-dark{display:block!important}@media(prefers-color-scheme:dark){body:not([data-theme=light]){--color-problematic:#ee5151;--color-foreground-primary:#cfd0d0;--color-foreground-secondary:#9ca0a5;--color-foreground-muted:#81868d;--color-foreground-border:#666;--color-background-primary:#131416;--color-background-secondary:#1a1c1e;--color-background-hover:#1e2124;--color-background-hover--transparent:#1e212400;--color-background-border:#303335;--color-background-item:#444;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#3d94ff;--color-brand-content:#5ca5ff;--color-brand-visited:#b27aeb;--color-highlighted-background:#083563;--color-guilabel-background:#08356380;--color-guilabel-border:#13395f80;--color-api-keyword:var(--color-foreground-secondary);--color-highlight-on-target:#330;--color-api-added:#3db854;--color-api-added-border:#267334;--color-api-changed:#09b0ce;--color-api-changed-border:#056d80;--color-api-deprecated:#b1a10b;--color-api-deprecated-border:#6e6407;--color-api-removed:#ff7575;--color-api-removed-border:#b03b3b;--color-admonition-background:#18181a;--color-card-border:var(--color-background-secondary);--color-card-background:#18181a;--color-card-marginals-background:var(--color-background-hover)}html body:not([data-theme=light]) .only-light{display:none!important}body:not([data-theme=light]) .only-dark{display:block!important}}}body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-light{display:block}@media(prefers-color-scheme:dark){body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-dark{display:block}body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-light{display:none}}body[data-theme=dark] .theme-toggle svg.theme-icon-when-dark,body[data-theme=light] .theme-toggle svg.theme-icon-when-light{display:block}body{font-family:var(--font-stack)}code,kbd,pre,samp{font-family:var(--font-stack--monospace)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}article{line-height:1.5}h1,h2,h3,h4,h5,h6{border-radius:.5rem;font-family:var(--font-stack--headings);font-weight:700;line-height:1.25;margin:.5rem -.5rem;padding-left:.5rem;padding-right:.5rem}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p{margin-top:0}h1{font-size:2.5em;margin-bottom:1rem}h1,h2{margin-top:1.75rem}h2{font-size:2em}h3{font-size:1.5em}h4{font-size:1.25em}h5{font-size:1.125em}h6{font-size:1em}small{font-size:80%;opacity:75%}p{margin-bottom:.75rem;margin-top:.5rem}hr.docutils{background-color:var(--color-background-border);border:0;height:1px;margin:2rem 0;padding:0}.centered{text-align:center}a{color:var(--color-link);text-decoration:underline;text-decoration-color:var(--color-link-underline)}a:visited{color:var(--color-link--visited);text-decoration-color:var(--color-link-underline--visited)}a:visited:hover{color:var(--color-link--visited--hover);text-decoration-color:var(--color-link-underline--visited--hover)}a:hover{color:var(--color-link--hover);text-decoration-color:var(--color-link-underline--hover)}a.muted-link{color:inherit}a.muted-link:hover{color:var(--color-link--hover);text-decoration-color:var(--color-link-underline--hover)}a.muted-link:hover:visited{color:var(--color-link--visited--hover);text-decoration-color:var(--color-link-underline--visited--hover)}html{overflow-x:hidden;overflow-y:scroll;scroll-behavior:smooth}.sidebar-scroll,.toc-scroll,article[role=main] *{scrollbar-color:var(--color-foreground-border) transparent;scrollbar-width:thin}.sidebar-scroll::-webkit-scrollbar,.toc-scroll::-webkit-scrollbar,article[role=main] ::-webkit-scrollbar{height:.25rem;width:.25rem}.sidebar-scroll::-webkit-scrollbar-thumb,.toc-scroll::-webkit-scrollbar-thumb,article[role=main] ::-webkit-scrollbar-thumb{background-color:var(--color-foreground-border);border-radius:.125rem}body,html{height:100%}.skip-to-content,body,html{background:var(--color-background-primary);color:var(--color-foreground-primary)}.skip-to-content{border-radius:1rem;left:.25rem;padding:1rem;position:fixed;top:.25rem;transform:translateY(-200%);transition:transform .3s ease-in-out;z-index:40}.skip-to-content:focus-within{transform:translateY(0)}article{background:var(--color-content-background);color:var(--color-content-foreground);overflow-wrap:break-word}.page{display:flex;min-height:100%}.mobile-header{background-color:var(--color-header-background);border-bottom:1px solid var(--color-header-border);color:var(--color-header-text);display:none;height:var(--header-height);width:100%;z-index:10}.mobile-header.scrolled{border-bottom:none;box-shadow:0 0 .2rem rgba(0,0,0,.1),0 .2rem .4rem rgba(0,0,0,.2)}.mobile-header .header-center a{color:var(--color-header-text);text-decoration:none}.main{display:flex;flex:1}.sidebar-drawer{background:var(--color-sidebar-background);border-right:1px solid var(--color-sidebar-background-border);box-sizing:border-box;display:flex;justify-content:flex-end;min-width:15em;width:calc(50% - 26em)}.sidebar-container,.toc-drawer{box-sizing:border-box;width:15em}.toc-drawer{background:var(--color-toc-background);padding-right:1rem}.sidebar-sticky,.toc-sticky{display:flex;flex-direction:column;height:min(100%,100vh);height:100vh;position:sticky;top:0}.sidebar-scroll,.toc-scroll{flex-grow:1;flex-shrink:1;overflow:auto;scroll-behavior:smooth}.content{display:flex;flex-direction:column;justify-content:space-between;padding:0 3em;width:46em}.icon{display:inline-block;height:1rem;width:1rem}.icon svg{height:100%;width:100%}.announcement{align-items:center;background-color:var(--color-announcement-background);color:var(--color-announcement-text);display:flex;height:var(--header-height);overflow-x:auto}.announcement+.page{min-height:calc(100% - var(--header-height))}.announcement-content{box-sizing:border-box;min-width:100%;padding:.5rem;text-align:center;white-space:nowrap}.announcement-content a{color:var(--color-announcement-text);text-decoration-color:var(--color-announcement-text)}.announcement-content a:hover{color:var(--color-announcement-text);text-decoration-color:var(--color-link--hover)}.no-js .theme-toggle-container{display:none}.theme-toggle-container{display:flex}.theme-toggle{background:transparent;border:none;cursor:pointer;display:flex;padding:0}.theme-toggle svg{color:var(--color-foreground-primary);display:none;height:1.25rem;width:1.25rem}.theme-toggle-header{align-items:center;display:flex;justify-content:center}.nav-overlay-icon,.toc-overlay-icon{cursor:pointer;display:none}.nav-overlay-icon .icon,.toc-overlay-icon .icon{color:var(--color-foreground-secondary);height:1.5rem;width:1.5rem}.nav-overlay-icon,.toc-header-icon{align-items:center;justify-content:center}.toc-content-icon{height:1.5rem;width:1.5rem}.content-icon-container{display:flex;float:right;gap:.5rem;margin-bottom:1rem;margin-left:1rem;margin-top:1.5rem}.content-icon-container .edit-this-page svg,.content-icon-container .view-this-page svg{color:inherit;height:1.25rem;width:1.25rem}.sidebar-toggle{display:none;position:absolute}.sidebar-toggle[name=__toc]{left:20px}.sidebar-toggle:checked{left:40px}.overlay{background-color:rgba(0,0,0,.54);height:0;opacity:0;position:fixed;top:0;transition:width 0ms,height 0ms,opacity .25s ease-out;width:0}.sidebar-overlay{z-index:20}.toc-overlay{z-index:40}.sidebar-drawer{transition:left .25s ease-in-out;z-index:30}.toc-drawer{transition:right .25s ease-in-out;z-index:50}#__navigation:checked~.sidebar-overlay{height:100%;opacity:1;width:100%}#__navigation:checked~.page .sidebar-drawer{left:0;top:0}#__toc:checked~.toc-overlay{height:100%;opacity:1;width:100%}#__toc:checked~.page .toc-drawer{right:0;top:0}.back-to-top{background:var(--color-background-primary);border-radius:1rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 1px 0 hsla(220,9%,46%,.502);display:none;font-size:.8125rem;left:0;margin-left:50%;padding:.5rem .75rem .5rem .5rem;position:fixed;text-decoration:none;top:1rem;transform:translateX(-50%);z-index:10}.back-to-top svg{height:1rem;width:1rem;fill:currentColor;display:inline-block}.back-to-top span{margin-left:.25rem}.show-back-to-top .back-to-top{align-items:center;display:flex}@media(min-width:97em){html{font-size:110%}}@media(max-width:82em){.toc-content-icon{display:flex}.toc-drawer{border-left:1px solid var(--color-background-muted);height:100vh;position:fixed;right:-15em;top:0}.toc-tree{border-left:none;font-size:var(--toc-font-size--mobile)}.sidebar-drawer{width:calc(50% - 18.5em)}}@media(max-width:67em){.content{margin-left:auto;margin-right:auto;padding:0 1em}}@media(max-width:63em){.nav-overlay-icon{display:flex}.sidebar-drawer{height:100vh;left:-15em;position:fixed;top:0;width:15em}.theme-toggle-header,.toc-header-icon{display:flex}.theme-toggle-content,.toc-content-icon{display:none}.mobile-header{align-items:center;display:flex;justify-content:space-between;position:sticky;top:0}.mobile-header .header-left,.mobile-header .header-right{display:flex;height:var(--header-height);padding:0 var(--header-padding)}.mobile-header .header-left label,.mobile-header .header-right label{height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.nav-overlay-icon .icon,.theme-toggle svg{height:1.5rem;width:1.5rem}:target{scroll-margin-top:calc(var(--header-height) + 2.5rem)}.back-to-top{top:calc(var(--header-height) + .5rem)}.page{flex-direction:column;justify-content:center}}@media(max-width:48em){.content{overflow-x:auto;width:100%}}@media(max-width:46em){article[role=main] aside.sidebar{float:none;margin:1rem 0;width:100%}}.admonition,.topic{background:var(--color-admonition-background);border-radius:.2rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1);font-size:var(--admonition-font-size);margin:1rem auto;overflow:hidden;padding:0 .5rem .5rem;page-break-inside:avoid}.admonition>:nth-child(2),.topic>:nth-child(2){margin-top:0}.admonition>:last-child,.topic>:last-child{margin-bottom:0}.admonition p.admonition-title,p.topic-title{font-size:var(--admonition-title-font-size);font-weight:500;line-height:1.3;margin:0 -.5rem .5rem;padding:.4rem .5rem .4rem 2rem;position:relative}.admonition p.admonition-title:before,p.topic-title:before{content:"";height:1rem;left:.5rem;position:absolute;width:1rem}p.admonition-title{background-color:var(--color-admonition-title-background)}p.admonition-title:before{background-color:var(--color-admonition-title);-webkit-mask-image:var(--icon-admonition-default);mask-image:var(--icon-admonition-default);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}p.topic-title{background-color:var(--color-topic-title-background)}p.topic-title:before{background-color:var(--color-topic-title);-webkit-mask-image:var(--icon-topic-default);mask-image:var(--icon-topic-default);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.admonition{border-left:.2rem solid var(--color-admonition-title)}.admonition.caution{border-left-color:var(--color-admonition-title--caution)}.admonition.caution>.admonition-title{background-color:var(--color-admonition-title-background--caution)}.admonition.caution>.admonition-title:before{background-color:var(--color-admonition-title--caution);-webkit-mask-image:var(--icon-spark);mask-image:var(--icon-spark)}.admonition.warning{border-left-color:var(--color-admonition-title--warning)}.admonition.warning>.admonition-title{background-color:var(--color-admonition-title-background--warning)}.admonition.warning>.admonition-title:before{background-color:var(--color-admonition-title--warning);-webkit-mask-image:var(--icon-warning);mask-image:var(--icon-warning)}.admonition.danger{border-left-color:var(--color-admonition-title--danger)}.admonition.danger>.admonition-title{background-color:var(--color-admonition-title-background--danger)}.admonition.danger>.admonition-title:before{background-color:var(--color-admonition-title--danger);-webkit-mask-image:var(--icon-spark);mask-image:var(--icon-spark)}.admonition.attention{border-left-color:var(--color-admonition-title--attention)}.admonition.attention>.admonition-title{background-color:var(--color-admonition-title-background--attention)}.admonition.attention>.admonition-title:before{background-color:var(--color-admonition-title--attention);-webkit-mask-image:var(--icon-warning);mask-image:var(--icon-warning)}.admonition.error{border-left-color:var(--color-admonition-title--error)}.admonition.error>.admonition-title{background-color:var(--color-admonition-title-background--error)}.admonition.error>.admonition-title:before{background-color:var(--color-admonition-title--error);-webkit-mask-image:var(--icon-failure);mask-image:var(--icon-failure)}.admonition.hint{border-left-color:var(--color-admonition-title--hint)}.admonition.hint>.admonition-title{background-color:var(--color-admonition-title-background--hint)}.admonition.hint>.admonition-title:before{background-color:var(--color-admonition-title--hint);-webkit-mask-image:var(--icon-question);mask-image:var(--icon-question)}.admonition.tip{border-left-color:var(--color-admonition-title--tip)}.admonition.tip>.admonition-title{background-color:var(--color-admonition-title-background--tip)}.admonition.tip>.admonition-title:before{background-color:var(--color-admonition-title--tip);-webkit-mask-image:var(--icon-info);mask-image:var(--icon-info)}.admonition.important{border-left-color:var(--color-admonition-title--important)}.admonition.important>.admonition-title{background-color:var(--color-admonition-title-background--important)}.admonition.important>.admonition-title:before{background-color:var(--color-admonition-title--important);-webkit-mask-image:var(--icon-flame);mask-image:var(--icon-flame)}.admonition.note{border-left-color:var(--color-admonition-title--note)}.admonition.note>.admonition-title{background-color:var(--color-admonition-title-background--note)}.admonition.note>.admonition-title:before{background-color:var(--color-admonition-title--note);-webkit-mask-image:var(--icon-pencil);mask-image:var(--icon-pencil)}.admonition.seealso{border-left-color:var(--color-admonition-title--seealso)}.admonition.seealso>.admonition-title{background-color:var(--color-admonition-title-background--seealso)}.admonition.seealso>.admonition-title:before{background-color:var(--color-admonition-title--seealso);-webkit-mask-image:var(--icon-info);mask-image:var(--icon-info)}.admonition.admonition-todo{border-left-color:var(--color-admonition-title--admonition-todo)}.admonition.admonition-todo>.admonition-title{background-color:var(--color-admonition-title-background--admonition-todo)}.admonition.admonition-todo>.admonition-title:before{background-color:var(--color-admonition-title--admonition-todo);-webkit-mask-image:var(--icon-pencil);mask-image:var(--icon-pencil)}.admonition-todo>.admonition-title{text-transform:uppercase}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd{margin-left:2rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd>:first-child{margin-top:.125rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list,dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd>:last-child{margin-bottom:.75rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list>dt{font-size:var(--font-size--small);text-transform:uppercase}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd:empty{margin-bottom:.5rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul{margin-left:-1.2rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul>li>p:nth-child(2){margin-top:0}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul>li>p+p:last-child:empty{margin-bottom:0;margin-top:0}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt{color:var(--color-api-overall)}.sig:not(.sig-inline){background:var(--color-api-background);border-radius:.25rem;font-family:var(--font-stack--monospace);font-size:var(--api-font-size);font-weight:700;margin-left:-.25rem;margin-right:-.25rem;padding:.25rem .5rem .25rem 3em;text-indent:-2.5em;transition:background .1s ease-out}.sig:not(.sig-inline):hover{background:var(--color-api-background-hover)}.sig:not(.sig-inline) a.reference .viewcode-link{font-weight:400;width:4.25rem}em.property{font-style:normal}em.property:first-child{color:var(--color-api-keyword)}.sig-name{color:var(--color-api-name)}.sig-prename{color:var(--color-api-pre-name);font-weight:400}.sig-paren{color:var(--color-api-paren)}.sig-param{font-style:normal}div.deprecated,div.versionadded,div.versionchanged,div.versionremoved{border-left:.1875rem solid;border-radius:.125rem;padding-left:.75rem}div.deprecated p,div.versionadded p,div.versionchanged p,div.versionremoved p{margin-bottom:.125rem;margin-top:.125rem}div.versionadded{border-color:var(--color-api-added-border)}div.versionadded .versionmodified{color:var(--color-api-added)}div.versionchanged{border-color:var(--color-api-changed-border)}div.versionchanged .versionmodified{color:var(--color-api-changed)}div.deprecated{border-color:var(--color-api-deprecated-border)}div.deprecated .versionmodified{color:var(--color-api-deprecated)}div.versionremoved{border-color:var(--color-api-removed-border)}div.versionremoved .versionmodified{color:var(--color-api-removed)}.viewcode-back,.viewcode-link{float:right;text-align:right}.line-block{margin-bottom:.75rem;margin-top:.5rem}.line-block .line-block{margin-bottom:0;margin-top:0;padding-left:1rem}.code-block-caption,article p.caption,table>caption{font-size:var(--font-size--small);text-align:center}.toctree-wrapper.compound .caption,.toctree-wrapper.compound :not(.caption)>.caption-text{font-size:var(--font-size--small);margin-bottom:0;text-align:initial;text-transform:uppercase}.toctree-wrapper.compound>ul{margin-bottom:0;margin-top:0}.sig-inline,code.literal{background:var(--color-inline-code-background);border-radius:.2em;font-size:var(--font-size--small--2);padding:.1em .2em}pre.literal-block .sig-inline,pre.literal-block code.literal{font-size:inherit;padding:0}p .sig-inline,p code.literal{border:1px solid var(--color-background-border)}.sig-inline{font-family:var(--font-stack--monospace)}div[class*=" highlight-"],div[class^=highlight-]{display:flex;margin:1em 0}div[class*=" highlight-"] .table-wrapper,div[class^=highlight-] .table-wrapper,pre{margin:0;padding:0}pre{overflow:auto}article[role=main] .highlight pre{line-height:1.5}.highlight pre,pre.literal-block{font-size:var(--code-font-size);padding:.625rem .875rem}pre.literal-block{background-color:var(--color-code-background);border-radius:.2rem;color:var(--color-code-foreground);margin-bottom:1rem;margin-top:1rem}.highlight{border-radius:.2rem;width:100%}.highlight .gp,.highlight span.linenos{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.highlight .hll{display:block;margin-left:-.875rem;margin-right:-.875rem;padding-left:.875rem;padding-right:.875rem}.code-block-caption{background-color:var(--color-code-background);border-bottom:1px solid;border-radius:.25rem;border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:var(--color-background-border);color:var(--color-code-foreground);display:flex;font-weight:300;padding:.625rem .875rem}.code-block-caption+div[class]{margin-top:0}.code-block-caption+div[class] pre{border-top-left-radius:0;border-top-right-radius:0}.highlighttable{display:block;width:100%}.highlighttable tbody{display:block}.highlighttable tr{display:flex}.highlighttable td.linenos{background-color:var(--color-code-background);border-bottom-left-radius:.2rem;border-top-left-radius:.2rem;color:var(--color-code-foreground);padding:.625rem 0 .625rem .875rem}.highlighttable .linenodiv{box-shadow:-.0625rem 0 var(--color-foreground-border) inset;font-size:var(--code-font-size);padding-right:.875rem}.highlighttable td.code{display:block;flex:1;overflow:hidden;padding:0}.highlighttable td.code .highlight{border-bottom-left-radius:0;border-top-left-radius:0}.highlight span.linenos{box-shadow:-.0625rem 0 var(--color-foreground-border) inset;display:inline-block;margin-right:.875rem;padding-left:0;padding-right:.875rem}.footnote-reference{font-size:var(--font-size--small--4);vertical-align:super}dl.footnote.brackets{color:var(--color-foreground-secondary);display:grid;font-size:var(--font-size--small);grid-template-columns:max-content auto}dl.footnote.brackets dt{margin:0}dl.footnote.brackets dt>.fn-backref{margin-left:.25rem}dl.footnote.brackets dt:after{content:":"}dl.footnote.brackets dt .brackets:before{content:"["}dl.footnote.brackets dt .brackets:after{content:"]"}dl.footnote.brackets dd{margin:0;padding:0 1rem}aside.footnote{color:var(--color-foreground-secondary);font-size:var(--font-size--small)}aside.footnote>span,div.citation>span{float:left;font-weight:500;padding-right:.25rem}aside.footnote>:not(span),div.citation>p{margin-left:2rem}img{box-sizing:border-box;height:auto;max-width:100%}article .figure,article figure{border-radius:.2rem;margin:0}article .figure :last-child,article figure :last-child{margin-bottom:0}article .align-left{clear:left;float:left;margin:0 1rem 1rem}article .align-right{clear:right;float:right;margin:0 1rem 1rem}article .align-center,article .align-default{display:block;margin-left:auto;margin-right:auto;text-align:center}article table.align-default{display:table;text-align:initial}.domainindex-jumpbox,.genindex-jumpbox{border-bottom:1px solid var(--color-background-border);border-top:1px solid var(--color-background-border);padding:.25rem}.domainindex-section h2,.genindex-section h2{margin-bottom:.5rem;margin-top:.75rem}.domainindex-section ul,.genindex-section ul{margin-bottom:0;margin-top:0}ol,ul{margin-bottom:1rem;margin-top:1rem;padding-left:1.2rem}ol li>p:first-child,ul li>p:first-child{margin-bottom:.25rem;margin-top:.25rem}ol li>p:last-child,ul li>p:last-child{margin-top:.25rem}ol li>ol,ol li>ul,ul li>ol,ul li>ul{margin-bottom:.5rem;margin-top:.5rem}ol.arabic{list-style:decimal}ol.loweralpha{list-style:lower-alpha}ol.upperalpha{list-style:upper-alpha}ol.lowerroman{list-style:lower-roman}ol.upperroman{list-style:upper-roman}.simple li>ol,.simple li>ul,.toctree-wrapper li>ol,.toctree-wrapper li>ul{margin-bottom:0;margin-top:0}.field-list dt,.option-list dt,dl.footnote dt,dl.glossary dt,dl.simple dt,dl:not([class]) dt{font-weight:500;margin-top:.25rem}.field-list dt+dt,.option-list dt+dt,dl.footnote dt+dt,dl.glossary dt+dt,dl.simple dt+dt,dl:not([class]) dt+dt{margin-top:0}.field-list dt .classifier:before,.option-list dt .classifier:before,dl.footnote dt .classifier:before,dl.glossary dt .classifier:before,dl.simple dt .classifier:before,dl:not([class]) dt .classifier:before{content:":";margin-left:.2rem;margin-right:.2rem}.field-list dd ul,.field-list dd>p:first-child,.option-list dd ul,.option-list dd>p:first-child,dl.footnote dd ul,dl.footnote dd>p:first-child,dl.glossary dd ul,dl.glossary dd>p:first-child,dl.simple dd ul,dl.simple dd>p:first-child,dl:not([class]) dd ul,dl:not([class]) dd>p:first-child{margin-top:.125rem}.field-list dd ul,.option-list dd ul,dl.footnote dd ul,dl.glossary dd ul,dl.simple dd ul,dl:not([class]) dd ul{margin-bottom:.125rem}.math-wrapper{overflow-x:auto;width:100%}div.math{position:relative;text-align:center}div.math .headerlink,div.math:focus .headerlink{display:none}div.math:hover .headerlink{display:inline-block}div.math span.eqno{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);z-index:1}abbr[title]{cursor:help}.problematic{color:var(--color-problematic)}kbd:not(.compound){background-color:var(--color-background-secondary);border:1px solid var(--color-foreground-border);border-radius:.2rem;box-shadow:0 .0625rem 0 rgba(0,0,0,.2),inset 0 0 0 .125rem var(--color-background-primary);color:var(--color-foreground-primary);display:inline-block;font-size:var(--font-size--small--3);margin:0 .2rem;padding:0 .2rem;vertical-align:text-bottom}blockquote{background:var(--color-background-secondary);border-left:4px solid var(--color-background-border);margin-left:0;margin-right:0;padding:.5rem 1rem}blockquote .attribution{font-weight:600;text-align:right}blockquote.highlights,blockquote.pull-quote{font-size:1.25em}blockquote.epigraph,blockquote.pull-quote{border-left-width:0;border-radius:.5rem}blockquote.highlights{background:transparent;border-left-width:0}p .reference img{vertical-align:middle}p.rubric{font-size:1.125em;font-weight:700;line-height:1.25}dd p.rubric{font-size:var(--font-size--small);font-weight:inherit;line-height:inherit;text-transform:uppercase}article .sidebar{background-color:var(--color-background-secondary);border:1px solid var(--color-background-border);border-radius:.2rem;clear:right;float:right;margin-left:1rem;margin-right:0;width:30%}article .sidebar>*{padding-left:1rem;padding-right:1rem}article .sidebar>ol,article .sidebar>ul{padding-left:2.2rem}article .sidebar .sidebar-title{border-bottom:1px solid var(--color-background-border);font-weight:500;margin:0;padding:.5rem 1rem}[role=main] .table-wrapper.container{margin-bottom:.5rem;margin-top:1rem;overflow-x:auto;padding:.2rem .2rem .75rem;width:100%}table.docutils{border-collapse:collapse;border-radius:.2rem;border-spacing:0;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1)}table.docutils th{background:var(--color-table-header-background)}table.docutils td,table.docutils th{border-bottom:1px solid var(--color-table-border);border-left:1px solid var(--color-table-border);border-right:1px solid var(--color-table-border);padding:0 .25rem}table.docutils td p,table.docutils th p{margin:.25rem}table.docutils td:first-child,table.docutils th:first-child{border-left:none}table.docutils td:last-child,table.docutils th:last-child{border-right:none}table.docutils td.text-left,table.docutils th.text-left{text-align:left}table.docutils td.text-right,table.docutils th.text-right{text-align:right}table.docutils td.text-center,table.docutils th.text-center{text-align:center}:target{scroll-margin-top:2.5rem}@media(max-width:67em){:target{scroll-margin-top:calc(2.5rem + var(--header-height))}section>span:target{scroll-margin-top:calc(2.8rem + var(--header-height))}}.headerlink{font-weight:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.code-block-caption>.headerlink,dl dt>.headerlink,figcaption p>.headerlink,h1>.headerlink,h2>.headerlink,h3>.headerlink,h4>.headerlink,h5>.headerlink,h6>.headerlink,p.caption>.headerlink,table>caption>.headerlink{margin-left:.5rem;visibility:hidden}.code-block-caption:hover>.headerlink,dl dt:hover>.headerlink,figcaption p:hover>.headerlink,h1:hover>.headerlink,h2:hover>.headerlink,h3:hover>.headerlink,h4:hover>.headerlink,h5:hover>.headerlink,h6:hover>.headerlink,p.caption:hover>.headerlink,table>caption:hover>.headerlink{visibility:visible}.code-block-caption>.toc-backref,dl dt>.toc-backref,figcaption p>.toc-backref,h1>.toc-backref,h2>.toc-backref,h3>.toc-backref,h4>.toc-backref,h5>.toc-backref,h6>.toc-backref,p.caption>.toc-backref,table>caption>.toc-backref{color:inherit;text-decoration-line:none}figure:hover>figcaption>p>.headerlink,table:hover>caption>.headerlink{visibility:visible}:target>h1:first-of-type,:target>h2:first-of-type,:target>h3:first-of-type,:target>h4:first-of-type,:target>h5:first-of-type,:target>h6:first-of-type,span:target~h1:first-of-type,span:target~h2:first-of-type,span:target~h3:first-of-type,span:target~h4:first-of-type,span:target~h5:first-of-type,span:target~h6:first-of-type{background-color:var(--color-highlight-on-target)}:target>h1:first-of-type code.literal,:target>h2:first-of-type code.literal,:target>h3:first-of-type code.literal,:target>h4:first-of-type code.literal,:target>h5:first-of-type code.literal,:target>h6:first-of-type code.literal,span:target~h1:first-of-type code.literal,span:target~h2:first-of-type code.literal,span:target~h3:first-of-type code.literal,span:target~h4:first-of-type code.literal,span:target~h5:first-of-type code.literal,span:target~h6:first-of-type code.literal{background-color:transparent}.literal-block-wrapper:target .code-block-caption,.this-will-duplicate-information-and-it-is-still-useful-here li :target,figure:target,table:target>caption{background-color:var(--color-highlight-on-target)}dt:target{background-color:var(--color-highlight-on-target)!important}.footnote-reference:target,.footnote>dt:target+dd{background-color:var(--color-highlight-on-target)}.guilabel{background-color:var(--color-guilabel-background);border:1px solid var(--color-guilabel-border);border-radius:.5em;color:var(--color-guilabel-text);font-size:.9em;padding:0 .3em}footer{display:flex;flex-direction:column;font-size:var(--font-size--small);margin-top:2rem}.bottom-of-page{align-items:center;border-top:1px solid var(--color-background-border);color:var(--color-foreground-secondary);display:flex;justify-content:space-between;line-height:1.5;margin-top:1rem;padding-bottom:1rem;padding-top:1rem}@media(max-width:46em){.bottom-of-page{flex-direction:column-reverse;gap:.25rem;text-align:center}}.bottom-of-page .left-details{font-size:var(--font-size--small)}.bottom-of-page .right-details{display:flex;flex-direction:column;gap:.25rem;text-align:right}.bottom-of-page .icons{display:flex;font-size:1rem;gap:.25rem;justify-content:flex-end}.bottom-of-page .icons a{text-decoration:none}.bottom-of-page .icons img,.bottom-of-page .icons svg{font-size:1.125rem;height:1em;width:1em}.related-pages a{align-items:center;display:flex;text-decoration:none}.related-pages a:hover .page-info .title{color:var(--color-link);text-decoration:underline;text-decoration-color:var(--color-link-underline)}.related-pages a svg.furo-related-icon,.related-pages a svg.furo-related-icon>use{color:var(--color-foreground-border);flex-shrink:0;height:.75rem;margin:0 .5rem;width:.75rem}.related-pages a.next-page{clear:right;float:right;max-width:50%;text-align:right}.related-pages a.prev-page{clear:left;float:left;max-width:50%}.related-pages a.prev-page svg{transform:rotate(180deg)}.page-info{display:flex;flex-direction:column;overflow-wrap:anywhere}.next-page .page-info{align-items:flex-end}.page-info .context{align-items:center;color:var(--color-foreground-muted);display:flex;font-size:var(--font-size--small);padding-bottom:.1rem;text-decoration:none}ul.search{list-style:none;padding-left:0}ul.search li{border-bottom:1px solid var(--color-background-border);padding:1rem 0}[role=main] .highlighted{background-color:var(--color-highlighted-background);color:var(--color-highlighted-text)}.sidebar-brand{display:flex;flex-direction:column;flex-shrink:0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-decoration:none}.sidebar-brand-text{color:var(--color-sidebar-brand-text);font-size:1.5rem;overflow-wrap:break-word}.sidebar-brand-text,.sidebar-logo-container{margin:var(--sidebar-item-spacing-vertical) 0}.sidebar-logo{display:block;margin:0 auto;max-width:100%}.sidebar-search-container{align-items:center;background:var(--color-sidebar-search-background);display:flex;margin-top:var(--sidebar-search-space-above);position:relative}.sidebar-search-container:focus-within,.sidebar-search-container:hover{background:var(--color-sidebar-search-background--focus)}.sidebar-search-container:before{background-color:var(--color-sidebar-search-icon);content:"";height:var(--sidebar-search-icon-size);left:var(--sidebar-item-spacing-horizontal);-webkit-mask-image:var(--icon-search);mask-image:var(--icon-search);position:absolute;width:var(--sidebar-search-icon-size)}.sidebar-search{background:transparent;border:none;border-bottom:1px solid var(--color-sidebar-search-border);border-top:1px solid var(--color-sidebar-search-border);box-sizing:border-box;color:var(--color-sidebar-search-foreground);padding:var(--sidebar-search-input-spacing-vertical) var(--sidebar-search-input-spacing-horizontal) var(--sidebar-search-input-spacing-vertical) calc(var(--sidebar-item-spacing-horizontal) + var(--sidebar-search-input-spacing-horizontal) + var(--sidebar-search-icon-size));width:100%;z-index:10}.sidebar-search:focus{outline:none}.sidebar-search::-moz-placeholder{font-size:var(--sidebar-search-input-font-size)}.sidebar-search::placeholder{font-size:var(--sidebar-search-input-font-size)}#searchbox .highlight-link{margin:0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal) 0;text-align:center}#searchbox .highlight-link a{color:var(--color-sidebar-search-icon);font-size:var(--font-size--small--2)}.sidebar-tree{font-size:var(--sidebar-item-font-size);margin-bottom:var(--sidebar-item-spacing-vertical);margin-top:var(--sidebar-tree-space-above)}.sidebar-tree ul{display:flex;flex-direction:column;list-style:none;margin-bottom:0;margin-top:0;padding:0}.sidebar-tree li{margin:0;position:relative}.sidebar-tree li>ul{margin-left:var(--sidebar-item-spacing-horizontal)}.sidebar-tree .icon,.sidebar-tree .reference{color:var(--color-sidebar-link-text)}.sidebar-tree .reference{box-sizing:border-box;display:inline-block;height:100%;line-height:var(--sidebar-item-line-height);overflow-wrap:anywhere;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-decoration:none;width:100%}.sidebar-tree .reference:hover{background:var(--color-sidebar-item-background--hover);color:var(--color-sidebar-link-text)}.sidebar-tree .reference.external:after{color:var(--color-sidebar-link-text);content:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23607D8B' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M11 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-5M10 14 20 4M15 4h5v5'/%3E%3C/svg%3E");margin:0 .25rem;vertical-align:middle}.sidebar-tree .current-page>.reference{font-weight:700}.sidebar-tree label{align-items:center;cursor:pointer;display:flex;height:var(--sidebar-item-height);justify-content:center;position:absolute;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--sidebar-expander-width)}.sidebar-tree .caption,.sidebar-tree :not(.caption)>.caption-text{color:var(--color-sidebar-caption-text);font-size:var(--sidebar-caption-font-size);font-weight:700;margin:var(--sidebar-caption-space-above) 0 0 0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-transform:uppercase}.sidebar-tree li.has-children>.reference{padding-right:var(--sidebar-expander-width)}.sidebar-tree .toctree-l1>.reference,.sidebar-tree .toctree-l1>label .icon{color:var(--color-sidebar-link-text--top-level)}.sidebar-tree label{background:var(--color-sidebar-item-expander-background)}.sidebar-tree label:hover{background:var(--color-sidebar-item-expander-background--hover)}.sidebar-tree .current>.reference{background:var(--color-sidebar-item-background--current)}.sidebar-tree .current>.reference:hover{background:var(--color-sidebar-item-background--hover)}.toctree-checkbox{display:none;position:absolute}.toctree-checkbox~ul{display:none}.toctree-checkbox~label .icon svg{transform:rotate(90deg)}.toctree-checkbox:checked~ul{display:block}.toctree-checkbox:checked~label .icon svg{transform:rotate(-90deg)}.toc-title-container{padding:var(--toc-title-padding);padding-top:var(--toc-spacing-vertical)}.toc-title{color:var(--color-toc-title-text);font-size:var(--toc-title-font-size);padding-left:var(--toc-spacing-horizontal);text-transform:uppercase}.no-toc{display:none}.toc-tree-container{padding-bottom:var(--toc-spacing-vertical)}.toc-tree{border-left:1px solid var(--color-background-border);font-size:var(--toc-font-size);line-height:1.3;padding-left:calc(var(--toc-spacing-horizontal) - var(--toc-item-spacing-horizontal))}.toc-tree>ul>li:first-child{padding-top:0}.toc-tree>ul>li:first-child>ul{padding-left:0}.toc-tree>ul>li:first-child>a{display:none}.toc-tree ul{list-style-type:none;margin-bottom:0;margin-top:0;padding-left:var(--toc-item-spacing-horizontal)}.toc-tree li{padding-top:var(--toc-item-spacing-vertical)}.toc-tree li.scroll-current>.reference{color:var(--color-toc-item-text--active);font-weight:700}.toc-tree a.reference{color:var(--color-toc-item-text);overflow-wrap:anywhere;text-decoration:none}.toc-scroll{max-height:100vh;overflow-y:scroll}.contents:not(.this-will-duplicate-information-and-it-is-still-useful-here){background:rgba(255,0,0,.25);color:var(--color-problematic)}.contents:not(.this-will-duplicate-information-and-it-is-still-useful-here):before{content:"ERROR: Adding a table of contents in Furo-based documentation is unnecessary, and does not work well with existing styling. Add a 'this-will-duplicate-information-and-it-is-still-useful-here' class, if you want an escape hatch."}.text-align\:left>p{text-align:left}.text-align\:center>p{text-align:center}.text-align\:right>p{text-align:right} +/*# sourceMappingURL=furo.css.map*/ \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/_static/styles/furo.css.map b/docs/cuda-bindings/12.6.1/_static/styles/furo.css.map new file mode 100644 index 000000000..3ecc37150 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/_static/styles/furo.css.map @@ -0,0 +1 @@ +{"version":3,"file":"styles/furo.css","mappings":"AAAA,2EAA2E,CAU3E,KACE,gBAAiB,CACjB,6BACF,CASA,KACE,QACF,CAMA,KACE,aACF,CAOA,GACE,aAAc,CACd,cACF,CAUA,GACE,sBAAuB,CACvB,QAAS,CACT,gBACF,CAOA,IACE,+BAAiC,CACjC,aACF,CASA,EACE,4BACF,CAOA,YACE,kBAAmB,CACnB,yBAA0B,CAC1B,gCACF,CAMA,SAEE,kBACF,CAOA,cAGE,+BAAiC,CACjC,aACF,CAeA,QAEE,aAAc,CACd,aAAc,CACd,iBAAkB,CAClB,uBACF,CAEA,IACE,aACF,CAEA,IACE,SACF,CASA,IACE,iBACF,CAUA,sCAKE,mBAAoB,CACpB,cAAe,CACf,gBAAiB,CACjB,QACF,CAOA,aAEE,gBACF,CAOA,cAEE,mBACF,CAMA,gDAIE,yBACF,CAMA,wHAIE,iBAAkB,CAClB,SACF,CAMA,4GAIE,6BACF,CAMA,SACE,0BACF,CASA,OACE,qBAAsB,CACtB,aAAc,CACd,aAAc,CACd,cAAe,CACf,SAAU,CACV,kBACF,CAMA,SACE,uBACF,CAMA,SACE,aACF,CAOA,6BAEE,qBAAsB,CACtB,SACF,CAMA,kFAEE,WACF,CAOA,cACE,4BAA6B,CAC7B,mBACF,CAMA,yCACE,uBACF,CAOA,6BACE,yBAA0B,CAC1B,YACF,CASA,QACE,aACF,CAMA,QACE,iBACF,CAiBA,kBACE,YACF,CCvVA,aAcE,kEACE,uBAOF,WACE,iDAMF,kCACE,wBAEF,qCAEE,uBADA,uBACA,CAEF,SACE,wBAtBA,CCpBJ,iBAGE,qBAEA,sBACA,0BAFA,oBAHA,4BACA,oBAKA,6BAIA,2CAFA,mBACA,sCAFA,4BAGA,CAEF,gBACE,aCTF,KCGE,mHAEA,wGAEA,wCAAyC,CAEzC,wBAAyB,CACzB,wBAAyB,CACzB,4BAA6B,CAC7B,yBAA0B,CAC1B,2BAA4B,CAG5B,sDAAuD,CACvD,gDAAiD,CACjD,wDAAyD,CAGzD,0CAA2C,CAC3C,gDAAiD,CACjD,gDAAiD,CAKjD,gCAAiC,CACjC,sCAAuC,CAGvC,2CAA4C,CAG5C,uCAAwC,CCjCxC,+FAGA,uBAAwB,CAGxB,iCAAkC,CAClC,kCAAmC,CAEnC,+BAAgC,CAChC,sCAAuC,CACvC,sCAAuC,CACvC,qGAIA,mDAAoD,CAEpD,mCAAoC,CACpC,8CAA+C,CAC/C,gDAAiD,CACjD,kCAAmC,CACnC,6DAA8D,CAG9D,6BAA8B,CAC9B,6BAA8B,CAC9B,+BAAgC,CAChC,kCAAmC,CACnC,kCAAmC,CCPjC,+jBCYA,iqCAZF,iaCVA,8KAOA,4SAWA,4SAUA,0CACA,gEAGA,0CAGA,gEAGA,yCACA,+DAIA,4CACA,kEAGA,wCAUA,8DACA,uCAGA,4DACA,sCACA,2DAGA,4CACA,kEACA,uCAGA,6DACA,2GAGA,sHAEA,yFAEA,+CACA,+EAGA,4MAOA,gCACA,sHAIA,kCACA,uEACA,gEACA,4DACA,kEAGA,2DACA,sDACA,0CACA,8CACA,wGAGA,0BACA,iCAGA,+DACA,+BACA,sCACA,+DAEA,kGACA,oCACA,yDACA,sCL7HF,kCAEA,sDAIA,0CK2HE,kEAIA,oDACA,sDAGA,oCACA,oEAEA,0DACA,qDAIA,oDACA,6DAIA,iEAIA,2DAIA,2DAGA,4DACA,gEAIA,gEAEA,gFAEA,oNASA,qDLxKE,gFAGE,4DAIF,oEKkHF,yEAEA,6DAGA,0DAEA,uDACA,qDACA,wDAIA,6DAIA,yDACA,2DAIA,uCAGA,wCACA,sDAGA,+CAGA,6DAEA,iDACA,+DAEA,wDAEA,sEAMA,0DACA,sBACA,mEL9JI,wEAEA,iCACE,+BAMN,wEAGA,iCACE,kFAEA,uEAIF,gEACE,8BAGF,qEMvDA,sCAKA,wFAKA,iCAIA,0BAWA,iCACA,4BACA,mCAGA,+BAEA,sCACA,4BAEA,mCAEA,sCAKA,sDAIA,gCAEA,gEAQF,wCAME,sBACA,kCAKA,uBAEA,gEAIA,2BAIA,mCAEA,qCACA,iCAGE,+BACA,wEAEE,iCACA,kFAGF,6BACA,0CACF,kCAEE,8BACE,8BACA,qEAEE,sCACA,wFCnFN,iCAGF,2DAEE,4BACA,oCAGA,mIAGA,4HACE,gEAMJ,+CAGE,sBACA,yCAEF,uBAEE,sEAKA,gDACA,kEAGA,iFAGE,YAGF,EACA,4HAQF,mBACE,6BACA,mBACA,wCACA,wCACA,2CAIA,eAGA,mBAKE,mBAGA,CAJA,uCACA,iBAFF,gBACE,CAKE,mBACA,mBAGJ,oBAIF,+BAGE,kDACA,OADA,kBAGA,CAFA,gBAEA,mBACA,oBAEA,sCACA,OAGF,cAHE,WAGF,GAEE,oBACA,CAHF,gBAGE,CC9Gc,YDiHd,+CAIF,SAEE,CAPF,UACE,wBAMA,4BAEA,GAGA,uBACA,CAJA,yBAGA,CACA,iDAKA,2CAGA,2DAQA,iBACA,uCAGA,kEAKE,SAKJ,8BACE,yDACA,2BAEA,oBACA,8BAEA,yDAEE,4BAEJ,uCACE,CACA,iEAGA,CAEA,wCACE,uBACA,kDAEA,0DAEE,CAJF,oBAIE,0GAWN,aACE,CAHA,YAGA,4HASA,+CAGF,sBACE,WACA,WAQA,4BAFF,0CAEE,CARA,qCAsBA,CAdA,iBAEA,kBACE,aADF,4BACE,WAMF,2BAGF,qCAEE,CAXE,UAWF,+BAGA,uBAEA,SAEA,0CAIE,CANF,qCAEA,CAIE,2DACE,gBAIN,+CAIA,CAEA,kDAKE,CAPF,8BAEA,CAOE,YACA,CAjBI,2BAGN,CAHM,WAcJ,UAGA,CAEA,2GAIF,iCAGE,8BAIA,qBACA,oBACF,uBAOI,0CAIA,CATF,6DAKE,CALF,sBASE,qCAKF,CACE,cACA,CAFF,sBAEE,CACA,+BAEA,qBAEE,WAKN,aACE,sCAGA,mBAEA,6BAMA,kCACA,CAJA,sBACA,aAEA,CAJA,eACA,MAIA,2FAEA,UAGA,YACA,sBACE,8BAEA,CALF,aACA,WAIE,OACA,oBAEF,uBACE,WAEF,YAFE,UAEF,eAgBA,kBACE,CAhBA,qDAQF,qCAGF,CAGI,YACF,CAJF,2BAGI,CAEA,eACA,qBAGA,mEAEA,qBACA,8BAIA,kBADF,kBACE,yBAEJ,oCAGI,qDAIJ,+BAGI,oCAEA,+CAQF,4CACE,yBACF,2BAOE,sBACA,CAHA,WACA,CAFF,cACE,CAJA,YAGF,CAEE,SAEA,mBAGA,kDAEE,CAJF,cAEA,cAEE,sBAEA,mBADA,YACA,uBACA,mDACE,CADF,YACE,iDAEA,uCAEN,+DAOE,mBADF,sBACE,mBAGF,aACE,sCAIA,aADF,WACE,CAKF,SACE,CAHJ,kBAEE,CAJE,gBAEJ,CAHI,iBAMA,yFAKA,aACA,eACA,cElbJ,iBAEE,aADA,iBACA,6BAEA,kCAEA,SACA,UAIA,gCACA,CALA,SAEA,SAEA,CAJA,0EAEA,CAFA,OAKA,CAGA,mDACE,iBAGF,gCACE,CADF,UACE,aAEJ,iCAEE,CAFF,UAEE,wCAEA,WACA,WADA,UACA,CACA,4CAGA,MACA,CADA,KACA,wCACA,UAGA,CAJA,UAIA,6DAUA,0CACE,CAFF,mBAEE,wEACA,CAVA,YACA,CAMF,mBAJE,OAOA,gBAJJ,gCACE,CANE,cACA,CAHA,oBACA,CAGA,QAGJ,CAII,0BACA,CADA,UACA,wCAEJ,kBACE,0DACA,gCACE,kBACA,CADA,YACA,oEACA,2CAMF,mDAII,CALN,YACE,CANE,cAKJ,CACE,iBAII,kEACA,yCACE,kDACA,yDACE,+CACA,uBANN,CAMM,+BANN,uCACE,qDACA,4BAEE,mBADA,0CACA,CADA,qBACA,0DACE,wCACA,sGALJ,oCACA,sBACE,kBAFF,UAEE,2CACA,wFACE,cACA,kEANN,uBACE,iDACA,CADA,UACA,0DACE,wDAEE,iEACA,qEANN,sCACE,CAGE,iBAHF,gBAGE,qBACE,CAJJ,uBACA,gDACE,wDACA,6DAHF,2CACA,CADA,gBACA,eACE,CAGE,sBANN,8BACE,CAII,iBAFF,4DACA,WACE,YADF,uCACE,6EACA,2BANN,8CACE,kDACA,0CACE,8BACA,yFACE,sBACA,sFALJ,mEACA,sBACE,kEACA,6EACE,uCACA,kEALJ,qGAEE,kEACA,6EACE,uCACA,kEALJ,8CACA,uDACE,sEACA,2EACE,sCACA,iEALJ,mGACA,qCACE,oDACA,0DACE,6GACA,gDAGR,yDCrEA,sEACE,CACA,6GACE,gEACF,iGAIF,wFACE,qDAGA,mGAEE,2CAEF,4FACE,gCACF,wGACE,8DAEE,6FAIA,iJAKN,6GACE,gDAKF,yDACA,qCAGA,6BACA,kBACA,qDAKA,oCAEA,+DAGA,2CAGE,oDAIA,oEAEE,qBAGJ,wDAEE,uCAEF,kEAGA,8CAEA,uDAIF,gEAIE,6BACA,gEAIA,+CACE,0EAIF,sDAEE,+DAGF,sCACA,8BACE,oCAEJ,wBACE,4FAEE,gBAEJ,yGAGI,kBAGJ,CCnHE,2MCFF,oBAGE,wGAKA,iCACE,CADF,wBACE,8GAQA,mBCjBJ,2GAIE,mBACA,6HAMA,YACE,mIAYF,eACA,CAHF,YAGE,4FAGE,8BAKF,uBAkBE,sCACA,CADA,qBAbA,wCAIA,CALF,8BACE,CADF,gBAKE,wCACA,CAOA,kDACA,CACA,kCAKF,6BAGA,4CACE,kDACA,eAGF,cACE,aACA,iBACA,yBACA,8BACA,WAGJ,2BACE,cAGA,+BACA,CAHA,eAGA,wCACA,YACA,iBACA,uEAGA,0BACA,2CAEA,8EAGI,qBACA,CAFF,kBAEE,kBAGN,0CAGE,mCAGA,4BAIA,gEACE,qCACA,8BAEA,gBACA,+CACA,iCAEF,iCAEE,gEACA,qCAGF,8BAEE,+BAIA,yCAEE,qBADA,gBACA,yBAKF,eACA,CAFF,YACE,CACA,iBACA,qDAEA,mDCvIJ,2FAOE,iCACA,CAEA,eACA,CAHA,kBAEA,CAFA,wBAGA,8BACA,eACE,CAFF,YAEE,0BACA,8CAGA,oBACE,oCAGA,kBACE,8DAEA,iBAEN,UACE,8BAIJ,+CAEE,qDAEF,kDAIE,YAEF,CAFE,YAEF,CCpCE,mFADA,kBAKE,CAJF,IAGA,aACE,mCAGA,iDACE,+BAEJ,wBAEE,mBAMA,6CAEF,CAJE,mBAEA,CAEF,kCAGE,CARF,kBACE,CAHA,eAUA,YACA,mBACA,CADA,UACA,wCC9BF,oBDkCE,wBCnCJ,uCACE,+BACA,+DACA,sBAGA,qBCDA,6CAIE,CAPF,uBAGA,CDGE,oBACF,yDAEE,CCDE,2CAGF,CAJA,kCACE,CDJJ,YACE,CAIA,eCTF,CDKE,uBCMA,gCACE,YAEF,oCAEE,wBACA,0BAIF,iBAEA,cADF,UACE,uBAEA,iCAEA,wCAEA,6CAMA,CAYF,gCATI,4BASJ,CAZE,mCAEE,iCAUJ,4BAGE,4DADA,+BACA,CAHF,qBAGE,sCACE,OAEF,iBAHA,SAGA,iHACE,2DAKF,CANA,8EAMA,uSAEE,kBAEF,+FACE,yCCjEJ,WACA,yBAGA,uBACA,gBAEA,uCAIA,CAJA,iCAIA,uCAGA,UACE,gBACA,qBAEA,0CClBJ,gBACE,KAGF,qBACE,YAGF,CAHE,cAGF,gCAEE,mBACA,iEAEA,oCACA,wCAEA,sBACA,WAEA,CAFA,YAEA,8EAEA,mCAFA,iBAEA,6BAIA,wEAKA,sDAIE,CARF,mDAIA,CAIE,cAEF,8CAIA,oBAFE,iBAEF,8CAGE,eAEF,CAFE,YAEF,OAEE,kBAGJ,CAJI,eACA,CAFF,mBAKF,yCCjDE,oBACA,CAFA,iBAEA,uCAKE,iBACA,qCAGA,mBCZJ,CDWI,gBCXJ,6BAEE,eACA,sBAGA,eAEA,sBACA,oDACA,iGAMA,gBAFE,YAEF,8FAME,iJCnBF,YACA,gNAWE,gDAEF,iSAaE,kBACE,gHAKF,oCACE,eACF,CADE,UACF,8CACE,gDACF,wCACE,oBCxCJ,oBAEF,6BACE,QACE,kDAGF,yBACE,kDAmBA,kDAEF,CAhBA,+CAaA,CAbA,oBAaA,0FACE,CADF,gGAfF,cACE,gBACA,CAaA,0BAGA,mQACE,gBAGF,oMACE,iBACA,CAFF,eACE,CADF,gBAEE,aAGJ,iCAEE,CAFF,wCAEE,wBAUE,+VAIE,uEAHA,2BAGA,wXAKJ,iDAGF,CARM,+CACE,iDAIN,CALI,gBAQN,mHACE,gBAGF,2DACE,0EAOA,0EAGF,gBAEE,6DC/EA,kDACA,gCACA,qDAGA,qBACA,qDCFA,cACA,eAEA,yBAGF,sBAEE,iBACA,sNAWA,iBACE,kBACA,wRAgBA,kBAEA,iOAgBA,uCACE,uEAEA,kBAEF,qUAuBE,iDAIJ,CACA,geCxFF,4BAEE,CAQA,6JACA,iDAIA,sEAGA,mDAOF,iDAGE,4DAIA,8CACA,qDAEE,eAFF,cAEE,oBAEF,uBAFE,kCAGA,eACA,iBACA,mBAIA,mDACA,CAHA,uCAEA,CAJA,0CACA,CAIA,gBAJA,gBACA,oBADA,gBAIA,wBAEJ,gBAGE,6BACA,YAHA,iBAGA,gCACA,iEAEA,6CACA,sDACA,0BADA,wBACA,0BACA,oIAIA,mBAFA,YAEA,qBACA,0CAIE,uBAEF,CAHA,yBACE,CAEF,iDACE,mFAKJ,oCACE,CANE,aAKJ,CACE,qEAIA,YAFA,WAEA,CAHA,aACA,CAEA,gBACE,4BACA,sBADA,aACA,gCAMF,oCACA,yDACA,2CAEA,qBAGE,kBAEA,CACA,mCAIF,CARE,YACA,CAOF,iCAEE,CAPA,oBACA,CAQA,oBACE,uDAEJ,sDAGA,CAHA,cAGA,0BACE,oDAIA,oCACA,4BACA,sBAGA,cAEA,oFAGA,sBAEA,yDACE,CAIF,iBAJE,wBAIF,6CAHE,6CAKA,eACA,aACA,CADA,cACA,yCAGJ,kBACE,CAKA,iDAEA,CARF,aACE,4CAGA,kBAIA,wEAGA,wDAGA,kCAOA,iDAGA,CAPF,WAEE,sCAEA,CAJF,2CACE,CAMA,qCACA,+BARF,kBACE,qCAOA,iBAsBA,sBACE,CAvBF,WAKA,CACE,0DAIF,CALA,uDACE,CANF,sBAqBA,4CACA,CALA,gRAIA,YAEE,6CAEN,mCAEE,+CASA,6EAIA,4BChNA,SDmNA,qFCnNA,gDACA,sCAGA,qCACA,sDACA,CAKA,kDAGA,CARA,0CAQA,kBAGA,YACA,sBACA,iBAFA,gBADF,YACE,CAHA,SAKA,kBAEA,SAFA,iBAEA,uEAGA,CAEE,6CAFF,oCAgBI,CAdF,yBACE,qBACF,CAGF,oBACE,CAIF,WACE,CALA,2CAGA,uBACF,CACE,mFAGE,CALF,qBAEA,UAGE,gCAIF,sDAEA,CALE,oCAKF,yCC7CJ,oCACE,CD+CA,yXAQE,sCCrDJ,wCAGA,oCACE","sources":["webpack:///./node_modules/normalize.css/normalize.css","webpack:///./src/furo/assets/styles/base/_print.sass","webpack:///./src/furo/assets/styles/base/_screen-readers.sass","webpack:///./src/furo/assets/styles/base/_theme.sass","webpack:///./src/furo/assets/styles/variables/_fonts.scss","webpack:///./src/furo/assets/styles/variables/_spacing.scss","webpack:///./src/furo/assets/styles/variables/_icons.scss","webpack:///./src/furo/assets/styles/variables/_admonitions.scss","webpack:///./src/furo/assets/styles/variables/_colors.scss","webpack:///./src/furo/assets/styles/base/_typography.sass","webpack:///./src/furo/assets/styles/_scaffold.sass","webpack:///./src/furo/assets/styles/variables/_layout.scss","webpack:///./src/furo/assets/styles/content/_admonitions.sass","webpack:///./src/furo/assets/styles/content/_api.sass","webpack:///./src/furo/assets/styles/content/_blocks.sass","webpack:///./src/furo/assets/styles/content/_captions.sass","webpack:///./src/furo/assets/styles/content/_code.sass","webpack:///./src/furo/assets/styles/content/_footnotes.sass","webpack:///./src/furo/assets/styles/content/_images.sass","webpack:///./src/furo/assets/styles/content/_indexes.sass","webpack:///./src/furo/assets/styles/content/_lists.sass","webpack:///./src/furo/assets/styles/content/_math.sass","webpack:///./src/furo/assets/styles/content/_misc.sass","webpack:///./src/furo/assets/styles/content/_rubrics.sass","webpack:///./src/furo/assets/styles/content/_sidebar.sass","webpack:///./src/furo/assets/styles/content/_tables.sass","webpack:///./src/furo/assets/styles/content/_target.sass","webpack:///./src/furo/assets/styles/content/_gui-labels.sass","webpack:///./src/furo/assets/styles/components/_footer.sass","webpack:///./src/furo/assets/styles/components/_sidebar.sass","webpack:///./src/furo/assets/styles/components/_table_of_contents.sass","webpack:///./src/furo/assets/styles/_shame.sass"],"sourcesContent":["/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */\n\n/* Document\n ========================================================================== */\n\n/**\n * 1. Correct the line height in all browsers.\n * 2. Prevent adjustments of font size after orientation changes in iOS.\n */\n\nhtml {\n line-height: 1.15; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n}\n\n/* Sections\n ========================================================================== */\n\n/**\n * Remove the margin in all browsers.\n */\n\nbody {\n margin: 0;\n}\n\n/**\n * Render the `main` element consistently in IE.\n */\n\nmain {\n display: block;\n}\n\n/**\n * Correct the font size and margin on `h1` elements within `section` and\n * `article` contexts in Chrome, Firefox, and Safari.\n */\n\nh1 {\n font-size: 2em;\n margin: 0.67em 0;\n}\n\n/* Grouping content\n ========================================================================== */\n\n/**\n * 1. Add the correct box sizing in Firefox.\n * 2. Show the overflow in Edge and IE.\n */\n\nhr {\n box-sizing: content-box; /* 1 */\n height: 0; /* 1 */\n overflow: visible; /* 2 */\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\npre {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/* Text-level semantics\n ========================================================================== */\n\n/**\n * Remove the gray background on active links in IE 10.\n */\n\na {\n background-color: transparent;\n}\n\n/**\n * 1. Remove the bottom border in Chrome 57-\n * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.\n */\n\nabbr[title] {\n border-bottom: none; /* 1 */\n text-decoration: underline; /* 2 */\n text-decoration: underline dotted; /* 2 */\n}\n\n/**\n * Add the correct font weight in Chrome, Edge, and Safari.\n */\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/**\n * 1. Correct the inheritance and scaling of font size in all browsers.\n * 2. Correct the odd `em` font sizing in all browsers.\n */\n\ncode,\nkbd,\nsamp {\n font-family: monospace, monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/**\n * Add the correct font size in all browsers.\n */\n\nsmall {\n font-size: 80%;\n}\n\n/**\n * Prevent `sub` and `sup` elements from affecting the line height in\n * all browsers.\n */\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/* Embedded content\n ========================================================================== */\n\n/**\n * Remove the border on images inside links in IE 10.\n */\n\nimg {\n border-style: none;\n}\n\n/* Forms\n ========================================================================== */\n\n/**\n * 1. Change the font styles in all browsers.\n * 2. Remove the margin in Firefox and Safari.\n */\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n line-height: 1.15; /* 1 */\n margin: 0; /* 2 */\n}\n\n/**\n * Show the overflow in IE.\n * 1. Show the overflow in Edge.\n */\n\nbutton,\ninput { /* 1 */\n overflow: visible;\n}\n\n/**\n * Remove the inheritance of text transform in Edge, Firefox, and IE.\n * 1. Remove the inheritance of text transform in Firefox.\n */\n\nbutton,\nselect { /* 1 */\n text-transform: none;\n}\n\n/**\n * Correct the inability to style clickable types in iOS and Safari.\n */\n\nbutton,\n[type=\"button\"],\n[type=\"reset\"],\n[type=\"submit\"] {\n -webkit-appearance: button;\n}\n\n/**\n * Remove the inner border and padding in Firefox.\n */\n\nbutton::-moz-focus-inner,\n[type=\"button\"]::-moz-focus-inner,\n[type=\"reset\"]::-moz-focus-inner,\n[type=\"submit\"]::-moz-focus-inner {\n border-style: none;\n padding: 0;\n}\n\n/**\n * Restore the focus styles unset by the previous rule.\n */\n\nbutton:-moz-focusring,\n[type=\"button\"]:-moz-focusring,\n[type=\"reset\"]:-moz-focusring,\n[type=\"submit\"]:-moz-focusring {\n outline: 1px dotted ButtonText;\n}\n\n/**\n * Correct the padding in Firefox.\n */\n\nfieldset {\n padding: 0.35em 0.75em 0.625em;\n}\n\n/**\n * 1. Correct the text wrapping in Edge and IE.\n * 2. Correct the color inheritance from `fieldset` elements in IE.\n * 3. Remove the padding so developers are not caught out when they zero out\n * `fieldset` elements in all browsers.\n */\n\nlegend {\n box-sizing: border-box; /* 1 */\n color: inherit; /* 2 */\n display: table; /* 1 */\n max-width: 100%; /* 1 */\n padding: 0; /* 3 */\n white-space: normal; /* 1 */\n}\n\n/**\n * Add the correct vertical alignment in Chrome, Firefox, and Opera.\n */\n\nprogress {\n vertical-align: baseline;\n}\n\n/**\n * Remove the default vertical scrollbar in IE 10+.\n */\n\ntextarea {\n overflow: auto;\n}\n\n/**\n * 1. Add the correct box sizing in IE 10.\n * 2. Remove the padding in IE 10.\n */\n\n[type=\"checkbox\"],\n[type=\"radio\"] {\n box-sizing: border-box; /* 1 */\n padding: 0; /* 2 */\n}\n\n/**\n * Correct the cursor style of increment and decrement buttons in Chrome.\n */\n\n[type=\"number\"]::-webkit-inner-spin-button,\n[type=\"number\"]::-webkit-outer-spin-button {\n height: auto;\n}\n\n/**\n * 1. Correct the odd appearance in Chrome and Safari.\n * 2. Correct the outline style in Safari.\n */\n\n[type=\"search\"] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/**\n * Remove the inner padding in Chrome and Safari on macOS.\n */\n\n[type=\"search\"]::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/**\n * 1. Correct the inability to style clickable types in iOS and Safari.\n * 2. Change font properties to `inherit` in Safari.\n */\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/* Interactive\n ========================================================================== */\n\n/*\n * Add the correct display in Edge, IE 10+, and Firefox.\n */\n\ndetails {\n display: block;\n}\n\n/*\n * Add the correct display in all browsers.\n */\n\nsummary {\n display: list-item;\n}\n\n/* Misc\n ========================================================================== */\n\n/**\n * Add the correct display in IE 10+.\n */\n\ntemplate {\n display: none;\n}\n\n/**\n * Add the correct display in IE 10.\n */\n\n[hidden] {\n display: none;\n}\n","// This file contains styles for managing print media.\n\n////////////////////////////////////////////////////////////////////////////////\n// Hide elements not relevant to print media.\n////////////////////////////////////////////////////////////////////////////////\n@media print\n // Hide icon container.\n .content-icon-container\n display: none !important\n\n // Hide showing header links if hovering over when printing.\n .headerlink\n display: none !important\n\n // Hide mobile header.\n .mobile-header\n display: none !important\n\n // Hide navigation links.\n .related-pages\n display: none !important\n\n////////////////////////////////////////////////////////////////////////////////\n// Tweaks related to decolorization.\n////////////////////////////////////////////////////////////////////////////////\n@media print\n // Apply a border around code which no longer have a color background.\n .highlight\n border: 0.1pt solid var(--color-foreground-border)\n\n////////////////////////////////////////////////////////////////////////////////\n// Avoid page break in some relevant cases.\n////////////////////////////////////////////////////////////////////////////////\n@media print\n ul, ol, dl, a, table, pre, blockquote, p\n page-break-inside: avoid\n\n h1, h2, h3, h4, h5, h6, img, figure, caption\n page-break-inside: avoid\n page-break-after: avoid\n\n ul, ol, dl\n page-break-before: avoid\n",".visually-hidden\n position: absolute !important\n width: 1px !important\n height: 1px !important\n padding: 0 !important\n margin: -1px !important\n overflow: hidden !important\n clip: rect(0,0,0,0) !important\n white-space: nowrap !important\n border: 0 !important\n color: var(--color-foreground-primary)\n background: var(--color-background-primary)\n\n:-moz-focusring\n outline: auto\n","// This file serves as the \"skeleton\" of the theming logic.\n//\n// This contains the bulk of the logic for handling dark mode, color scheme\n// toggling and the handling of color-scheme-specific hiding of elements.\n\nbody\n @include fonts\n @include spacing\n @include icons\n @include admonitions\n @include default-admonition(#651fff, \"abstract\")\n @include default-topic(#14B8A6, \"pencil\")\n\n @include colors\n\n.only-light\n display: block !important\nhtml body .only-dark\n display: none !important\n\n// Ignore dark-mode hints if print media.\n@media not print\n // Enable dark-mode, if requested.\n body[data-theme=\"dark\"]\n @include colors-dark\n\n html & .only-light\n display: none !important\n .only-dark\n display: block !important\n\n // Enable dark mode, unless explicitly told to avoid.\n @media (prefers-color-scheme: dark)\n body:not([data-theme=\"light\"])\n @include colors-dark\n\n html & .only-light\n display: none !important\n .only-dark\n display: block !important\n\n//\n// Theme toggle presentation\n//\nbody[data-theme=\"auto\"]\n .theme-toggle svg.theme-icon-when-auto-light\n display: block\n\n @media (prefers-color-scheme: dark)\n .theme-toggle svg.theme-icon-when-auto-dark\n display: block\n .theme-toggle svg.theme-icon-when-auto-light\n display: none\n\nbody[data-theme=\"dark\"]\n .theme-toggle svg.theme-icon-when-dark\n display: block\n\nbody[data-theme=\"light\"]\n .theme-toggle svg.theme-icon-when-light\n display: block\n","// Fonts used by this theme.\n//\n// There are basically two things here -- using the system font stack and\n// defining sizes for various elements in %ages. We could have also used `em`\n// but %age is easier to reason about for me.\n\n@mixin fonts {\n // These are adapted from https://systemfontstack.com/\n --font-stack: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial,\n sans-serif, Apple Color Emoji, Segoe UI Emoji;\n --font-stack--monospace: \"SFMono-Regular\", Menlo, Consolas, Monaco,\n Liberation Mono, Lucida Console, monospace;\n --font-stack--headings: var(--font-stack);\n\n --font-size--normal: 100%;\n --font-size--small: 87.5%;\n --font-size--small--2: 81.25%;\n --font-size--small--3: 75%;\n --font-size--small--4: 62.5%;\n\n // Sidebar\n --sidebar-caption-font-size: var(--font-size--small--2);\n --sidebar-item-font-size: var(--font-size--small);\n --sidebar-search-input-font-size: var(--font-size--small);\n\n // Table of Contents\n --toc-font-size: var(--font-size--small--3);\n --toc-font-size--mobile: var(--font-size--normal);\n --toc-title-font-size: var(--font-size--small--4);\n\n // Admonitions\n //\n // These aren't defined in terms of %ages, since nesting these is permitted.\n --admonition-font-size: 0.8125rem;\n --admonition-title-font-size: 0.8125rem;\n\n // Code\n --code-font-size: var(--font-size--small--2);\n\n // API\n --api-font-size: var(--font-size--small);\n}\n","// Spacing for various elements on the page\n//\n// If the user wants to tweak things in a certain way, they are permitted to.\n// They also have to deal with the consequences though!\n\n@mixin spacing {\n // Header!\n --header-height: calc(\n var(--sidebar-item-line-height) + 4 * #{var(--sidebar-item-spacing-vertical)}\n );\n --header-padding: 0.5rem;\n\n // Sidebar\n --sidebar-tree-space-above: 1.5rem;\n --sidebar-caption-space-above: 1rem;\n\n --sidebar-item-line-height: 1rem;\n --sidebar-item-spacing-vertical: 0.5rem;\n --sidebar-item-spacing-horizontal: 1rem;\n --sidebar-item-height: calc(\n var(--sidebar-item-line-height) + 2 *#{var(--sidebar-item-spacing-vertical)}\n );\n\n --sidebar-expander-width: var(--sidebar-item-height); // be square\n\n --sidebar-search-space-above: 0.5rem;\n --sidebar-search-input-spacing-vertical: 0.5rem;\n --sidebar-search-input-spacing-horizontal: 0.5rem;\n --sidebar-search-input-height: 1rem;\n --sidebar-search-icon-size: var(--sidebar-search-input-height);\n\n // Table of Contents\n --toc-title-padding: 0.25rem 0;\n --toc-spacing-vertical: 1.5rem;\n --toc-spacing-horizontal: 1.5rem;\n --toc-item-spacing-vertical: 0.4rem;\n --toc-item-spacing-horizontal: 1rem;\n}\n","// Expose theme icons as CSS variables.\n\n$icons: (\n // Adapted from tabler-icons\n // url: https://tablericons.com/\n \"search\":\n url('data:image/svg+xml;charset=utf-8,'),\n // Factored out from mkdocs-material on 24-Aug-2020.\n // url: https://squidfunk.github.io/mkdocs-material/reference/admonitions/\n \"pencil\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"abstract\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"info\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"flame\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"question\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"warning\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"failure\":\n url('data:image/svg+xml;charset=utf-8,'),\n \"spark\":\n url('data:image/svg+xml;charset=utf-8,')\n);\n\n@mixin icons {\n @each $name, $glyph in $icons {\n --icon-#{$name}: #{$glyph};\n }\n}\n","// Admonitions\n\n// Structure of these is:\n// admonition-class: color \"icon-name\";\n//\n// The colors are translated into CSS variables below. The icons are\n// used directly in the main declarations to set the `mask-image` in\n// the title.\n\n// prettier-ignore\n$admonitions: (\n // Each of these has an reST directives for it.\n \"caution\": #ff9100 \"spark\",\n \"warning\": #ff9100 \"warning\",\n \"danger\": #ff5252 \"spark\",\n \"attention\": #ff5252 \"warning\",\n \"error\": #ff5252 \"failure\",\n \"hint\": #00c852 \"question\",\n \"tip\": #00c852 \"info\",\n \"important\": #00bfa5 \"flame\",\n \"note\": #00b0ff \"pencil\",\n \"seealso\": #448aff \"info\",\n \"admonition-todo\": #808080 \"pencil\"\n);\n\n@mixin default-admonition($color, $icon-name) {\n --color-admonition-title: #{$color};\n --color-admonition-title-background: #{rgba($color, 0.2)};\n\n --icon-admonition-default: var(--icon-#{$icon-name});\n}\n\n@mixin default-topic($color, $icon-name) {\n --color-topic-title: #{$color};\n --color-topic-title-background: #{rgba($color, 0.2)};\n\n --icon-topic-default: var(--icon-#{$icon-name});\n}\n\n@mixin admonitions {\n @each $name, $values in $admonitions {\n --color-admonition-title--#{$name}: #{nth($values, 1)};\n --color-admonition-title-background--#{$name}: #{rgba(\n nth($values, 1),\n 0.2\n )};\n }\n}\n","// Colors used throughout this theme.\n//\n// The aim is to give the user more control. Thus, instead of hard-coding colors\n// in various parts of the stylesheet, the approach taken is to define all\n// colors as CSS variables and reusing them in all the places.\n//\n// `colors-dark` depends on `colors` being included at a lower specificity.\n\n@mixin colors {\n --color-problematic: #b30000;\n\n // Base Colors\n --color-foreground-primary: black; // for main text and headings\n --color-foreground-secondary: #5a5c63; // for secondary text\n --color-foreground-muted: #6b6f76; // for muted text\n --color-foreground-border: #878787; // for content borders\n\n --color-background-primary: white; // for content\n --color-background-secondary: #f8f9fb; // for navigation + ToC\n --color-background-hover: #efeff4ff; // for navigation-item hover\n --color-background-hover--transparent: #efeff400;\n --color-background-border: #eeebee; // for UI borders\n --color-background-item: #ccc; // for \"background\" items (eg: copybutton)\n\n // Announcements\n --color-announcement-background: #000000dd;\n --color-announcement-text: #eeebee;\n\n // Brand colors\n --color-brand-primary: #0a4bff;\n --color-brand-content: #2757dd;\n --color-brand-visited: #872ee0;\n\n // API documentation\n --color-api-background: var(--color-background-hover--transparent);\n --color-api-background-hover: var(--color-background-hover);\n --color-api-overall: var(--color-foreground-secondary);\n --color-api-name: var(--color-problematic);\n --color-api-pre-name: var(--color-problematic);\n --color-api-paren: var(--color-foreground-secondary);\n --color-api-keyword: var(--color-foreground-primary);\n\n --color-api-added: #21632c;\n --color-api-added-border: #38a84d;\n --color-api-changed: #046172;\n --color-api-changed-border: #06a1bc;\n --color-api-deprecated: #605706;\n --color-api-deprecated-border: #f0d90f;\n --color-api-removed: #b30000;\n --color-api-removed-border: #ff5c5c;\n\n --color-highlight-on-target: #ffffcc;\n\n // Inline code background\n --color-inline-code-background: var(--color-background-secondary);\n\n // Highlighted text (search)\n --color-highlighted-background: #ddeeff;\n --color-highlighted-text: var(--color-foreground-primary);\n\n // GUI Labels\n --color-guilabel-background: #ddeeff80;\n --color-guilabel-border: #bedaf580;\n --color-guilabel-text: var(--color-foreground-primary);\n\n // Admonitions!\n --color-admonition-background: transparent;\n\n //////////////////////////////////////////////////////////////////////////////\n // Everything below this should be one of:\n // - var(...)\n // - *-gradient(...)\n // - special literal values (eg: transparent, none)\n //////////////////////////////////////////////////////////////////////////////\n\n // Tables\n --color-table-header-background: var(--color-background-secondary);\n --color-table-border: var(--color-background-border);\n\n // Cards\n --color-card-border: var(--color-background-secondary);\n --color-card-background: transparent;\n --color-card-marginals-background: var(--color-background-secondary);\n\n // Header\n --color-header-background: var(--color-background-primary);\n --color-header-border: var(--color-background-border);\n --color-header-text: var(--color-foreground-primary);\n\n // Sidebar (left)\n --color-sidebar-background: var(--color-background-secondary);\n --color-sidebar-background-border: var(--color-background-border);\n\n --color-sidebar-brand-text: var(--color-foreground-primary);\n --color-sidebar-caption-text: var(--color-foreground-muted);\n --color-sidebar-link-text: var(--color-foreground-secondary);\n --color-sidebar-link-text--top-level: var(--color-brand-primary);\n\n --color-sidebar-item-background: var(--color-sidebar-background);\n --color-sidebar-item-background--current: var(\n --color-sidebar-item-background\n );\n --color-sidebar-item-background--hover: linear-gradient(\n 90deg,\n var(--color-background-hover--transparent) 0%,\n var(--color-background-hover) var(--sidebar-item-spacing-horizontal),\n var(--color-background-hover) 100%\n );\n\n --color-sidebar-item-expander-background: transparent;\n --color-sidebar-item-expander-background--hover: var(\n --color-background-hover\n );\n\n --color-sidebar-search-text: var(--color-foreground-primary);\n --color-sidebar-search-background: var(--color-background-secondary);\n --color-sidebar-search-background--focus: var(--color-background-primary);\n --color-sidebar-search-border: var(--color-background-border);\n --color-sidebar-search-icon: var(--color-foreground-muted);\n\n // Table of Contents (right)\n --color-toc-background: var(--color-background-primary);\n --color-toc-title-text: var(--color-foreground-muted);\n --color-toc-item-text: var(--color-foreground-secondary);\n --color-toc-item-text--hover: var(--color-foreground-primary);\n --color-toc-item-text--active: var(--color-brand-primary);\n\n // Actual page contents\n --color-content-foreground: var(--color-foreground-primary);\n --color-content-background: transparent;\n\n // Links\n --color-link: var(--color-brand-content);\n --color-link-underline: var(--color-background-border);\n --color-link--hover: var(--color-brand-content);\n --color-link-underline--hover: var(--color-foreground-border);\n\n --color-link--visited: var(--color-brand-visited);\n --color-link-underline--visited: var(--color-background-border);\n --color-link--visited--hover: var(--color-brand-visited);\n --color-link-underline--visited--hover: var(--color-foreground-border);\n}\n\n@mixin colors-dark {\n --color-problematic: #ee5151;\n\n // Base Colors\n --color-foreground-primary: #cfd0d0; // for main text and headings\n --color-foreground-secondary: #9ca0a5; // for secondary text\n --color-foreground-muted: #81868d; // for muted text\n --color-foreground-border: #666666; // for content borders\n\n --color-background-primary: #131416; // for content\n --color-background-secondary: #1a1c1e; // for navigation + ToC\n --color-background-hover: #1e2124ff; // for navigation-item hover\n --color-background-hover--transparent: #1e212400;\n --color-background-border: #303335; // for UI borders\n --color-background-item: #444; // for \"background\" items (eg: copybutton)\n\n // Announcements\n --color-announcement-background: #000000dd;\n --color-announcement-text: #eeebee;\n\n // Brand colors\n --color-brand-primary: #3d94ff;\n --color-brand-content: #5ca5ff;\n --color-brand-visited: #b27aeb;\n\n // Highlighted text (search)\n --color-highlighted-background: #083563;\n\n // GUI Labels\n --color-guilabel-background: #08356380;\n --color-guilabel-border: #13395f80;\n\n // API documentation\n --color-api-keyword: var(--color-foreground-secondary);\n --color-highlight-on-target: #333300;\n\n --color-api-added: #3db854;\n --color-api-added-border: #267334;\n --color-api-changed: #09b0ce;\n --color-api-changed-border: #056d80;\n --color-api-deprecated: #b1a10b;\n --color-api-deprecated-border: #6e6407;\n --color-api-removed: #ff7575;\n --color-api-removed-border: #b03b3b;\n\n // Admonitions\n --color-admonition-background: #18181a;\n\n // Cards\n --color-card-border: var(--color-background-secondary);\n --color-card-background: #18181a;\n --color-card-marginals-background: var(--color-background-hover);\n}\n","// This file contains the styling for making the content throughout the page,\n// including fonts, paragraphs, headings and spacing among these elements.\n\nbody\n font-family: var(--font-stack)\npre,\ncode,\nkbd,\nsamp\n font-family: var(--font-stack--monospace)\n\n// Make fonts look slightly nicer.\nbody\n -webkit-font-smoothing: antialiased\n -moz-osx-font-smoothing: grayscale\n\n// Line height from Bootstrap 4.1\narticle\n line-height: 1.5\n\n//\n// Headings\n//\nh1,\nh2,\nh3,\nh4,\nh5,\nh6\n line-height: 1.25\n font-family: var(--font-stack--headings)\n font-weight: bold\n\n border-radius: 0.5rem\n margin-top: 0.5rem\n margin-bottom: 0.5rem\n margin-left: -0.5rem\n margin-right: -0.5rem\n padding-left: 0.5rem\n padding-right: 0.5rem\n\n + p\n margin-top: 0\n\nh1\n font-size: 2.5em\n margin-top: 1.75rem\n margin-bottom: 1rem\nh2\n font-size: 2em\n margin-top: 1.75rem\nh3\n font-size: 1.5em\nh4\n font-size: 1.25em\nh5\n font-size: 1.125em\nh6\n font-size: 1em\n\nsmall\n opacity: 75%\n font-size: 80%\n\n// Paragraph\np\n margin-top: 0.5rem\n margin-bottom: 0.75rem\n\n// Horizontal rules\nhr.docutils\n height: 1px\n padding: 0\n margin: 2rem 0\n background-color: var(--color-background-border)\n border: 0\n\n.centered\n text-align: center\n\n// Links\na\n text-decoration: underline\n\n color: var(--color-link)\n text-decoration-color: var(--color-link-underline)\n\n &:visited\n color: var(--color-link--visited)\n text-decoration-color: var(--color-link-underline--visited)\n &:hover\n color: var(--color-link--visited--hover)\n text-decoration-color: var(--color-link-underline--visited--hover)\n\n &:hover\n color: var(--color-link--hover)\n text-decoration-color: var(--color-link-underline--hover)\n &.muted-link\n color: inherit\n &:hover\n color: var(--color-link--hover)\n text-decoration-color: var(--color-link-underline--hover)\n &:visited\n color: var(--color-link--visited--hover)\n text-decoration-color: var(--color-link-underline--visited--hover)\n","// This file contains the styles for the overall layouting of the documentation\n// skeleton, including the responsive changes as well as sidebar toggles.\n//\n// This is implemented as a mobile-last design, which isn't ideal, but it is\n// reasonably good-enough and I got pretty tired by the time I'd finished this\n// to move the rules around to fix this. Shouldn't take more than 3-4 hours,\n// if you know what you're doing tho.\n\n// HACK: Not all browsers account for the scrollbar width in media queries.\n// This results in horizontal scrollbars in the breakpoint where we go\n// from displaying everything to hiding the ToC. We accomodate for this by\n// adding a bit of padding to the TOC drawer, disabling the horizontal\n// scrollbar and allowing the scrollbars to cover the padding.\n// https://www.456bereastreet.com/archive/201301/media_query_width_and_vertical_scrollbars/\n\n// HACK: Always having the scrollbar visible, prevents certain browsers from\n// causing the content to stutter horizontally between taller-than-viewport and\n// not-taller-than-viewport pages.\n\nhtml\n overflow-x: hidden\n overflow-y: scroll\n scroll-behavior: smooth\n\n.sidebar-scroll, .toc-scroll, article[role=main] *\n // Override Firefox scrollbar style\n scrollbar-width: thin\n scrollbar-color: var(--color-foreground-border) transparent\n\n // Override Chrome scrollbar styles\n &::-webkit-scrollbar\n width: 0.25rem\n height: 0.25rem\n &::-webkit-scrollbar-thumb\n background-color: var(--color-foreground-border)\n border-radius: 0.125rem\n\n//\n// Overalls\n//\nhtml,\nbody\n height: 100%\n color: var(--color-foreground-primary)\n background: var(--color-background-primary)\n\n.skip-to-content\n position: fixed\n padding: 1rem\n border-radius: 1rem\n left: 0.25rem\n top: 0.25rem\n z-index: 40\n background: var(--color-background-primary)\n color: var(--color-foreground-primary)\n\n transform: translateY(-200%)\n transition: transform 300ms ease-in-out\n\n &:focus-within\n transform: translateY(0%)\n\narticle\n color: var(--color-content-foreground)\n background: var(--color-content-background)\n overflow-wrap: break-word\n\n.page\n display: flex\n // fill the viewport for pages with little content.\n min-height: 100%\n\n.mobile-header\n width: 100%\n height: var(--header-height)\n background-color: var(--color-header-background)\n color: var(--color-header-text)\n border-bottom: 1px solid var(--color-header-border)\n\n // Looks like sub-script/super-script have this, and we need this to\n // be \"on top\" of those.\n z-index: 10\n\n // We don't show the header on large screens.\n display: none\n\n // Add shadow when scrolled\n &.scrolled\n border-bottom: none\n box-shadow: 0 0 0.2rem rgba(0, 0, 0, 0.1), 0 0.2rem 0.4rem rgba(0, 0, 0, 0.2)\n\n .header-center\n a\n color: var(--color-header-text)\n text-decoration: none\n\n.main\n display: flex\n flex: 1\n\n// Sidebar (left) also covers the entire left portion of screen.\n.sidebar-drawer\n box-sizing: border-box\n\n border-right: 1px solid var(--color-sidebar-background-border)\n background: var(--color-sidebar-background)\n\n display: flex\n justify-content: flex-end\n // These next two lines took me two days to figure out.\n width: calc((100% - #{$full-width}) / 2 + #{$sidebar-width})\n min-width: $sidebar-width\n\n// Scroll-along sidebars\n.sidebar-container,\n.toc-drawer\n box-sizing: border-box\n width: $sidebar-width\n\n.toc-drawer\n background: var(--color-toc-background)\n // See HACK described on top of this document\n padding-right: 1rem\n\n.sidebar-sticky,\n.toc-sticky\n position: sticky\n top: 0\n height: min(100%, 100vh)\n height: 100vh\n\n display: flex\n flex-direction: column\n\n.sidebar-scroll,\n.toc-scroll\n flex-grow: 1\n flex-shrink: 1\n\n overflow: auto\n scroll-behavior: smooth\n\n// Central items.\n.content\n padding: 0 $content-padding\n width: $content-width\n\n display: flex\n flex-direction: column\n justify-content: space-between\n\n.icon\n display: inline-block\n height: 1rem\n width: 1rem\n svg\n width: 100%\n height: 100%\n\n//\n// Accommodate announcement banner\n//\n.announcement\n background-color: var(--color-announcement-background)\n color: var(--color-announcement-text)\n\n height: var(--header-height)\n display: flex\n align-items: center\n overflow-x: auto\n & + .page\n min-height: calc(100% - var(--header-height))\n\n.announcement-content\n box-sizing: border-box\n padding: 0.5rem\n min-width: 100%\n white-space: nowrap\n text-align: center\n\n a\n color: var(--color-announcement-text)\n text-decoration-color: var(--color-announcement-text)\n\n &:hover\n color: var(--color-announcement-text)\n text-decoration-color: var(--color-link--hover)\n\n////////////////////////////////////////////////////////////////////////////////\n// Toggles for theme\n////////////////////////////////////////////////////////////////////////////////\n.no-js .theme-toggle-container // don't show theme toggle if there's no JS\n display: none\n\n.theme-toggle-container\n display: flex\n\n.theme-toggle\n display: flex\n cursor: pointer\n border: none\n padding: 0\n background: transparent\n\n.theme-toggle svg\n height: 1.25rem\n width: 1.25rem\n color: var(--color-foreground-primary)\n display: none\n\n.theme-toggle-header\n display: flex\n align-items: center\n justify-content: center\n\n////////////////////////////////////////////////////////////////////////////////\n// Toggles for elements\n////////////////////////////////////////////////////////////////////////////////\n.toc-overlay-icon, .nav-overlay-icon\n display: none\n cursor: pointer\n\n .icon\n color: var(--color-foreground-secondary)\n height: 1.5rem\n width: 1.5rem\n\n.toc-header-icon, .nav-overlay-icon\n // for when we set display: flex\n justify-content: center\n align-items: center\n\n.toc-content-icon\n height: 1.5rem\n width: 1.5rem\n\n.content-icon-container\n float: right\n display: flex\n margin-top: 1.5rem\n margin-left: 1rem\n margin-bottom: 1rem\n gap: 0.5rem\n\n .edit-this-page, .view-this-page\n svg\n color: inherit\n height: 1.25rem\n width: 1.25rem\n\n.sidebar-toggle\n position: absolute\n display: none\n// \n.sidebar-toggle[name=\"__toc\"]\n left: 20px\n.sidebar-toggle:checked\n left: 40px\n// \n\n.overlay\n position: fixed\n top: 0\n width: 0\n height: 0\n\n transition: width 0ms, height 0ms, opacity 250ms ease-out\n\n opacity: 0\n background-color: rgba(0, 0, 0, 0.54)\n.sidebar-overlay\n z-index: 20\n.toc-overlay\n z-index: 40\n\n// Keep things on top and smooth.\n.sidebar-drawer\n z-index: 30\n transition: left 250ms ease-in-out\n.toc-drawer\n z-index: 50\n transition: right 250ms ease-in-out\n\n// Show the Sidebar\n#__navigation:checked\n & ~ .sidebar-overlay\n width: 100%\n height: 100%\n opacity: 1\n & ~ .page\n .sidebar-drawer\n top: 0\n left: 0\n // Show the toc sidebar\n#__toc:checked\n & ~ .toc-overlay\n width: 100%\n height: 100%\n opacity: 1\n & ~ .page\n .toc-drawer\n top: 0\n right: 0\n\n////////////////////////////////////////////////////////////////////////////////\n// Back to top\n////////////////////////////////////////////////////////////////////////////////\n.back-to-top\n text-decoration: none\n\n display: none\n position: fixed\n left: 0\n top: 1rem\n padding: 0.5rem\n padding-right: 0.75rem\n border-radius: 1rem\n font-size: 0.8125rem\n\n background: var(--color-background-primary)\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), #6b728080 0px 0px 1px 0px\n\n z-index: 10\n\n margin-left: 50%\n transform: translateX(-50%)\n svg\n height: 1rem\n width: 1rem\n fill: currentColor\n display: inline-block\n\n span\n margin-left: 0.25rem\n\n .show-back-to-top &\n display: flex\n align-items: center\n\n////////////////////////////////////////////////////////////////////////////////\n// Responsive layouting\n////////////////////////////////////////////////////////////////////////////////\n// Make things a bit bigger on bigger screens.\n@media (min-width: $full-width + $sidebar-width)\n html\n font-size: 110%\n\n@media (max-width: $full-width)\n // Collapse \"toc\" into the icon.\n .toc-content-icon\n display: flex\n .toc-drawer\n position: fixed\n height: 100vh\n top: 0\n right: -$sidebar-width\n border-left: 1px solid var(--color-background-muted)\n .toc-tree\n border-left: none\n font-size: var(--toc-font-size--mobile)\n\n // Accomodate for a changed content width.\n .sidebar-drawer\n width: calc((100% - #{$full-width - $sidebar-width}) / 2 + #{$sidebar-width})\n\n@media (max-width: $content-padded-width + $sidebar-width)\n // Center the page\n .content\n margin-left: auto\n margin-right: auto\n padding: 0 $content-padding--small\n\n@media (max-width: $content-padded-width--small + $sidebar-width)\n // Collapse \"navigation\".\n .nav-overlay-icon\n display: flex\n .sidebar-drawer\n position: fixed\n height: 100vh\n width: $sidebar-width\n\n top: 0\n left: -$sidebar-width\n\n // Swap which icon is visible.\n .toc-header-icon, .theme-toggle-header\n display: flex\n .toc-content-icon, .theme-toggle-content\n display: none\n\n // Show the header.\n .mobile-header\n position: sticky\n top: 0\n display: flex\n justify-content: space-between\n align-items: center\n\n .header-left,\n .header-right\n display: flex\n height: var(--header-height)\n padding: 0 var(--header-padding)\n label\n height: 100%\n width: 100%\n user-select: none\n\n .nav-overlay-icon .icon,\n .theme-toggle svg\n height: 1.5rem\n width: 1.5rem\n\n // Add a scroll margin for the content\n :target\n scroll-margin-top: calc(var(--header-height) + 2.5rem)\n\n // Show back-to-top below the header\n .back-to-top\n top: calc(var(--header-height) + 0.5rem)\n\n // Accommodate for the header.\n .page\n flex-direction: column\n justify-content: center\n\n@media (max-width: $content-width + 2* $content-padding--small)\n // Content should respect window limits.\n .content\n width: 100%\n overflow-x: auto\n\n@media (max-width: $content-width)\n article[role=main] aside.sidebar\n float: none\n width: 100%\n margin: 1rem 0\n","// Overall Layout Variables\n//\n// Because CSS variables can't be used in media queries. The fact that this\n// makes the layout non-user-configurable is a good thing.\n$content-padding: 3em;\n$content-padding--small: 1em;\n$content-width: 46em;\n$sidebar-width: 15em;\n$content-padded-width: $content-width + 2 * $content-padding;\n$content-padded-width--small: $content-width + 2 * $content-padding--small;\n$full-width: $content-padded-width + 2 * $sidebar-width;\n","//\n// The design here is strongly inspired by mkdocs-material.\n.admonition, .topic\n margin: 1rem auto\n padding: 0 0.5rem 0.5rem 0.5rem\n\n background: var(--color-admonition-background)\n\n border-radius: 0.2rem\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1)\n\n font-size: var(--admonition-font-size)\n\n overflow: hidden\n page-break-inside: avoid\n\n // First element should have no margin, since the title has it.\n > :nth-child(2)\n margin-top: 0\n\n // Last item should have no margin, since we'll control that w/ padding\n > :last-child\n margin-bottom: 0\n\n.admonition p.admonition-title,\np.topic-title\n position: relative\n margin: 0 -0.5rem 0.5rem\n padding-left: 2rem\n padding-right: .5rem\n padding-top: .4rem\n padding-bottom: .4rem\n\n font-weight: 500\n font-size: var(--admonition-title-font-size)\n line-height: 1.3\n\n // Our fancy icon\n &::before\n content: \"\"\n position: absolute\n left: 0.5rem\n width: 1rem\n height: 1rem\n\n// Default styles\np.admonition-title\n background-color: var(--color-admonition-title-background)\n &::before\n background-color: var(--color-admonition-title)\n mask-image: var(--icon-admonition-default)\n mask-repeat: no-repeat\n\np.topic-title\n background-color: var(--color-topic-title-background)\n &::before\n background-color: var(--color-topic-title)\n mask-image: var(--icon-topic-default)\n mask-repeat: no-repeat\n\n//\n// Variants\n//\n.admonition\n border-left: 0.2rem solid var(--color-admonition-title)\n\n @each $type, $value in $admonitions\n &.#{$type}\n border-left-color: var(--color-admonition-title--#{$type})\n > .admonition-title\n background-color: var(--color-admonition-title-background--#{$type})\n &::before\n background-color: var(--color-admonition-title--#{$type})\n mask-image: var(--icon-#{nth($value, 2)})\n\n.admonition-todo > .admonition-title\n text-transform: uppercase\n","// This file stylizes the API documentation (stuff generated by autodoc). It's\n// deeply nested due to how autodoc structures the HTML without enough classes\n// to select the relevant items.\n\n// API docs!\ndl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)\n // Tweak the spacing of all the things!\n dd\n margin-left: 2rem\n > :first-child\n margin-top: 0.125rem\n > :last-child\n margin-bottom: 0.75rem\n\n // This is used for the arguments\n .field-list\n margin-bottom: 0.75rem\n\n // \"Headings\" (like \"Parameters\" and \"Return\")\n > dt\n text-transform: uppercase\n font-size: var(--font-size--small)\n\n dd:empty\n margin-bottom: 0.5rem\n dd > ul\n margin-left: -1.2rem\n > li\n > p:nth-child(2)\n margin-top: 0\n // When the last-empty-paragraph follows a paragraph, it doesn't need\n // to augument the existing spacing.\n > p + p:last-child:empty\n margin-top: 0\n margin-bottom: 0\n\n // Colorize the elements\n > dt\n color: var(--color-api-overall)\n\n.sig:not(.sig-inline)\n font-weight: bold\n\n font-size: var(--api-font-size)\n font-family: var(--font-stack--monospace)\n\n margin-left: -0.25rem\n margin-right: -0.25rem\n padding-top: 0.25rem\n padding-bottom: 0.25rem\n padding-right: 0.5rem\n\n // These are intentionally em, to properly match the font size.\n padding-left: 3em\n text-indent: -2.5em\n\n border-radius: 0.25rem\n\n background: var(--color-api-background)\n transition: background 100ms ease-out\n\n &:hover\n background: var(--color-api-background-hover)\n\n // adjust the size of the [source] link on the right.\n a.reference\n .viewcode-link\n font-weight: normal\n width: 4.25rem\n\nem.property\n font-style: normal\n &:first-child\n color: var(--color-api-keyword)\n.sig-name\n color: var(--color-api-name)\n.sig-prename\n font-weight: normal\n color: var(--color-api-pre-name)\n.sig-paren\n color: var(--color-api-paren)\n.sig-param\n font-style: normal\n\ndiv.versionadded,\ndiv.versionchanged,\ndiv.deprecated,\ndiv.versionremoved\n border-left: 0.1875rem solid\n border-radius: 0.125rem\n\n padding-left: 0.75rem\n\n p\n margin-top: 0.125rem\n margin-bottom: 0.125rem\n\ndiv.versionadded\n border-color: var(--color-api-added-border)\n .versionmodified\n color: var(--color-api-added)\n\ndiv.versionchanged\n border-color: var(--color-api-changed-border)\n .versionmodified\n color: var(--color-api-changed)\n\ndiv.deprecated\n border-color: var(--color-api-deprecated-border)\n .versionmodified\n color: var(--color-api-deprecated)\n\ndiv.versionremoved\n border-color: var(--color-api-removed-border)\n .versionmodified\n color: var(--color-api-removed)\n\n// Align the [docs] and [source] to the right.\n.viewcode-link, .viewcode-back\n float: right\n text-align: right\n",".line-block\n margin-top: 0.5rem\n margin-bottom: 0.75rem\n .line-block\n margin-top: 0rem\n margin-bottom: 0rem\n padding-left: 1rem\n","// Captions\narticle p.caption,\ntable > caption,\n.code-block-caption\n font-size: var(--font-size--small)\n text-align: center\n\n// Caption above a TOCTree\n.toctree-wrapper.compound\n .caption, :not(.caption) > .caption-text\n font-size: var(--font-size--small)\n text-transform: uppercase\n\n text-align: initial\n margin-bottom: 0\n\n > ul\n margin-top: 0\n margin-bottom: 0\n","// Inline code\ncode.literal, .sig-inline\n background: var(--color-inline-code-background)\n border-radius: 0.2em\n // Make the font smaller, and use padding to recover.\n font-size: var(--font-size--small--2)\n padding: 0.1em 0.2em\n\n pre.literal-block &\n font-size: inherit\n padding: 0\n\n p &\n border: 1px solid var(--color-background-border)\n\n.sig-inline\n font-family: var(--font-stack--monospace)\n\n// Code and Literal Blocks\n$code-spacing-vertical: 0.625rem\n$code-spacing-horizontal: 0.875rem\n\n// Wraps every literal block + line numbers.\ndiv[class*=\" highlight-\"],\ndiv[class^=\"highlight-\"]\n margin: 1em 0\n display: flex\n\n .table-wrapper\n margin: 0\n padding: 0\n\npre\n margin: 0\n padding: 0\n overflow: auto\n\n // Needed to have more specificity than pygments' \"pre\" selector. :(\n article[role=\"main\"] .highlight &\n line-height: 1.5\n\n &.literal-block,\n .highlight &\n font-size: var(--code-font-size)\n padding: $code-spacing-vertical $code-spacing-horizontal\n\n // Make it look like all the other blocks.\n &.literal-block\n margin-top: 1rem\n margin-bottom: 1rem\n\n border-radius: 0.2rem\n background-color: var(--color-code-background)\n color: var(--color-code-foreground)\n\n// All code is always contained in this.\n.highlight\n width: 100%\n border-radius: 0.2rem\n\n // Make line numbers and prompts un-selectable.\n .gp, span.linenos\n user-select: none\n pointer-events: none\n\n // Expand the line-highlighting.\n .hll\n display: block\n margin-left: -$code-spacing-horizontal\n margin-right: -$code-spacing-horizontal\n padding-left: $code-spacing-horizontal\n padding-right: $code-spacing-horizontal\n\n/* Make code block captions be nicely integrated */\n.code-block-caption\n display: flex\n padding: $code-spacing-vertical $code-spacing-horizontal\n\n border-radius: 0.25rem\n border-bottom-left-radius: 0\n border-bottom-right-radius: 0\n font-weight: 300\n border-bottom: 1px solid\n\n background-color: var(--color-code-background)\n color: var(--color-code-foreground)\n border-color: var(--color-background-border)\n\n + div[class]\n margin-top: 0\n pre\n border-top-left-radius: 0\n border-top-right-radius: 0\n\n// When `html_codeblock_linenos_style` is table.\n.highlighttable\n width: 100%\n display: block\n tbody\n display: block\n\n tr\n display: flex\n\n // Line numbers\n td.linenos\n background-color: var(--color-code-background)\n color: var(--color-code-foreground)\n padding: $code-spacing-vertical $code-spacing-horizontal\n padding-right: 0\n border-top-left-radius: 0.2rem\n border-bottom-left-radius: 0.2rem\n\n .linenodiv\n padding-right: $code-spacing-horizontal\n font-size: var(--code-font-size)\n box-shadow: -0.0625rem 0 var(--color-foreground-border) inset\n\n // Actual code\n td.code\n padding: 0\n display: block\n flex: 1\n overflow: hidden\n\n .highlight\n border-top-left-radius: 0\n border-bottom-left-radius: 0\n\n// When `html_codeblock_linenos_style` is inline.\n.highlight\n span.linenos\n display: inline-block\n padding-left: 0\n padding-right: $code-spacing-horizontal\n margin-right: $code-spacing-horizontal\n box-shadow: -0.0625rem 0 var(--color-foreground-border) inset\n","// Inline Footnote Reference\n.footnote-reference\n font-size: var(--font-size--small--4)\n vertical-align: super\n\n// Definition list, listing the content of each note.\n// docutils <= 0.17\ndl.footnote.brackets\n font-size: var(--font-size--small)\n color: var(--color-foreground-secondary)\n\n display: grid\n grid-template-columns: max-content auto\n dt\n margin: 0\n > .fn-backref\n margin-left: 0.25rem\n\n &:after\n content: \":\"\n\n .brackets\n &:before\n content: \"[\"\n &:after\n content: \"]\"\n\n dd\n margin: 0\n padding: 0 1rem\n\n// docutils >= 0.18\naside.footnote\n font-size: var(--font-size--small)\n color: var(--color-foreground-secondary)\n\naside.footnote > span,\ndiv.citation > span\n float: left\n font-weight: 500\n padding-right: 0.25rem\n\naside.footnote > *:not(span),\ndiv.citation > p\n margin-left: 2rem\n","//\n// Figures\n//\nimg\n box-sizing: border-box\n max-width: 100%\n height: auto\n\narticle\n figure, .figure\n border-radius: 0.2rem\n\n margin: 0\n :last-child\n margin-bottom: 0\n\n .align-left\n float: left\n clear: left\n margin: 0 1rem 1rem\n\n .align-right\n float: right\n clear: right\n margin: 0 1rem 1rem\n\n .align-default,\n .align-center\n display: block\n text-align: center\n margin-left: auto\n margin-right: auto\n\n // WELL, table needs to be stylised like a table.\n table.align-default\n display: table\n text-align: initial\n",".genindex-jumpbox, .domainindex-jumpbox\n border-top: 1px solid var(--color-background-border)\n border-bottom: 1px solid var(--color-background-border)\n padding: 0.25rem\n\n.genindex-section, .domainindex-section\n h2\n margin-top: 0.75rem\n margin-bottom: 0.5rem\n ul\n margin-top: 0\n margin-bottom: 0\n","ul,\nol\n padding-left: 1.2rem\n\n // Space lists out like paragraphs\n margin-top: 1rem\n margin-bottom: 1rem\n // reduce margins within li.\n li\n > p:first-child\n margin-top: 0.25rem\n margin-bottom: 0.25rem\n\n > p:last-child\n margin-top: 0.25rem\n\n > ul,\n > ol\n margin-top: 0.5rem\n margin-bottom: 0.5rem\n\nol\n &.arabic\n list-style: decimal\n &.loweralpha\n list-style: lower-alpha\n &.upperalpha\n list-style: upper-alpha\n &.lowerroman\n list-style: lower-roman\n &.upperroman\n list-style: upper-roman\n\n// Don't space lists out when they're \"simple\" or in a `.. toctree::`\n.simple,\n.toctree-wrapper\n li\n > ul,\n > ol\n margin-top: 0\n margin-bottom: 0\n\n// Definition Lists\n.field-list,\n.option-list,\ndl:not([class]),\ndl.simple,\ndl.footnote,\ndl.glossary\n dt\n font-weight: 500\n margin-top: 0.25rem\n + dt\n margin-top: 0\n\n .classifier::before\n content: \":\"\n margin-left: 0.2rem\n margin-right: 0.2rem\n\n dd\n > p:first-child,\n ul\n margin-top: 0.125rem\n\n ul\n margin-bottom: 0.125rem\n",".math-wrapper\n width: 100%\n overflow-x: auto\n\ndiv.math\n position: relative\n text-align: center\n\n .headerlink,\n &:focus .headerlink\n display: none\n\n &:hover .headerlink\n display: inline-block\n\n span.eqno\n position: absolute\n right: 0.5rem\n top: 50%\n transform: translate(0, -50%)\n z-index: 1\n","// Abbreviations\nabbr[title]\n cursor: help\n\n// \"Problematic\" content, as identified by Sphinx\n.problematic\n color: var(--color-problematic)\n\n// Keyboard / Mouse \"instructions\"\nkbd:not(.compound)\n margin: 0 0.2rem\n padding: 0 0.2rem\n border-radius: 0.2rem\n border: 1px solid var(--color-foreground-border)\n color: var(--color-foreground-primary)\n vertical-align: text-bottom\n\n font-size: var(--font-size--small--3)\n display: inline-block\n\n box-shadow: 0 0.0625rem 0 rgba(0, 0, 0, 0.2), inset 0 0 0 0.125rem var(--color-background-primary)\n\n background-color: var(--color-background-secondary)\n\n// Blockquote\nblockquote\n border-left: 4px solid var(--color-background-border)\n background: var(--color-background-secondary)\n\n margin-left: 0\n margin-right: 0\n padding: 0.5rem 1rem\n\n .attribution\n font-weight: 600\n text-align: right\n\n &.pull-quote,\n &.highlights\n font-size: 1.25em\n\n &.epigraph,\n &.pull-quote\n border-left-width: 0\n border-radius: 0.5rem\n\n &.highlights\n border-left-width: 0\n background: transparent\n\n// Center align embedded-in-text images\np .reference img\n vertical-align: middle\n","p.rubric\n line-height: 1.25\n font-weight: bold\n font-size: 1.125em\n\n // For Numpy-style documentation that's got rubrics within it.\n // https://github.com/pradyunsg/furo/discussions/505\n dd &\n line-height: inherit\n font-weight: inherit\n\n font-size: var(--font-size--small)\n text-transform: uppercase\n","article .sidebar\n float: right\n clear: right\n width: 30%\n\n margin-left: 1rem\n margin-right: 0\n\n border-radius: 0.2rem\n background-color: var(--color-background-secondary)\n border: var(--color-background-border) 1px solid\n\n > *\n padding-left: 1rem\n padding-right: 1rem\n\n > ul, > ol // lists need additional padding, because bullets.\n padding-left: 2.2rem\n\n .sidebar-title\n margin: 0\n padding: 0.5rem 1rem\n border-bottom: var(--color-background-border) 1px solid\n\n font-weight: 500\n\n// TODO: subtitle\n// TODO: dedicated variables?\n","[role=main] .table-wrapper.container\n width: 100%\n overflow-x: auto\n margin-top: 1rem\n margin-bottom: 0.5rem\n padding: 0.2rem 0.2rem 0.75rem\n\ntable.docutils\n border-radius: 0.2rem\n border-spacing: 0\n border-collapse: collapse\n\n box-shadow: 0 0.2rem 0.5rem rgba(0, 0, 0, 0.05), 0 0 0.0625rem rgba(0, 0, 0, 0.1)\n\n th\n background: var(--color-table-header-background)\n\n td,\n th\n // Space things out properly\n padding: 0 0.25rem\n\n // Get the borders looking just-right.\n border-left: 1px solid var(--color-table-border)\n border-right: 1px solid var(--color-table-border)\n border-bottom: 1px solid var(--color-table-border)\n\n p\n margin: 0.25rem\n\n &:first-child\n border-left: none\n &:last-child\n border-right: none\n\n // MyST-parser tables set these classes for control of column alignment\n &.text-left\n text-align: left\n &.text-right\n text-align: right\n &.text-center\n text-align: center\n",":target\n scroll-margin-top: 2.5rem\n\n@media (max-width: $full-width - $sidebar-width)\n :target\n scroll-margin-top: calc(2.5rem + var(--header-height))\n\n // When a heading is selected\n section > span:target\n scroll-margin-top: calc(2.8rem + var(--header-height))\n\n// Permalinks\n.headerlink\n font-weight: 100\n user-select: none\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\ndl dt,\np.caption,\nfigcaption p,\ntable > caption,\n.code-block-caption\n > .headerlink\n margin-left: 0.5rem\n visibility: hidden\n &:hover > .headerlink\n visibility: visible\n\n // Don't change to link-like, if someone adds the contents directive.\n > .toc-backref\n color: inherit\n text-decoration-line: none\n\n// Figure and table captions are special.\nfigure:hover > figcaption > p > .headerlink,\ntable:hover > caption > .headerlink\n visibility: visible\n\n:target >, // Regular section[id] style anchors\nspan:target ~ // Non-regular span[id] style \"extra\" anchors\n h1,\n h2,\n h3,\n h4,\n h5,\n h6\n &:nth-of-type(1)\n background-color: var(--color-highlight-on-target)\n // .headerlink\n // visibility: visible\n code.literal\n background-color: transparent\n\ntable:target > caption,\nfigure:target\n background-color: var(--color-highlight-on-target)\n\n// Inline page contents\n.this-will-duplicate-information-and-it-is-still-useful-here li :target\n background-color: var(--color-highlight-on-target)\n\n// Code block permalinks\n.literal-block-wrapper:target .code-block-caption\n background-color: var(--color-highlight-on-target)\n\n// When a definition list item is selected\n//\n// There isn't really an alternative to !important here, due to the\n// high-specificity of API documentation's selector.\ndt:target\n background-color: var(--color-highlight-on-target) !important\n\n// When a footnote reference is selected\n.footnote > dt:target + dd,\n.footnote-reference:target\n background-color: var(--color-highlight-on-target)\n",".guilabel\n background-color: var(--color-guilabel-background)\n border: 1px solid var(--color-guilabel-border)\n color: var(--color-guilabel-text)\n\n padding: 0 0.3em\n border-radius: 0.5em\n font-size: 0.9em\n","// This file contains the styles used for stylizing the footer that's shown\n// below the content.\n\nfooter\n font-size: var(--font-size--small)\n display: flex\n flex-direction: column\n\n margin-top: 2rem\n\n// Bottom of page information\n.bottom-of-page\n display: flex\n align-items: center\n justify-content: space-between\n\n margin-top: 1rem\n padding-top: 1rem\n padding-bottom: 1rem\n\n color: var(--color-foreground-secondary)\n border-top: 1px solid var(--color-background-border)\n\n line-height: 1.5\n\n @media (max-width: $content-width)\n text-align: center\n flex-direction: column-reverse\n gap: 0.25rem\n\n .left-details\n font-size: var(--font-size--small)\n\n .right-details\n display: flex\n flex-direction: column\n gap: 0.25rem\n text-align: right\n\n .icons\n display: flex\n justify-content: flex-end\n gap: 0.25rem\n font-size: 1rem\n\n a\n text-decoration: none\n\n svg,\n img\n font-size: 1.125rem\n height: 1em\n width: 1em\n\n// Next/Prev page information\n.related-pages\n a\n display: flex\n align-items: center\n\n text-decoration: none\n &:hover .page-info .title\n text-decoration: underline\n color: var(--color-link)\n text-decoration-color: var(--color-link-underline)\n\n svg.furo-related-icon,\n svg.furo-related-icon > use\n flex-shrink: 0\n\n color: var(--color-foreground-border)\n\n width: 0.75rem\n height: 0.75rem\n margin: 0 0.5rem\n\n &.next-page\n max-width: 50%\n\n float: right\n clear: right\n text-align: right\n\n &.prev-page\n max-width: 50%\n\n float: left\n clear: left\n\n svg\n transform: rotate(180deg)\n\n.page-info\n display: flex\n flex-direction: column\n overflow-wrap: anywhere\n\n .next-page &\n align-items: flex-end\n\n .context\n display: flex\n align-items: center\n\n padding-bottom: 0.1rem\n\n color: var(--color-foreground-muted)\n font-size: var(--font-size--small)\n text-decoration: none\n","// This file contains the styles for the contents of the left sidebar, which\n// contains the navigation tree, logo, search etc.\n\n////////////////////////////////////////////////////////////////////////////////\n// Brand on top of the scrollable tree.\n////////////////////////////////////////////////////////////////////////////////\n.sidebar-brand\n display: flex\n flex-direction: column\n flex-shrink: 0\n\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n text-decoration: none\n\n.sidebar-brand-text\n color: var(--color-sidebar-brand-text)\n overflow-wrap: break-word\n margin: var(--sidebar-item-spacing-vertical) 0\n font-size: 1.5rem\n\n.sidebar-logo-container\n margin: var(--sidebar-item-spacing-vertical) 0\n\n.sidebar-logo\n margin: 0 auto\n display: block\n max-width: 100%\n\n////////////////////////////////////////////////////////////////////////////////\n// Search\n////////////////////////////////////////////////////////////////////////////////\n.sidebar-search-container\n display: flex\n align-items: center\n margin-top: var(--sidebar-search-space-above)\n\n position: relative\n\n background: var(--color-sidebar-search-background)\n &:hover,\n &:focus-within\n background: var(--color-sidebar-search-background--focus)\n\n &::before\n content: \"\"\n position: absolute\n left: var(--sidebar-item-spacing-horizontal)\n width: var(--sidebar-search-icon-size)\n height: var(--sidebar-search-icon-size)\n\n background-color: var(--color-sidebar-search-icon)\n mask-image: var(--icon-search)\n\n.sidebar-search\n box-sizing: border-box\n\n border: none\n border-top: 1px solid var(--color-sidebar-search-border)\n border-bottom: 1px solid var(--color-sidebar-search-border)\n\n padding-top: var(--sidebar-search-input-spacing-vertical)\n padding-bottom: var(--sidebar-search-input-spacing-vertical)\n padding-right: var(--sidebar-search-input-spacing-horizontal)\n padding-left: calc(var(--sidebar-item-spacing-horizontal) + var(--sidebar-search-input-spacing-horizontal) + var(--sidebar-search-icon-size))\n\n width: 100%\n\n color: var(--color-sidebar-search-foreground)\n background: transparent\n z-index: 10\n\n &:focus\n outline: none\n\n &::placeholder\n font-size: var(--sidebar-search-input-font-size)\n\n//\n// Hide Search Matches link\n//\n#searchbox .highlight-link\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal) 0\n margin: 0\n text-align: center\n\n a\n color: var(--color-sidebar-search-icon)\n font-size: var(--font-size--small--2)\n\n////////////////////////////////////////////////////////////////////////////////\n// Structure/Skeleton of the navigation tree (left)\n////////////////////////////////////////////////////////////////////////////////\n.sidebar-tree\n font-size: var(--sidebar-item-font-size)\n margin-top: var(--sidebar-tree-space-above)\n margin-bottom: var(--sidebar-item-spacing-vertical)\n\n ul\n padding: 0\n margin-top: 0\n margin-bottom: 0\n\n display: flex\n flex-direction: column\n\n list-style: none\n\n li\n position: relative\n margin: 0\n\n > ul\n margin-left: var(--sidebar-item-spacing-horizontal)\n\n .icon\n color: var(--color-sidebar-link-text)\n\n .reference\n box-sizing: border-box\n color: var(--color-sidebar-link-text)\n\n // Fill the parent.\n display: inline-block\n line-height: var(--sidebar-item-line-height)\n text-decoration: none\n\n // Don't allow long words to cause wrapping.\n overflow-wrap: anywhere\n\n height: 100%\n width: 100%\n\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n\n &:hover\n color: var(--color-sidebar-link-text)\n background: var(--color-sidebar-item-background--hover)\n\n // Add a nice little \"external-link\" arrow here.\n &.external::after\n content: url('data:image/svg+xml,')\n margin: 0 0.25rem\n vertical-align: middle\n color: var(--color-sidebar-link-text)\n\n // Make the current page reference bold.\n .current-page > .reference\n font-weight: bold\n\n label\n position: absolute\n top: 0\n right: 0\n height: var(--sidebar-item-height)\n width: var(--sidebar-expander-width)\n\n cursor: pointer\n user-select: none\n\n display: flex\n justify-content: center\n align-items: center\n\n .caption, :not(.caption) > .caption-text\n font-size: var(--sidebar-caption-font-size)\n color: var(--color-sidebar-caption-text)\n\n font-weight: bold\n text-transform: uppercase\n\n margin: var(--sidebar-caption-space-above) 0 0 0\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n\n // If it has children, add a bit more padding to wrap the content to avoid\n // overlapping with the +Skip to content +
@@ -123,13 +166,14 @@
@@ -150,7 +194,7 @@
- CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation
+
+ + cuda-bindings + v: + + +
+
+
+ + @@ -216,7 +282,8 @@
@@ -226,7 +293,7 @@
-
+

Index

@@ -305,7 +372,7 @@

A

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • addressMode (cuda.bindings.driver.CUDA_TEXTURE_DESC attribute) @@ -571,7 +638,7 @@

    C

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • clusterDimMustBeSet (cuda.bindings.runtime.cudaFuncAttributes attribute) @@ -593,7 +660,7 @@

    C

  • (cuda.bindings.runtime.cudaFuncAttributes attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • computeMode (cuda.bindings.runtime.cudaDeviceProp attribute) @@ -627,7 +694,7 @@

    C

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • cooperativeLaunch (cuda.bindings.runtime.cudaDeviceProp attribute) @@ -671,7 +738,7 @@

    C

  • (cuda.bindings.driver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st attribute)
  • -
  • (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS attribute), [1] +
  • (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS attribute)
  • (cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS attribute)
  • @@ -2548,7 +2615,7 @@

    C

  • CUDA_CHILD_GRAPH_NODE_PARAMS_st (class in cuda.bindings.driver)
  • -
  • CUDA_CONDITIONAL_NODE_PARAMS (class in cuda.bindings.driver), [1] +
  • CUDA_CONDITIONAL_NODE_PARAMS (class in cuda.bindings.driver)
  • CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC (cuda.bindings.driver attribute)
  • @@ -4798,7 +4865,7 @@

    C

  • cudaLaunchAttributeSynchronizationPolicy (cuda.bindings.runtime.cudaLaunchAttributeID attribute)
  • -
  • cudaLaunchAttributeValue (class in cuda.bindings.runtime), [1] +
  • cudaLaunchAttributeValue (class in cuda.bindings.runtime)
  • cudaLaunchHostFunc() (in module cuda.bindings.runtime)
  • @@ -5492,7 +5559,7 @@

    C

  • CUdevResourceType (class in cuda.bindings.driver)
  • -
  • CUdevSmResource (class in cuda.bindings.driver), [1] +
  • CUdevSmResource (class in cuda.bindings.driver)
  • CUdevSmResource_st (class in cuda.bindings.driver)
  • @@ -6651,7 +6718,7 @@

    D

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • directManagedMemAccessFromHost (cuda.bindings.runtime.cudaDeviceProp attribute) @@ -7461,7 +7528,7 @@

    G

  • (cuda.bindings.driver.CUDA_CHILD_GRAPH_NODE_PARAMS_st method)
  • -
  • (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS method), [1] +
  • (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS method)
  • (cuda.bindings.driver.CUDA_EVENT_RECORD_NODE_PARAMS method)
  • @@ -7651,7 +7718,7 @@

    G

  • (cuda.bindings.driver.CUdevResourceDesc method)
  • -
  • (cuda.bindings.driver.CUdevSmResource method), [1] +
  • (cuda.bindings.driver.CUdevSmResource method)
  • (cuda.bindings.driver.CUdevSmResource_st method)
  • @@ -7971,7 +8038,7 @@

    G

  • (cuda.bindings.runtime.cudaLaunchAttribute_st method)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue method), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue method)
  • (cuda.bindings.runtime.cudaLaunchMemSyncDomainMap method)
  • @@ -8156,7 +8223,7 @@

    G

    H

    @@ -8723,7 +8790,7 @@

    M

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • memSyncDomainMap (cuda.bindings.driver.CUkernelNodeAttrValue attribute) @@ -8739,7 +8806,7 @@

    M

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • minMipmapLevelClamp (cuda.bindings.driver.CUDA_TEXTURE_DESC attribute) @@ -9095,7 +9162,7 @@

    P

  • (cuda.bindings.driver.CUstreamBatchMemOpParams_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • pageableMemoryAccess (cuda.bindings.runtime.cudaDeviceProp attribute) @@ -9178,7 +9245,7 @@

    P

  • persistingL2CacheMaxSize (cuda.bindings.runtime.cudaDeviceProp attribute)
  • -
  • phGraph_out (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS attribute), [1] +
  • phGraph_out (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS attribute)
  • programmaticEvent (cuda.bindings.driver.CUkernelNodeAttrValue attribute) @@ -9279,7 +9346,7 @@

    P

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • programmaticStreamSerializationAllowed (cuda.bindings.driver.CUkernelNodeAttrValue attribute) @@ -9295,7 +9362,7 @@

    P

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • ptr (cuda.bindings.runtime.cudaPitchedPtr attribute) @@ -9657,7 +9724,7 @@

    S

  • (cuda.bindings.driver.CUstreamAttrValue_v1 attribute)
  • -
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute), [1] +
  • (cuda.bindings.runtime.cudaLaunchAttributeValue attribute)
  • sharedMemPerBlock (cuda.bindings.driver.CUdevprop attribute) @@ -9693,7 +9760,7 @@

    S

  • (cuda.bindings.driver.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1 attribute)
  • -
  • (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS attribute), [1] +
  • (cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS attribute)
  • (cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC attribute)
  • @@ -9728,7 +9795,7 @@

    S

  • (cuda.bindings.driver.CUdevResource_st attribute)
  • -
  • smCount (cuda.bindings.driver.CUdevSmResource attribute), [1] +
  • smCount (cuda.bindings.driver.CUdevSmResource attribute)
  • @@ -10045,7 +10112,7 @@

    T

    - + @@ -555,12 +627,12 @@

    Performance _images/Nsigth-Compute-CLI-625x473.png
    -

    Fig. 1 Screenshot of Nsight Compute CLI output of CUDA Python example.#

    +

    Fig. 1 Screenshot of Nsight Compute CLI output of CUDA Python example.

    -

    Future of CUDA Python#

    +

    Future of CUDA Python

    The current bindings are built to match the C APIs as closely as possible.

    The next goal is to build a higher-level “object oriented” API on top of current CUDA Python bindings and provide an overall more Pythonic experience. @@ -638,11 +710,9 @@

    Future of CUDA Python - - - - - - + + + + \ No newline at end of file diff --git a/docs/release.html b/docs/cuda-bindings/12.6.1/release.html similarity index 70% rename from docs/release.html rename to docs/cuda-bindings/12.6.1/release.html index 4b4b97ef0..e6fc5097d 100644 --- a/docs/release.html +++ b/docs/cuda-bindings/12.6.1/release.html @@ -1,17 +1,17 @@ - + - - + + - - Release Notes - CUDA Python 12.6.1 documentation - - + + Release Notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,22 +301,31 @@
    -
    +
    -

    Release Notes#

    +

    Release Notes

    + + + \ No newline at end of file diff --git a/docs/release/11.4.0-notes.html b/docs/cuda-bindings/12.6.1/release/11.4.0-notes.html similarity index 67% rename from docs/release/11.4.0-notes.html rename to docs/cuda-bindings/12.6.1/release/11.4.0-notes.html index da2568a03..723945d59 100644 --- a/docs/release/11.4.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.4.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.4.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.4.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 11.4.0 Release notes#

    +

    CUDA Python 11.4.0 Release notes

    Released on August 16, 2021

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/release/11.5.0-notes.html b/docs/cuda-bindings/12.6.1/release/11.5.0-notes.html similarity index 71% rename from docs/release/11.5.0-notes.html rename to docs/cuda-bindings/12.6.1/release/11.5.0-notes.html index f27710253..3aa32e8ff 100644 --- a/docs/release/11.5.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.5.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.5.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.5.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 11.5.0 Release notes#

    +

    CUDA Python 11.5.0 Release notes

    Released on October 18, 2021

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/release/11.6.0-notes.html b/docs/cuda-bindings/12.6.1/release/11.6.0-notes.html similarity index 71% rename from docs/release/11.6.0-notes.html rename to docs/cuda-bindings/12.6.1/release/11.6.0-notes.html index 3f9828586..2f0e35da7 100644 --- a/docs/release/11.6.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.6.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.6.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.6.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 11.6.0 Release notes#

    +

    CUDA Python 11.6.0 Release notes

    Released on Januray 12, 2022

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Support CUDA Toolkit 11.6

    • Support Profiler APIs

    • @@ -243,7 +315,7 @@

      Hightlights -

      Default stream#

      +

      Default stream

      Changing default stream to Per-Thread-Default-Stream (PTDS) is done through environment variable before execution:

      export CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM=1
       
      @@ -251,7 +323,7 @@

      Default streamStream Synchronization Behavior for an explanation of the legacy and per-thread default streams.

    -

    Primitive interoperability#

    +

    Primitive interoperability

    APIs accepting classes that wrap a primitive value are now interoperable with the underlining value.

    Example 1: Structure member handles interoperability.

    >>> waitParams = cuda.CUstreamMemOpWaitValueParams_st()
    @@ -273,9 +345,9 @@ 

    Primitive interoperability -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/11.6.1-notes.html b/docs/cuda-bindings/12.6.1/release/11.6.1-notes.html similarity index 66% rename from docs/release/11.6.1-notes.html rename to docs/cuda-bindings/12.6.1/release/11.6.1-notes.html index 6d3709006..fc693bef8 100644 --- a/docs/release/11.6.1-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.6.1-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.6.1 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.6.1 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + +
    @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,20 +301,20 @@
    -
    +
    -

    CUDA Python 11.6.1 Release notes#

    +

    CUDA Python 11.6.1 Release notes

    Released on March 18, 2022

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Fix string decomposition for WSL library load

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/11.7.0-notes.html b/docs/cuda-bindings/12.6.1/release/11.7.0-notes.html similarity index 66% rename from docs/release/11.7.0-notes.html rename to docs/cuda-bindings/12.6.1/release/11.7.0-notes.html index 970c6092b..c351ae7ea 100644 --- a/docs/release/11.7.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.7.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.7.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.7.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,20 +301,20 @@
    -
    +
    -

    CUDA Python 11.7.0 Release notes#

    +

    CUDA Python 11.7.0 Release notes

    Released on May 11, 2022

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Support CUDA Toolkit 11.7

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/11.7.1-notes.html b/docs/cuda-bindings/12.6.1/release/11.7.1-notes.html similarity index 68% rename from docs/release/11.7.1-notes.html rename to docs/cuda-bindings/12.6.1/release/11.7.1-notes.html index 2d567baf6..e63b2ba4a 100644 --- a/docs/release/11.7.1-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.7.1-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.7.1 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.7.1 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,21 +301,21 @@
    -
    +
    -

    CUDA Python 11.7.1 Release notes#

    +

    CUDA Python 11.7.1 Release notes

    Released on June 29, 2022

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Fix error propagation in CUDA Runtime bindings

    • Resolves issue #22

    -

    Limitations#

    +

    Limitations

    -

    Source builds#

    +

    Source builds

    CUDA Python no longer re-declares CUDA types, instead it uses the types from CUDA C headers. As such source builds now need to access to latest CTK headers. In particular:

    1. “$CUDA_HOME/include” has latest CTK headers

    2. @@ -260,7 +332,7 @@

      Source builds -

      CUDA Functions Not Supported in this Release#

      +

      CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/11.8.0-notes.html b/docs/cuda-bindings/12.6.1/release/11.8.0-notes.html similarity index 68% rename from docs/release/11.8.0-notes.html rename to docs/cuda-bindings/12.6.1/release/11.8.0-notes.html index 4d2bb529e..2dc194726 100644 --- a/docs/release/11.8.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.8.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.8.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.8.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 11.8.0 Release notes#

    +

    CUDA Python 11.8.0 Release notes

    Released on October 3, 2022

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Support CUDA Toolkit 11.8

    • Source builds allow for missing types and APIs

    • @@ -242,15 +314,15 @@

      Hightlightsissue #24

    -

    Source Builds#

    +

    Source Builds

    CUDA Python source builds now parse CUDA headers located in $CUDA_HOME directory, enabling/disabling types and APIs if defined. Therefore this removes the need for CTK headers to have all types defined. By allowing minor variations, previous 11.7.1 mobile platform workaround is no longer needed.

    It’s still required that source builds use the latest CTK headers (i.e. “$CUDA_HOME/include” has latest CTK headers).

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/11.8.1-notes.html b/docs/cuda-bindings/12.6.1/release/11.8.1-notes.html similarity index 67% rename from docs/release/11.8.1-notes.html rename to docs/cuda-bindings/12.6.1/release/11.8.1-notes.html index e78937d0d..439b70f72 100644 --- a/docs/release/11.8.1-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.8.1-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.8.1 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.8.1 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,21 +301,21 @@
    -
    +
    -

    CUDA Python 11.8.1 Release notes#

    +

    CUDA Python 11.8.1 Release notes

    Released on November 4, 2022

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Resolves issue #27

    • Update install instructions to use latest CTK

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/11.8.2-notes.html b/docs/cuda-bindings/12.6.1/release/11.8.2-notes.html similarity index 66% rename from docs/release/11.8.2-notes.html rename to docs/cuda-bindings/12.6.1/release/11.8.2-notes.html index 0000a86a8..6151fe468 100644 --- a/docs/release/11.8.2-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.8.2-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.8.2 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.8.2 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,20 +301,20 @@
    -
    +
    -

    CUDA Python 11.8.2 Release notes#

    +

    CUDA Python 11.8.2 Release notes

    Released on May 18, 2023

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Open libcuda.so.1 instead of libcuda.so

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/11.8.3-notes.html b/docs/cuda-bindings/12.6.1/release/11.8.3-notes.html similarity index 67% rename from docs/release/11.8.3-notes.html rename to docs/cuda-bindings/12.6.1/release/11.8.3-notes.html index 7083e1c1f..aaa978232 100644 --- a/docs/release/11.8.3-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.8.3-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 11.8.3 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.8.3 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 11.8.3 Release notes#

    +

    CUDA Python 11.8.3 Release notes

    Released on October 23, 2023

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/release/11.8.4-notes.html b/docs/cuda-bindings/12.6.1/release/11.8.4-notes.html new file mode 100644 index 000000000..c94727405 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/release/11.8.4-notes.html @@ -0,0 +1,455 @@ + + + + + + + + + + CUDA Python 11.8.4 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.8.4 Release notes

    +

    Released on October 7, 2024

    +
    +

    Highlights

    +
      +
    • Resolve Issue #89: Fix getLocalRuntimeVersion searching for wrong libcudart version

    • +
    • Resolve Issue #90: Use new layout in preperation for cuda-python becoming a metapackage

    • +
    +
    +
    +

    CUDA namespace cleanup with a new module layout

    +

    Issue #75 explains in detail what the new module layout is, what problem it fixes and how it impacts the users. However for the sake of completeness, this release notes will highlight key points of this change.

    +

    Before this change, cuda-python was tightly coupled to CUDA Toolkit releases and all new features would inherit this coupling regardless of their applicability. As we develop new features, this coupling was becoming overly restrictive and motivated a new solution: Convert cuda-python into a metapackage where we use cuda as a namespace with existing bindings code moved to a cuda_bindings subpackage.

    +

    This patch release applies the new module layout for the bindings as follows:

    +
      +
    • cuda.cuda -> cuda.bindings.driver

    • +
    • cuda.ccuda -> cuda.bindings.cydriver

    • +
    • cuda.cudart -> cuda.bindings.runtime

    • +
    • cuda.ccudart -> cuda.bindings.cyruntime

    • +
    • cuda.nvrtc -> cuda.bindings.nvrtc

    • +
    • cuda.cnvrtc -> cuda.bindings.cynvrtc

    • +
    +

    Deprecation warnings are turned on as a notice to switch to the new module layout.

    +
    +

    Note

    +

    This is non-breaking, backwards compatible change. All old module path will continue work as they “forward” user calls towards the new layout.

    +
    +
    +
    +

    Limitations

    +
    +

    Know issues

    + +
    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/release/11.8.4-notes.html b/docs/cuda-bindings/12.6.1/release/11.8.5-notes.html similarity index 64% rename from docs/release/11.8.4-notes.html rename to docs/cuda-bindings/12.6.1/release/11.8.5-notes.html index 8e2d33bc4..cdcc81e3a 100644 --- a/docs/release/11.8.4-notes.html +++ b/docs/cuda-bindings/12.6.1/release/11.8.5-notes.html @@ -1,17 +1,17 @@ - + - - - + + + - - CUDA Python 11.8.4 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 11.8.5 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,21 +301,20 @@
    -
    -
    -

    CUDA Python 11.8.4 Release notes#

    -

    Released on October 7, 2024

    -
    -

    Hightlights#

    +
    +
    +

    CUDA Python 11.8.5 Release notes

    +

    Released on November 5, 2024

    +
    +

    Highlights

      -
    • Resolve Issue #89: Fix getLocalRuntimeVersion searching for wrong libcudart version

    • -
    • Resolve Issue #90: Use new layout in preperation for cuda-python becoming a metapackage

    • +
    • Resolve Issue #215: module ‘cuda.ccudart’ has no attribute ‘pyx_capi

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 12.0.0 Release notes#

    +

    CUDA Python 12.0.0 Release notes

    Released on December 8, 2022

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/release/12.1.0-notes.html b/docs/cuda-bindings/12.6.1/release/12.1.0-notes.html similarity index 67% rename from docs/release/12.1.0-notes.html rename to docs/cuda-bindings/12.6.1/release/12.1.0-notes.html index 2f07a8bab..adfe92394 100644 --- a/docs/release/12.1.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.1.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 12.1.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.1.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 12.1.0 Release notes#

    +

    CUDA Python 12.1.0 Release notes

    Released on February 28, 2023

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/release/12.2.0-notes.html b/docs/cuda-bindings/12.6.1/release/12.2.0-notes.html similarity index 67% rename from docs/release/12.2.0-notes.html rename to docs/cuda-bindings/12.6.1/release/12.2.0-notes.html index 0ca899bdd..f6640369e 100644 --- a/docs/release/12.2.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.2.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 12.2.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.2.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 12.2.0 Release notes#

    +

    CUDA Python 12.2.0 Release notes

    Released on June 28, 2023

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/release/12.2.1-notes.html b/docs/cuda-bindings/12.6.1/release/12.2.1-notes.html similarity index 66% rename from docs/release/12.2.1-notes.html rename to docs/cuda-bindings/12.6.1/release/12.2.1-notes.html index 6906e2a9b..39fcf1f22 100644 --- a/docs/release/12.2.1-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.2.1-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 12.2.1 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.2.1 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,20 +301,20 @@
    -
    +
    -

    CUDA Python 12.2.1 Release notes#

    +

    CUDA Python 12.2.1 Release notes

    Released on January 8, 2024

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Compatibility with Cython 3

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/12.3.0-notes.html b/docs/cuda-bindings/12.6.1/release/12.3.0-notes.html similarity index 67% rename from docs/release/12.3.0-notes.html rename to docs/cuda-bindings/12.6.1/release/12.3.0-notes.html index 304a56d9a..3a288e6c0 100644 --- a/docs/release/12.3.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.3.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 12.3.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.3.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 12.3.0 Release notes#

    +

    CUDA Python 12.3.0 Release notes

    Released on October 19, 2023

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/release/12.4.0-notes.html b/docs/cuda-bindings/12.6.1/release/12.4.0-notes.html similarity index 67% rename from docs/release/12.4.0-notes.html rename to docs/cuda-bindings/12.6.1/release/12.4.0-notes.html index e2deb824f..d17eb1a8a 100644 --- a/docs/release/12.4.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.4.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 12.4.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.4.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,21 +301,21 @@
    -
    +
    -

    CUDA Python 12.4.0 Release notes#

    +

    CUDA Python 12.4.0 Release notes

    Released on March 5, 2024

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Rebase to CUDA Toolkit 12.4

    • Add PyPI/Conda support for Python 12

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/12.5.0-notes.html b/docs/cuda-bindings/12.6.1/release/12.5.0-notes.html similarity index 67% rename from docs/release/12.5.0-notes.html rename to docs/cuda-bindings/12.6.1/release/12.5.0-notes.html index 4b50b53d9..1809bd0e6 100644 --- a/docs/release/12.5.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.5.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 12.5.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.5.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,21 +301,21 @@
    -
    +
    -

    CUDA Python 12.5.0 Release notes#

    +

    CUDA Python 12.5.0 Release notes

    Released on May 21, 2024

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Rebase to CUDA Toolkit 12.5

    • Resolve Issue #58: Interop between CUdeviceptr and Runtime

    -

    Limitations#

    +

    Limitations

    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/release/12.6.0-notes.html b/docs/cuda-bindings/12.6.1/release/12.6.0-notes.html similarity index 67% rename from docs/release/12.6.0-notes.html rename to docs/cuda-bindings/12.6.1/release/12.6.0-notes.html index d9c287fa5..9531d2e57 100644 --- a/docs/release/12.6.0-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.6.0-notes.html @@ -1,17 +1,17 @@ - + - + - - CUDA Python 12.6.0 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.6.0 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,12 +301,12 @@
    -
    +
    -

    CUDA Python 12.6.0 Release notes#

    +

    CUDA Python 12.6.0 Release notes

    Released on August 1, 2024

    -
    -

    Hightlights#

    +
    +

    Highlights

    + + + \ No newline at end of file diff --git a/docs/release/12.6.1-notes.html b/docs/cuda-bindings/12.6.1/release/12.6.1-notes.html similarity index 69% rename from docs/release/12.6.1-notes.html rename to docs/cuda-bindings/12.6.1/release/12.6.1-notes.html index c1beff01d..40ac4acb5 100644 --- a/docs/release/12.6.1-notes.html +++ b/docs/cuda-bindings/12.6.1/release/12.6.1-notes.html @@ -1,17 +1,17 @@ - + - - + + - - CUDA Python 12.6.1 Release notes - CUDA Python 12.6.1 documentation - - + + CUDA Python 12.6.1 Release notes - cuda.bindings 12.6.1 documentation + + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +
    Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -165,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,11 +281,17 @@ Back to top
    - +
    @@ -229,19 +301,19 @@
    -
    +
    -

    CUDA Python 12.6.1 Release notes#

    +

    CUDA Python 12.6.1 Release notes

    Released on October 7, 2024

    -
    -

    Hightlights#

    +
    +

    Highlights

    • Resolve Issue #90: Use new layout in preparation for cuda-python becoming a metapackage

    • Resolve Issue #75: CUDA namespace cleanup

    -

    CUDA namespace cleanup with a new module layout#

    +

    CUDA namespace cleanup with a new module layout

    Issue #75 explains in detail what the new module layout is, what problem it fixes and how it impacts the users. However for the sake of completeness, this release notes will highlight key points of this change.

    Before this change, cuda-python was tightly coupled to CUDA Toolkit releases and all new features would inherit this coupling regardless of their applicability. As we develop new features, this coupling was becoming overly restrictive and motivated a new solution: Convert cuda-python into a metapackage where we use cuda as a namespace with existing bindings code moved to a cuda_bindings subpackage.

    This patch release applies the new module layout for the bindings as follows:

    @@ -260,9 +332,15 @@

    CUDA namespace cleanup with a new module layout -

    Limitations#

    +

    Limitations

    +
    +

    Know issues

    + +
    -

    CUDA Functions Not Supported in this Release#

    +

    CUDA Functions Not Supported in this Release

    + + + \ No newline at end of file diff --git a/docs/cuda-bindings/12.6.1/release/12.6.2-notes.html b/docs/cuda-bindings/12.6.1/release/12.6.2-notes.html new file mode 100644 index 000000000..6da9b4609 --- /dev/null +++ b/docs/cuda-bindings/12.6.1/release/12.6.2-notes.html @@ -0,0 +1,429 @@ + + + + + + + + + + CUDA Python 12.6.2 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.6.2 Release notes

    +

    Released on November 5, 2024

    +
    +

    Highlights

    +
      +
    • Resolve Issue #215: module ‘cuda.ccudart’ has no attribute ‘pyx_capi

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    • cudaFuncGetName

    • +
    • cudaFuncGetParamInfo

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/search.html b/docs/cuda-bindings/12.6.1/search.html similarity index 64% rename from docs/search.html rename to docs/cuda-bindings/12.6.1/search.html index ecfa30632..768e16547 100644 --- a/docs/search.html +++ b/docs/cuda-bindings/12.6.1/search.html @@ -1,14 +1,17 @@ - - + + + - Search - CUDA Python 12.6.1 documentation - + + +Search - cuda.bindings 12.6.1 documentation + - + @@ -67,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -82,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -111,6 +155,8 @@
    Hide table of contents sidebar
    +Skip to content +
    @@ -122,13 +168,14 @@
    @@ -149,7 +196,7 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation @@ -162,9 +209,8 @@
  • Installation
  • Overview
  • Motivation
  • -
  • Code of Conduct
  • -
  • Contributing
  • -
  • Release Notes
  • +
    + + cuda-bindings + v: + + +
    +
    +
    + + @@ -215,7 +284,8 @@
    @@ -225,7 +295,7 @@
    -
    +

    Table 1 Kernel and application performance comparison.#Table 1 Kernel and application performance comparison.

    C++

    + + +
    +
    + +
    +

    A

    + + + +
    +
    + +
    +

    B

    + + + +
    +
    + +
    +

    C

    + + + +
    +
    + +
    +

    D

    + + + +
    +
    + +
    +

    E

    + + + +
    +
    + +
    +

    F

    + + + +
    +
    + +
    +

    G

    + + + +
    +
    + +
    +

    H

    + + + +
    +
    + +
    +

    I

    + + + +
    +
    + +
    +

    K

    + + + +
    +
    + +
    +

    L

    + + + +
    +
    + +
    +

    M

    + + + +
    +
    + +
    +

    N

    + + + +
    +
    + +
    +

    O

    + + + +
    +
    + +
    +

    P

    + + + +
    +
    + +
    +

    R

    + + + +
    +
    + +
    +

    S

    + + + +
    +
    + +
    +

    T

    + + +
    +
    + +
    +

    U

    + + + +
    +
    + +
    +

    V

    + + + +
    +
    + +
    +

    W

    + + + +
    +
    + +
    +

    X

    + + + +
    +
    + +
    +

    Y

    + + + +
    +
    + +
    +

    Z

    + + +
    +
    + + +
    + +
    + + +
    +
    + + Made with Sphinx and @pradyunsg's + + Furo + +
    +
    + +
    +
    + +
    + + + + + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/index.html b/docs/cuda-bindings/latest/index.html new file mode 100644 index 000000000..0821a6bcd --- /dev/null +++ b/docs/cuda-bindings/latest/index.html @@ -0,0 +1,416 @@ + + + + + + + + + + cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    cuda.bindings: Low-level Python Bindings for CUDA

    + +
    +
    +

    Indices and tables

    + +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/install.html b/docs/cuda-bindings/latest/install.html new file mode 100644 index 000000000..11ce77de5 --- /dev/null +++ b/docs/cuda-bindings/latest/install.html @@ -0,0 +1,481 @@ + + + + + + + + + + Installation - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    Installation

    +
    +

    Runtime Requirements

    +

    CUDA Python is supported on all platforms that CUDA is supported. Specific +dependencies are as follows:

    +
      +
    • Driver: Linux (450.80.02 or later) Windows (456.38 or later)

    • +
    • CUDA Toolkit 12.0 to 12.6

    • +
    +
    +

    Note

    +

    Only the NVRTC redistributable component is required from the CUDA Toolkit. CUDA Toolkit Documentation Installation Guides can be used for guidance. Note that the NVRTC component in the Toolkit can be obtained via PYPI, Conda or Local Installer.

    +
    +
    +
    +

    Installing from PyPI

    +
    pip install cuda-python
    +
    +
    +
    +
    +

    Installing from Conda

    +
    conda install -c nvidia cuda-python
    +
    +
    +

    Conda packages are assigned a dependency to CUDA Toolkit:

    +
      +
    • cuda-cudart (Provides CUDA headers to enable writting NVRTC kernels with CUDA types)

    • +
    • cuda-nvrtc (Provides NVRTC shared library)

    • +
    +
    +
    +

    Installing from Source

    +
    +

    Build Requirements

    +
      +
    • CUDA Toolkit headers

    • +
    • Cython

    • +
    • pyclibrary

    • +
    +

    Remaining build and test dependencies are outlined in requirements.txt

    +

    The version of CUDA Toolkit headers must match the major.minor of CUDA Python. Note that minor version compatibility will still be maintained.

    +

    During the build process, environment variable CUDA_HOME or CUDA_PATH are used to find the location of CUDA headers. In particular, if your headers are located in path /usr/local/cuda/include, then you should set CUDA_HOME as follows:

    +
    export CUDA_HOME=/usr/local/cuda
    +
    +
    +
    +
    +

    In-place

    +

    To compile the extension in-place, run:

    +
    python setup.py build_ext --inplace
    +
    +
    +

    To compile for debugging the extension modules with gdb, pass the --debug +argument to setup.py.

    +
    +
    +

    Develop

    +

    You can use

    +
    pip install -e .
    +
    +
    +

    to install the module as editible in your current Python environment (e.g. for +testing of porting other libraries to use the binding).

    +
    +
    +
    +

    Build the Docs

    +
    conda env create -f docs_src/environment-docs.yml
    +conda activate cuda-python-docs
    +
    +
    +

    Then compile and install cuda-python following the steps above.

    +
    cd docs_src
    +make html
    +open build/html/index.html
    +
    +
    +
    +

    Publish the Docs

    +
    git checkout gh-pages
    +cd docs_src
    +make html
    +cp -a build/html/. ../docs/
    +
    +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/module/driver.html b/docs/cuda-bindings/latest/module/driver.html new file mode 100644 index 000000000..a8b9326f2 --- /dev/null +++ b/docs/cuda-bindings/latest/module/driver.html @@ -0,0 +1,43103 @@ + + + + + + + + + + driver - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    driver

    +
    +

    Data types used by CUDA driver

    +
    +
    +class cuda.bindings.driver.CUuuid_st(void_ptr _ptr=0)
    +
    +
    +bytes
    +

    < CUDA definition of UUID

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemFabricHandle_st(void_ptr _ptr=0)
    +

    Fabric handle - An opaque handle representing a memory allocation +that can be exported to processes in same or different nodes. For +IPC between processes on different nodes they must be connected via +the NVSwitch fabric.

    +
    +
    +data
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUipcEventHandle_st(void_ptr _ptr=0)
    +

    CUDA IPC event handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUipcMemHandle_st(void_ptr _ptr=0)
    +

    CUDA IPC mem handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamBatchMemOpParams_union(void_ptr _ptr=0)
    +

    Per-operation parameters for cuStreamBatchMemOp

    +
    +
    +operation
    +
    +
    Type:
    +

    CUstreamBatchMemOpType

    +
    +
    +
    + +
    +
    +waitValue
    +
    +
    Type:
    +

    CUstreamMemOpWaitValueParams_st

    +
    +
    +
    + +
    +
    +writeValue
    +
    +
    Type:
    +

    CUstreamMemOpWriteValueParams_st

    +
    +
    +
    + +
    +
    +flushRemoteWrites
    +
    +
    Type:
    +

    CUstreamMemOpFlushRemoteWritesParams_st

    +
    +
    +
    + +
    +
    +memoryBarrier
    +
    +
    Type:
    +

    CUstreamMemOpMemoryBarrierParams_st

    +
    +
    +
    + +
    +
    +pad
    +
    +
    Type:
    +

    List[cuuint64_t]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1_st(void_ptr _ptr=0)
    +
    +
    +ctx
    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +count
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +paramArray
    +
    +
    Type:
    +

    CUstreamBatchMemOpParams

    +
    +
    +
    + +
    +
    +flags
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2_st(void_ptr _ptr=0)
    +

    Batch memory operation node parameters

    +
    +
    +ctx
    +

    Context to use for the operations.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +count
    +

    Number of operations in paramArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +paramArray
    +

    Array of batch memory operations.

    +
    +
    Type:
    +

    CUstreamBatchMemOpParams

    +
    +
    +
    + +
    +
    +flags
    +

    Flags to control the node.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUasyncNotificationInfo_st(void_ptr _ptr=0)
    +

    Information passed to the user via the async notification callback

    +
    +
    +type
    +
    +
    Type:
    +

    CUasyncNotificationType

    +
    +
    +
    + +
    +
    +info
    +
    +
    Type:
    +

    anon_union2

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevprop_st(void_ptr _ptr=0)
    +

    Legacy device properties

    +
    +
    +maxThreadsPerBlock
    +

    Maximum number of threads per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxThreadsDim
    +

    Maximum size of each dimension of a block

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxGridSize
    +

    Maximum size of each dimension of a grid

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +sharedMemPerBlock
    +

    Shared memory available per block in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +totalConstantMemory
    +

    Constant memory available on device in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +SIMDWidth
    +

    Warp size in threads

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memPitch
    +

    Maximum pitch in bytes allowed by memory copies

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +regsPerBlock
    +

    32-bit registers available per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +clockRate
    +

    Clock frequency in kilohertz

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +textureAlign
    +

    Alignment requirement for textures

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUaccessPolicyWindow_st(void_ptr _ptr=0)
    +

    Specifies an access policy for a window, a contiguous extent of +memory beginning at base_ptr and ending at base_ptr + num_bytes. +num_bytes is limited by +CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into +many segments and assign segments such that: sum of “hit segments” +/ window == approx. ratio. sum of “miss segments” / window == +approx 1-ratio. Segments and ratio specifications are fitted to the +capabilities of the architecture. Accesses in a hit segment apply +the hitProp access policy. Accesses in a miss segment apply the +missProp access policy.

    +
    +
    +base_ptr
    +

    Starting address of the access policy window. CUDA driver may align +it.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +num_bytes
    +

    Size in bytes of the window policy. CUDA driver may restrict the +maximum size and alignment.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +hitRatio
    +

    hitRatio specifies percentage of lines assigned hitProp, rest are +assigned missProp.

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +hitProp
    +

    CUaccessProperty set for hit.

    +
    +
    Type:
    +

    CUaccessProperty

    +
    +
    +
    + +
    +
    +missProp
    +

    CUaccessProperty set for miss. Must be either NORMAL or STREAMING

    +
    +
    Type:
    +

    CUaccessProperty

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Extra options

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS_v2_st(void_ptr _ptr=0)
    +

    GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Extra options

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +kern
    +

    Kernel to launch, will only be referenced if func is NULL

    +
    +
    Type:
    +

    CUkernel

    +
    +
    +
    + +
    +
    +ctx
    +

    Context for the kernel task to run in. The value NULL will indicate +the current context should be used by the api. This field is +ignored if func is set.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS_v3_st(void_ptr _ptr=0)
    +

    GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Extra options

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +kern
    +

    Kernel to launch, will only be referenced if func is NULL

    +
    +
    Type:
    +

    CUkernel

    +
    +
    +
    + +
    +
    +ctx
    +

    Context for the kernel task to run in. The value NULL will indicate +the current context should be used by the api. This field is +ignored if func is set.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMSET_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Memset node parameters

    +
    +
    +dst
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of destination device pointer. Unused if height is 1

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +value
    +

    Value to be set

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +elementSize
    +

    Size of each element in bytes. Must be 1, 2, or 4.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +width
    +

    Width of the row in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Number of rows

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMSET_NODE_PARAMS_v2_st(void_ptr _ptr=0)
    +

    Memset node parameters

    +
    +
    +dst
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of destination device pointer. Unused if height is 1

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +value
    +

    Value to be set

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +elementSize
    +

    Size of each element in bytes. Must be 1, 2, or 4.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +width
    +

    Width of the row in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Number of rows

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +ctx
    +

    Context on which to run the node

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Host node parameters

    +
    +
    +fn
    +

    The function to call when the node executes

    +
    +
    Type:
    +

    CUhostFn

    +
    +
    +
    + +
    +
    +userData
    +

    Argument to pass to the function

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_v2_st(void_ptr _ptr=0)
    +

    Host node parameters

    +
    +
    +fn
    +

    The function to call when the node executes

    +
    +
    Type:
    +

    CUhostFn

    +
    +
    +
    + +
    +
    +userData
    +

    Argument to pass to the function

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_CONDITIONAL_NODE_PARAMS(void_ptr _ptr=0)
    +

    Conditional node parameters

    +
    +
    +handle
    +

    Conditional node handle. Handles must be created in advance of +creating the node using cuGraphConditionalHandleCreate.

    +
    +
    Type:
    +

    CUgraphConditionalHandle

    +
    +
    +
    + +
    +
    +type
    +

    Type of conditional node.

    +
    +
    Type:
    +

    CUgraphConditionalNodeType

    +
    +
    +
    + +
    +
    +size
    +

    Size of graph output array. Must be 1.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +phGraph_out
    +

    CUDA-owned array populated with conditional node child graphs +during creation of the node. Valid for the lifetime of the +conditional node. The contents of the graph(s) are subject to the +following constraints: - Allowed node types are kernel nodes, +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. +These graphs may be populated using graph node creation APIs or +cuStreamBeginCaptureToGraph.

    +
    +
    Type:
    +

    CUgraph

    +
    +
    +
    + +
    +
    +ctx
    +

    Context on which to run the node. Must match context used to create +the handle and all body nodes.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphEdgeData_st(void_ptr _ptr=0)
    +

    Optional annotation for edges in a CUDA graph. Note, all edges +implicitly have annotations and default to a zero-initialized value +if not specified. A zero-initialized struct indicates a standard +full serialization of two nodes with memory visibility.

    +
    +
    +from_port
    +

    This indicates when the dependency is triggered from the upstream +node on the edge. The meaning is specfic to the node type. A value +of 0 in all cases means full completion of the upstream node, with +memory visibility to the downstream node or portion thereof +(indicated by to_port). Only kernel nodes define non-zero +ports. A kernel node can use the following output port types: +CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, +CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or +CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +to_port
    +

    This indicates what portion of the downstream node is dependent on +the upstream node or portion thereof (indicated by from_port). +The meaning is specific to the node type. A value of 0 in all cases +means the entirety of the downstream node is dependent on the +upstream work. Currently no node types define non-zero ports. +Accordingly, this field must be set to zero.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +type
    +

    This should be populated with a value from CUgraphDependencyType. +(It is typed as char due to compiler-specific layout of bitfields.) +See CUgraphDependencyType.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +reserved
    +

    These bytes are unused and must be zeroed. This ensures +compatibility if additional fields are added in the future.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_GRAPH_INSTANTIATE_PARAMS_st(void_ptr _ptr=0)
    +

    Graph instantiation parameters

    +
    +
    +flags
    +

    Instantiation flags

    +
    +
    Type:
    +

    cuuint64_t

    +
    +
    +
    + +
    +
    +hUploadStream
    +

    Upload stream

    +
    +
    Type:
    +

    CUstream

    +
    +
    +
    + +
    +
    +hErrNode_out
    +

    The node which caused instantiation to fail, if any

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +result_out
    +

    Whether instantiation was successful. If it failed, the reason why

    +
    +
    Type:
    +

    CUgraphInstantiateResult

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchMemSyncDomainMap_st(void_ptr _ptr=0)
    +

    Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. +By default, kernels are launched in domain 0. Kernel launched with +CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. +User may also alter the domain ID with CUlaunchMemSyncDomainMap for +a specific stream / graph node / kernel launch. See +CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. Domain ID range is +available through CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT.

    +
    +
    +default_
    +

    The default domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +remote
    +

    The remote domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchAttributeValue_union(void_ptr _ptr=0)
    +

    Launch attributes union; used as value field of CUlaunchAttribute

    +
    +
    +pad
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +accessPolicyWindow
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW.

    +
    +
    Type:
    +

    CUaccessPolicyWindow

    +
    +
    +
    + +
    +
    +cooperative
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero +indicates a cooperative kernel (see cuLaunchCooperativeKernel).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +syncPolicy
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. +::CUsynchronizationPolicy for work queued up in this stream

    +
    +
    Type:
    +

    CUsynchronizationPolicy

    +
    +
    +
    + +
    +
    +clusterDim
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION +that represents the desired cluster dimensions for the kernel. +Opaque type with the following fields: - x - The X dimension of +the cluster, in blocks. Must be a divisor of the grid X dimension. +- y - The Y dimension of the cluster, in blocks. Must be a +divisor of the grid Y dimension. - z - The Z dimension of the +cluster, in blocks. Must be a divisor of the grid Z dimension.

    +
    +
    Type:
    +

    anon_struct1

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster +scheduling policy preference for the kernel.

    +
    +
    Type:
    +

    CUclusterSchedulingPolicy

    +
    +
    +
    + +
    +
    +programmaticStreamSerializationAllowed
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +programmaticEvent
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT +with the following fields: - CUevent event - Event to fire when +all blocks trigger it. - Event record flags, see +cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. +- triggerAtBlockStart - If this is set to non-0, each block +launch will automatically trigger the event.

    +
    +
    Type:
    +

    anon_struct2

    +
    +
    +
    + +
    +
    +launchCompletionEvent
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following +fields: - CUevent event - Event to fire when the last block +launches - int flags; - Event record flags, see +cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL.

    +
    +
    Type:
    +

    anon_struct3

    +
    +
    +
    + +
    +
    +priority
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution +priority of the kernel.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memSyncDomainMap
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. +See CUlaunchMemSyncDomainMap.

    +
    +
    Type:
    +

    CUlaunchMemSyncDomainMap

    +
    +
    +
    + +
    +
    +memSyncDomain
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. +See::CUlaunchMemSyncDomain

    +
    +
    Type:
    +

    CUlaunchMemSyncDomain

    +
    +
    +
    + +
    +
    +deviceUpdatableKernelNode
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the +following fields: - int deviceUpdatable - Whether or not the +resulting kernel node should be device-updatable. - +CUgraphDeviceNode devNode - Returns a handle to pass to the +various device-side update functions.

    +
    +
    Type:
    +

    anon_struct4

    +
    +
    +
    + +
    +
    +sharedMemCarveout
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchAttribute_st(void_ptr _ptr=0)
    +

    Launch attribute

    +
    +
    +id
    +

    Attribute to set

    +
    +
    Type:
    +

    CUlaunchAttributeID

    +
    +
    +
    + +
    +
    +value
    +

    Value of the attribute

    +
    +
    Type:
    +

    CUlaunchAttributeValue

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchConfig_st(void_ptr _ptr=0)
    +

    CUDA extensible launch configuration

    +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +hStream
    +

    Stream identifier

    +
    +
    Type:
    +

    CUstream

    +
    +
    +
    + +
    +
    +attrs
    +

    List of attributes; nullable if CUlaunchConfig::numAttrs == 0

    +
    +
    Type:
    +

    CUlaunchAttribute

    +
    +
    +
    + +
    +
    +numAttrs
    +

    Number of attributes populated in CUlaunchConfig::attrs

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexecAffinitySmCount_st(void_ptr _ptr=0)
    +

    Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT

    +
    +
    +val
    +

    The number of SMs the context is limited to use.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexecAffinityParam_st(void_ptr _ptr=0)
    +

    Execution Affinity Parameters

    +
    +
    +type
    +
    +
    Type:
    +

    CUexecAffinityType

    +
    +
    +
    + +
    +
    +param
    +
    +
    Type:
    +

    anon_union3

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUctxCigParam_st(void_ptr _ptr=0)
    +

    CIG Context Create Params

    +
    +
    +sharedDataType
    +
    +
    Type:
    +

    CUcigDataType

    +
    +
    +
    + +
    +
    +sharedData
    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUctxCreateParams_st(void_ptr _ptr=0)
    +

    Params for creating CUDA context Exactly one of execAffinityParams +and cigParams must be non-NULL.

    +
    +
    +execAffinityParams
    +
    +
    Type:
    +

    CUexecAffinityParam

    +
    +
    +
    + +
    +
    +numExecAffinityParams
    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +cigParams
    +
    +
    Type:
    +

    CUctxCigParam

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlibraryHostUniversalFunctionAndDataTable_st(void_ptr _ptr=0)
    +
    +
    +functionTable
    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +functionWindowSize
    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dataTable
    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dataWindowSize
    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY2D_st(void_ptr _ptr=0)
    +

    2D memory copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 2D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 2D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY3D_st(void_ptr _ptr=0)
    +

    3D memory copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcZ
    +

    Source Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcLOD
    +

    Source LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +reserved0
    +

    Must be NULL

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcHeight
    +

    Source height (ignored when src is array; may be 0 if Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstZ
    +

    Destination Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstLOD
    +

    Destination LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +reserved1
    +

    Must be NULL

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstHeight
    +

    Destination height (ignored when dst is array; may be 0 if +Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 3D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY3D_PEER_st(void_ptr _ptr=0)
    +

    3D memory cross-context copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcZ
    +

    Source Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcLOD
    +

    Source LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +srcContext
    +

    Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY)

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcHeight
    +

    Source height (ignored when src is array; may be 0 if Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstZ
    +

    Destination Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstLOD
    +

    Destination LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +dstContext
    +

    Destination context (ignored with dstMemoryType is +CU_MEMORYTYPE_ARRAY)

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstHeight
    +

    Destination height (ignored when dst is array; may be 0 if +Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 3D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Memcpy node parameters

    +
    +
    +flags
    +

    Must be zero

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +reserved
    +

    Must be zero

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +copyCtx
    +

    Context on which to run the node

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +copyParams
    +

    Parameters for the memory copy

    +
    +
    Type:
    +

    CUDA_MEMCPY3D

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_DESCRIPTOR_st(void_ptr _ptr=0)
    +

    Array descriptor

    +
    +
    +Width
    +

    Width of array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Format
    +

    Array format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +NumChannels
    +

    Channels per array element

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY3D_DESCRIPTOR_st(void_ptr _ptr=0)
    +

    3D array descriptor

    +
    +
    +Width
    +

    Width of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Format
    +

    Array format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +NumChannels
    +

    Channels per array element

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +Flags
    +

    Flags

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_SPARSE_PROPERTIES_st(void_ptr _ptr=0)
    +

    CUDA array sparse properties

    +
    +
    +tileExtent
    +
    +
    Type:
    +

    anon_struct5

    +
    +
    +
    + +
    +
    +miptailFirstLevel
    +

    First mip level at which the mip tail begins.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +miptailSize
    +

    Total size of the mip tail.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags will either be zero or +CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_MEMORY_REQUIREMENTS_st(void_ptr _ptr=0)
    +

    CUDA array memory requirements

    +
    +
    +size
    +

    Total required memory size

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +alignment
    +

    alignment requirement

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_RESOURCE_DESC_st(void_ptr _ptr=0)
    +

    CUDA Resource descriptor

    +
    +
    +resType
    +

    Resource type

    +
    +
    Type:
    +

    CUresourcetype

    +
    +
    +
    + +
    +
    +res
    +
    +
    Type:
    +

    anon_union4

    +
    +
    +
    + +
    +
    +flags
    +

    Flags (must be zero)

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_TEXTURE_DESC_st(void_ptr _ptr=0)
    +

    Texture descriptor

    +
    +
    +addressMode
    +

    Address modes

    +
    +
    Type:
    +

    List[CUaddress_mode]

    +
    +
    +
    + +
    +
    +filterMode
    +

    Filter mode

    +
    +
    Type:
    +

    CUfilter_mode

    +
    +
    +
    + +
    +
    +flags
    +

    Flags

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +maxAnisotropy
    +

    Maximum anisotropy ratio

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +mipmapFilterMode
    +

    Mipmap filter mode

    +
    +
    Type:
    +

    CUfilter_mode

    +
    +
    +
    + +
    +
    +mipmapLevelBias
    +

    Mipmap level bias

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +minMipmapLevelClamp
    +

    Mipmap minimum level clamp

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +maxMipmapLevelClamp
    +

    Mipmap maximum level clamp

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +borderColor
    +

    Border Color

    +
    +
    Type:
    +

    List[float]

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_RESOURCE_VIEW_DESC_st(void_ptr _ptr=0)
    +

    Resource view descriptor

    +
    +
    +format
    +

    Resource view format

    +
    +
    Type:
    +

    CUresourceViewFormat

    +
    +
    +
    + +
    +
    +width
    +

    Width of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Height of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +firstMipmapLevel
    +

    First defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastMipmapLevel
    +

    Last defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +firstLayer
    +

    First layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastLayer
    +

    Last layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtensorMap_st(void_ptr _ptr=0)
    +

    Tensor map descriptor. Requires compiler support for aligning to 64 +bytes.

    +
    +
    +opaque
    +
    +
    Type:
    +

    List[cuuint64_t]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_st(void_ptr _ptr=0)
    +

    GPU Direct v3 tokens

    +
    +
    +p2pToken
    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +vaSpaceToken
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_LAUNCH_PARAMS_st(void_ptr _ptr=0)
    +

    Kernel launch parameters

    +
    +
    +function
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +hStream
    +

    Stream identifier

    +
    +
    Type:
    +

    CUstream

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_st(void_ptr _ptr=0)
    +

    External memory handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    CUexternalMemoryHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union5

    +
    +
    +
    + +
    +
    +size
    +

    Size of the memory allocation

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_st(void_ptr _ptr=0)
    +

    External memory buffer descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the buffer’s base is

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +size
    +

    Size of the buffer

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for future use. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_st(void_ptr _ptr=0)
    +

    External memory mipmap descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the base level of the mipmap +chain is.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +arrayDesc
    +

    Format, dimension and type of base level of the mipmap chain

    +
    +
    Type:
    +

    CUDA_ARRAY3D_DESCRIPTOR

    +
    +
    +
    + +
    +
    +numLevels
    +

    Total number of levels in the mipmap chain

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_st(void_ptr _ptr=0)
    +

    External semaphore handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    CUexternalSemaphoreHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union6

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for the future. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_st(void_ptr _ptr=0)
    +

    External semaphore signal parameters

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct15

    +
    +
    +
    + +
    +
    +flags
    +

    Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal +a CUexternalSemaphore of type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which +indicates that while signaling the CUexternalSemaphore, no memory +synchronization operations should be performed for any external +memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. +For all other types of CUexternalSemaphore, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_st(void_ptr _ptr=0)
    +

    External semaphore wait parameters

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct18

    +
    +
    +
    + +
    +
    +flags
    +

    Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on +a CUexternalSemaphore of type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is +CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates +that while waiting for the CUexternalSemaphore, no memory +synchronization operations should be performed for any external +memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. +For all other types of CUexternalSemaphore, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Semaphore signal node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore signal parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2_st(void_ptr _ptr=0)
    +

    Semaphore signal node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore signal parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Semaphore wait node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore wait parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2_st(void_ptr _ptr=0)
    +

    Semaphore wait node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore wait parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUarrayMapInfo_st(void_ptr _ptr=0)
    +

    Specifies the CUDA array or CUDA mipmapped array memory mapping +information

    +
    +
    +resourceType
    +

    Resource type

    +
    +
    Type:
    +

    CUresourcetype

    +
    +
    +
    + +
    +
    +resource
    +
    +
    Type:
    +

    anon_union9

    +
    +
    +
    + +
    +
    +subresourceType
    +

    Sparse subresource type

    +
    +
    Type:
    +

    CUarraySparseSubresourceType

    +
    +
    +
    + +
    +
    +subresource
    +
    +
    Type:
    +

    anon_union10

    +
    +
    +
    + +
    +
    +memOperationType
    +

    Memory operation type

    +
    +
    Type:
    +

    CUmemOperationType

    +
    +
    +
    + +
    +
    +memHandleType
    +

    Memory handle type

    +
    +
    Type:
    +

    CUmemHandleType

    +
    +
    +
    + +
    +
    +memHandle
    +
    +
    Type:
    +

    anon_union11

    +
    +
    +
    + +
    +
    +offset
    +

    Offset within mip tail Offset within the memory

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +deviceBitMask
    +

    Device ordinal bit mask

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +flags
    +

    flags for future use, must be zero now.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +

    Reserved for future use, must be zero now.

    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemLocation_st(void_ptr _ptr=0)
    +

    Specifies a memory location.

    +
    +
    +type
    +

    Specifies the location type, which modifies the meaning of id.

    +
    +
    Type:
    +

    CUmemLocationType

    +
    +
    +
    + +
    +
    +id
    +

    identifier for a given this location’s CUmemLocationType.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAllocationProp_st(void_ptr _ptr=0)
    +

    Specifies the allocation properties for a allocation.

    +
    +
    +type
    +

    Allocation type

    +
    +
    Type:
    +

    CUmemAllocationType

    +
    +
    +
    + +
    +
    +requestedHandleTypes
    +

    requested CUmemAllocationHandleType

    +
    +
    Type:
    +

    CUmemAllocationHandleType

    +
    +
    +
    + +
    +
    +location
    +

    Location of allocation

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +win32HandleMetaData
    +

    Windows-specific POBJECT_ATTRIBUTES required when +CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes +structure includes security attributes that define the scope of +which exported allocations may be transferred to other processes. +In all other cases, this field is required to be zero.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +allocFlags
    +
    +
    Type:
    +

    anon_struct21

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmulticastObjectProp_st(void_ptr _ptr=0)
    +

    Specifies the properties for a multicast object.

    +
    +
    +numDevices
    +

    The number of devices in the multicast team that will bind memory +to this object

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +size
    +

    The maximum amount of memory that can be bound to this multicast +object per device

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +handleTypes
    +

    Bitmask of exportable handle types (see CUmemAllocationHandleType) +for this object

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags for future use, must be zero now

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAccessDesc_st(void_ptr _ptr=0)
    +

    Memory access descriptor

    +
    +
    +location
    +

    Location on which the request is to change it’s accessibility

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +flags
    +

    ::CUmemProt accessibility flags to set on the request

    +
    +
    Type:
    +

    CUmemAccess_flags

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphExecUpdateResultInfo_st(void_ptr _ptr=0)
    +

    Result information returned by cuGraphExecUpdate

    +
    +
    +result
    +

    Gives more specific detail when a cuda graph update fails.

    +
    +
    Type:
    +

    CUgraphExecUpdateResult

    +
    +
    +
    + +
    +
    +errorNode
    +

    The “to node” of the error edge when the topologies do not match. +The error node when the error is associated with a specific node. +NULL when the error is generic.

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +errorFromNode
    +

    The from node of error edge when the topologies do not match. +Otherwise NULL.

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemPoolProps_st(void_ptr _ptr=0)
    +

    Specifies the properties of allocations made from the pool.

    +
    +
    +allocType
    +

    Allocation type. Currently must be specified as +CU_MEM_ALLOCATION_TYPE_PINNED

    +
    +
    Type:
    +

    CUmemAllocationType

    +
    +
    +
    + +
    +
    +handleTypes
    +

    Handle types that will be supported by allocations from the pool.

    +
    +
    Type:
    +

    CUmemAllocationHandleType

    +
    +
    +
    + +
    +
    +location
    +

    Location where allocations should reside.

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +win32SecurityAttributes
    +

    Windows-specific LPSECURITYATTRIBUTES required when +CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute +defines the scope of which exported allocations may be transferred +to other processes. In all other cases, this field is required to +be zero.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +maxSize
    +

    Maximum pool size. When set to 0, defaults to a system dependent +value.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +usage
    +

    Bitmask indicating intended usage for the pool.

    +
    +
    Type:
    +

    unsigned short

    +
    +
    +
    + +
    +
    +reserved
    +

    reserved for future use, must be 0

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemPoolPtrExportData_st(void_ptr _ptr=0)
    +

    Opaque data for exporting a pool allocation

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEM_ALLOC_NODE_PARAMS_v1_st(void_ptr _ptr=0)
    +

    Memory allocation node parameters

    +
    +
    +poolProps
    +

    in: location where the allocation should reside (specified in +::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is +not supported.

    +
    +
    Type:
    +

    CUmemPoolProps

    +
    +
    +
    + +
    +
    +accessDescs
    +

    in: array of memory access descriptors. Used to describe peer GPU +access

    +
    +
    Type:
    +

    CUmemAccessDesc

    +
    +
    +
    + +
    +
    +accessDescCount
    +

    in: number of memory access descriptors. Must not exceed the number +of GPUs.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +bytesize
    +

    in: size in bytes of the requested allocation

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dptr
    +

    out: address of the allocation returned by CUDA

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEM_ALLOC_NODE_PARAMS_v2_st(void_ptr _ptr=0)
    +

    Memory allocation node parameters

    +
    +
    +poolProps
    +

    in: location where the allocation should reside (specified in +::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is +not supported.

    +
    +
    Type:
    +

    CUmemPoolProps

    +
    +
    +
    + +
    +
    +accessDescs
    +

    in: array of memory access descriptors. Used to describe peer GPU +access

    +
    +
    Type:
    +

    CUmemAccessDesc

    +
    +
    +
    + +
    +
    +accessDescCount
    +

    in: number of memory access descriptors. Must not exceed the number +of GPUs.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +bytesize
    +

    in: size in bytes of the requested allocation

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dptr
    +

    out: address of the allocation returned by CUDA

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEM_FREE_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Memory free node parameters

    +
    +
    +dptr
    +

    in: the pointer to free

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_CHILD_GRAPH_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Child graph node parameters

    +
    +
    +graph
    +

    The child graph to clone into the node for node creation, or a +handle to the graph owned by the node for node query

    +
    +
    Type:
    +

    CUgraph

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EVENT_RECORD_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Event record node parameters

    +
    +
    +event
    +

    The event to record when the node executes

    +
    +
    Type:
    +

    CUevent

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EVENT_WAIT_NODE_PARAMS_st(void_ptr _ptr=0)
    +

    Event wait node parameters

    +
    +
    +event
    +

    The event to wait on from the node

    +
    +
    Type:
    +

    CUevent

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphNodeParams_st(void_ptr _ptr=0)
    +

    Graph node parameters. See cuGraphAddNode.

    +
    +
    +type
    +

    Type of the node

    +
    +
    Type:
    +

    CUgraphNodeType

    +
    +
    +
    + +
    +
    +reserved0
    +

    Reserved. Must be zero.

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +reserved1
    +

    Padding. Unused bytes must be zero.

    +
    +
    Type:
    +

    List[long long]

    +
    +
    +
    + +
    +
    +kernel
    +

    Kernel node parameters.

    +
    +
    Type:
    +

    CUDA_KERNEL_NODE_PARAMS_v3

    +
    +
    +
    + +
    +
    +memcpy
    +

    Memcpy node parameters.

    +
    +
    Type:
    +

    CUDA_MEMCPY_NODE_PARAMS

    +
    +
    +
    + +
    +
    +memset
    +

    Memset node parameters.

    +
    +
    Type:
    +

    CUDA_MEMSET_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +host
    +

    Host node parameters.

    +
    +
    Type:
    +

    CUDA_HOST_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +graph
    +

    Child graph node parameters.

    +
    +
    Type:
    +

    CUDA_CHILD_GRAPH_NODE_PARAMS

    +
    +
    +
    + +
    +
    +eventWait
    +

    Event wait node parameters.

    +
    +
    Type:
    +

    CUDA_EVENT_WAIT_NODE_PARAMS

    +
    +
    +
    + +
    +
    +eventRecord
    +

    Event record node parameters.

    +
    +
    Type:
    +

    CUDA_EVENT_RECORD_NODE_PARAMS

    +
    +
    +
    + +
    +
    +extSemSignal
    +

    External semaphore signal node parameters.

    +
    +
    Type:
    +

    CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +extSemWait
    +

    External semaphore wait node parameters.

    +
    +
    Type:
    +

    CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +alloc
    +

    Memory allocation node parameters.

    +
    +
    Type:
    +

    CUDA_MEM_ALLOC_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +free
    +

    Memory free node parameters.

    +
    +
    Type:
    +

    CUDA_MEM_FREE_NODE_PARAMS

    +
    +
    +
    + +
    +
    +memOp
    +

    MemOp node parameters.

    +
    +
    Type:
    +

    CUDA_BATCH_MEM_OP_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +conditional
    +

    Conditional node parameters.

    +
    +
    Type:
    +

    CUDA_CONDITIONAL_NODE_PARAMS

    +
    +
    +
    + +
    +
    +reserved2
    +

    Reserved bytes. Must be zero.

    +
    +
    Type:
    +

    long long

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUeglFrame_st(void_ptr _ptr=0)
    +

    CUDA EGLFrame structure Descriptor - structure defining one frame +of EGL. Each frame may contain one or more planes depending on +whether the surface * is Multiplanar or not.

    +
    +
    +frame
    +
    +
    Type:
    +

    anon_union14

    +
    +
    +
    + +
    +
    +width
    +

    Width of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +height
    +

    Height of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +planeCount
    +

    Number of planes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +numChannels
    +

    Number of channels for the plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +frameType
    +

    Array or Pitch

    +
    +
    Type:
    +

    CUeglFrameType

    +
    +
    +
    + +
    +
    +eglColorFormat
    +

    CUDA EGL Color Format

    +
    +
    Type:
    +

    CUeglColorFormat

    +
    +
    +
    + +
    +
    +cuFormat
    +

    CUDA Array Format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUipcMem_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Ipc Mem Flags

    +
    +
    +CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS = 1
    +

    Automatically enable peer access between remote devices as needed

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAttach_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Mem Attach Flags

    +
    +
    +CU_MEM_ATTACH_GLOBAL = 1
    +

    Memory can be accessed by any stream on any device

    +
    + +
    +
    +CU_MEM_ATTACH_HOST = 2
    +

    Memory cannot be accessed by any stream on any device

    +
    + +
    +
    +CU_MEM_ATTACH_SINGLE = 4
    +

    Memory can only be accessed by a single stream on the associated device

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUctx_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Context creation flags

    +
    +
    +CU_CTX_SCHED_AUTO = 0
    +

    Automatic scheduling

    +
    + +
    +
    +CU_CTX_SCHED_SPIN = 1
    +

    Set spin as default scheduling

    +
    + +
    +
    +CU_CTX_SCHED_YIELD = 2
    +

    Set yield as default scheduling

    +
    + +
    +
    +CU_CTX_SCHED_BLOCKING_SYNC = 4
    +

    Set blocking synchronization as default scheduling

    +
    + +
    +
    +CU_CTX_BLOCKING_SYNC = 4
    +

    Set blocking synchronization as default scheduling [Deprecated]

    +
    + +
    +
    +CU_CTX_SCHED_MASK = 7
    +
    + +
    +
    +CU_CTX_MAP_HOST = 8
    +

    [Deprecated]

    +
    + +
    +
    +CU_CTX_LMEM_RESIZE_TO_MAX = 16
    +

    Keep local memory allocation after launch

    +
    + +
    +
    +CU_CTX_COREDUMP_ENABLE = 32
    +

    Trigger coredumps from exceptions in this context

    +
    + +
    +
    +CU_CTX_USER_COREDUMP_ENABLE = 64
    +

    Enable user pipe to trigger coredumps in this context

    +
    + +
    +
    +CU_CTX_SYNC_MEMOPS = 128
    +

    Ensure synchronous memory operations on this context will synchronize

    +
    + +
    +
    +CU_CTX_FLAGS_MASK = 255
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUevent_sched_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Event sched flags

    +
    +
    +CU_EVENT_SCHED_AUTO = 0
    +

    Automatic scheduling

    +
    + +
    +
    +CU_EVENT_SCHED_SPIN = 1
    +

    Set spin as default scheduling

    +
    + +
    +
    +CU_EVENT_SCHED_YIELD = 2
    +

    Set yield as default scheduling

    +
    + +
    +
    +CU_EVENT_SCHED_BLOCKING_SYNC = 4
    +

    Set blocking synchronization as default scheduling

    +
    + +
    + +
    +
    +class cuda.bindings.driver.cl_event_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    NVCL event scheduling flags

    +
    +
    +NVCL_EVENT_SCHED_AUTO = 0
    +

    Automatic scheduling

    +
    + +
    +
    +NVCL_EVENT_SCHED_SPIN = 1
    +

    Set spin as default scheduling

    +
    + +
    +
    +NVCL_EVENT_SCHED_YIELD = 2
    +

    Set yield as default scheduling

    +
    + +
    +
    +NVCL_EVENT_SCHED_BLOCKING_SYNC = 4
    +

    Set blocking synchronization as default scheduling

    +
    + +
    + +
    +
    +class cuda.bindings.driver.cl_context_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    NVCL context scheduling flags

    +
    +
    +NVCL_CTX_SCHED_AUTO = 0
    +

    Automatic scheduling

    +
    + +
    +
    +NVCL_CTX_SCHED_SPIN = 1
    +

    Set spin as default scheduling

    +
    + +
    +
    +NVCL_CTX_SCHED_YIELD = 2
    +

    Set yield as default scheduling

    +
    + +
    +
    +NVCL_CTX_SCHED_BLOCKING_SYNC = 4
    +

    Set blocking synchronization as default scheduling

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstream_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Stream creation flags

    +
    +
    +CU_STREAM_DEFAULT = 0
    +

    Default stream flag

    +
    + +
    +
    +CU_STREAM_NON_BLOCKING = 1
    +

    Stream does not synchronize with stream 0 (the NULL stream)

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUevent_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Event creation flags

    +
    +
    +CU_EVENT_DEFAULT = 0
    +

    Default event flag

    +
    + +
    +
    +CU_EVENT_BLOCKING_SYNC = 1
    +

    Event uses blocking synchronization

    +
    + +
    +
    +CU_EVENT_DISABLE_TIMING = 2
    +

    Event will not record timing data

    +
    + +
    +
    +CU_EVENT_INTERPROCESS = 4
    +

    Event is suitable for interprocess use. CU_EVENT_DISABLE_TIMING must be set

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUevent_record_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Event record flags

    +
    +
    +CU_EVENT_RECORD_DEFAULT = 0
    +

    Default event record flag

    +
    + +
    +
    +CU_EVENT_RECORD_EXTERNAL = 1
    +

    When using stream capture, create an event record node instead of the default behavior. This flag is invalid when used outside of capture.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUevent_wait_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Event wait flags

    +
    +
    +CU_EVENT_WAIT_DEFAULT = 0
    +

    Default event wait flag

    +
    + +
    +
    +CU_EVENT_WAIT_EXTERNAL = 1
    +

    When using stream capture, create an event wait node instead of the default behavior. This flag is invalid when used outside of capture.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamWaitValue_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for cuStreamWaitValue32 and +cuStreamWaitValue64

    +
    +
    +CU_STREAM_WAIT_VALUE_GEQ = 0
    +

    Wait until (int32_t)(*addr - value) >= 0 (or int64_t for 64 bit values). Note this is a cyclic comparison which ignores wraparound. (Default behavior.)

    +
    + +
    +
    +CU_STREAM_WAIT_VALUE_EQ = 1
    +

    Wait until *addr == value.

    +
    + +
    +
    +CU_STREAM_WAIT_VALUE_AND = 2
    +

    Wait until (*addr & value) != 0.

    +
    + +
    +
    +CU_STREAM_WAIT_VALUE_NOR = 3
    +

    Wait until ~(*addr | value) != 0. Support for this operation can be queried with cuDeviceGetAttribute() and CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR.

    +
    + +
    +
    +CU_STREAM_WAIT_VALUE_FLUSH = 1073741824
    +

    Follow the wait operation with a flush of outstanding remote writes. This means that, if a remote write operation is guaranteed to have reached the device before the wait can be satisfied, that write is guaranteed to be visible to downstream device work. The device is permitted to reorder remote writes internally. For example, this flag would be required if two remote writes arrive in a defined order, the wait is satisfied by the second write, and downstream work needs to observe the first write. Support for this operation is restricted to selected platforms and can be queried with CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamWriteValue_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for cuStreamWriteValue32

    +
    +
    +CU_STREAM_WRITE_VALUE_DEFAULT = 0
    +

    Default behavior

    +
    + +
    +
    +CU_STREAM_WRITE_VALUE_NO_MEMORY_BARRIER = 1
    +

    Permits the write to be reordered with writes which were issued before it, as a performance optimization. Normally, cuStreamWriteValue32 will provide a memory fence before the write, which has similar semantics to __threadfence_system() but is scoped to the stream rather than a CUDA thread. This flag is not supported in the v2 API.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamBatchMemOpType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Operations for cuStreamBatchMemOp

    +
    +
    +CU_STREAM_MEM_OP_WAIT_VALUE_32 = 1
    +

    Represents a cuStreamWaitValue32 operation

    +
    + +
    +
    +CU_STREAM_MEM_OP_WRITE_VALUE_32 = 2
    +

    Represents a cuStreamWriteValue32 operation

    +
    + +
    +
    +CU_STREAM_MEM_OP_WAIT_VALUE_64 = 4
    +

    Represents a cuStreamWaitValue64 operation

    +
    + +
    +
    +CU_STREAM_MEM_OP_WRITE_VALUE_64 = 5
    +

    Represents a cuStreamWriteValue64 operation

    +
    + +
    +
    +CU_STREAM_MEM_OP_BARRIER = 6
    +

    Insert a memory barrier of the specified type

    +
    + +
    +
    +CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES = 3
    +

    This has the same effect as CU_STREAM_WAIT_VALUE_FLUSH, but as a standalone operation.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamMemoryBarrier_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for cuStreamMemoryBarrier

    +
    +
    +CU_STREAM_MEMORY_BARRIER_TYPE_SYS = 0
    +

    System-wide memory barrier.

    +
    + +
    +
    +CU_STREAM_MEMORY_BARRIER_TYPE_GPU = 1
    +

    Limit memory barrier scope to the GPU.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUoccupancy_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Occupancy calculator flag

    +
    +
    +CU_OCCUPANCY_DEFAULT = 0
    +

    Default behavior

    +
    + +
    +
    +CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE = 1
    +

    Assume global caching is enabled and cannot be automatically turned off

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamUpdateCaptureDependencies_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for cuStreamUpdateCaptureDependencies

    +
    +
    +CU_STREAM_ADD_CAPTURE_DEPENDENCIES = 0
    +

    Add new nodes to the dependency set

    +
    + +
    +
    +CU_STREAM_SET_CAPTURE_DEPENDENCIES = 1
    +

    Replace the dependency set with the new nodes

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUasyncNotificationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Types of async notification that can be sent

    +
    +
    +CU_ASYNC_NOTIFICATION_TYPE_OVER_BUDGET = 1
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUarray_format(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Array formats

    +
    +
    +CU_AD_FORMAT_UNSIGNED_INT8 = 1
    +

    Unsigned 8-bit integers

    +
    + +
    +
    +CU_AD_FORMAT_UNSIGNED_INT16 = 2
    +

    Unsigned 16-bit integers

    +
    + +
    +
    +CU_AD_FORMAT_UNSIGNED_INT32 = 3
    +

    Unsigned 32-bit integers

    +
    + +
    +
    +CU_AD_FORMAT_SIGNED_INT8 = 8
    +

    Signed 8-bit integers

    +
    + +
    +
    +CU_AD_FORMAT_SIGNED_INT16 = 9
    +

    Signed 16-bit integers

    +
    + +
    +
    +CU_AD_FORMAT_SIGNED_INT32 = 10
    +

    Signed 32-bit integers

    +
    + +
    +
    +CU_AD_FORMAT_HALF = 16
    +

    16-bit floating point

    +
    + +
    +
    +CU_AD_FORMAT_FLOAT = 32
    +

    32-bit floating point

    +
    + +
    +
    +CU_AD_FORMAT_NV12 = 176
    +

    8-bit YUV planar format, with 4:2:0 sampling

    +
    + +
    +
    +CU_AD_FORMAT_UNORM_INT8X1 = 192
    +

    1 channel unsigned 8-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_UNORM_INT8X2 = 193
    +

    2 channel unsigned 8-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_UNORM_INT8X4 = 194
    +

    4 channel unsigned 8-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_UNORM_INT16X1 = 195
    +

    1 channel unsigned 16-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_UNORM_INT16X2 = 196
    +

    2 channel unsigned 16-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_UNORM_INT16X4 = 197
    +

    4 channel unsigned 16-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_SNORM_INT8X1 = 198
    +

    1 channel signed 8-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_SNORM_INT8X2 = 199
    +

    2 channel signed 8-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_SNORM_INT8X4 = 200
    +

    4 channel signed 8-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_SNORM_INT16X1 = 201
    +

    1 channel signed 16-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_SNORM_INT16X2 = 202
    +

    2 channel signed 16-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_SNORM_INT16X4 = 203
    +

    4 channel signed 16-bit normalized integer

    +
    + +
    +
    +CU_AD_FORMAT_BC1_UNORM = 145
    +

    4 channel unsigned normalized block-compressed (BC1 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC1_UNORM_SRGB = 146
    +

    4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding

    +
    + +
    +
    +CU_AD_FORMAT_BC2_UNORM = 147
    +

    4 channel unsigned normalized block-compressed (BC2 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC2_UNORM_SRGB = 148
    +

    4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding

    +
    + +
    +
    +CU_AD_FORMAT_BC3_UNORM = 149
    +

    4 channel unsigned normalized block-compressed (BC3 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC3_UNORM_SRGB = 150
    +

    4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding

    +
    + +
    +
    +CU_AD_FORMAT_BC4_UNORM = 151
    +

    1 channel unsigned normalized block-compressed (BC4 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC4_SNORM = 152
    +

    1 channel signed normalized block-compressed (BC4 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC5_UNORM = 153
    +

    2 channel unsigned normalized block-compressed (BC5 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC5_SNORM = 154
    +

    2 channel signed normalized block-compressed (BC5 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC6H_UF16 = 155
    +

    3 channel unsigned half-float block-compressed (BC6H compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC6H_SF16 = 156
    +

    3 channel signed half-float block-compressed (BC6H compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC7_UNORM = 157
    +

    4 channel unsigned normalized block-compressed (BC7 compression) format

    +
    + +
    +
    +CU_AD_FORMAT_BC7_UNORM_SRGB = 158
    +

    4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding

    +
    + +
    +
    +CU_AD_FORMAT_P010 = 159
    +

    10-bit YUV planar format, with 4:2:0 sampling

    +
    + +
    +
    +CU_AD_FORMAT_P016 = 161
    +

    16-bit YUV planar format, with 4:2:0 sampling

    +
    + +
    +
    +CU_AD_FORMAT_NV16 = 162
    +

    8-bit YUV planar format, with 4:2:2 sampling

    +
    + +
    +
    +CU_AD_FORMAT_P210 = 163
    +

    10-bit YUV planar format, with 4:2:2 sampling

    +
    + +
    +
    +CU_AD_FORMAT_P216 = 164
    +

    16-bit YUV planar format, with 4:2:2 sampling

    +
    + +
    +
    +CU_AD_FORMAT_YUY2 = 165
    +

    2 channel, 8-bit YUV packed planar format, with 4:2:2 sampling

    +
    + +
    +
    +CU_AD_FORMAT_Y210 = 166
    +

    2 channel, 10-bit YUV packed planar format, with 4:2:2 sampling

    +
    + +
    +
    +CU_AD_FORMAT_Y216 = 167
    +

    2 channel, 16-bit YUV packed planar format, with 4:2:2 sampling

    +
    + +
    +
    +CU_AD_FORMAT_AYUV = 168
    +

    4 channel, 8-bit YUV packed planar format, with 4:4:4 sampling

    +
    + +
    +
    +CU_AD_FORMAT_Y410 = 169
    +

    10-bit YUV packed planar format, with 4:4:4 sampling

    +
    + +
    +
    +CU_AD_FORMAT_Y416 = 177
    +

    4 channel, 12-bit YUV packed planar format, with 4:4:4 sampling

    +
    + +
    +
    +CU_AD_FORMAT_Y444_PLANAR8 = 178
    +

    3 channel 8-bit YUV planar format, with 4:4:4 sampling

    +
    + +
    +
    +CU_AD_FORMAT_Y444_PLANAR10 = 179
    +

    3 channel 10-bit YUV planar format, with 4:4:4 sampling

    +
    + +
    +
    +CU_AD_FORMAT_MAX = 2147483647
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUaddress_mode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Texture reference addressing modes

    +
    +
    +CU_TR_ADDRESS_MODE_WRAP = 0
    +

    Wrapping address mode

    +
    + +
    +
    +CU_TR_ADDRESS_MODE_CLAMP = 1
    +

    Clamp to edge address mode

    +
    + +
    +
    +CU_TR_ADDRESS_MODE_MIRROR = 2
    +

    Mirror address mode

    +
    + +
    +
    +CU_TR_ADDRESS_MODE_BORDER = 3
    +

    Border address mode

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUfilter_mode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Texture reference filtering modes

    +
    +
    +CU_TR_FILTER_MODE_POINT = 0
    +

    Point filter mode

    +
    + +
    +
    +CU_TR_FILTER_MODE_LINEAR = 1
    +

    Linear filter mode

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevice_attribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Device properties

    +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 1
    +

    Maximum number of threads per block

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X = 2
    +

    Maximum block dimension X

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y = 3
    +

    Maximum block dimension Y

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z = 4
    +

    Maximum block dimension Z

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X = 5
    +

    Maximum grid dimension X

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y = 6
    +

    Maximum grid dimension Y

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z = 7
    +

    Maximum grid dimension Z

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK = 8
    +

    Maximum shared memory available per block in bytes

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK = 8
    +

    Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY = 9
    +

    Memory available on device for constant variables in a CUDA C kernel in bytes

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_WARP_SIZE = 10
    +

    Warp size in threads

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_PITCH = 11
    +

    Maximum pitch in bytes allowed by memory copies

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK = 12
    +

    Maximum number of 32-bit registers available per block

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK = 12
    +

    Deprecated, use CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CLOCK_RATE = 13
    +

    Typical clock frequency in kilohertz

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT = 14
    +

    Alignment requirement for textures

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GPU_OVERLAP = 15
    +

    Device can possibly copy memory and execute a kernel concurrently. Deprecated. Use instead CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT = 16
    +

    Number of multiprocessors on device

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT = 17
    +

    Specifies whether there is a run time limit on kernels

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_INTEGRATED = 18
    +

    Device is integrated with host memory

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY = 19
    +

    Device can map host memory into CUDA address space

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_COMPUTE_MODE = 20
    +

    Compute mode (See CUcomputemode for details)

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH = 21
    +

    Maximum 1D texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_WIDTH = 22
    +

    Maximum 2D texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_HEIGHT = 23
    +

    Maximum 2D texture height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH = 24
    +

    Maximum 3D texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT = 25
    +

    Maximum 3D texture height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH = 26
    +

    Maximum 3D texture depth

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH = 27
    +

    Maximum 2D layered texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT = 28
    +

    Maximum 2D layered texture height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS = 29
    +

    Maximum layers in a 2D layered texture

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_WIDTH = 27
    +

    Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_WIDTH

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_HEIGHT = 28
    +

    Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_HEIGHT

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_ARRAY_NUMSLICES = 29
    +

    Deprecated, use CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LAYERED_LAYERS

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_SURFACE_ALIGNMENT = 30
    +

    Alignment requirement for surfaces

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS = 31
    +

    Device can possibly execute multiple kernels concurrently

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_ECC_ENABLED = 32
    +

    Device has ECC support enabled

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_PCI_BUS_ID = 33
    +

    PCI bus ID of the device

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_PCI_DEVICE_ID = 34
    +

    PCI device ID of the device

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_TCC_DRIVER = 35
    +

    Device is using TCC driver model

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MEMORY_CLOCK_RATE = 36
    +

    Peak memory clock frequency in kilohertz

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GLOBAL_MEMORY_BUS_WIDTH = 37
    +

    Global memory bus width in bits

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_L2_CACHE_SIZE = 38
    +

    Size of L2 cache in bytes

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_MULTIPROCESSOR = 39
    +

    Maximum resident threads per multiprocessor

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT = 40
    +

    Number of asynchronous engines

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING = 41
    +

    Device shares a unified address space with the host

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_WIDTH = 42
    +

    Maximum 1D layered texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LAYERED_LAYERS = 43
    +

    Maximum layers in a 1D layered texture

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_TEX2D_GATHER = 44
    +

    Deprecated, do not use.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH = 45
    +

    Maximum 2D texture width if CUDA_ARRAY3D_TEXTURE_GATHER is set

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT = 46
    +

    Maximum 2D texture height if CUDA_ARRAY3D_TEXTURE_GATHER is set

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_WIDTH_ALTERNATE = 47
    +

    Alternate maximum 3D texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_HEIGHT_ALTERNATE = 48
    +

    Alternate maximum 3D texture height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE3D_DEPTH_ALTERNATE = 49
    +

    Alternate maximum 3D texture depth

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_PCI_DOMAIN_ID = 50
    +

    PCI domain ID of the device

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT = 51
    +

    Pitch alignment requirement for textures

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_WIDTH = 52
    +

    Maximum cubemap texture width/height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_WIDTH = 53
    +

    Maximum cubemap layered texture width/height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURECUBEMAP_LAYERED_LAYERS = 54
    +

    Maximum layers in a cubemap layered texture

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_WIDTH = 55
    +

    Maximum 1D surface width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_WIDTH = 56
    +

    Maximum 2D surface width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_HEIGHT = 57
    +

    Maximum 2D surface height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_WIDTH = 58
    +

    Maximum 3D surface width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_HEIGHT = 59
    +

    Maximum 3D surface height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE3D_DEPTH = 60
    +

    Maximum 3D surface depth

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_WIDTH = 61
    +

    Maximum 1D layered surface width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE1D_LAYERED_LAYERS = 62
    +

    Maximum layers in a 1D layered surface

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_WIDTH = 63
    +

    Maximum 2D layered surface width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_HEIGHT = 64
    +

    Maximum 2D layered surface height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACE2D_LAYERED_LAYERS = 65
    +

    Maximum layers in a 2D layered surface

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_WIDTH = 66
    +

    Maximum cubemap surface width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_WIDTH = 67
    +

    Maximum cubemap layered surface width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_SURFACECUBEMAP_LAYERED_LAYERS = 68
    +

    Maximum layers in a cubemap layered surface

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH = 69
    +

    Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() or cuDeviceGetTexture1DLinearMaxWidth() instead.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH = 70
    +

    Maximum 2D linear texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT = 71
    +

    Maximum 2D linear texture height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH = 72
    +

    Maximum 2D linear texture pitch in bytes

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_WIDTH = 73
    +

    Maximum mipmapped 2D texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_MIPMAPPED_HEIGHT = 74
    +

    Maximum mipmapped 2D texture height

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75
    +

    Major compute capability version number

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76
    +

    Minor compute capability version number

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH = 77
    +

    Maximum mipmapped 1D texture width

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_STREAM_PRIORITIES_SUPPORTED = 78
    +

    Device supports stream priorities

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GLOBAL_L1_CACHE_SUPPORTED = 79
    +

    Device supports caching globals in L1

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_LOCAL_L1_CACHE_SUPPORTED = 80
    +

    Device supports caching locals in L1

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_MULTIPROCESSOR = 81
    +

    Maximum shared memory available per multiprocessor in bytes

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_MULTIPROCESSOR = 82
    +

    Maximum number of 32-bit registers available per multiprocessor

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY = 83
    +

    Device can allocate managed memory on this system

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD = 84
    +

    Device is on a multi-GPU board

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MULTI_GPU_BOARD_GROUP_ID = 85
    +

    Unique id for a group of devices on the same multi-GPU board

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_HOST_NATIVE_ATOMIC_SUPPORTED = 86
    +

    Link between the device and the host supports native atomic operations (this is a placeholder attribute, and is not supported on any current hardware)

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_SINGLE_TO_DOUBLE_PRECISION_PERF_RATIO = 87
    +

    Ratio of single precision performance (in floating-point operations per second) to double precision performance

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS = 88
    +

    Device supports coherently accessing pageable memory without calling cudaHostRegister on it

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS = 89
    +

    Device can coherently access managed memory concurrently with the CPU

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_COMPUTE_PREEMPTION_SUPPORTED = 90
    +

    Device supports compute preemption.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM = 91
    +

    Device can access host registered memory at the same virtual address as the CPU

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_MEM_OPS_V1 = 92
    +

    Deprecated, along with v1 MemOps API, cuStreamBatchMemOp and related APIs are supported.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS_V1 = 93
    +

    Deprecated, along with v1 MemOps API, 64-bit operations are supported in cuStreamBatchMemOp and related APIs.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V1 = 94
    +

    Deprecated, along with v1 MemOps API, CU_STREAM_WAIT_VALUE_NOR is supported.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH = 95
    +

    Device supports launching cooperative kernels via cuLaunchCooperativeKernel

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH = 96
    +

    Deprecated, cuLaunchCooperativeKernelMultiDevice is deprecated.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK_OPTIN = 97
    +

    Maximum optin shared memory per block

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES = 98
    +

    The CU_STREAM_WAIT_VALUE_FLUSH flag and the CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the device. See Stream Memory Operations for additional details.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_HOST_REGISTER_SUPPORTED = 99
    +

    Device supports host memory registration via cudaHostRegister.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES = 100
    +

    Device accesses pageable memory via the host’s page tables.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_DIRECT_MANAGED_MEM_ACCESS_FROM_HOST = 101
    +

    The host can directly access managed memory on the device without migration.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_VIRTUAL_ADDRESS_MANAGEMENT_SUPPORTED = 102
    +

    Deprecated, Use CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_VIRTUAL_MEMORY_MANAGEMENT_SUPPORTED = 102
    +

    Device supports virtual memory management APIs like cuMemAddressReserve, cuMemCreate, cuMemMap and related APIs

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR_SUPPORTED = 103
    +

    Device supports exporting memory to a posix file descriptor with cuMemExportToShareableHandle, if requested via cuMemCreate

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_HANDLE_SUPPORTED = 104
    +

    Device supports exporting memory to a Win32 NT handle with cuMemExportToShareableHandle, if requested via cuMemCreate

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_WIN32_KMT_HANDLE_SUPPORTED = 105
    +

    Device supports exporting memory to a Win32 KMT handle with cuMemExportToShareableHandle, if requested via cuMemCreate

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_BLOCKS_PER_MULTIPROCESSOR = 106
    +

    Maximum number of blocks per multiprocessor

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GENERIC_COMPRESSION_SUPPORTED = 107
    +

    Device supports compression of memory

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_PERSISTING_L2_CACHE_SIZE = 108
    +

    Maximum L2 persisting lines capacity setting in bytes.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE = 109
    +

    Maximum value of num_bytes.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WITH_CUDA_VMM_SUPPORTED = 110
    +

    Device supports specifying the GPUDirect RDMA flag with cuMemCreate

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_RESERVED_SHARED_MEMORY_PER_BLOCK = 111
    +

    Shared memory reserved by CUDA driver per block in bytes

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_SPARSE_CUDA_ARRAY_SUPPORTED = 112
    +

    Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED = 113
    +

    Device supports using the cuMemHostRegister flag CU_MEMHOSTERGISTER_READ_ONLY to register memory that must be mapped as read-only to the GPU

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_TIMELINE_SEMAPHORE_INTEROP_SUPPORTED = 114
    +

    External timeline semaphore interop is supported on the device

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED = 115
    +

    Device supports using the cuMemAllocAsync and cuMemPool family of APIs

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_SUPPORTED = 116
    +

    Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS = 117
    +

    The returned attribute shall be interpreted as a bitmask, where the individual bits are described by the CUflushGPUDirectRDMAWritesOptions enum

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING = 118
    +

    GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See CUGPUDirectRDMAWritesOrdering for the numerical values returned here.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MEMPOOL_SUPPORTED_HANDLE_TYPES = 119
    +

    Handle types supported with mempool based IPC

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CLUSTER_LAUNCH = 120
    +

    Indicates device supports cluster launch

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_DEFERRED_MAPPING_CUDA_ARRAY_SUPPORTED = 121
    +

    Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS = 122
    +

    64-bit operations are supported in cuStreamBatchMemOp and related MemOp APIs.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR = 123
    +

    CU_STREAM_WAIT_VALUE_NOR is supported by MemOp APIs.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED = 124
    +

    Device supports buffer sharing with dma_buf mechanism.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED = 125
    +

    Device supports IPC Events.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT = 126
    +

    Number of memory domains the device supports.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_TENSOR_MAP_ACCESS_SUPPORTED = 127
    +

    Device supports accessing memory using Tensor Map.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_HANDLE_TYPE_FABRIC_SUPPORTED = 128
    +

    Device supports exporting memory to a fabric handle with cuMemExportToShareableHandle() or requested with cuMemCreate()

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS = 129
    +

    Device supports unified function pointers.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_NUMA_CONFIG = 130
    +

    NUMA configuration of a device: value is of type CUdeviceNumaConfig enum

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_NUMA_ID = 131
    +

    NUMA node ID of the GPU memory

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED = 132
    +

    Device supports switch multicast and reduction operations.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MPS_ENABLED = 133
    +

    Indicates if contexts created on this device will be shared via MPS

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_HOST_NUMA_ID = 134
    +

    NUMA ID of the host node closest to the device. Returns -1 when system does not support NUMA.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED = 135
    +

    Device supports CIG with D3D12.

    +
    + +
    +
    +CU_DEVICE_ATTRIBUTE_MAX = 136
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUpointer_attribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Pointer information

    +
    +
    +CU_POINTER_ATTRIBUTE_CONTEXT = 1
    +

    The CUcontext on which a pointer was allocated or registered

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_MEMORY_TYPE = 2
    +

    The CUmemorytype describing the physical location of a pointer

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_DEVICE_POINTER = 3
    +

    The address at which a pointer’s memory may be accessed on the device

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_HOST_POINTER = 4
    +

    The address at which a pointer’s memory may be accessed on the host

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_P2P_TOKENS = 5
    +

    A pair of tokens for use with the nv-p2p.h Linux kernel interface

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_SYNC_MEMOPS = 6
    +

    Synchronize every synchronous memory operation initiated on this region

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_BUFFER_ID = 7
    +

    A process-wide unique ID for an allocated memory region

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_IS_MANAGED = 8
    +

    Indicates if the pointer points to managed memory

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL = 9
    +

    A device ordinal of a device on which a pointer was allocated or registered

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE = 10
    +

    1 if this pointer maps to an allocation that is suitable for cudaIpcGetMemHandle, 0 otherwise

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_RANGE_START_ADDR = 11
    +

    Starting address for this requested pointer

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_RANGE_SIZE = 12
    +

    Size of the address range for this requested pointer

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_MAPPED = 13
    +

    1 if this pointer is in a valid address range that is mapped to a backing allocation, 0 otherwise

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES = 14
    +

    Bitmask of allowed CUmemAllocationHandleType for this allocation

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_IS_GPU_DIRECT_RDMA_CAPABLE = 15
    +

    1 if the memory this pointer is referencing can be used with the GPUDirect RDMA API

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_ACCESS_FLAGS = 16
    +

    Returns the access flags the device associated with the current context has on the corresponding memory referenced by the pointer given

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE = 17
    +

    Returns the mempool handle for the allocation if it was allocated from a mempool. Otherwise returns NULL.

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_MAPPING_SIZE = 18
    +

    Size of the actual underlying mapping that the pointer belongs to

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_MAPPING_BASE_ADDR = 19
    +

    The start address of the mapping that the pointer belongs to

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_MEMORY_BLOCK_ID = 20
    +

    A process-wide unique id corresponding to the physical allocation the pointer belongs to

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUfunction_attribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Function properties

    +
    +
    +CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK = 0
    +

    The maximum number of threads per block, beyond which a launch of the function would fail. This number depends on both the function and the device on which the function is currently loaded.

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES = 1
    +

    The size in bytes of statically-allocated shared memory required by this function. This does not include dynamically-allocated shared memory requested by the user at runtime.

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES = 2
    +

    The size in bytes of user-allocated constant memory required by this function.

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES = 3
    +

    The size in bytes of local memory used by each thread of this function.

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_NUM_REGS = 4
    +

    The number of registers used by each thread of this function.

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_PTX_VERSION = 5
    +

    The PTX virtual architecture version for which the function was compiled. This value is the major PTX version * 10 + the minor PTX version, so a PTX version 1.3 function would return the value 13. Note that this may return the undefined value of 0 for cubins compiled prior to CUDA 3.0.

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_BINARY_VERSION = 6
    +

    The binary architecture version for which the function was compiled. This value is the major binary version * 10 + the minor binary version, so a binary version 1.3 function would return the value 13. Note that this will return a value of 10 for legacy cubins that do not have a properly-encoded binary architecture version.

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_CACHE_MODE_CA = 7
    +

    The attribute to indicate whether the function has been compiled with user specified option “-Xptxas –dlcm=ca” set .

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES = 8
    +

    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. See cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 9
    +

    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 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 cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET = 10
    +

    If this attribute is set, the kernel must launch with a valid cluster size specified. See cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH = 11
    +

    The required cluster width in blocks. The values must 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 will return CUDA_ERROR_NOT_PERMITTED. See cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT = 12
    +

    The required cluster height in blocks. The values must 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 CUDA_ERROR_NOT_PERMITTED. See cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH = 13
    +

    The required cluster depth in blocks. The values must 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 CUDA_ERROR_NOT_PERMITTED. See cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED = 14
    +

    Whether the function can be launched with non-portable cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster size may only function on the specific SKUs the program is tested on. The launch might fail if the program is run on a different hardware platform.

    +

    CUDA API provides cudaOccupancyMaxActiveClusters to assist with checking whether the desired size can be launched on the current device.

    +

    Portable Cluster Size

    +

    A portable cluster size is guaranteed to be functional on all compute capabilities higher 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 cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 15
    +

    The block scheduling policy of a function. The value type is CUclusterSchedulingPolicy / cudaClusterSchedulingPolicy. See cuFuncSetAttribute, cuKernelSetAttribute

    +
    + +
    +
    +CU_FUNC_ATTRIBUTE_MAX = 16
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUfunc_cache(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Function cache configurations

    +
    +
    +CU_FUNC_CACHE_PREFER_NONE = 0
    +

    no preference for shared memory or L1 (default)

    +
    + +
    +
    +CU_FUNC_CACHE_PREFER_SHARED = 1
    +

    prefer larger shared memory and smaller L1 cache

    +
    + +
    +
    +CU_FUNC_CACHE_PREFER_L1 = 2
    +

    prefer larger L1 cache and smaller shared memory

    +
    + +
    +
    +CU_FUNC_CACHE_PREFER_EQUAL = 3
    +

    prefer equal sized L1 cache and shared memory

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUsharedconfig(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    [Deprecated] Shared memory configurations

    +
    +
    +CU_SHARED_MEM_CONFIG_DEFAULT_BANK_SIZE = 0
    +

    set default shared memory bank size

    +
    + +
    +
    +CU_SHARED_MEM_CONFIG_FOUR_BYTE_BANK_SIZE = 1
    +

    set shared memory bank width to four bytes

    +
    + +
    +
    +CU_SHARED_MEM_CONFIG_EIGHT_BYTE_BANK_SIZE = 2
    +

    set shared memory bank width to eight bytes

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUshared_carveout(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Shared memory carveout configurations. These may be passed to +cuFuncSetAttribute or cuKernelSetAttribute

    +
    +
    +CU_SHAREDMEM_CARVEOUT_DEFAULT = -1
    +

    No preference for shared memory or L1 (default)

    +
    + +
    +
    +CU_SHAREDMEM_CARVEOUT_MAX_SHARED = 100
    +

    Prefer maximum available shared memory, minimum L1 cache

    +
    + +
    +
    +CU_SHAREDMEM_CARVEOUT_MAX_L1 = 0
    +

    Prefer maximum available L1 cache, minimum shared memory

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemorytype(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Memory types

    +
    +
    +CU_MEMORYTYPE_HOST = 1
    +

    Host memory

    +
    + +
    +
    +CU_MEMORYTYPE_DEVICE = 2
    +

    Device memory

    +
    + +
    +
    +CU_MEMORYTYPE_ARRAY = 3
    +

    Array memory

    +
    + +
    +
    +CU_MEMORYTYPE_UNIFIED = 4
    +

    Unified device or host memory

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUcomputemode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Compute Modes

    +
    +
    +CU_COMPUTEMODE_DEFAULT = 0
    +

    Default compute mode (Multiple contexts allowed per device)

    +
    + +
    +
    +CU_COMPUTEMODE_PROHIBITED = 2
    +

    Compute-prohibited mode (No contexts can be created on this device at this time)

    +
    + +
    +
    +CU_COMPUTEMODE_EXCLUSIVE_PROCESS = 3
    +

    Compute-exclusive-process mode (Only one context used by a single process can be present on this device at a time)

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmem_advise(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Memory advise values

    +
    +
    +CU_MEM_ADVISE_SET_READ_MOSTLY = 1
    +

    Data will mostly be read and only occasionally be written to

    +
    + +
    +
    +CU_MEM_ADVISE_UNSET_READ_MOSTLY = 2
    +

    Undo the effect of CU_MEM_ADVISE_SET_READ_MOSTLY

    +
    + +
    +
    +CU_MEM_ADVISE_SET_PREFERRED_LOCATION = 3
    +

    Set the preferred location for the data as the specified device

    +
    + +
    +
    +CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION = 4
    +

    Clear the preferred location for the data

    +
    + +
    +
    +CU_MEM_ADVISE_SET_ACCESSED_BY = 5
    +

    Data will be accessed by the specified device, so prevent page faults as much as possible

    +
    + +
    +
    +CU_MEM_ADVISE_UNSET_ACCESSED_BY = 6
    +

    Let the Unified Memory subsystem decide on the page faulting policy for the specified device

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmem_range_attribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY = 1
    +

    Whether the range will mostly be read and only occasionally be written to

    +
    + +
    +
    +CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION = 2
    +

    The preferred location of the range

    +
    + +
    +
    +CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY = 3
    +

    Memory range has CU_MEM_ADVISE_SET_ACCESSED_BY set for specified device

    +
    + +
    +
    +CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION = 4
    +

    The last location to which the range was prefetched

    +
    + +
    +
    +CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE = 5
    +

    The preferred location type of the range

    +
    + +
    +
    +CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_ID = 6
    +

    The preferred location id of the range

    +
    + +
    +
    +CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE = 7
    +

    The last location type to which the range was prefetched

    +
    + +
    +
    +CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_ID = 8
    +

    The last location id to which the range was prefetched

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUjit_option(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Online compiler and linker options

    +
    +
    +CU_JIT_MAX_REGISTERS = 0
    +

    Max number of registers that a thread may use.

    +

    Option type: unsigned int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_THREADS_PER_BLOCK = 1
    +

    IN: Specifies minimum number of threads per block to target compilation for

    +

    OUT: Returns the number of threads the compiler actually targeted. This restricts the resource utilization of the compiler (e.g. max registers) such that a block with the given number of threads should be able to launch based on register limitations. Note, this option does not currently take into account any other resource limitations, such as shared memory utilization.

    +

    Cannot be combined with CU_JIT_TARGET.

    +

    Option type: unsigned int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_WALL_TIME = 2
    +

    Overwrites the option value with the total wall clock time, in milliseconds, spent in the compiler and linker

    +

    Option type: float

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_INFO_LOG_BUFFER = 3
    +

    Pointer to a buffer in which to print any log messages that are informational in nature (the buffer size is specified via option CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES)

    +

    Option type: char *

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES = 4
    +

    IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator)

    +

    OUT: Amount of log buffer filled with messages

    +

    Option type: unsigned int

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_ERROR_LOG_BUFFER = 5
    +

    Pointer to a buffer in which to print any log messages that reflect errors (the buffer size is specified via option CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES)

    +

    Option type: char *

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES = 6
    +

    IN: Log buffer size in bytes. Log messages will be capped at this size (including null terminator)

    +

    OUT: Amount of log buffer filled with messages

    +

    Option type: unsigned int

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_OPTIMIZATION_LEVEL = 7
    +

    Level of optimizations to apply to generated code (0 - 4), with 4 being the default and highest level of optimizations.

    +

    Option type: unsigned int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_TARGET_FROM_CUCONTEXT = 8
    +

    No option value required. Determines the target based on the current attached context (default)

    +

    Option type: No option value needed

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_TARGET = 9
    +

    Target is chosen based on supplied CUjit_target. Cannot be combined with CU_JIT_THREADS_PER_BLOCK.

    +

    Option type: unsigned int for enumerated type CUjit_target

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_FALLBACK_STRATEGY = 10
    +

    Specifies choice of fallback strategy if matching cubin is not found. Choice is based on supplied CUjit_fallback. This option cannot be used with cuLink* APIs as the linker requires exact matches.

    +

    Option type: unsigned int for enumerated type CUjit_fallback

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_GENERATE_DEBUG_INFO = 11
    +

    Specifies whether to create debug information in output (-g) (0: false, default)

    +

    Option type: int

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_LOG_VERBOSE = 12
    +

    Generate verbose log messages (0: false, default)

    +

    Option type: int

    +

    Applies to: compiler and linker

    +
    + +
    +
    +CU_JIT_GENERATE_LINE_INFO = 13
    +

    Generate line number information (-lineinfo) (0: false, default)

    +

    Option type: int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_CACHE_MODE = 14
    +

    Specifies whether to enable caching explicitly (-dlcm)

    +

    Choice is based on supplied CUjit_cacheMode_enum.

    +

    Option type: unsigned int for enumerated type CUjit_cacheMode_enum

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_NEW_SM3X_OPT = 15
    +

    [Deprecated]

    +
    + +
    +
    +CU_JIT_FAST_COMPILE = 16
    +

    This jit option is used for internal purpose only.

    +
    + +
    +
    +CU_JIT_GLOBAL_SYMBOL_NAMES = 17
    +

    Array of device symbol names that will be relocated to the corresponding host addresses stored in CU_JIT_GLOBAL_SYMBOL_ADDRESSES.

    +

    Must contain CU_JIT_GLOBAL_SYMBOL_COUNT entries.

    +

    When loading a device module, driver will relocate all encountered unresolved symbols to the host addresses.

    +

    It is only allowed to register symbols that correspond to unresolved global variables.

    +

    It is illegal to register the same device symbol at multiple addresses.

    +

    Option type: const char **

    +

    Applies to: dynamic linker only

    +
    + +
    +
    +CU_JIT_GLOBAL_SYMBOL_ADDRESSES = 18
    +

    Array of host addresses that will be used to relocate corresponding device symbols stored in CU_JIT_GLOBAL_SYMBOL_NAMES.

    +

    Must contain CU_JIT_GLOBAL_SYMBOL_COUNT entries.

    +

    Option type: void **

    +

    Applies to: dynamic linker only

    +
    + +
    +
    +CU_JIT_GLOBAL_SYMBOL_COUNT = 19
    +

    Number of entries in CU_JIT_GLOBAL_SYMBOL_NAMES and CU_JIT_GLOBAL_SYMBOL_ADDRESSES arrays.

    +

    Option type: unsigned int

    +

    Applies to: dynamic linker only

    +
    + +
    +
    +CU_JIT_LTO = 20
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_FTZ = 21
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_PREC_DIV = 22
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_PREC_SQRT = 23
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_FMA = 24
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_REFERENCED_KERNEL_NAMES = 25
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_REFERENCED_KERNEL_COUNT = 26
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_REFERENCED_VARIABLE_NAMES = 27
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_REFERENCED_VARIABLE_COUNT = 28
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_OPTIMIZE_UNUSED_DEVICE_VARIABLES = 29
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_POSITION_INDEPENDENT_CODE = 30
    +

    Generate position independent code (0: false)

    +

    Option type: int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_MIN_CTA_PER_SM = 31
    +

    This option hints to the JIT compiler the minimum number of CTAs from the kernel’s grid to be mapped to a SM. This option is ignored when used together with CU_JIT_MAX_REGISTERS or CU_JIT_THREADS_PER_BLOCK. Optimizations based on this option need CU_JIT_MAX_THREADS_PER_BLOCK to be specified as well. For kernels already using PTX directive .minnctapersm, this option will be ignored by default. Use CU_JIT_OVERRIDE_DIRECTIVE_VALUES to let this option take precedence over the PTX directive. Option type: unsigned int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_MAX_THREADS_PER_BLOCK = 32
    +

    Maximum number threads in a thread block, computed as the product of the maximum extent specifed for each dimension of the block. This limit is guaranteed not to be exeeded in any invocation of the kernel. Exceeding the the maximum number of threads results in runtime error or kernel launch failure. For kernels already using PTX directive .maxntid, this option will be ignored by default. Use CU_JIT_OVERRIDE_DIRECTIVE_VALUES to let this option take precedence over the PTX directive. Option type: int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_OVERRIDE_DIRECTIVE_VALUES = 33
    +

    This option lets the values specified using CU_JIT_MAX_REGISTERS, CU_JIT_THREADS_PER_BLOCK, CU_JIT_MAX_THREADS_PER_BLOCK and CU_JIT_MIN_CTA_PER_SM take precedence over any PTX directives. (0: Disable, default; 1: Enable) Option type: int

    +

    Applies to: compiler only

    +
    + +
    +
    +CU_JIT_NUM_OPTIONS = 34
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUjit_target(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Online compilation targets

    +
    +
    +CU_TARGET_COMPUTE_30 = 30
    +

    Compute device class 3.0

    +
    + +
    +
    +CU_TARGET_COMPUTE_32 = 32
    +

    Compute device class 3.2

    +
    + +
    +
    +CU_TARGET_COMPUTE_35 = 35
    +

    Compute device class 3.5

    +
    + +
    +
    +CU_TARGET_COMPUTE_37 = 37
    +

    Compute device class 3.7

    +
    + +
    +
    +CU_TARGET_COMPUTE_50 = 50
    +

    Compute device class 5.0

    +
    + +
    +
    +CU_TARGET_COMPUTE_52 = 52
    +

    Compute device class 5.2

    +
    + +
    +
    +CU_TARGET_COMPUTE_53 = 53
    +

    Compute device class 5.3

    +
    + +
    +
    +CU_TARGET_COMPUTE_60 = 60
    +

    Compute device class 6.0.

    +
    + +
    +
    +CU_TARGET_COMPUTE_61 = 61
    +

    Compute device class 6.1.

    +
    + +
    +
    +CU_TARGET_COMPUTE_62 = 62
    +

    Compute device class 6.2.

    +
    + +
    +
    +CU_TARGET_COMPUTE_70 = 70
    +

    Compute device class 7.0.

    +
    + +
    +
    +CU_TARGET_COMPUTE_72 = 72
    +

    Compute device class 7.2.

    +
    + +
    +
    +CU_TARGET_COMPUTE_75 = 75
    +

    Compute device class 7.5.

    +
    + +
    +
    +CU_TARGET_COMPUTE_80 = 80
    +

    Compute device class 8.0.

    +
    + +
    +
    +CU_TARGET_COMPUTE_86 = 86
    +

    Compute device class 8.6.

    +
    + +
    +
    +CU_TARGET_COMPUTE_87 = 87
    +

    Compute device class 8.7.

    +
    + +
    +
    +CU_TARGET_COMPUTE_89 = 89
    +

    Compute device class 8.9.

    +
    + +
    +
    +CU_TARGET_COMPUTE_90 = 90
    +

    Compute device class 9.0. Compute device class 9.0. with accelerated features.

    +
    + +
    +
    +CU_TARGET_COMPUTE_90A = 65626
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUjit_fallback(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Cubin matching fallback strategies

    +
    +
    +CU_PREFER_PTX = 0
    +

    Prefer to compile ptx if exact binary match not found

    +
    + +
    +
    +CU_PREFER_BINARY = 1
    +

    Prefer to fall back to compatible binary code if exact match not found

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUjit_cacheMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Caching modes for dlcm

    +
    +
    +CU_JIT_CACHE_OPTION_NONE = 0
    +

    Compile with no -dlcm flag specified

    +
    + +
    +
    +CU_JIT_CACHE_OPTION_CG = 1
    +

    Compile with L1 cache disabled

    +
    + +
    +
    +CU_JIT_CACHE_OPTION_CA = 2
    +

    Compile with L1 cache enabled

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUjitInputType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Device code formats

    +
    +
    +CU_JIT_INPUT_CUBIN = 0
    +

    Compiled device-class-specific device code

    +

    Applicable options: none

    +
    + +
    +
    +CU_JIT_INPUT_PTX = 1
    +

    PTX source code

    +

    Applicable options: PTX compiler options

    +
    + +
    +
    +CU_JIT_INPUT_FATBINARY = 2
    +

    Bundle of multiple cubins and/or PTX of some device code

    +

    Applicable options: PTX compiler options, CU_JIT_FALLBACK_STRATEGY

    +
    + +
    +
    +CU_JIT_INPUT_OBJECT = 3
    +

    Host object with embedded device code

    +

    Applicable options: PTX compiler options, CU_JIT_FALLBACK_STRATEGY

    +
    + +
    +
    +CU_JIT_INPUT_LIBRARY = 4
    +

    Archive of host objects with embedded device code

    +

    Applicable options: PTX compiler options, CU_JIT_FALLBACK_STRATEGY

    +
    + +
    +
    +CU_JIT_INPUT_NVVM = 5
    +

    [Deprecated]

    +

    Only valid with LTO-IR compiled with toolkits prior to CUDA 12.0

    +
    + +
    +
    +CU_JIT_NUM_INPUT_TYPES = 6
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphicsRegisterFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags to register a graphics resource

    +
    +
    +CU_GRAPHICS_REGISTER_FLAGS_NONE = 0
    +
    + +
    +
    +CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 1
    +
    + +
    +
    +CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 2
    +
    + +
    +
    +CU_GRAPHICS_REGISTER_FLAGS_SURFACE_LDST = 4
    +
    + +
    +
    +CU_GRAPHICS_REGISTER_FLAGS_TEXTURE_GATHER = 8
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphicsMapResourceFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for mapping and unmapping interop resources

    +
    +
    +CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0
    +
    + +
    +
    +CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 1
    +
    + +
    +
    +CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 2
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUarray_cubemap_face(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Array indices for cube faces

    +
    +
    +CU_CUBEMAP_FACE_POSITIVE_X = 0
    +

    Positive X face of cubemap

    +
    + +
    +
    +CU_CUBEMAP_FACE_NEGATIVE_X = 1
    +

    Negative X face of cubemap

    +
    + +
    +
    +CU_CUBEMAP_FACE_POSITIVE_Y = 2
    +

    Positive Y face of cubemap

    +
    + +
    +
    +CU_CUBEMAP_FACE_NEGATIVE_Y = 3
    +

    Negative Y face of cubemap

    +
    + +
    +
    +CU_CUBEMAP_FACE_POSITIVE_Z = 4
    +

    Positive Z face of cubemap

    +
    + +
    +
    +CU_CUBEMAP_FACE_NEGATIVE_Z = 5
    +

    Negative Z face of cubemap

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlimit(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Limits

    +
    +
    +CU_LIMIT_STACK_SIZE = 0
    +

    GPU thread stack size

    +
    + +
    +
    +CU_LIMIT_PRINTF_FIFO_SIZE = 1
    +

    GPU printf FIFO size

    +
    + +
    +
    +CU_LIMIT_MALLOC_HEAP_SIZE = 2
    +

    GPU malloc heap size

    +
    + +
    +
    +CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH = 3
    +

    GPU device runtime launch synchronize depth

    +
    + +
    +
    +CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT = 4
    +

    GPU device runtime pending launch count

    +
    + +
    +
    +CU_LIMIT_MAX_L2_FETCH_GRANULARITY = 5
    +

    A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint

    +
    + +
    +
    +CU_LIMIT_PERSISTING_L2_CACHE_SIZE = 6
    +

    A size in bytes for L2 persisting lines cache size

    +
    + +
    +
    +CU_LIMIT_SHMEM_SIZE = 7
    +

    A maximum size in bytes of shared memory available to CUDA kernels on a CIG context. Can only be queried, cannot be set

    +
    + +
    +
    +CU_LIMIT_CIG_ENABLED = 8
    +

    A non-zero value indicates this CUDA context is a CIG-enabled context. Can only be queried, cannot be set

    +
    + +
    +
    +CU_LIMIT_CIG_SHMEM_FALLBACK_ENABLED = 9
    +

    When set to a non-zero value, 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

    +
    + +
    +
    +CU_LIMIT_MAX = 10
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUresourcetype(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Resource types

    +
    +
    +CU_RESOURCE_TYPE_ARRAY = 0
    +

    Array resource

    +
    + +
    +
    +CU_RESOURCE_TYPE_MIPMAPPED_ARRAY = 1
    +

    Mipmapped array resource

    +
    + +
    +
    +CU_RESOURCE_TYPE_LINEAR = 2
    +

    Linear resource

    +
    + +
    +
    +CU_RESOURCE_TYPE_PITCH2D = 3
    +

    Pitch 2D resource

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUaccessProperty(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies performance hint with CUaccessPolicyWindow +for hitProp and missProp members.

    +
    +
    +CU_ACCESS_PROPERTY_NORMAL = 0
    +

    Normal cache persistence.

    +
    + +
    +
    +CU_ACCESS_PROPERTY_STREAMING = 1
    +

    Streaming access is less likely to persit from cache.

    +
    + +
    +
    +CU_ACCESS_PROPERTY_PERSISTING = 2
    +

    Persisting access is more likely to persist in cache.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphConditionalNodeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Conditional node types

    +
    +
    +CU_GRAPH_COND_TYPE_IF = 0
    +

    Conditional ‘if’ Node. Body executed once if condition value is non-zero.

    +
    + +
    +
    +CU_GRAPH_COND_TYPE_WHILE = 1
    +

    Conditional ‘while’ Node. Body executed repeatedly while condition value is non-zero.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphNodeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Graph node types

    +
    +
    +CU_GRAPH_NODE_TYPE_KERNEL = 0
    +

    GPU kernel node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_MEMCPY = 1
    +

    Memcpy node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_MEMSET = 2
    +

    Memset node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_HOST = 3
    +

    Host (executable) node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_GRAPH = 4
    +

    Node which executes an embedded graph

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_EMPTY = 5
    +

    Empty (no-op) node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_WAIT_EVENT = 6
    +

    External event wait node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_EVENT_RECORD = 7
    +

    External event record node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_EXT_SEMAS_SIGNAL = 8
    +

    External semaphore signal node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_EXT_SEMAS_WAIT = 9
    +

    External semaphore wait node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_MEM_ALLOC = 10
    +

    Memory Allocation Node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_MEM_FREE = 11
    +

    Memory Free Node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_BATCH_MEM_OP = 12
    +

    Batch MemOp Node

    +
    + +
    +
    +CU_GRAPH_NODE_TYPE_CONDITIONAL = 13
    +

    Conditional Node May be used to implement a conditional execution path or loop

    +
    +

    inside of a graph. The graph(s) contained within the body of the conditional node

    +

    can be selectively executed or iterated upon based on the value of a conditional

    +

    variable.

    +

    Handles must be created in advance of creating the node

    +

    using cuGraphConditionalHandleCreate.

    +

    The following restrictions apply to graphs which contain conditional nodes:

    +
    +

    The graph cannot be used in a child node.

    +

    Only one instantiation of the graph may exist at any point in time.

    +

    The graph cannot be cloned.

    +
    +

    To set the control value, supply a default value when creating the handle and/or

    +

    call cudaGraphSetConditional from device code.

    +
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphDependencyType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Type annotations that can be applied to graph edges as part of +CUgraphEdgeData.

    +
    +
    +CU_GRAPH_DEPENDENCY_TYPE_DEFAULT = 0
    +

    This is an ordinary dependency.

    +
    + +
    +
    +CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC = 1
    +

    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 CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC or CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER outgoing port.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphInstantiateResult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Graph instantiation results

    +
    +
    +CUDA_GRAPH_INSTANTIATE_SUCCESS = 0
    +

    Instantiation succeeded

    +
    + +
    +
    +CUDA_GRAPH_INSTANTIATE_ERROR = 1
    +

    Instantiation failed for an unexpected reason which is described in the return value of the function

    +
    + +
    +
    +CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE = 2
    +

    Instantiation failed due to invalid structure, such as cycles

    +
    + +
    +
    +CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED = 3
    +

    Instantiation for device launch failed because the graph contained an unsupported operation

    +
    + +
    +
    +CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED = 4
    +

    Instantiation for device launch failed due to the nodes belonging to different contexts

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUsynchronizationPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +CU_SYNC_POLICY_AUTO = 1
    +
    + +
    +
    +CU_SYNC_POLICY_SPIN = 2
    +
    + +
    +
    +CU_SYNC_POLICY_YIELD = 3
    +
    + +
    +
    +CU_SYNC_POLICY_BLOCKING_SYNC = 4
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUclusterSchedulingPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Cluster scheduling policies. These may be passed to +cuFuncSetAttribute or cuKernelSetAttribute

    +
    +
    +CU_CLUSTER_SCHEDULING_POLICY_DEFAULT = 0
    +

    the default policy

    +
    + +
    +
    +CU_CLUSTER_SCHEDULING_POLICY_SPREAD = 1
    +

    spread the blocks within a cluster to the SMs

    +
    + +
    +
    +CU_CLUSTER_SCHEDULING_POLICY_LOAD_BALANCING = 2
    +

    allow the hardware to load-balance the blocks in a cluster to the SMs

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchMemSyncDomain(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Memory Synchronization Domain A kernel can be launched in a +specified memory synchronization domain that affects all memory +operations issued by that kernel. A memory barrier issued in one +domain will only order memory operations in that domain, thus +eliminating latency increase from memory barriers ordering +unrelated traffic. By default, kernels are launched in domain 0. +Kernel launched with CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE +will have a different domain ID. User may also alter the domain ID +with CUlaunchMemSyncDomainMap for a specific stream / +graph node / kernel launch. See +CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN, +cuStreamSetAttribute, cuLaunchKernelEx, +cuGraphKernelNodeSetAttribute. Memory operations done +in kernels launched in different domains are considered system- +scope distanced. In other words, a GPU scoped memory +synchronization is not sufficient for memory order to be observed +by kernels in another memory synchronization domain even if they +are on the same GPU.

    +
    +
    +CU_LAUNCH_MEM_SYNC_DOMAIN_DEFAULT = 0
    +

    Launch kernels in the default domain

    +
    + +
    +
    +CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE = 1
    +

    Launch kernels in the remote domain

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchAttributeID(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Launch attributes enum; used as id field of +CUlaunchAttribute

    +
    +
    +CU_LAUNCH_ATTRIBUTE_IGNORE = 0
    +

    Ignored entry, for convenient composition

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
    +

    Valid for streams, graph nodes, launches. See accessPolicyWindow.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_COOPERATIVE = 2
    +

    Valid for graph nodes, launches. See cooperative.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
    +

    Valid for streams. See syncPolicy.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION = 4
    +

    Valid for graph nodes, launches. See clusterDim.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
    +

    Valid for graph nodes, launches. See clusterSchedulingPolicyPreference.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION = 6
    +

    Valid for launches. Setting programmaticStreamSerializationAllowed to non-0 signals that the kernel will use programmatic means to resolve its stream dependency, so that the CUDA runtime should opportunistically allow the grid’s execution to overlap with the previous kernel in the stream, if that kernel requests the overlap. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions).

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT = 7
    +

    Valid for launches. Set programmaticEvent to record the event. Event recorded through this launch attribute is guaranteed to only trigger after all block in the associated kernel trigger the event. A block can trigger the event through PTX launchdep.release or CUDA builtin function cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be inserted at the beginning of each block’s execution if triggerAtBlockStart is set to non-0. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions). Note that dependents (including the CPU thread calling cuEventSynchronize()) are not guaranteed to observe the release precisely when it is released. For example, cuEventSynchronize() may only observe the event trigger long after the associated kernel has completed. This recording type is primarily meant for establishing programmatic dependency between device tasks. Note also this type of dependency allows, but does not guarantee, concurrent execution of tasks.

    +
    +

    The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the CU_EVENT_DISABLE_TIMING flag set).

    +
    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_PRIORITY = 8
    +

    Valid for streams, graph nodes, launches. See priority.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
    +

    Valid for streams, graph nodes, launches. See memSyncDomainMap.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
    +

    Valid for streams, graph nodes, launches. See memSyncDomain.

    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT = 12
    +

    Valid for launches. Set launchCompletionEvent to record the event.

    +
    +

    Nominally, the event is triggered once all blocks of the kernel have begun execution. Currently this is a best effort. If a kernel B has a launch completion dependency on a kernel A, B may wait until A is complete. Alternatively, blocks of B may begin before all blocks of A have begun, for example if B can claim execution resources unavailable to A (e.g. they run on different GPUs) or if B is a higher priority than A. Exercise caution if such an ordering inversion could lead to deadlock.

    +

    A launch completion event is nominally similar to a programmatic event with triggerAtBlockStart set except that it is not visible to cudaGridDependencySynchronize() and can be used with compute capability less than 9.0.

    +

    The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the CU_EVENT_DISABLE_TIMING flag set).

    +
    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13
    +

    Valid for graph nodes, launches. This attribute is graphs-only, and passing it to a launch in a non-capturing stream will result in an error.

    +
    +

    CUlaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can only be set to 0 or 1. Setting the field to 1 indicates that the corresponding kernel node should be device-updatable. On success, a handle will be returned via CUlaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be passed to the various device-side update functions to update the node’s kernel parameters from within another kernel. For more information on the types of device updates that can be made, as well as the relevant limitations thereof, see cudaGraphKernelNodeUpdatesApply.

    +

    Nodes which are device-updatable have additional restrictions compared to regular kernel nodes. Firstly, device-updatable nodes cannot be removed from their graph via cuGraphDestroyNode. Additionally, once opted-in to this functionality, a node cannot opt out, and any attempt to set the deviceUpdatable attribute to 0 will result in an error. Device-updatable kernel nodes also cannot have their attributes copied to/from another kernel node via cuGraphKernelNodeCopyAttributes. Graphs containing one or more device-updatable nodes also do not allow multiple instantiation, and neither the graph nor its instantiated version can be passed to cuGraphExecUpdate.

    +

    If a graph contains device-updatable nodes and updates those nodes from the device from within the graph, the graph must be uploaded with cuGraphUpload before it is launched. For such a graph, if host-side executable graph updates are made to the device-updatable nodes, the graph must be uploaded before it is launched again.

    +
    +
    + +
    +
    +CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14
    +

    Valid for launches. On devices where the L1 cache and shared memory use the same hardware resources, setting sharedMemCarveout to a percentage between 0-100 signals the CUDA driver to set the shared memory carveout preference, in percent of the total shared memory for that kernel launch. This attribute takes precedence over CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT. This is only a hint, and the CUDA driver can choose a different configuration if required for the launch.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamCaptureStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Possible stream capture statuses returned by +cuStreamIsCapturing

    +
    +
    +CU_STREAM_CAPTURE_STATUS_NONE = 0
    +

    Stream is not capturing

    +
    + +
    +
    +CU_STREAM_CAPTURE_STATUS_ACTIVE = 1
    +

    Stream is actively capturing

    +
    + +
    +
    +CU_STREAM_CAPTURE_STATUS_INVALIDATED = 2
    +

    Stream is part of a capture sequence that has been invalidated, but not terminated

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamCaptureMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Possible modes for stream capture thread interactions. For more +details see cuStreamBeginCapture and +cuThreadExchangeStreamCaptureMode

    +
    +
    +CU_STREAM_CAPTURE_MODE_GLOBAL = 0
    +
    + +
    +
    +CU_STREAM_CAPTURE_MODE_THREAD_LOCAL = 1
    +
    + +
    +
    +CU_STREAM_CAPTURE_MODE_RELAXED = 2
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdriverProcAddress_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags to specify search options. For more details see +cuGetProcAddress

    +
    +
    +CU_GET_PROC_ADDRESS_DEFAULT = 0
    +

    Default search mode for driver symbols.

    +
    + +
    +
    +CU_GET_PROC_ADDRESS_LEGACY_STREAM = 1
    +

    Search for legacy versions of driver symbols.

    +
    + +
    +
    +CU_GET_PROC_ADDRESS_PER_THREAD_DEFAULT_STREAM = 2
    +

    Search for per-thread versions of driver symbols.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdriverProcAddressQueryResult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags to indicate search status. For more details see +cuGetProcAddress

    +
    +
    +CU_GET_PROC_ADDRESS_SUCCESS = 0
    +

    Symbol was succesfully found

    +
    + +
    +
    +CU_GET_PROC_ADDRESS_SYMBOL_NOT_FOUND = 1
    +

    Symbol was not found in search

    +
    + +
    +
    +CU_GET_PROC_ADDRESS_VERSION_NOT_SUFFICIENT = 2
    +

    Symbol was found but version supplied was not sufficient

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexecAffinityType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Execution Affinity Types

    +
    +
    +CU_EXEC_AFFINITY_TYPE_SM_COUNT = 0
    +

    Create a context with limited SMs.

    +
    + +
    +
    +CU_EXEC_AFFINITY_TYPE_MAX = 1
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUcigDataType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +CIG_DATA_TYPE_D3D12_COMMAND_QUEUE = 1
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlibraryOption(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Library options to be specified with +cuLibraryLoadData() or +cuLibraryLoadFromFile()

    +
    +
    +CU_LIBRARY_HOST_UNIVERSAL_FUNCTION_AND_DATA_TABLE = 0
    +
    + +
    +
    +CU_LIBRARY_BINARY_IS_PRESERVED = 1
    +

    Specifes that the argument code passed to cuLibraryLoadData() will be preserved. Specifying this option will let the driver know that code can be accessed at any point until cuLibraryUnload(). The default behavior is for the driver to allocate and maintain its own copy of code. Note that this is only a memory usage optimization hint and the driver can choose to ignore it if required. Specifying this option with cuLibraryLoadFromFile() is invalid and will return CUDA_ERROR_INVALID_VALUE.

    +
    + +
    +
    +CU_LIBRARY_NUM_OPTIONS = 2
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUresult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Error codes

    +
    +
    +CUDA_SUCCESS = 0
    +

    The API call returned with no errors. In the case of query calls, this also means that the operation being queried is complete (see cuEventQuery() and cuStreamQuery()).

    +
    + +
    +
    +CUDA_ERROR_INVALID_VALUE = 1
    +

    This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.

    +
    + +
    +
    +CUDA_ERROR_OUT_OF_MEMORY = 2
    +

    The API call failed because it was unable to allocate enough memory or other resources to perform the requested operation.

    +
    + +
    +
    +CUDA_ERROR_NOT_INITIALIZED = 3
    +

    This indicates that the CUDA driver has not been initialized with cuInit() or that initialization has failed.

    +
    + +
    +
    +CUDA_ERROR_DEINITIALIZED = 4
    +

    This indicates that the CUDA driver is in the process of shutting down.

    +
    + +
    +
    +CUDA_ERROR_PROFILER_DISABLED = 5
    +

    This indicates profiler is not initialized for this run. This can happen when the application is running with external profiling tools like visual profiler.

    +
    + +
    +
    +CUDA_ERROR_PROFILER_NOT_INITIALIZED = 6
    +

    [Deprecated]

    +
    + +
    +
    +CUDA_ERROR_PROFILER_ALREADY_STARTED = 7
    +

    [Deprecated]

    +
    + +
    +
    +CUDA_ERROR_PROFILER_ALREADY_STOPPED = 8
    +

    [Deprecated]

    +
    + +
    +
    +CUDA_ERROR_STUB_LIBRARY = 34
    +

    This indicates that the CUDA driver that the application has loaded is a stub library. Applications that run with the stub rather than a real driver loaded will result in CUDA API returning this error.

    +
    + +
    +
    +CUDA_ERROR_DEVICE_UNAVAILABLE = 46
    +

    This indicates that requested CUDA device is unavailable at the current time. Devices are often unavailable due to use of CU_COMPUTEMODE_EXCLUSIVE_PROCESS or CU_COMPUTEMODE_PROHIBITED.

    +
    + +
    +
    +CUDA_ERROR_NO_DEVICE = 100
    +

    This indicates that no CUDA-capable devices were detected by the installed CUDA driver.

    +
    + +
    +
    +CUDA_ERROR_INVALID_DEVICE = 101
    +

    This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device or that the action requested is invalid for the specified device.

    +
    + +
    +
    +CUDA_ERROR_DEVICE_NOT_LICENSED = 102
    +

    This error indicates that the Grid license is not applied.

    +
    + +
    +
    +CUDA_ERROR_INVALID_IMAGE = 200
    +

    This indicates that the device kernel image is invalid. This can also indicate an invalid CUDA module.

    +
    + +
    +
    +CUDA_ERROR_INVALID_CONTEXT = 201
    +

    This most frequently indicates that there is no context bound to the current thread. This can also be returned if the context passed to an API call is not a valid handle (such as a context that has had cuCtxDestroy() invoked on it). This can also be returned if a user mixes different API versions (i.e. 3010 context with 3020 API calls). See cuCtxGetApiVersion() for more details. This can also be returned if the green context passed to an API call was not converted to a CUcontext using cuCtxFromGreenCtx API.

    +
    + +
    +
    +CUDA_ERROR_CONTEXT_ALREADY_CURRENT = 202
    +

    This indicated that the context being supplied as a parameter to the API call was already the active context. [Deprecated]

    +
    + +
    +
    +CUDA_ERROR_MAP_FAILED = 205
    +

    This indicates that a map or register operation has failed.

    +
    + +
    +
    +CUDA_ERROR_UNMAP_FAILED = 206
    +

    This indicates that an unmap or unregister operation has failed.

    +
    + +
    +
    +CUDA_ERROR_ARRAY_IS_MAPPED = 207
    +

    This indicates that the specified array is currently mapped and thus cannot be destroyed.

    +
    + +
    +
    +CUDA_ERROR_ALREADY_MAPPED = 208
    +

    This indicates that the resource is already mapped.

    +
    + +
    +
    +CUDA_ERROR_NO_BINARY_FOR_GPU = 209
    +

    This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration.

    +
    + +
    +
    +CUDA_ERROR_ALREADY_ACQUIRED = 210
    +

    This indicates that a resource has already been acquired.

    +
    + +
    +
    +CUDA_ERROR_NOT_MAPPED = 211
    +

    This indicates that a resource is not mapped.

    +
    + +
    +
    +CUDA_ERROR_NOT_MAPPED_AS_ARRAY = 212
    +

    This indicates that a mapped resource is not available for access as an array.

    +
    + +
    +
    +CUDA_ERROR_NOT_MAPPED_AS_POINTER = 213
    +

    This indicates that a mapped resource is not available for access as a pointer.

    +
    + +
    +
    +CUDA_ERROR_ECC_UNCORRECTABLE = 214
    +

    This indicates that an uncorrectable ECC error was detected during execution.

    +
    + +
    +
    +CUDA_ERROR_UNSUPPORTED_LIMIT = 215
    +

    This indicates that the CUlimit passed to the API call is not supported by the active device.

    +
    + +
    +
    +CUDA_ERROR_CONTEXT_ALREADY_IN_USE = 216
    +

    This indicates that the CUcontext passed to the API call can only be bound to a single CPU thread at a time but is already bound to a CPU thread.

    +
    + +
    +
    +CUDA_ERROR_PEER_ACCESS_UNSUPPORTED = 217
    +

    This indicates that peer access is not supported across the given devices.

    +
    + +
    +
    +CUDA_ERROR_INVALID_PTX = 218
    +

    This indicates that a PTX JIT compilation failed.

    +
    + +
    +
    +CUDA_ERROR_INVALID_GRAPHICS_CONTEXT = 219
    +

    This indicates an error with OpenGL or DirectX context.

    +
    + +
    + +

    This indicates that an uncorrectable NVLink error was detected during the execution.

    +
    + +
    +
    +CUDA_ERROR_JIT_COMPILER_NOT_FOUND = 221
    +

    This indicates that the PTX JIT compiler library was not found.

    +
    + +
    +
    +CUDA_ERROR_UNSUPPORTED_PTX_VERSION = 222
    +

    This indicates that the provided PTX was compiled with an unsupported toolchain.

    +
    + +
    +
    +CUDA_ERROR_JIT_COMPILATION_DISABLED = 223
    +

    This indicates that the PTX JIT compilation was disabled.

    +
    + +
    +
    +CUDA_ERROR_UNSUPPORTED_EXEC_AFFINITY = 224
    +

    This indicates that the CUexecAffinityType passed to the API call is not supported by the active device.

    +
    + +
    +
    +CUDA_ERROR_UNSUPPORTED_DEVSIDE_SYNC = 225
    +

    This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize.

    +
    + +
    +
    +CUDA_ERROR_INVALID_SOURCE = 300
    +

    This indicates that the device kernel source is invalid. This includes compilation/linker errors encountered in device code or user error.

    +
    + +
    +
    +CUDA_ERROR_FILE_NOT_FOUND = 301
    +

    This indicates that the file specified was not found.

    +
    + +
    +
    +CUDA_ERROR_SHARED_OBJECT_SYMBOL_NOT_FOUND = 302
    +

    This indicates that a link to a shared object failed to resolve.

    +
    + +
    +
    +CUDA_ERROR_SHARED_OBJECT_INIT_FAILED = 303
    +

    This indicates that initialization of a shared object failed.

    +
    + +
    +
    +CUDA_ERROR_OPERATING_SYSTEM = 304
    +

    This indicates that an OS call failed.

    +
    + +
    +
    +CUDA_ERROR_INVALID_HANDLE = 400
    +

    This indicates that a resource handle passed to the API call was not valid. Resource handles are opaque types like CUstream and CUevent.

    +
    + +
    +
    +CUDA_ERROR_ILLEGAL_STATE = 401
    +

    This indicates that a resource required by the API call is not in a valid state to perform the requested operation.

    +
    + +
    +
    +CUDA_ERROR_LOSSY_QUERY = 402
    +

    This indicates an attempt was made to introspect an object in a way that would discard semantically important information. This is either due to the object using funtionality newer than the API version used to introspect it or omission of optional return arguments.

    +
    + +
    +
    +CUDA_ERROR_NOT_FOUND = 500
    +

    This indicates that a named symbol was not found. Examples of symbols are global/constant variable names, driver function names, texture names, and surface names.

    +
    + +
    +
    +CUDA_ERROR_NOT_READY = 600
    +

    This indicates that asynchronous operations issued previously have not completed yet. This result is not actually an error, but must be indicated differently than CUDA_SUCCESS (which indicates completion). Calls that may return this value include cuEventQuery() and cuStreamQuery().

    +
    + +
    +
    +CUDA_ERROR_ILLEGAL_ADDRESS = 700
    +

    While executing a kernel, the device encountered a load or store instruction on an invalid memory address. 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.

    +
    + +
    +
    +CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES = 701
    +

    This indicates that a launch did not occur because it did not have appropriate resources. This error usually indicates that the user has attempted to pass too many arguments to the device kernel, or the kernel launch specifies too many threads for the kernel’s register count. Passing arguments of the wrong size (i.e. a 64-bit pointer when a 32-bit int is expected) is equivalent to passing too many arguments and can also result in this error.

    +
    + +
    +
    +CUDA_ERROR_LAUNCH_TIMEOUT = 702
    +

    This indicates that the device kernel took too long to execute. This can only occur if timeouts are enabled - see the device attribute CU_DEVICE_ATTRIBUTE_KERNEL_EXEC_TIMEOUT for more information. 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.

    +
    + +
    +
    +CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING = 703
    +

    This error indicates a kernel launch that uses an incompatible texturing mode.

    +
    + +
    +
    +CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED = 704
    +

    This error indicates that a call to cuCtxEnablePeerAccess() is trying to re-enable peer access to a context which has already had peer access to it enabled.

    +
    + +
    +
    +CUDA_ERROR_PEER_ACCESS_NOT_ENABLED = 705
    +

    This error indicates that cuCtxDisablePeerAccess() is trying to disable peer access which has not been enabled yet via cuCtxEnablePeerAccess().

    +
    + +
    +
    +CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE = 708
    +

    This error indicates that the primary context for the specified device has already been initialized.

    +
    + +
    +
    +CUDA_ERROR_CONTEXT_IS_DESTROYED = 709
    +

    This error indicates that the context current to the calling thread has been destroyed using cuCtxDestroy, or is a primary context which has not yet been initialized.

    +
    + +
    +
    +CUDA_ERROR_ASSERT = 710
    +

    A device-side assert triggered during kernel execution. The context cannot be used anymore, and must be destroyed. All existing device memory allocations from this context are invalid and must be reconstructed if the program is to continue using CUDA.

    +
    + +
    +
    +CUDA_ERROR_TOO_MANY_PEERS = 711
    +

    This error indicates that the hardware resources required to enable peer access have been exhausted for one or more of the devices passed to cuCtxEnablePeerAccess().

    +
    + +
    +
    +CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED = 712
    +

    This error indicates that the memory range passed to cuMemHostRegister() has already been registered.

    +
    + +
    +
    +CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED = 713
    +

    This error indicates that the pointer passed to cuMemHostUnregister() does not correspond to any currently registered memory region.

    +
    + +
    +
    +CUDA_ERROR_HARDWARE_STACK_ERROR = 714
    +

    While executing a kernel, the device encountered a stack error. This can be due to stack corruption or exceeding the stack size limit. 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.

    +
    + +
    +
    +CUDA_ERROR_ILLEGAL_INSTRUCTION = 715
    +

    While executing a kernel, the device encountered an illegal instruction. 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.

    +
    + +
    +
    +CUDA_ERROR_MISALIGNED_ADDRESS = 716
    +

    While executing a kernel, the device encountered a load or store instruction on a memory address which is not aligned. 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.

    +
    + +
    +
    +CUDA_ERROR_INVALID_ADDRESS_SPACE = 717
    +

    While executing a kernel, the device encountered an instruction which can only operate on memory locations in certain address spaces (global, shared, or local), but was supplied a memory address not belonging to an allowed address space. 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.

    +
    + +
    +
    +CUDA_ERROR_INVALID_PC = 718
    +

    While executing a kernel, the device program counter wrapped its address space. 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.

    +
    + +
    +
    +CUDA_ERROR_LAUNCH_FAILED = 719
    +

    An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases can be found in the system specific user guide. 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.

    +
    + +
    +
    +CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE = 720
    +

    This error indicates that the number of blocks launched per grid for a kernel that was launched via either cuLaunchCooperativeKernel or cuLaunchCooperativeKernelMultiDevice exceeds the maximum number of blocks as allowed by cuOccupancyMaxActiveBlocksPerMultiprocessor or cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors as specified by the device attribute CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT.

    +
    + +
    +
    +CUDA_ERROR_NOT_PERMITTED = 800
    +

    This error indicates that the attempted operation is not permitted.

    +
    + +
    +
    +CUDA_ERROR_NOT_SUPPORTED = 801
    +

    This error indicates that the attempted operation is not supported on the current system or device.

    +
    + +
    +
    +CUDA_ERROR_SYSTEM_NOT_READY = 802
    +

    This error indicates that the system is not yet ready to start any CUDA work. To continue using CUDA, verify the system configuration is in a valid state and all required driver daemons are actively running. More information about this error can be found in the system specific user guide.

    +
    + +
    +
    +CUDA_ERROR_SYSTEM_DRIVER_MISMATCH = 803
    +

    This error indicates that there is a mismatch between the versions of the display driver and the CUDA driver. Refer to the compatibility documentation for supported versions.

    +
    + +
    +
    +CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE = 804
    +

    This error indicates that the system was upgraded to run with forward compatibility but the visible hardware detected by CUDA does not support this configuration. Refer to the compatibility documentation for the supported hardware matrix or ensure that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES environment variable.

    +
    + +
    +
    +CUDA_ERROR_MPS_CONNECTION_FAILED = 805
    +

    This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server.

    +
    + +
    +
    +CUDA_ERROR_MPS_RPC_FAILURE = 806
    +

    This error indicates that the remote procedural call between the MPS server and the MPS client failed.

    +
    + +
    +
    +CUDA_ERROR_MPS_SERVER_NOT_READY = 807
    +

    This error indicates that the MPS server is not ready to accept new MPS client requests. This error can be returned when the MPS server is in the process of recovering from a fatal failure.

    +
    + +
    +
    +CUDA_ERROR_MPS_MAX_CLIENTS_REACHED = 808
    +

    This error indicates that the hardware resources required to create MPS client have been exhausted.

    +
    + +
    +
    +CUDA_ERROR_MPS_MAX_CONNECTIONS_REACHED = 809
    +

    This error indicates the the hardware resources required to support device connections have been exhausted.

    +
    + +
    +
    +CUDA_ERROR_MPS_CLIENT_TERMINATED = 810
    +

    This error indicates that the MPS client has been terminated by the server. To continue using CUDA, the process must be terminated and relaunched.

    +
    + +
    +
    +CUDA_ERROR_CDP_NOT_SUPPORTED = 811
    +

    This error indicates that the module is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it.

    +
    + +
    +
    +CUDA_ERROR_CDP_VERSION_MISMATCH = 812
    +

    This error indicates that a module contains an unsupported interaction between different versions of CUDA Dynamic Parallelism.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED = 900
    +

    This error indicates that the operation is not permitted when the stream is capturing.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_INVALIDATED = 901
    +

    This error indicates that the current capture sequence on the stream has been invalidated due to a previous error.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_MERGE = 902
    +

    This error indicates that the operation would have resulted in a merge of two independent capture sequences.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_UNMATCHED = 903
    +

    This error indicates that the capture was not initiated in this stream.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_UNJOINED = 904
    +

    This error indicates that the capture sequence contains a fork that was not joined to the primary stream.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_ISOLATION = 905
    +

    This error indicates that a dependency would have been created which crosses the capture sequence boundary. Only implicit in-stream ordering dependencies are allowed to cross the boundary.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_IMPLICIT = 906
    +

    This error indicates a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy.

    +
    + +
    +
    +CUDA_ERROR_CAPTURED_EVENT = 907
    +

    This error indicates that the operation is not permitted on an event which was last recorded in a capturing stream.

    +
    + +
    +
    +CUDA_ERROR_STREAM_CAPTURE_WRONG_THREAD = 908
    +

    A stream capture sequence not initiated with the CU_STREAM_CAPTURE_MODE_RELAXED argument to cuStreamBeginCapture was passed to cuStreamEndCapture in a different thread.

    +
    + +
    +
    +CUDA_ERROR_TIMEOUT = 909
    +

    This error indicates that the timeout specified for the wait operation has lapsed.

    +
    + +
    +
    +CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE = 910
    +

    This error indicates that the graph update was not performed because it included changes which violated constraints specific to instantiated graph update.

    +
    + +
    +
    +CUDA_ERROR_EXTERNAL_DEVICE = 911
    +

    This indicates that an async error has occurred in a device outside of CUDA. If CUDA was waiting for an external device’s signal before consuming shared data, the external device signaled an error indicating that the data is not valid for consumption. 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.

    +
    + +
    +
    +CUDA_ERROR_INVALID_CLUSTER_SIZE = 912
    +

    Indicates a kernel launch error due to cluster misconfiguration.

    +
    + +
    +
    +CUDA_ERROR_FUNCTION_NOT_LOADED = 913
    +

    Indiciates a function handle is not loaded when calling an API that requires a loaded function.

    +
    + +
    +
    +CUDA_ERROR_INVALID_RESOURCE_TYPE = 914
    +

    This error indicates one or more resources passed in are not valid resource types for the operation.

    +
    + +
    +
    +CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION = 915
    +

    This error indicates one or more resources are insufficient or non-applicable for the operation.

    +
    + +
    +
    +CUDA_ERROR_UNKNOWN = 999
    +

    This indicates that an unknown internal error has occurred.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevice_P2PAttribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    P2P Attributes

    +
    +
    +CU_DEVICE_P2P_ATTRIBUTE_PERFORMANCE_RANK = 1
    +

    A relative value indicating the performance of the link between two devices

    +
    + +
    +
    +CU_DEVICE_P2P_ATTRIBUTE_ACCESS_SUPPORTED = 2
    +

    P2P Access is enable

    +
    + +
    +
    +CU_DEVICE_P2P_ATTRIBUTE_NATIVE_ATOMIC_SUPPORTED = 3
    +

    Atomic operation over the link supported

    +
    + +
    +
    +CU_DEVICE_P2P_ATTRIBUTE_ACCESS_ACCESS_SUPPORTED = 4
    +

    [Deprecated]

    +
    + +
    +
    +CU_DEVICE_P2P_ATTRIBUTE_CUDA_ARRAY_ACCESS_SUPPORTED = 4
    +

    Accessing CUDA arrays over the link supported

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUresourceViewFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Resource view format

    +
    +
    +CU_RES_VIEW_FORMAT_NONE = 0
    +

    No resource view format (use underlying resource format)

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_1X8 = 1
    +

    1 channel unsigned 8-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_2X8 = 2
    +

    2 channel unsigned 8-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_4X8 = 3
    +

    4 channel unsigned 8-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_1X8 = 4
    +

    1 channel signed 8-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_2X8 = 5
    +

    2 channel signed 8-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_4X8 = 6
    +

    4 channel signed 8-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_1X16 = 7
    +

    1 channel unsigned 16-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_2X16 = 8
    +

    2 channel unsigned 16-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_4X16 = 9
    +

    4 channel unsigned 16-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_1X16 = 10
    +

    1 channel signed 16-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_2X16 = 11
    +

    2 channel signed 16-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_4X16 = 12
    +

    4 channel signed 16-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_1X32 = 13
    +

    1 channel unsigned 32-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_2X32 = 14
    +

    2 channel unsigned 32-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UINT_4X32 = 15
    +

    4 channel unsigned 32-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_1X32 = 16
    +

    1 channel signed 32-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_2X32 = 17
    +

    2 channel signed 32-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SINT_4X32 = 18
    +

    4 channel signed 32-bit integers

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_FLOAT_1X16 = 19
    +

    1 channel 16-bit floating point

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_FLOAT_2X16 = 20
    +

    2 channel 16-bit floating point

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_FLOAT_4X16 = 21
    +

    4 channel 16-bit floating point

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_FLOAT_1X32 = 22
    +

    1 channel 32-bit floating point

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_FLOAT_2X32 = 23
    +

    2 channel 32-bit floating point

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_FLOAT_4X32 = 24
    +

    4 channel 32-bit floating point

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UNSIGNED_BC1 = 25
    +

    Block compressed 1

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UNSIGNED_BC2 = 26
    +

    Block compressed 2

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UNSIGNED_BC3 = 27
    +

    Block compressed 3

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UNSIGNED_BC4 = 28
    +

    Block compressed 4 unsigned

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SIGNED_BC4 = 29
    +

    Block compressed 4 signed

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UNSIGNED_BC5 = 30
    +

    Block compressed 5 unsigned

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SIGNED_BC5 = 31
    +

    Block compressed 5 signed

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UNSIGNED_BC6H = 32
    +

    Block compressed 6 unsigned half-float

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_SIGNED_BC6H = 33
    +

    Block compressed 6 signed half-float

    +
    + +
    +
    +CU_RES_VIEW_FORMAT_UNSIGNED_BC7 = 34
    +

    Block compressed 7

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtensorMapDataType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Tensor map data type

    +
    +
    +CU_TENSOR_MAP_DATA_TYPE_UINT8 = 0
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_UINT16 = 1
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_UINT32 = 2
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_INT32 = 3
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_UINT64 = 4
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_INT64 = 5
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_FLOAT16 = 6
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_FLOAT32 = 7
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_FLOAT64 = 8
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_BFLOAT16 = 9
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_FLOAT32_FTZ = 10
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_TFLOAT32 = 11
    +
    + +
    +
    +CU_TENSOR_MAP_DATA_TYPE_TFLOAT32_FTZ = 12
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtensorMapInterleave(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Tensor map interleave layout type

    +
    +
    +CU_TENSOR_MAP_INTERLEAVE_NONE = 0
    +
    + +
    +
    +CU_TENSOR_MAP_INTERLEAVE_16B = 1
    +
    + +
    +
    +CU_TENSOR_MAP_INTERLEAVE_32B = 2
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtensorMapSwizzle(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Tensor map swizzling mode of shared memory banks

    +
    +
    +CU_TENSOR_MAP_SWIZZLE_NONE = 0
    +
    + +
    +
    +CU_TENSOR_MAP_SWIZZLE_32B = 1
    +
    + +
    +
    +CU_TENSOR_MAP_SWIZZLE_64B = 2
    +
    + +
    +
    +CU_TENSOR_MAP_SWIZZLE_128B = 3
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtensorMapL2promotion(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Tensor map L2 promotion type

    +
    +
    +CU_TENSOR_MAP_L2_PROMOTION_NONE = 0
    +
    + +
    +
    +CU_TENSOR_MAP_L2_PROMOTION_L2_64B = 1
    +
    + +
    +
    +CU_TENSOR_MAP_L2_PROMOTION_L2_128B = 2
    +
    + +
    +
    +CU_TENSOR_MAP_L2_PROMOTION_L2_256B = 3
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtensorMapFloatOOBfill(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Tensor map out-of-bounds fill type

    +
    +
    +CU_TENSOR_MAP_FLOAT_OOB_FILL_NONE = 0
    +
    + +
    +
    +CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA = 1
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_POINTER_ATTRIBUTE_ACCESS_FLAGS(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Access flags that specify the level of access the current context’s +device has on the memory referenced.

    +
    +
    +CU_POINTER_ATTRIBUTE_ACCESS_FLAG_NONE = 0
    +

    No access, meaning the device cannot access this memory at all, thus must be staged through accessible memory in order to complete certain operations

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READ = 1
    +

    Read-only access, meaning writes to this memory are considered invalid accesses and thus return error in that case.

    +
    + +
    +
    +CU_POINTER_ATTRIBUTE_ACCESS_FLAG_READWRITE = 3
    +

    Read-write access, the device has full read-write access to the memory

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexternalMemoryHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    External memory handle types

    +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD = 1
    +

    Handle is an opaque file descriptor

    +
    + +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32 = 2
    +

    Handle is an opaque shared NT handle

    +
    + +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3
    +

    Handle is an opaque, globally shared handle

    +
    + +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP = 4
    +

    Handle is a D3D12 heap object

    +
    + +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE = 5
    +

    Handle is a D3D12 committed resource

    +
    + +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE = 6
    +

    Handle is a shared NT handle to a D3D11 resource

    +
    + +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT = 7
    +

    Handle is a globally shared handle to a D3D11 resource

    +
    + +
    +
    +CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF = 8
    +

    Handle is an NvSciBuf object

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexternalSemaphoreHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    External semaphore handle types

    +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD = 1
    +

    Handle is an opaque file descriptor

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32 = 2
    +

    Handle is an opaque shared NT handle

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT = 3
    +

    Handle is an opaque, globally shared handle

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE = 4
    +

    Handle is a shared NT handle referencing a D3D12 fence object

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE = 5
    +

    Handle is a shared NT handle referencing a D3D11 fence object

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC = 6
    +

    Opaque handle to NvSciSync Object

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX = 7
    +

    Handle is a shared NT handle referencing a D3D11 keyed mutex object

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT = 8
    +

    Handle is a globally shared handle referencing a D3D11 keyed mutex object

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD = 9
    +

    Handle is an opaque file descriptor referencing a timeline semaphore

    +
    + +
    +
    +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 = 10
    +

    Handle is an opaque shared NT handle referencing a timeline semaphore

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAllocationHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for specifying particular handle types

    +
    +
    +CU_MEM_HANDLE_TYPE_NONE = 0
    +

    Does not allow any export mechanism. >

    +
    + +
    +
    +CU_MEM_HANDLE_TYPE_POSIX_FILE_DESCRIPTOR = 1
    +

    Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)

    +
    + +
    +
    +CU_MEM_HANDLE_TYPE_WIN32 = 2
    +

    Allows a Win32 NT handle to be used for exporting. (HANDLE)

    +
    + +
    +
    +CU_MEM_HANDLE_TYPE_WIN32_KMT = 4
    +

    Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)

    +
    + +
    +
    +CU_MEM_HANDLE_TYPE_FABRIC = 8
    +

    Allows a fabric handle to be used for exporting. (CUmemFabricHandle)

    +
    + +
    +
    +CU_MEM_HANDLE_TYPE_MAX = 2147483647
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAccess_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies the memory protection flags for mapping.

    +
    +
    +CU_MEM_ACCESS_FLAGS_PROT_NONE = 0
    +

    Default, make the address range not accessible

    +
    + +
    +
    +CU_MEM_ACCESS_FLAGS_PROT_READ = 1
    +

    Make the address range read accessible

    +
    + +
    +
    +CU_MEM_ACCESS_FLAGS_PROT_READWRITE = 3
    +

    Make the address range read-write accessible

    +
    + +
    +
    +CU_MEM_ACCESS_FLAGS_PROT_MAX = 2147483647
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemLocationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies the type of location

    +
    +
    +CU_MEM_LOCATION_TYPE_INVALID = 0
    +
    + +
    +
    +CU_MEM_LOCATION_TYPE_DEVICE = 1
    +

    Location is a device location, thus id is a device ordinal

    +
    + +
    +
    +CU_MEM_LOCATION_TYPE_HOST = 2
    +

    Location is host, id is ignored

    +
    + +
    +
    +CU_MEM_LOCATION_TYPE_HOST_NUMA = 3
    +

    Location is a host NUMA node, thus id is a host NUMA node id

    +
    + +
    +
    +CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT = 4
    +

    Location is a host NUMA node of the current thread, id is ignored

    +
    + +
    +
    +CU_MEM_LOCATION_TYPE_MAX = 2147483647
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAllocationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Defines the allocation types available

    +
    +
    +CU_MEM_ALLOCATION_TYPE_INVALID = 0
    +
    + +
    +
    +CU_MEM_ALLOCATION_TYPE_PINNED = 1
    +

    This allocation type is ‘pinned’, i.e. cannot migrate from its current location while the application is actively using it

    +
    + +
    +
    +CU_MEM_ALLOCATION_TYPE_MAX = 2147483647
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAllocationGranularity_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flag for requesting different optimal and required granularities +for an allocation.

    +
    +
    +CU_MEM_ALLOC_GRANULARITY_MINIMUM = 0
    +

    Minimum required granularity for allocation

    +
    + +
    + +

    Recommended granularity for allocation for best performance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemRangeHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies the handle type for address range

    +
    +
    +CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD = 1
    +
    + +
    +
    +CU_MEM_RANGE_HANDLE_TYPE_MAX = 2147483647
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUarraySparseSubresourceType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Sparse subresource types

    +
    +
    +CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL = 0
    +
    + +
    +
    +CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL = 1
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemOperationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Memory operation types

    +
    +
    +CU_MEM_OPERATION_TYPE_MAP = 1
    +
    + +
    +
    +CU_MEM_OPERATION_TYPE_UNMAP = 2
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Memory handle types

    +
    +
    +CU_MEM_HANDLE_TYPE_GENERIC = 0
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAllocationCompType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies compression attribute for an allocation.

    +
    +
    +CU_MEM_ALLOCATION_COMP_NONE = 0
    +

    Allocating non-compressible memory

    +
    + +
    +
    +CU_MEM_ALLOCATION_COMP_GENERIC = 1
    +

    Allocating compressible memory

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmulticastGranularity_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for querying different granularities for a multicast object

    +
    +
    +CU_MULTICAST_GRANULARITY_MINIMUM = 0
    +

    Minimum required granularity

    +
    + +
    + +

    Recommended granularity for best performance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphExecUpdateResult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Graph Update error types

    +
    +
    +CU_GRAPH_EXEC_UPDATE_SUCCESS = 0
    +

    The update succeeded

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR = 1
    +

    The update failed for an unexpected reason which is described in the return value of the function

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED = 2
    +

    The update failed because the topology changed

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED = 3
    +

    The update failed because a node type changed

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR_FUNCTION_CHANGED = 4
    +

    The update failed because the function of a kernel node changed (CUDA driver < 11.2)

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED = 5
    +

    The update failed because the parameters changed in a way that is not supported

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED = 6
    +

    The update failed because something about the node is not supported

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE = 7
    +

    The update failed because the function of a kernel node changed in an unsupported way

    +
    + +
    +
    +CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED = 8
    +

    The update failed because the node attributes changed in a way that is not supported

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemPool_attribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA memory pool attributes

    +
    +
    +CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES = 1
    +

    (value type = int) Allow cuMemAllocAsync to use memory asynchronously freed in another streams as long as a stream ordering dependency of the allocating stream on the free action exists. Cuda events and null stream interactions can create the required stream ordered dependencies. (default enabled)

    +
    + +
    +
    +CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC = 2
    +

    (value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation. (default enabled)

    +
    + +
    +
    +CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES = 3
    +

    (value type = int) Allow cuMemAllocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by cuFreeAsync (default enabled).

    +
    + +
    +
    +CU_MEMPOOL_ATTR_RELEASE_THRESHOLD = 4
    +

    (value type = cuuint64_t) Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS. When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0)

    +
    + +
    +
    +CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT = 5
    +

    (value type = cuuint64_t) Amount of backing memory currently allocated for the mempool.

    +
    + +
    +
    +CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH = 6
    +

    (value type = cuuint64_t) High watermark of backing memory allocated for the mempool since the last time it was reset. High watermark can only be reset to zero.

    +
    + +
    +
    +CU_MEMPOOL_ATTR_USED_MEM_CURRENT = 7
    +

    (value type = cuuint64_t) Amount of memory from the pool that is currently in use by the application.

    +
    + +
    +
    +CU_MEMPOOL_ATTR_USED_MEM_HIGH = 8
    +

    (value type = cuuint64_t) High watermark of the amount of memory from the pool that was in use by the application since the last time it was reset. High watermark can only be reset to zero.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphMem_attribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +CU_GRAPH_MEM_ATTR_USED_MEM_CURRENT = 0
    +

    (value type = cuuint64_t) Amount of memory, in bytes, currently associated with graphs

    +
    + +
    +
    +CU_GRAPH_MEM_ATTR_USED_MEM_HIGH = 1
    +

    (value type = cuuint64_t) High watermark of memory, in bytes, associated with graphs since the last time it was reset. High watermark can only be reset to zero.

    +
    + +
    +
    +CU_GRAPH_MEM_ATTR_RESERVED_MEM_CURRENT = 2
    +

    (value type = cuuint64_t) Amount of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator.

    +
    + +
    +
    +CU_GRAPH_MEM_ATTR_RESERVED_MEM_HIGH = 3
    +

    (value type = cuuint64_t) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUflushGPUDirectRDMAWritesOptions(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Bitmasks for +CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_FLUSH_WRITES_OPTIONS

    +
    +
    +CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_HOST = 1
    +

    cuFlushGPUDirectRDMAWrites() and its CUDA Runtime API counterpart are supported on the device.

    +
    + +
    +
    +CU_FLUSH_GPU_DIRECT_RDMA_WRITES_OPTION_MEMOPS = 2
    +

    The CU_STREAM_WAIT_VALUE_FLUSH flag and the CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the device.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUGPUDirectRDMAWritesOrdering(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Platform native ordering for GPUDirect RDMA writes

    +
    +
    +CU_GPU_DIRECT_RDMA_WRITES_ORDERING_NONE = 0
    +

    The device does not natively support ordering of remote writes. cuFlushGPUDirectRDMAWrites() can be leveraged if supported.

    +
    + +
    +
    +CU_GPU_DIRECT_RDMA_WRITES_ORDERING_OWNER = 100
    +

    Natively, the device can consistently consume remote writes, although other CUDA devices may not.

    +
    + +
    +
    +CU_GPU_DIRECT_RDMA_WRITES_ORDERING_ALL_DEVICES = 200
    +

    Any CUDA device in the system can consistently consume remote writes to this device.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUflushGPUDirectRDMAWritesScope(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    The scopes for cuFlushGPUDirectRDMAWrites

    +
    +
    +CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_OWNER = 100
    +

    Blocks until remote writes are visible to the CUDA device context owning the data.

    +
    + +
    +
    +CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TO_ALL_DEVICES = 200
    +

    Blocks until remote writes are visible to all CUDA device contexts.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUflushGPUDirectRDMAWritesTarget(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    The targets for cuFlushGPUDirectRDMAWrites

    +
    +
    +CU_FLUSH_GPU_DIRECT_RDMA_WRITES_TARGET_CURRENT_CTX = 0
    +

    Sets the target for cuFlushGPUDirectRDMAWrites() to the currently active CUDA device context.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphDebugDot_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    The additional write options for cuGraphDebugDotPrint

    +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_VERBOSE = 1
    +

    Output all debug data as if every debug flag is enabled

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_RUNTIME_TYPES = 2
    +

    Use CUDA Runtime structures for output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_PARAMS = 4
    +

    Adds CUDA_KERNEL_NODE_PARAMS values to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_MEMCPY_NODE_PARAMS = 8
    +

    Adds CUDA_MEMCPY3D values to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_MEMSET_NODE_PARAMS = 16
    +

    Adds CUDA_MEMSET_NODE_PARAMS values to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_HOST_NODE_PARAMS = 32
    +

    Adds CUDA_HOST_NODE_PARAMS values to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_EVENT_NODE_PARAMS = 64
    +

    Adds CUevent handle from record and wait nodes to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_SIGNAL_NODE_PARAMS = 128
    +

    Adds CUDA_EXT_SEM_SIGNAL_NODE_PARAMS values to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_EXT_SEMAS_WAIT_NODE_PARAMS = 256
    +

    Adds CUDA_EXT_SEM_WAIT_NODE_PARAMS values to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_KERNEL_NODE_ATTRIBUTES = 512
    +

    Adds CUkernelNodeAttrValue values to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_HANDLES = 1024
    +

    Adds node handles and every kernel function handle to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_MEM_ALLOC_NODE_PARAMS = 2048
    +

    Adds memory alloc node parameters to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_MEM_FREE_NODE_PARAMS = 4096
    +

    Adds memory free node parameters to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_BATCH_MEM_OP_NODE_PARAMS = 8192
    +

    Adds batch mem op node parameters to output

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_EXTRA_TOPO_INFO = 16384
    +

    Adds edge numbering information

    +
    + +
    +
    +CU_GRAPH_DEBUG_DOT_FLAGS_CONDITIONAL_NODE_PARAMS = 32768
    +

    Adds conditional node parameters to output

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUuserObject_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for user objects for graphs

    +
    +
    +CU_USER_OBJECT_NO_DESTRUCTOR_SYNC = 1
    +

    Indicates the destructor execution is not synchronized by any CUDA handle.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUuserObjectRetain_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for retaining user object references for graphs

    +
    +
    +CU_GRAPH_USER_OBJECT_MOVE = 1
    +

    Transfer references from the caller rather than creating new references.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphInstantiate_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for instantiating a graph

    +
    +
    +CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH = 1
    +

    Automatically free memory allocated in a graph before relaunching.

    +
    + +
    +
    +CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD = 2
    +

    Automatically upload the graph after instantiation. Only supported by cuGraphInstantiateWithParams. The upload will be performed using the stream provided in instantiateParams.

    +
    + +
    +
    +CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH = 4
    +

    Instantiate the graph to be launchable from the device. This flag can only be used on platforms which support unified addressing. This flag cannot be used in conjunction with CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH.

    +
    + +
    +
    +CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY = 8
    +

    Run the graph using the per-node priority attributes rather than the priority of the stream it is launched into.

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdeviceNumaConfig(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA device NUMA configuration

    +
    +
    +CU_DEVICE_NUMA_CONFIG_NONE = 0
    +

    The GPU is not a NUMA node

    +
    + +
    +
    +CU_DEVICE_NUMA_CONFIG_NUMA_NODE = 1
    +

    The GPU is a NUMA node, CU_DEVICE_ATTRIBUTE_NUMA_ID contains its NUMA ID

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUeglFrameType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA EglFrame type - array or pointer

    +
    +
    +CU_EGL_FRAME_TYPE_ARRAY = 0
    +

    Frame type CUDA array

    +
    + +
    +
    +CU_EGL_FRAME_TYPE_PITCH = 1
    +

    Frame type pointer

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUeglResourceLocationFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Resource location flags- sysmem or vidmem For CUDA context on +iGPU, since video and system memory are equivalent - these flags +will not have an effect on the execution. For CUDA context on +dGPU, applications can use the flag +CUeglResourceLocationFlags to give a hint about the +desired location. CU_EGL_RESOURCE_LOCATION_SYSMEM - +the frame data is made resident on the system memory to be accessed +by CUDA. CU_EGL_RESOURCE_LOCATION_VIDMEM - the frame +data is made resident on the dedicated video memory to be accessed +by CUDA. There may be an additional latency due to new allocation +and data migration, if the frame is produced on a different memory.

    +
    +
    +CU_EGL_RESOURCE_LOCATION_SYSMEM = 0
    +

    Resource location sysmem

    +
    + +
    +
    +CU_EGL_RESOURCE_LOCATION_VIDMEM = 1
    +

    Resource location vidmem

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUeglColorFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA EGL Color Format - The different planar and multiplanar +formats currently supported for CUDA_EGL interops. Three channel +formats are currently not supported for +CU_EGL_FRAME_TYPE_ARRAY

    +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_PLANAR = 0
    +

    Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR = 1
    +

    Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV420Planar.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV422_PLANAR = 2
    +

    Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR = 3
    +

    Y, UV in two surfaces with VU byte ordering, width, height ratio same as YUV422Planar.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_RGB = 4
    +

    R/G/B three channels in one surface with BGR byte ordering. Only pitch linear format supported.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BGR = 5
    +

    R/G/B three channels in one surface with RGB byte ordering. Only pitch linear format supported.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_ARGB = 6
    +

    R/G/B/A four channels in one surface with BGRA byte ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_RGBA = 7
    +

    R/G/B/A four channels in one surface with ABGR byte ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_L = 8
    +

    single luminance channel in one surface.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_R = 9
    +

    single color channel in one surface.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV444_PLANAR = 10
    +

    Y, U, V in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR = 11
    +

    Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV444Planar.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUYV_422 = 12
    +

    Y, U, V in one surface, interleaved as UYVY in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_UYVY_422 = 13
    +

    Y, U, V in one surface, interleaved as YUYV in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_ABGR = 14
    +

    R/G/B/A four channels in one surface with RGBA byte ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BGRA = 15
    +

    R/G/B/A four channels in one surface with ARGB byte ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_A = 16
    +

    Alpha color format - one channel in one surface.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_RG = 17
    +

    R/G color format - two channels in one surface with GR byte ordering

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_AYUV = 18
    +

    Y, U, V, A four channels in one surface, interleaved as VUYA.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR = 19
    +

    Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR = 20
    +

    Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR = 21
    +

    Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR = 22
    +

    Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR = 23
    +

    Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR = 24
    +

    Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR = 25
    +

    Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_VYUY_ER = 26
    +

    Extended Range Y, U, V in one surface, interleaved as YVYU in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_UYVY_ER = 27
    +

    Extended Range Y, U, V in one surface, interleaved as YUYV in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUYV_ER = 28
    +

    Extended Range Y, U, V in one surface, interleaved as UYVY in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVYU_ER = 29
    +

    Extended Range Y, U, V in one surface, interleaved as VYUY in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV_ER = 30
    +

    Extended Range Y, U, V three channels in one surface, interleaved as VUY. Only pitch linear format supported.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUVA_ER = 31
    +

    Extended Range Y, U, V, A four channels in one surface, interleaved as AVUY.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_AYUV_ER = 32
    +

    Extended Range Y, U, V, A four channels in one surface, interleaved as VUYA.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV444_PLANAR_ER = 33
    +

    Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV422_PLANAR_ER = 34
    +

    Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_PLANAR_ER = 35
    +

    Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV444_SEMIPLANAR_ER = 36
    +

    Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV422_SEMIPLANAR_ER = 37
    +

    Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_ER = 38
    +

    Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU444_PLANAR_ER = 39
    +

    Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU422_PLANAR_ER = 40
    +

    Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_PLANAR_ER = 41
    +

    Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU444_SEMIPLANAR_ER = 42
    +

    Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU422_SEMIPLANAR_ER = 43
    +

    Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_ER = 44
    +

    Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_RGGB = 45
    +

    Bayer format - one channel in one surface with interleaved RGGB ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_BGGR = 46
    +

    Bayer format - one channel in one surface with interleaved BGGR ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_GRBG = 47
    +

    Bayer format - one channel in one surface with interleaved GRBG ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_GBRG = 48
    +

    Bayer format - one channel in one surface with interleaved GBRG ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER10_RGGB = 49
    +

    Bayer10 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER10_BGGR = 50
    +

    Bayer10 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER10_GRBG = 51
    +

    Bayer10 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER10_GBRG = 52
    +

    Bayer10 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_RGGB = 53
    +

    Bayer12 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_BGGR = 54
    +

    Bayer12 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_GRBG = 55
    +

    Bayer12 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_GBRG = 56
    +

    Bayer12 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER14_RGGB = 57
    +

    Bayer14 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER14_BGGR = 58
    +

    Bayer14 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER14_GRBG = 59
    +

    Bayer14 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER14_GBRG = 60
    +

    Bayer14 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER20_RGGB = 61
    +

    Bayer20 format - one channel in one surface with interleaved RGGB ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER20_BGGR = 62
    +

    Bayer20 format - one channel in one surface with interleaved BGGR ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER20_GRBG = 63
    +

    Bayer20 format - one channel in one surface with interleaved GRBG ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER20_GBRG = 64
    +

    Bayer20 format - one channel in one surface with interleaved GBRG ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU444_PLANAR = 65
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU422_PLANAR = 66
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_PLANAR = 67
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_ISP_RGGB = 68
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved RGGB ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_ISP_BGGR = 69
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved BGGR ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_ISP_GRBG = 70
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GRBG ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_ISP_GBRG = 71
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GBRG ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_BCCR = 72
    +

    Bayer format - one channel in one surface with interleaved BCCR ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_RCCB = 73
    +

    Bayer format - one channel in one surface with interleaved RCCB ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_CRBC = 74
    +

    Bayer format - one channel in one surface with interleaved CRBC ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER_CBRC = 75
    +

    Bayer format - one channel in one surface with interleaved CBRC ordering.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER10_CCCC = 76
    +

    Bayer10 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_BCCR = 77
    +

    Bayer12 format - one channel in one surface with interleaved BCCR ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_RCCB = 78
    +

    Bayer12 format - one channel in one surface with interleaved RCCB ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_CRBC = 79
    +

    Bayer12 format - one channel in one surface with interleaved CRBC ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_CBRC = 80
    +

    Bayer12 format - one channel in one surface with interleaved CBRC ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_BAYER12_CCCC = 81
    +

    Bayer12 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y = 82
    +

    Color format for single Y plane.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_2020 = 83
    +

    Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_2020 = 84
    +

    Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_PLANAR_2020 = 85
    +

    Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height= 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_PLANAR_2020 = 86
    +

    Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_SEMIPLANAR_709 = 87
    +

    Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_SEMIPLANAR_709 = 88
    +

    Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV420_PLANAR_709 = 89
    +

    Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVU420_PLANAR_709 = 90
    +

    Y, V, U each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709 = 91
    +

    Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_2020 = 92
    +

    Y10, V10U10 in two surfaces (VU as one surface), U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_2020 = 93
    +

    Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR = 94
    +

    Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_422_SEMIPLANAR_709 = 95
    +

    Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y_ER = 96
    +

    Extended Range Color format for single Y plane.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y_709_ER = 97
    +

    Extended Range Color format for single Y plane.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10_ER = 98
    +

    Extended Range Color format for single Y10 plane.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10_709_ER = 99
    +

    Extended Range Color format for single Y10 plane.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12_ER = 100
    +

    Extended Range Color format for single Y12 plane.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12_709_ER = 101
    +

    Extended Range Color format for single Y12 plane.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUVA = 102
    +

    Y, U, V, A four channels in one surface, interleaved as AVUY.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YUV = 103
    +

    Y, U, V three channels in one surface, interleaved as VUY. Only pitch linear format supported.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_YVYU = 104
    +

    Y, U, V in one surface, interleaved as YVYU in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_VYUY = 105
    +

    Y, U, V in one surface, interleaved as VYUY in one channel.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_ER = 106
    +

    Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_420_SEMIPLANAR_709_ER = 107
    +

    Extended Range Y10, V10U10 in two surfaces(VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_ER = 108
    +

    Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y10V10U10_444_SEMIPLANAR_709_ER = 109
    +

    Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_ER = 110
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12V12U12_420_SEMIPLANAR_709_ER = 111
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_ER = 112
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_Y12V12U12_444_SEMIPLANAR_709_ER = 113
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +CU_EGL_COLOR_FORMAT_MAX = 114
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdeviceptr_v2
    +

    CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform.

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdeviceptr
    +

    CUDA device pointer CUdeviceptr is defined as an unsigned integer type whose size matches the size of a pointer on the target platform.

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevice_v1
    +

    CUDA device

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevice
    +

    CUDA device

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUcontext(*args, **kwargs)
    +

    A regular context handle

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmodule(*args, **kwargs)
    +

    CUDA module

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUfunction(*args, **kwargs)
    +

    CUDA function

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlibrary(*args, **kwargs)
    +

    CUDA library

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUkernel(*args, **kwargs)
    +

    CUDA kernel

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUarray(*args, **kwargs)
    +

    CUDA array

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmipmappedArray(*args, **kwargs)
    +

    CUDA mipmapped array

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtexref(*args, **kwargs)
    +

    CUDA texture reference

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUsurfref(*args, **kwargs)
    +

    CUDA surface reference

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUevent(*args, **kwargs)
    +

    CUDA event

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstream(*args, **kwargs)
    +

    CUDA stream

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphicsResource(*args, **kwargs)
    +

    CUDA graphics interop resource

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtexObject_v1
    +

    An opaque value that represents a CUDA texture object

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtexObject
    +

    An opaque value that represents a CUDA texture object

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUsurfObject_v1
    +

    An opaque value that represents a CUDA surface object

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUsurfObject
    +

    An opaque value that represents a CUDA surface object

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexternalMemory(*args, **kwargs)
    +

    CUDA external memory

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexternalSemaphore(*args, **kwargs)
    +

    CUDA external semaphore

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraph(*args, **kwargs)
    +

    CUDA graph

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphNode(*args, **kwargs)
    +

    CUDA graph node

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphExec(*args, **kwargs)
    +

    CUDA executable graph

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemoryPool(*args, **kwargs)
    +

    CUDA memory pool

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUuserObject(*args, **kwargs)
    +

    CUDA user object for graphs

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphConditionalHandle
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphDeviceNode(*args, **kwargs)
    +

    CUDA graph device node handle

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUasyncCallbackHandle(*args, **kwargs)
    +

    CUDA async notification callback handle

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgreenCtx(*args, **kwargs)
    +

    A green context handle. This handle can be used safely from only one CPU thread at a time. Created via cuGreenCtxCreate

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUuuid
    +
    +
    +bytes
    +

    < CUDA definition of UUID

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemFabricHandle_v1
    +

    Fabric handle - An opaque handle representing a memory allocation +that can be exported to processes in same or different nodes. For +IPC between processes on different nodes they must be connected via +the NVSwitch fabric.

    +
    +
    +data
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemFabricHandle
    +

    Fabric handle - An opaque handle representing a memory allocation +that can be exported to processes in same or different nodes. For +IPC between processes on different nodes they must be connected via +the NVSwitch fabric.

    +
    +
    +data
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUipcEventHandle_v1
    +

    CUDA IPC event handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUipcEventHandle
    +

    CUDA IPC event handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUipcMemHandle_v1
    +

    CUDA IPC mem handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUipcMemHandle
    +

    CUDA IPC mem handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamBatchMemOpParams_v1
    +

    Per-operation parameters for cuStreamBatchMemOp

    +
    +
    +operation
    +
    +
    Type:
    +

    CUstreamBatchMemOpType

    +
    +
    +
    + +
    +
    +waitValue
    +
    +
    Type:
    +

    CUstreamMemOpWaitValueParams_st

    +
    +
    +
    + +
    +
    +writeValue
    +
    +
    Type:
    +

    CUstreamMemOpWriteValueParams_st

    +
    +
    +
    + +
    +
    +flushRemoteWrites
    +
    +
    Type:
    +

    CUstreamMemOpFlushRemoteWritesParams_st

    +
    +
    +
    + +
    +
    +memoryBarrier
    +
    +
    Type:
    +

    CUstreamMemOpMemoryBarrierParams_st

    +
    +
    +
    + +
    +
    +pad
    +
    +
    Type:
    +

    List[cuuint64_t]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamBatchMemOpParams
    +

    Per-operation parameters for cuStreamBatchMemOp

    +
    +
    +operation
    +
    +
    Type:
    +

    CUstreamBatchMemOpType

    +
    +
    +
    + +
    +
    +waitValue
    +
    +
    Type:
    +

    CUstreamMemOpWaitValueParams_st

    +
    +
    +
    + +
    +
    +writeValue
    +
    +
    Type:
    +

    CUstreamMemOpWriteValueParams_st

    +
    +
    +
    + +
    +
    +flushRemoteWrites
    +
    +
    Type:
    +

    CUstreamMemOpFlushRemoteWritesParams_st

    +
    +
    +
    + +
    +
    +memoryBarrier
    +
    +
    Type:
    +

    CUstreamMemOpMemoryBarrierParams_st

    +
    +
    +
    + +
    +
    +pad
    +
    +
    Type:
    +

    List[cuuint64_t]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v1
    +
    +
    +ctx
    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +count
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +paramArray
    +
    +
    Type:
    +

    CUstreamBatchMemOpParams

    +
    +
    +
    + +
    +
    +flags
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_BATCH_MEM_OP_NODE_PARAMS
    +
    +
    +ctx
    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +count
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +paramArray
    +
    +
    Type:
    +

    CUstreamBatchMemOpParams

    +
    +
    +
    + +
    +
    +flags
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_BATCH_MEM_OP_NODE_PARAMS_v2
    +

    Batch memory operation node parameters

    +
    +
    +ctx
    +

    Context to use for the operations.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +count
    +

    Number of operations in paramArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +paramArray
    +

    Array of batch memory operations.

    +
    +
    Type:
    +

    CUstreamBatchMemOpParams

    +
    +
    +
    + +
    +
    +flags
    +

    Flags to control the node.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUasyncNotificationInfo
    +

    Information passed to the user via the async notification callback

    +
    +
    +type
    +
    +
    Type:
    +

    CUasyncNotificationType

    +
    +
    +
    + +
    +
    +info
    +
    +
    Type:
    +

    anon_union2

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUasyncCallback(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevprop_v1
    +

    Legacy device properties

    +
    +
    +maxThreadsPerBlock
    +

    Maximum number of threads per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxThreadsDim
    +

    Maximum size of each dimension of a block

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxGridSize
    +

    Maximum size of each dimension of a grid

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +sharedMemPerBlock
    +

    Shared memory available per block in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +totalConstantMemory
    +

    Constant memory available on device in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +SIMDWidth
    +

    Warp size in threads

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memPitch
    +

    Maximum pitch in bytes allowed by memory copies

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +regsPerBlock
    +

    32-bit registers available per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +clockRate
    +

    Clock frequency in kilohertz

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +textureAlign
    +

    Alignment requirement for textures

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevprop
    +

    Legacy device properties

    +
    +
    +maxThreadsPerBlock
    +

    Maximum number of threads per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxThreadsDim
    +

    Maximum size of each dimension of a block

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxGridSize
    +

    Maximum size of each dimension of a grid

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +sharedMemPerBlock
    +

    Shared memory available per block in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +totalConstantMemory
    +

    Constant memory available on device in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +SIMDWidth
    +

    Warp size in threads

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memPitch
    +

    Maximum pitch in bytes allowed by memory copies

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +regsPerBlock
    +

    32-bit registers available per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +clockRate
    +

    Clock frequency in kilohertz

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +textureAlign
    +

    Alignment requirement for textures

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlinkState(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUhostFn(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUaccessPolicyWindow_v1
    +

    Specifies an access policy for a window, a contiguous extent of +memory beginning at base_ptr and ending at base_ptr + num_bytes. +num_bytes is limited by +CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into +many segments and assign segments such that: sum of “hit segments” +/ window == approx. ratio. sum of “miss segments” / window == +approx 1-ratio. Segments and ratio specifications are fitted to the +capabilities of the architecture. Accesses in a hit segment apply +the hitProp access policy. Accesses in a miss segment apply the +missProp access policy.

    +
    +
    +base_ptr
    +

    Starting address of the access policy window. CUDA driver may align +it.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +num_bytes
    +

    Size in bytes of the window policy. CUDA driver may restrict the +maximum size and alignment.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +hitRatio
    +

    hitRatio specifies percentage of lines assigned hitProp, rest are +assigned missProp.

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +hitProp
    +

    CUaccessProperty set for hit.

    +
    +
    Type:
    +

    CUaccessProperty

    +
    +
    +
    + +
    +
    +missProp
    +

    CUaccessProperty set for miss. Must be either NORMAL or STREAMING

    +
    +
    Type:
    +

    CUaccessProperty

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUaccessPolicyWindow
    +

    Specifies an access policy for a window, a contiguous extent of +memory beginning at base_ptr and ending at base_ptr + num_bytes. +num_bytes is limited by +CU_DEVICE_ATTRIBUTE_MAX_ACCESS_POLICY_WINDOW_SIZE. Partition into +many segments and assign segments such that: sum of “hit segments” +/ window == approx. ratio. sum of “miss segments” / window == +approx 1-ratio. Segments and ratio specifications are fitted to the +capabilities of the architecture. Accesses in a hit segment apply +the hitProp access policy. Accesses in a miss segment apply the +missProp access policy.

    +
    +
    +base_ptr
    +

    Starting address of the access policy window. CUDA driver may align +it.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +num_bytes
    +

    Size in bytes of the window policy. CUDA driver may restrict the +maximum size and alignment.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +hitRatio
    +

    hitRatio specifies percentage of lines assigned hitProp, rest are +assigned missProp.

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +hitProp
    +

    CUaccessProperty set for hit.

    +
    +
    Type:
    +

    CUaccessProperty

    +
    +
    +
    + +
    +
    +missProp
    +

    CUaccessProperty set for miss. Must be either NORMAL or STREAMING

    +
    +
    Type:
    +

    CUaccessProperty

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS_v1
    +

    GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Extra options

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS_v2
    +

    GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Extra options

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +kern
    +

    Kernel to launch, will only be referenced if func is NULL

    +
    +
    Type:
    +

    CUkernel

    +
    +
    +
    + +
    +
    +ctx
    +

    Context for the kernel task to run in. The value NULL will indicate +the current context should be used by the api. This field is +ignored if func is set.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS
    +

    GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Extra options

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +kern
    +

    Kernel to launch, will only be referenced if func is NULL

    +
    +
    Type:
    +

    CUkernel

    +
    +
    +
    + +
    +
    +ctx
    +

    Context for the kernel task to run in. The value NULL will indicate +the current context should be used by the api. This field is +ignored if func is set.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_KERNEL_NODE_PARAMS_v3
    +

    GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Extra options

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +kern
    +

    Kernel to launch, will only be referenced if func is NULL

    +
    +
    Type:
    +

    CUkernel

    +
    +
    +
    + +
    +
    +ctx
    +

    Context for the kernel task to run in. The value NULL will indicate +the current context should be used by the api. This field is +ignored if func is set.

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMSET_NODE_PARAMS_v1
    +

    Memset node parameters

    +
    +
    +dst
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of destination device pointer. Unused if height is 1

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +value
    +

    Value to be set

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +elementSize
    +

    Size of each element in bytes. Must be 1, 2, or 4.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +width
    +

    Width of the row in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Number of rows

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMSET_NODE_PARAMS
    +

    Memset node parameters

    +
    +
    +dst
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of destination device pointer. Unused if height is 1

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +value
    +

    Value to be set

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +elementSize
    +

    Size of each element in bytes. Must be 1, 2, or 4.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +width
    +

    Width of the row in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Number of rows

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMSET_NODE_PARAMS_v2
    +

    Memset node parameters

    +
    +
    +dst
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of destination device pointer. Unused if height is 1

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +value
    +

    Value to be set

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +elementSize
    +

    Size of each element in bytes. Must be 1, 2, or 4.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +width
    +

    Width of the row in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Number of rows

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +ctx
    +

    Context on which to run the node

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_v1
    +

    Host node parameters

    +
    +
    +fn
    +

    The function to call when the node executes

    +
    +
    Type:
    +

    CUhostFn

    +
    +
    +
    + +
    +
    +userData
    +

    Argument to pass to the function

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_HOST_NODE_PARAMS
    +

    Host node parameters

    +
    +
    +fn
    +

    The function to call when the node executes

    +
    +
    Type:
    +

    CUhostFn

    +
    +
    +
    + +
    +
    +userData
    +

    Argument to pass to the function

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_HOST_NODE_PARAMS_v2
    +

    Host node parameters

    +
    +
    +fn
    +

    The function to call when the node executes

    +
    +
    Type:
    +

    CUhostFn

    +
    +
    +
    + +
    +
    +userData
    +

    Argument to pass to the function

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphEdgeData
    +

    Optional annotation for edges in a CUDA graph. Note, all edges +implicitly have annotations and default to a zero-initialized value +if not specified. A zero-initialized struct indicates a standard +full serialization of two nodes with memory visibility.

    +
    +
    +from_port
    +

    This indicates when the dependency is triggered from the upstream +node on the edge. The meaning is specfic to the node type. A value +of 0 in all cases means full completion of the upstream node, with +memory visibility to the downstream node or portion thereof +(indicated by to_port). Only kernel nodes define non-zero +ports. A kernel node can use the following output port types: +CU_GRAPH_KERNEL_NODE_PORT_DEFAULT, +CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC, or +CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +to_port
    +

    This indicates what portion of the downstream node is dependent on +the upstream node or portion thereof (indicated by from_port). +The meaning is specific to the node type. A value of 0 in all cases +means the entirety of the downstream node is dependent on the +upstream work. Currently no node types define non-zero ports. +Accordingly, this field must be set to zero.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +type
    +

    This should be populated with a value from CUgraphDependencyType. +(It is typed as char due to compiler-specific layout of bitfields.) +See CUgraphDependencyType.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +reserved
    +

    These bytes are unused and must be zeroed. This ensures +compatibility if additional fields are added in the future.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_GRAPH_INSTANTIATE_PARAMS
    +

    Graph instantiation parameters

    +
    +
    +flags
    +

    Instantiation flags

    +
    +
    Type:
    +

    cuuint64_t

    +
    +
    +
    + +
    +
    +hUploadStream
    +

    Upload stream

    +
    +
    Type:
    +

    CUstream

    +
    +
    +
    + +
    +
    +hErrNode_out
    +

    The node which caused instantiation to fail, if any

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +result_out
    +

    Whether instantiation was successful. If it failed, the reason why

    +
    +
    Type:
    +

    CUgraphInstantiateResult

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchMemSyncDomainMap
    +

    Memory Synchronization Domain map See ::cudaLaunchMemSyncDomain. +By default, kernels are launched in domain 0. Kernel launched with +CU_LAUNCH_MEM_SYNC_DOMAIN_REMOTE will have a different domain ID. +User may also alter the domain ID with CUlaunchMemSyncDomainMap for +a specific stream / graph node / kernel launch. See +CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. Domain ID range is +available through CU_DEVICE_ATTRIBUTE_MEM_SYNC_DOMAIN_COUNT.

    +
    +
    +default_
    +

    The default domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +remote
    +

    The remote domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchAttributeValue
    +

    Launch attributes union; used as value field of CUlaunchAttribute

    +
    +
    +pad
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +accessPolicyWindow
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW.

    +
    +
    Type:
    +

    CUaccessPolicyWindow

    +
    +
    +
    + +
    +
    +cooperative
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero +indicates a cooperative kernel (see cuLaunchCooperativeKernel).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +syncPolicy
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. +::CUsynchronizationPolicy for work queued up in this stream

    +
    +
    Type:
    +

    CUsynchronizationPolicy

    +
    +
    +
    + +
    +
    +clusterDim
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION +that represents the desired cluster dimensions for the kernel. +Opaque type with the following fields: - x - The X dimension of +the cluster, in blocks. Must be a divisor of the grid X dimension. +- y - The Y dimension of the cluster, in blocks. Must be a +divisor of the grid Y dimension. - z - The Z dimension of the +cluster, in blocks. Must be a divisor of the grid Z dimension.

    +
    +
    Type:
    +

    anon_struct1

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster +scheduling policy preference for the kernel.

    +
    +
    Type:
    +

    CUclusterSchedulingPolicy

    +
    +
    +
    + +
    +
    +programmaticStreamSerializationAllowed
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +programmaticEvent
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT +with the following fields: - CUevent event - Event to fire when +all blocks trigger it. - Event record flags, see +cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. +- triggerAtBlockStart - If this is set to non-0, each block +launch will automatically trigger the event.

    +
    +
    Type:
    +

    anon_struct2

    +
    +
    +
    + +
    +
    +launchCompletionEvent
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following +fields: - CUevent event - Event to fire when the last block +launches - int flags; - Event record flags, see +cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL.

    +
    +
    Type:
    +

    anon_struct3

    +
    +
    +
    + +
    +
    +priority
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution +priority of the kernel.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memSyncDomainMap
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. +See CUlaunchMemSyncDomainMap.

    +
    +
    Type:
    +

    CUlaunchMemSyncDomainMap

    +
    +
    +
    + +
    +
    +memSyncDomain
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. +See::CUlaunchMemSyncDomain

    +
    +
    Type:
    +

    CUlaunchMemSyncDomain

    +
    +
    +
    + +
    +
    +deviceUpdatableKernelNode
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the +following fields: - int deviceUpdatable - Whether or not the +resulting kernel node should be device-updatable. - +CUgraphDeviceNode devNode - Returns a handle to pass to the +various device-side update functions.

    +
    +
    Type:
    +

    anon_struct4

    +
    +
    +
    + +
    +
    +sharedMemCarveout
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchAttribute
    +

    Launch attribute

    +
    +
    +id
    +

    Attribute to set

    +
    +
    Type:
    +

    CUlaunchAttributeID

    +
    +
    +
    + +
    +
    +value
    +

    Value of the attribute

    +
    +
    Type:
    +

    CUlaunchAttributeValue

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlaunchConfig
    +

    CUDA extensible launch configuration

    +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +hStream
    +

    Stream identifier

    +
    +
    Type:
    +

    CUstream

    +
    +
    +
    + +
    +
    +attrs
    +

    List of attributes; nullable if CUlaunchConfig::numAttrs == 0

    +
    +
    Type:
    +

    CUlaunchAttribute

    +
    +
    +
    + +
    +
    +numAttrs
    +

    Number of attributes populated in CUlaunchConfig::attrs

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUkernelNodeAttrID(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Launch attributes enum; used as id field of +CUlaunchAttribute

    +
    + +
    +
    +class cuda.bindings.driver.CUkernelNodeAttrValue_v1
    +

    Launch attributes union; used as value field of CUlaunchAttribute

    +
    +
    +pad
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +accessPolicyWindow
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW.

    +
    +
    Type:
    +

    CUaccessPolicyWindow

    +
    +
    +
    + +
    +
    +cooperative
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero +indicates a cooperative kernel (see cuLaunchCooperativeKernel).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +syncPolicy
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. +::CUsynchronizationPolicy for work queued up in this stream

    +
    +
    Type:
    +

    CUsynchronizationPolicy

    +
    +
    +
    + +
    +
    +clusterDim
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION +that represents the desired cluster dimensions for the kernel. +Opaque type with the following fields: - x - The X dimension of +the cluster, in blocks. Must be a divisor of the grid X dimension. +- y - The Y dimension of the cluster, in blocks. Must be a +divisor of the grid Y dimension. - z - The Z dimension of the +cluster, in blocks. Must be a divisor of the grid Z dimension.

    +
    +
    Type:
    +

    anon_struct1

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster +scheduling policy preference for the kernel.

    +
    +
    Type:
    +

    CUclusterSchedulingPolicy

    +
    +
    +
    + +
    +
    +programmaticStreamSerializationAllowed
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +programmaticEvent
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT +with the following fields: - CUevent event - Event to fire when +all blocks trigger it. - Event record flags, see +cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. +- triggerAtBlockStart - If this is set to non-0, each block +launch will automatically trigger the event.

    +
    +
    Type:
    +

    anon_struct2

    +
    +
    +
    + +
    +
    +launchCompletionEvent
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following +fields: - CUevent event - Event to fire when the last block +launches - int flags; - Event record flags, see +cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL.

    +
    +
    Type:
    +

    anon_struct3

    +
    +
    +
    + +
    +
    +priority
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution +priority of the kernel.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memSyncDomainMap
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. +See CUlaunchMemSyncDomainMap.

    +
    +
    Type:
    +

    CUlaunchMemSyncDomainMap

    +
    +
    +
    + +
    +
    +memSyncDomain
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. +See::CUlaunchMemSyncDomain

    +
    +
    Type:
    +

    CUlaunchMemSyncDomain

    +
    +
    +
    + +
    +
    +deviceUpdatableKernelNode
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the +following fields: - int deviceUpdatable - Whether or not the +resulting kernel node should be device-updatable. - +CUgraphDeviceNode devNode - Returns a handle to pass to the +various device-side update functions.

    +
    +
    Type:
    +

    anon_struct4

    +
    +
    +
    + +
    +
    +sharedMemCarveout
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUkernelNodeAttrValue
    +

    Launch attributes union; used as value field of CUlaunchAttribute

    +
    +
    +pad
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +accessPolicyWindow
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW.

    +
    +
    Type:
    +

    CUaccessPolicyWindow

    +
    +
    +
    + +
    +
    +cooperative
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero +indicates a cooperative kernel (see cuLaunchCooperativeKernel).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +syncPolicy
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. +::CUsynchronizationPolicy for work queued up in this stream

    +
    +
    Type:
    +

    CUsynchronizationPolicy

    +
    +
    +
    + +
    +
    +clusterDim
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION +that represents the desired cluster dimensions for the kernel. +Opaque type with the following fields: - x - The X dimension of +the cluster, in blocks. Must be a divisor of the grid X dimension. +- y - The Y dimension of the cluster, in blocks. Must be a +divisor of the grid Y dimension. - z - The Z dimension of the +cluster, in blocks. Must be a divisor of the grid Z dimension.

    +
    +
    Type:
    +

    anon_struct1

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster +scheduling policy preference for the kernel.

    +
    +
    Type:
    +

    CUclusterSchedulingPolicy

    +
    +
    +
    + +
    +
    +programmaticStreamSerializationAllowed
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +programmaticEvent
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT +with the following fields: - CUevent event - Event to fire when +all blocks trigger it. - Event record flags, see +cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. +- triggerAtBlockStart - If this is set to non-0, each block +launch will automatically trigger the event.

    +
    +
    Type:
    +

    anon_struct2

    +
    +
    +
    + +
    +
    +launchCompletionEvent
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following +fields: - CUevent event - Event to fire when the last block +launches - int flags; - Event record flags, see +cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL.

    +
    +
    Type:
    +

    anon_struct3

    +
    +
    +
    + +
    +
    +priority
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution +priority of the kernel.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memSyncDomainMap
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. +See CUlaunchMemSyncDomainMap.

    +
    +
    Type:
    +

    CUlaunchMemSyncDomainMap

    +
    +
    +
    + +
    +
    +memSyncDomain
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. +See::CUlaunchMemSyncDomain

    +
    +
    Type:
    +

    CUlaunchMemSyncDomain

    +
    +
    +
    + +
    +
    +deviceUpdatableKernelNode
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the +following fields: - int deviceUpdatable - Whether or not the +resulting kernel node should be device-updatable. - +CUgraphDeviceNode devNode - Returns a handle to pass to the +various device-side update functions.

    +
    +
    Type:
    +

    anon_struct4

    +
    +
    +
    + +
    +
    +sharedMemCarveout
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamAttrID(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Launch attributes enum; used as id field of +CUlaunchAttribute

    +
    + +
    +
    +class cuda.bindings.driver.CUstreamAttrValue_v1
    +

    Launch attributes union; used as value field of CUlaunchAttribute

    +
    +
    +pad
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +accessPolicyWindow
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW.

    +
    +
    Type:
    +

    CUaccessPolicyWindow

    +
    +
    +
    + +
    +
    +cooperative
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero +indicates a cooperative kernel (see cuLaunchCooperativeKernel).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +syncPolicy
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. +::CUsynchronizationPolicy for work queued up in this stream

    +
    +
    Type:
    +

    CUsynchronizationPolicy

    +
    +
    +
    + +
    +
    +clusterDim
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION +that represents the desired cluster dimensions for the kernel. +Opaque type with the following fields: - x - The X dimension of +the cluster, in blocks. Must be a divisor of the grid X dimension. +- y - The Y dimension of the cluster, in blocks. Must be a +divisor of the grid Y dimension. - z - The Z dimension of the +cluster, in blocks. Must be a divisor of the grid Z dimension.

    +
    +
    Type:
    +

    anon_struct1

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster +scheduling policy preference for the kernel.

    +
    +
    Type:
    +

    CUclusterSchedulingPolicy

    +
    +
    +
    + +
    +
    +programmaticStreamSerializationAllowed
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +programmaticEvent
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT +with the following fields: - CUevent event - Event to fire when +all blocks trigger it. - Event record flags, see +cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. +- triggerAtBlockStart - If this is set to non-0, each block +launch will automatically trigger the event.

    +
    +
    Type:
    +

    anon_struct2

    +
    +
    +
    + +
    +
    +launchCompletionEvent
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following +fields: - CUevent event - Event to fire when the last block +launches - int flags; - Event record flags, see +cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL.

    +
    +
    Type:
    +

    anon_struct3

    +
    +
    +
    + +
    +
    +priority
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution +priority of the kernel.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memSyncDomainMap
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. +See CUlaunchMemSyncDomainMap.

    +
    +
    Type:
    +

    CUlaunchMemSyncDomainMap

    +
    +
    +
    + +
    +
    +memSyncDomain
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. +See::CUlaunchMemSyncDomain

    +
    +
    Type:
    +

    CUlaunchMemSyncDomain

    +
    +
    +
    + +
    +
    +deviceUpdatableKernelNode
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the +following fields: - int deviceUpdatable - Whether or not the +resulting kernel node should be device-updatable. - +CUgraphDeviceNode devNode - Returns a handle to pass to the +various device-side update functions.

    +
    +
    Type:
    +

    anon_struct4

    +
    +
    +
    + +
    +
    +sharedMemCarveout
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamAttrValue
    +

    Launch attributes union; used as value field of CUlaunchAttribute

    +
    +
    +pad
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +accessPolicyWindow
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_ACCESS_POLICY_WINDOW.

    +
    +
    Type:
    +

    CUaccessPolicyWindow

    +
    +
    +
    + +
    +
    +cooperative
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_COOPERATIVE. Nonzero +indicates a cooperative kernel (see cuLaunchCooperativeKernel).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +syncPolicy
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_SYNCHRONIZATION_POLICY. +::CUsynchronizationPolicy for work queued up in this stream

    +
    +
    Type:
    +

    CUsynchronizationPolicy

    +
    +
    +
    + +
    +
    +clusterDim
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_CLUSTER_DIMENSION +that represents the desired cluster dimensions for the kernel. +Opaque type with the following fields: - x - The X dimension of +the cluster, in blocks. Must be a divisor of the grid X dimension. +- y - The Y dimension of the cluster, in blocks. Must be a +divisor of the grid Y dimension. - z - The Z dimension of the +cluster, in blocks. Must be a divisor of the grid Z dimension.

    +
    +
    Type:
    +

    anon_struct1

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE. Cluster +scheduling policy preference for the kernel.

    +
    +
    Type:
    +

    CUclusterSchedulingPolicy

    +
    +
    +
    + +
    +
    +programmaticStreamSerializationAllowed
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +programmaticEvent
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT +with the following fields: - CUevent event - Event to fire when +all blocks trigger it. - Event record flags, see +cuEventRecordWithFlags. Does not accept :CU_EVENT_RECORD_EXTERNAL. +- triggerAtBlockStart - If this is set to non-0, each block +launch will automatically trigger the event.

    +
    +
    Type:
    +

    anon_struct2

    +
    +
    +
    + +
    +
    +launchCompletionEvent
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT with the following +fields: - CUevent event - Event to fire when the last block +launches - int flags; - Event record flags, see +cuEventRecordWithFlags. Does not accept CU_EVENT_RECORD_EXTERNAL.

    +
    +
    Type:
    +

    anon_struct3

    +
    +
    +
    + +
    +
    +priority
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_PRIORITY. Execution +priority of the kernel.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memSyncDomainMap
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP. +See CUlaunchMemSyncDomainMap.

    +
    +
    Type:
    +

    CUlaunchMemSyncDomainMap

    +
    +
    +
    + +
    +
    +memSyncDomain
    +

    Value of launch attribute CU_LAUNCH_ATTRIBUTE_MEM_SYNC_DOMAIN. +See::CUlaunchMemSyncDomain

    +
    +
    Type:
    +

    CUlaunchMemSyncDomain

    +
    +
    +
    + +
    +
    +deviceUpdatableKernelNode
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE. with the +following fields: - int deviceUpdatable - Whether or not the +resulting kernel node should be device-updatable. - +CUgraphDeviceNode devNode - Returns a handle to pass to the +various device-side update functions.

    +
    +
    Type:
    +

    anon_struct4

    +
    +
    +
    + +
    +
    +sharedMemCarveout
    +

    Value of launch attribute +CU_LAUNCH_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexecAffinitySmCount_v1
    +

    Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT

    +
    +
    +val
    +

    The number of SMs the context is limited to use.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexecAffinitySmCount
    +

    Value for CU_EXEC_AFFINITY_TYPE_SM_COUNT

    +
    +
    +val
    +

    The number of SMs the context is limited to use.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexecAffinityParam_v1
    +

    Execution Affinity Parameters

    +
    +
    +type
    +
    +
    Type:
    +

    CUexecAffinityType

    +
    +
    +
    + +
    +
    +param
    +
    +
    Type:
    +

    anon_union3

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUexecAffinityParam
    +

    Execution Affinity Parameters

    +
    +
    +type
    +
    +
    Type:
    +

    CUexecAffinityType

    +
    +
    +
    + +
    +
    +param
    +
    +
    Type:
    +

    anon_union3

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUctxCigParam
    +

    CIG Context Create Params

    +
    +
    +sharedDataType
    +
    +
    Type:
    +

    CUcigDataType

    +
    +
    +
    + +
    +
    +sharedData
    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUctxCreateParams
    +

    Params for creating CUDA context Exactly one of execAffinityParams +and cigParams must be non-NULL.

    +
    +
    +execAffinityParams
    +
    +
    Type:
    +

    CUexecAffinityParam

    +
    +
    +
    + +
    +
    +numExecAffinityParams
    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +cigParams
    +
    +
    Type:
    +

    CUctxCigParam

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUlibraryHostUniversalFunctionAndDataTable
    +
    +
    +functionTable
    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +functionWindowSize
    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dataTable
    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dataWindowSize
    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUstreamCallback(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUoccupancyB2DSize(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY2D_v2
    +

    2D memory copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 2D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 2D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY2D
    +

    2D memory copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 2D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 2D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY3D_v2
    +

    3D memory copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcZ
    +

    Source Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcLOD
    +

    Source LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +reserved0
    +

    Must be NULL

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcHeight
    +

    Source height (ignored when src is array; may be 0 if Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstZ
    +

    Destination Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstLOD
    +

    Destination LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +reserved1
    +

    Must be NULL

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstHeight
    +

    Destination height (ignored when dst is array; may be 0 if +Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 3D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY3D
    +

    3D memory copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcZ
    +

    Source Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcLOD
    +

    Source LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +reserved0
    +

    Must be NULL

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcHeight
    +

    Source height (ignored when src is array; may be 0 if Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstZ
    +

    Destination Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstLOD
    +

    Destination LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +reserved1
    +

    Must be NULL

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstHeight
    +

    Destination height (ignored when dst is array; may be 0 if +Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 3D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY3D_PEER_v1
    +

    3D memory cross-context copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcZ
    +

    Source Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcLOD
    +

    Source LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +srcContext
    +

    Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY)

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcHeight
    +

    Source height (ignored when src is array; may be 0 if Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstZ
    +

    Destination Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstLOD
    +

    Destination LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +dstContext
    +

    Destination context (ignored with dstMemoryType is +CU_MEMORYTYPE_ARRAY)

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstHeight
    +

    Destination height (ignored when dst is array; may be 0 if +Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 3D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY3D_PEER
    +

    3D memory cross-context copy parameters

    +
    +
    +srcXInBytes
    +

    Source X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcY
    +

    Source Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcZ
    +

    Source Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcLOD
    +

    Source LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcMemoryType
    +

    Source memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +srcHost
    +

    Source host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +srcArray
    +

    Source array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +srcContext
    +

    Source context (ignored with srcMemoryType is CU_MEMORYTYPE_ARRAY)

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +srcPitch
    +

    Source pitch (ignored when src is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +srcHeight
    +

    Source height (ignored when src is array; may be 0 if Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstXInBytes
    +

    Destination X in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstY
    +

    Destination Y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstZ
    +

    Destination Z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstLOD
    +

    Destination LOD

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstMemoryType
    +

    Destination memory type (host, device, array)

    +
    +
    Type:
    +

    CUmemorytype

    +
    +
    +
    + +
    +
    +dstHost
    +

    Destination host pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device pointer

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination array reference

    +
    +
    Type:
    +

    CUarray

    +
    +
    +
    + +
    +
    +dstContext
    +

    Destination context (ignored with dstMemoryType is +CU_MEMORYTYPE_ARRAY)

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +dstPitch
    +

    Destination pitch (ignored when dst is array)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dstHeight
    +

    Destination height (ignored when dst is array; may be 0 if +Depth==1)

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +WidthInBytes
    +

    Width of 3D memory copy in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D memory copy

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEMCPY_NODE_PARAMS
    +

    Memcpy node parameters

    +
    +
    +flags
    +

    Must be zero

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +reserved
    +

    Must be zero

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +copyCtx
    +

    Context on which to run the node

    +
    +
    Type:
    +

    CUcontext

    +
    +
    +
    + +
    +
    +copyParams
    +

    Parameters for the memory copy

    +
    +
    Type:
    +

    CUDA_MEMCPY3D

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_DESCRIPTOR_v2
    +

    Array descriptor

    +
    +
    +Width
    +

    Width of array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Format
    +

    Array format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +NumChannels
    +

    Channels per array element

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_DESCRIPTOR
    +

    Array descriptor

    +
    +
    +Width
    +

    Width of array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Format
    +

    Array format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +NumChannels
    +

    Channels per array element

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY3D_DESCRIPTOR_v2
    +

    3D array descriptor

    +
    +
    +Width
    +

    Width of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Format
    +

    Array format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +NumChannels
    +

    Channels per array element

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +Flags
    +

    Flags

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY3D_DESCRIPTOR
    +

    3D array descriptor

    +
    +
    +Width
    +

    Width of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Height
    +

    Height of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Depth
    +

    Depth of 3D array

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +Format
    +

    Array format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +NumChannels
    +

    Channels per array element

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +Flags
    +

    Flags

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_SPARSE_PROPERTIES_v1
    +

    CUDA array sparse properties

    +
    +
    +tileExtent
    +
    +
    Type:
    +

    anon_struct5

    +
    +
    +
    + +
    +
    +miptailFirstLevel
    +

    First mip level at which the mip tail begins.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +miptailSize
    +

    Total size of the mip tail.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags will either be zero or +CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_SPARSE_PROPERTIES
    +

    CUDA array sparse properties

    +
    +
    +tileExtent
    +
    +
    Type:
    +

    anon_struct5

    +
    +
    +
    + +
    +
    +miptailFirstLevel
    +

    First mip level at which the mip tail begins.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +miptailSize
    +

    Total size of the mip tail.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags will either be zero or +CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_MEMORY_REQUIREMENTS_v1
    +

    CUDA array memory requirements

    +
    +
    +size
    +

    Total required memory size

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +alignment
    +

    alignment requirement

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_ARRAY_MEMORY_REQUIREMENTS
    +

    CUDA array memory requirements

    +
    +
    +size
    +

    Total required memory size

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +alignment
    +

    alignment requirement

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_RESOURCE_DESC_v1
    +

    CUDA Resource descriptor

    +
    +
    +resType
    +

    Resource type

    +
    +
    Type:
    +

    CUresourcetype

    +
    +
    +
    + +
    +
    +res
    +
    +
    Type:
    +

    anon_union4

    +
    +
    +
    + +
    +
    +flags
    +

    Flags (must be zero)

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_RESOURCE_DESC
    +

    CUDA Resource descriptor

    +
    +
    +resType
    +

    Resource type

    +
    +
    Type:
    +

    CUresourcetype

    +
    +
    +
    + +
    +
    +res
    +
    +
    Type:
    +

    anon_union4

    +
    +
    +
    + +
    +
    +flags
    +

    Flags (must be zero)

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_TEXTURE_DESC_v1
    +

    Texture descriptor

    +
    +
    +addressMode
    +

    Address modes

    +
    +
    Type:
    +

    List[CUaddress_mode]

    +
    +
    +
    + +
    +
    +filterMode
    +

    Filter mode

    +
    +
    Type:
    +

    CUfilter_mode

    +
    +
    +
    + +
    +
    +flags
    +

    Flags

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +maxAnisotropy
    +

    Maximum anisotropy ratio

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +mipmapFilterMode
    +

    Mipmap filter mode

    +
    +
    Type:
    +

    CUfilter_mode

    +
    +
    +
    + +
    +
    +mipmapLevelBias
    +

    Mipmap level bias

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +minMipmapLevelClamp
    +

    Mipmap minimum level clamp

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +maxMipmapLevelClamp
    +

    Mipmap maximum level clamp

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +borderColor
    +

    Border Color

    +
    +
    Type:
    +

    List[float]

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_TEXTURE_DESC
    +

    Texture descriptor

    +
    +
    +addressMode
    +

    Address modes

    +
    +
    Type:
    +

    List[CUaddress_mode]

    +
    +
    +
    + +
    +
    +filterMode
    +

    Filter mode

    +
    +
    Type:
    +

    CUfilter_mode

    +
    +
    +
    + +
    +
    +flags
    +

    Flags

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +maxAnisotropy
    +

    Maximum anisotropy ratio

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +mipmapFilterMode
    +

    Mipmap filter mode

    +
    +
    Type:
    +

    CUfilter_mode

    +
    +
    +
    + +
    +
    +mipmapLevelBias
    +

    Mipmap level bias

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +minMipmapLevelClamp
    +

    Mipmap minimum level clamp

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +maxMipmapLevelClamp
    +

    Mipmap maximum level clamp

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +borderColor
    +

    Border Color

    +
    +
    Type:
    +

    List[float]

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_RESOURCE_VIEW_DESC_v1
    +

    Resource view descriptor

    +
    +
    +format
    +

    Resource view format

    +
    +
    Type:
    +

    CUresourceViewFormat

    +
    +
    +
    + +
    +
    +width
    +

    Width of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Height of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +firstMipmapLevel
    +

    First defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastMipmapLevel
    +

    Last defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +firstLayer
    +

    First layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastLayer
    +

    Last layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_RESOURCE_VIEW_DESC
    +

    Resource view descriptor

    +
    +
    +format
    +

    Resource view format

    +
    +
    Type:
    +

    CUresourceViewFormat

    +
    +
    +
    + +
    +
    +width
    +

    Width of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Height of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +firstMipmapLevel
    +

    First defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastMipmapLevel
    +

    Last defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +firstLayer
    +

    First layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastLayer
    +

    Last layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUtensorMap
    +

    Tensor map descriptor. Requires compiler support for aligning to 64 +bytes.

    +
    +
    +opaque
    +
    +
    Type:
    +

    List[cuuint64_t]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS_v1
    +

    GPU Direct v3 tokens

    +
    +
    +p2pToken
    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +vaSpaceToken
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_POINTER_ATTRIBUTE_P2P_TOKENS
    +

    GPU Direct v3 tokens

    +
    +
    +p2pToken
    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +vaSpaceToken
    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_LAUNCH_PARAMS_v1
    +

    Kernel launch parameters

    +
    +
    +function
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +hStream
    +

    Stream identifier

    +
    +
    Type:
    +

    CUstream

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_LAUNCH_PARAMS
    +

    Kernel launch parameters

    +
    +
    +function
    +

    Kernel to launch

    +
    +
    Type:
    +

    CUfunction

    +
    +
    +
    + +
    +
    +gridDimX
    +

    Width of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimY
    +

    Height of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gridDimZ
    +

    Depth of grid in blocks

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimX
    +

    X dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimY
    +

    Y dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +blockDimZ
    +

    Z dimension of each thread block

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +hStream
    +

    Stream identifier

    +
    +
    Type:
    +

    CUstream

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to kernel parameters

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC_v1
    +

    External memory handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    CUexternalMemoryHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union5

    +
    +
    +
    + +
    +
    +size
    +

    Size of the memory allocation

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_HANDLE_DESC
    +

    External memory handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    CUexternalMemoryHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union5

    +
    +
    +
    + +
    +
    +size
    +

    Size of the memory allocation

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags must either be zero or CUDA_EXTERNAL_MEMORY_DEDICATED

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC_v1
    +

    External memory buffer descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the buffer’s base is

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +size
    +

    Size of the buffer

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for future use. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_BUFFER_DESC
    +

    External memory buffer descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the buffer’s base is

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +size
    +

    Size of the buffer

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for future use. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC_v1
    +

    External memory mipmap descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the base level of the mipmap +chain is.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +arrayDesc
    +

    Format, dimension and type of base level of the mipmap chain

    +
    +
    Type:
    +

    CUDA_ARRAY3D_DESCRIPTOR

    +
    +
    +
    + +
    +
    +numLevels
    +

    Total number of levels in the mipmap chain

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC
    +

    External memory mipmap descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the base level of the mipmap +chain is.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +arrayDesc
    +

    Format, dimension and type of base level of the mipmap chain

    +
    +
    Type:
    +

    CUDA_ARRAY3D_DESCRIPTOR

    +
    +
    +
    + +
    +
    +numLevels
    +

    Total number of levels in the mipmap chain

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC_v1
    +

    External semaphore handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    CUexternalSemaphoreHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union6

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for the future. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC
    +

    External semaphore handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    CUexternalSemaphoreHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union6

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for the future. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS_v1
    +

    External semaphore signal parameters

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct15

    +
    +
    +
    + +
    +
    +flags
    +

    Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal +a CUexternalSemaphore of type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which +indicates that while signaling the CUexternalSemaphore, no memory +synchronization operations should be performed for any external +memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. +For all other types of CUexternalSemaphore, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS
    +

    External semaphore signal parameters

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct15

    +
    +
    +
    + +
    +
    +flags
    +

    Only when ::CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS is used to signal +a CUexternalSemaphore of type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC which +indicates that while signaling the CUexternalSemaphore, no memory +synchronization operations should be performed for any external +memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. +For all other types of CUexternalSemaphore, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS_v1
    +

    External semaphore wait parameters

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct18

    +
    +
    +
    + +
    +
    +flags
    +

    Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on +a CUexternalSemaphore of type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is +CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates +that while waiting for the CUexternalSemaphore, no memory +synchronization operations should be performed for any external +memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. +For all other types of CUexternalSemaphore, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS
    +

    External semaphore wait parameters

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct18

    +
    +
    +
    + +
    +
    +flags
    +

    Only when ::CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS is used to wait on +a CUexternalSemaphore of type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, the valid flag is +CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC which indicates +that while waiting for the CUexternalSemaphore, no memory +synchronization operations should be performed for any external +memory object imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. +For all other types of CUexternalSemaphore, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v1
    +

    Semaphore signal node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore signal parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS
    +

    Semaphore signal node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore signal parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2
    +

    Semaphore signal node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore signal parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v1
    +

    Semaphore wait node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore wait parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_WAIT_NODE_PARAMS
    +

    Semaphore wait node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore wait parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2
    +

    Semaphore wait node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    CUexternalSemaphore

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore wait parameters.

    +
    +
    Type:
    +

    CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemGenericAllocationHandle_v1
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemGenericAllocationHandle
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUarrayMapInfo_v1
    +

    Specifies the CUDA array or CUDA mipmapped array memory mapping +information

    +
    +
    +resourceType
    +

    Resource type

    +
    +
    Type:
    +

    CUresourcetype

    +
    +
    +
    + +
    +
    +resource
    +
    +
    Type:
    +

    anon_union9

    +
    +
    +
    + +
    +
    +subresourceType
    +

    Sparse subresource type

    +
    +
    Type:
    +

    CUarraySparseSubresourceType

    +
    +
    +
    + +
    +
    +subresource
    +
    +
    Type:
    +

    anon_union10

    +
    +
    +
    + +
    +
    +memOperationType
    +

    Memory operation type

    +
    +
    Type:
    +

    CUmemOperationType

    +
    +
    +
    + +
    +
    +memHandleType
    +

    Memory handle type

    +
    +
    Type:
    +

    CUmemHandleType

    +
    +
    +
    + +
    +
    +memHandle
    +
    +
    Type:
    +

    anon_union11

    +
    +
    +
    + +
    +
    +offset
    +

    Offset within mip tail Offset within the memory

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +deviceBitMask
    +

    Device ordinal bit mask

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +flags
    +

    flags for future use, must be zero now.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +

    Reserved for future use, must be zero now.

    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUarrayMapInfo
    +

    Specifies the CUDA array or CUDA mipmapped array memory mapping +information

    +
    +
    +resourceType
    +

    Resource type

    +
    +
    Type:
    +

    CUresourcetype

    +
    +
    +
    + +
    +
    +resource
    +
    +
    Type:
    +

    anon_union9

    +
    +
    +
    + +
    +
    +subresourceType
    +

    Sparse subresource type

    +
    +
    Type:
    +

    CUarraySparseSubresourceType

    +
    +
    +
    + +
    +
    +subresource
    +
    +
    Type:
    +

    anon_union10

    +
    +
    +
    + +
    +
    +memOperationType
    +

    Memory operation type

    +
    +
    Type:
    +

    CUmemOperationType

    +
    +
    +
    + +
    +
    +memHandleType
    +

    Memory handle type

    +
    +
    Type:
    +

    CUmemHandleType

    +
    +
    +
    + +
    +
    +memHandle
    +
    +
    Type:
    +

    anon_union11

    +
    +
    +
    + +
    +
    +offset
    +

    Offset within mip tail Offset within the memory

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +deviceBitMask
    +

    Device ordinal bit mask

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +flags
    +

    flags for future use, must be zero now.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +

    Reserved for future use, must be zero now.

    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemLocation_v1
    +

    Specifies a memory location.

    +
    +
    +type
    +

    Specifies the location type, which modifies the meaning of id.

    +
    +
    Type:
    +

    CUmemLocationType

    +
    +
    +
    + +
    +
    +id
    +

    identifier for a given this location’s CUmemLocationType.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemLocation
    +

    Specifies a memory location.

    +
    +
    +type
    +

    Specifies the location type, which modifies the meaning of id.

    +
    +
    Type:
    +

    CUmemLocationType

    +
    +
    +
    + +
    +
    +id
    +

    identifier for a given this location’s CUmemLocationType.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAllocationProp_v1
    +

    Specifies the allocation properties for a allocation.

    +
    +
    +type
    +

    Allocation type

    +
    +
    Type:
    +

    CUmemAllocationType

    +
    +
    +
    + +
    +
    +requestedHandleTypes
    +

    requested CUmemAllocationHandleType

    +
    +
    Type:
    +

    CUmemAllocationHandleType

    +
    +
    +
    + +
    +
    +location
    +

    Location of allocation

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +win32HandleMetaData
    +

    Windows-specific POBJECT_ATTRIBUTES required when +CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes +structure includes security attributes that define the scope of +which exported allocations may be transferred to other processes. +In all other cases, this field is required to be zero.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +allocFlags
    +
    +
    Type:
    +

    anon_struct21

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAllocationProp
    +

    Specifies the allocation properties for a allocation.

    +
    +
    +type
    +

    Allocation type

    +
    +
    Type:
    +

    CUmemAllocationType

    +
    +
    +
    + +
    +
    +requestedHandleTypes
    +

    requested CUmemAllocationHandleType

    +
    +
    Type:
    +

    CUmemAllocationHandleType

    +
    +
    +
    + +
    +
    +location
    +

    Location of allocation

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +win32HandleMetaData
    +

    Windows-specific POBJECT_ATTRIBUTES required when +CU_MEM_HANDLE_TYPE_WIN32 is specified. This object attributes +structure includes security attributes that define the scope of +which exported allocations may be transferred to other processes. +In all other cases, this field is required to be zero.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +allocFlags
    +
    +
    Type:
    +

    anon_struct21

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmulticastObjectProp_v1
    +

    Specifies the properties for a multicast object.

    +
    +
    +numDevices
    +

    The number of devices in the multicast team that will bind memory +to this object

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +size
    +

    The maximum amount of memory that can be bound to this multicast +object per device

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +handleTypes
    +

    Bitmask of exportable handle types (see CUmemAllocationHandleType) +for this object

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags for future use, must be zero now

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmulticastObjectProp
    +

    Specifies the properties for a multicast object.

    +
    +
    +numDevices
    +

    The number of devices in the multicast team that will bind memory +to this object

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +size
    +

    The maximum amount of memory that can be bound to this multicast +object per device

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +handleTypes
    +

    Bitmask of exportable handle types (see CUmemAllocationHandleType) +for this object

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags for future use, must be zero now

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAccessDesc_v1
    +

    Memory access descriptor

    +
    +
    +location
    +

    Location on which the request is to change it’s accessibility

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +flags
    +

    ::CUmemProt accessibility flags to set on the request

    +
    +
    Type:
    +

    CUmemAccess_flags

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemAccessDesc
    +

    Memory access descriptor

    +
    +
    +location
    +

    Location on which the request is to change it’s accessibility

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +flags
    +

    ::CUmemProt accessibility flags to set on the request

    +
    +
    Type:
    +

    CUmemAccess_flags

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphExecUpdateResultInfo_v1
    +

    Result information returned by cuGraphExecUpdate

    +
    +
    +result
    +

    Gives more specific detail when a cuda graph update fails.

    +
    +
    Type:
    +

    CUgraphExecUpdateResult

    +
    +
    +
    + +
    +
    +errorNode
    +

    The “to node” of the error edge when the topologies do not match. +The error node when the error is associated with a specific node. +NULL when the error is generic.

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +errorFromNode
    +

    The from node of error edge when the topologies do not match. +Otherwise NULL.

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphExecUpdateResultInfo
    +

    Result information returned by cuGraphExecUpdate

    +
    +
    +result
    +

    Gives more specific detail when a cuda graph update fails.

    +
    +
    Type:
    +

    CUgraphExecUpdateResult

    +
    +
    +
    + +
    +
    +errorNode
    +

    The “to node” of the error edge when the topologies do not match. +The error node when the error is associated with a specific node. +NULL when the error is generic.

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +errorFromNode
    +

    The from node of error edge when the topologies do not match. +Otherwise NULL.

    +
    +
    Type:
    +

    CUgraphNode

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemPoolProps_v1
    +

    Specifies the properties of allocations made from the pool.

    +
    +
    +allocType
    +

    Allocation type. Currently must be specified as +CU_MEM_ALLOCATION_TYPE_PINNED

    +
    +
    Type:
    +

    CUmemAllocationType

    +
    +
    +
    + +
    +
    +handleTypes
    +

    Handle types that will be supported by allocations from the pool.

    +
    +
    Type:
    +

    CUmemAllocationHandleType

    +
    +
    +
    + +
    +
    +location
    +

    Location where allocations should reside.

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +win32SecurityAttributes
    +

    Windows-specific LPSECURITYATTRIBUTES required when +CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute +defines the scope of which exported allocations may be transferred +to other processes. In all other cases, this field is required to +be zero.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +maxSize
    +

    Maximum pool size. When set to 0, defaults to a system dependent +value.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +usage
    +

    Bitmask indicating intended usage for the pool.

    +
    +
    Type:
    +

    unsigned short

    +
    +
    +
    + +
    +
    +reserved
    +

    reserved for future use, must be 0

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemPoolProps
    +

    Specifies the properties of allocations made from the pool.

    +
    +
    +allocType
    +

    Allocation type. Currently must be specified as +CU_MEM_ALLOCATION_TYPE_PINNED

    +
    +
    Type:
    +

    CUmemAllocationType

    +
    +
    +
    + +
    +
    +handleTypes
    +

    Handle types that will be supported by allocations from the pool.

    +
    +
    Type:
    +

    CUmemAllocationHandleType

    +
    +
    +
    + +
    +
    +location
    +

    Location where allocations should reside.

    +
    +
    Type:
    +

    CUmemLocation

    +
    +
    +
    + +
    +
    +win32SecurityAttributes
    +

    Windows-specific LPSECURITYATTRIBUTES required when +CU_MEM_HANDLE_TYPE_WIN32 is specified. This security attribute +defines the scope of which exported allocations may be transferred +to other processes. In all other cases, this field is required to +be zero.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +maxSize
    +

    Maximum pool size. When set to 0, defaults to a system dependent +value.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +usage
    +

    Bitmask indicating intended usage for the pool.

    +
    +
    Type:
    +

    unsigned short

    +
    +
    +
    + +
    +
    +reserved
    +

    reserved for future use, must be 0

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemPoolPtrExportData_v1
    +

    Opaque data for exporting a pool allocation

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUmemPoolPtrExportData
    +

    Opaque data for exporting a pool allocation

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEM_ALLOC_NODE_PARAMS_v1
    +

    Memory allocation node parameters

    +
    +
    +poolProps
    +

    in: location where the allocation should reside (specified in +::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is +not supported.

    +
    +
    Type:
    +

    CUmemPoolProps

    +
    +
    +
    + +
    +
    +accessDescs
    +

    in: array of memory access descriptors. Used to describe peer GPU +access

    +
    +
    Type:
    +

    CUmemAccessDesc

    +
    +
    +
    + +
    +
    +accessDescCount
    +

    in: number of memory access descriptors. Must not exceed the number +of GPUs.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +bytesize
    +

    in: size in bytes of the requested allocation

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dptr
    +

    out: address of the allocation returned by CUDA

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEM_ALLOC_NODE_PARAMS
    +

    Memory allocation node parameters

    +
    +
    +poolProps
    +

    in: location where the allocation should reside (specified in +::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is +not supported.

    +
    +
    Type:
    +

    CUmemPoolProps

    +
    +
    +
    + +
    +
    +accessDescs
    +

    in: array of memory access descriptors. Used to describe peer GPU +access

    +
    +
    Type:
    +

    CUmemAccessDesc

    +
    +
    +
    + +
    +
    +accessDescCount
    +

    in: number of memory access descriptors. Must not exceed the number +of GPUs.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +bytesize
    +

    in: size in bytes of the requested allocation

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dptr
    +

    out: address of the allocation returned by CUDA

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEM_ALLOC_NODE_PARAMS_v2
    +

    Memory allocation node parameters

    +
    +
    +poolProps
    +

    in: location where the allocation should reside (specified in +::location). ::handleTypes must be CU_MEM_HANDLE_TYPE_NONE. IPC is +not supported.

    +
    +
    Type:
    +

    CUmemPoolProps

    +
    +
    +
    + +
    +
    +accessDescs
    +

    in: array of memory access descriptors. Used to describe peer GPU +access

    +
    +
    Type:
    +

    CUmemAccessDesc

    +
    +
    +
    + +
    +
    +accessDescCount
    +

    in: number of memory access descriptors. Must not exceed the number +of GPUs.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +bytesize
    +

    in: size in bytes of the requested allocation

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dptr
    +

    out: address of the allocation returned by CUDA

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_MEM_FREE_NODE_PARAMS
    +

    Memory free node parameters

    +
    +
    +dptr
    +

    in: the pointer to free

    +
    +
    Type:
    +

    CUdeviceptr

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_CHILD_GRAPH_NODE_PARAMS
    +

    Child graph node parameters

    +
    +
    +graph
    +

    The child graph to clone into the node for node creation, or a +handle to the graph owned by the node for node query

    +
    +
    Type:
    +

    CUgraph

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EVENT_RECORD_NODE_PARAMS
    +

    Event record node parameters

    +
    +
    +event
    +

    The event to record when the node executes

    +
    +
    Type:
    +

    CUevent

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUDA_EVENT_WAIT_NODE_PARAMS
    +

    Event wait node parameters

    +
    +
    +event
    +

    The event to wait on from the node

    +
    +
    Type:
    +

    CUevent

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgraphNodeParams
    +

    Graph node parameters. See cuGraphAddNode.

    +
    +
    +type
    +

    Type of the node

    +
    +
    Type:
    +

    CUgraphNodeType

    +
    +
    +
    + +
    +
    +reserved0
    +

    Reserved. Must be zero.

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +reserved1
    +

    Padding. Unused bytes must be zero.

    +
    +
    Type:
    +

    List[long long]

    +
    +
    +
    + +
    +
    +kernel
    +

    Kernel node parameters.

    +
    +
    Type:
    +

    CUDA_KERNEL_NODE_PARAMS_v3

    +
    +
    +
    + +
    +
    +memcpy
    +

    Memcpy node parameters.

    +
    +
    Type:
    +

    CUDA_MEMCPY_NODE_PARAMS

    +
    +
    +
    + +
    +
    +memset
    +

    Memset node parameters.

    +
    +
    Type:
    +

    CUDA_MEMSET_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +host
    +

    Host node parameters.

    +
    +
    Type:
    +

    CUDA_HOST_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +graph
    +

    Child graph node parameters.

    +
    +
    Type:
    +

    CUDA_CHILD_GRAPH_NODE_PARAMS

    +
    +
    +
    + +
    +
    +eventWait
    +

    Event wait node parameters.

    +
    +
    Type:
    +

    CUDA_EVENT_WAIT_NODE_PARAMS

    +
    +
    +
    + +
    +
    +eventRecord
    +

    Event record node parameters.

    +
    +
    Type:
    +

    CUDA_EVENT_RECORD_NODE_PARAMS

    +
    +
    +
    + +
    +
    +extSemSignal
    +

    External semaphore signal node parameters.

    +
    +
    Type:
    +

    CUDA_EXT_SEM_SIGNAL_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +extSemWait
    +

    External semaphore wait node parameters.

    +
    +
    Type:
    +

    CUDA_EXT_SEM_WAIT_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +alloc
    +

    Memory allocation node parameters.

    +
    +
    Type:
    +

    CUDA_MEM_ALLOC_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +free
    +

    Memory free node parameters.

    +
    +
    Type:
    +

    CUDA_MEM_FREE_NODE_PARAMS

    +
    +
    +
    + +
    +
    +memOp
    +

    MemOp node parameters.

    +
    +
    Type:
    +

    CUDA_BATCH_MEM_OP_NODE_PARAMS_v2

    +
    +
    +
    + +
    +
    +conditional
    +

    Conditional node parameters.

    +
    +
    Type:
    +

    CUDA_CONDITIONAL_NODE_PARAMS

    +
    +
    +
    + +
    +
    +reserved2
    +

    Reserved bytes. Must be zero.

    +
    +
    Type:
    +

    long long

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUeglFrame_v1
    +

    CUDA EGLFrame structure Descriptor - structure defining one frame +of EGL. Each frame may contain one or more planes depending on +whether the surface * is Multiplanar or not.

    +
    +
    +frame
    +
    +
    Type:
    +

    anon_union14

    +
    +
    +
    + +
    +
    +width
    +

    Width of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +height
    +

    Height of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +planeCount
    +

    Number of planes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +numChannels
    +

    Number of channels for the plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +frameType
    +

    Array or Pitch

    +
    +
    Type:
    +

    CUeglFrameType

    +
    +
    +
    + +
    +
    +eglColorFormat
    +

    CUDA EGL Color Format

    +
    +
    Type:
    +

    CUeglColorFormat

    +
    +
    +
    + +
    +
    +cuFormat
    +

    CUDA Array Format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUeglFrame
    +

    CUDA EGLFrame structure Descriptor - structure defining one frame +of EGL. Each frame may contain one or more planes depending on +whether the surface * is Multiplanar or not.

    +
    +
    +frame
    +
    +
    Type:
    +

    anon_union14

    +
    +
    +
    + +
    +
    +width
    +

    Width of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +height
    +

    Height of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of first plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +planeCount
    +

    Number of planes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +numChannels
    +

    Number of channels for the plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +frameType
    +

    Array or Pitch

    +
    +
    Type:
    +

    CUeglFrameType

    +
    +
    +
    + +
    +
    +eglColorFormat
    +

    CUDA EGL Color Format

    +
    +
    Type:
    +

    CUeglColorFormat

    +
    +
    +
    + +
    +
    +cuFormat
    +

    CUDA Array Format

    +
    +
    Type:
    +

    CUarray_format

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUeglStreamConnection(*args, **kwargs)
    +

    CUDA EGLSream Connection

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +driver.CUDA_VERSION = 12060
    +

    CUDA API version number

    +
    + +
    +
    +driver.CU_IPC_HANDLE_SIZE = 64
    +

    CUDA IPC handle size

    +
    + +
    +
    +driver.CU_STREAM_LEGACY = 1
    +

    Legacy stream handle

    +

    Stream handle that can be passed as a CUstream to use an implicit stream with legacy synchronization behavior.

    +

    See details of the link_sync_behavior

    +
    + +
    +
    +driver.CU_STREAM_PER_THREAD = 2
    +

    Per-thread stream handle

    +

    Stream handle that can be passed as a CUstream to use an implicit stream with per-thread synchronization behavior.

    +

    See details of the link_sync_behavior

    +
    + +
    +
    +driver.CU_COMPUTE_ACCELERATED_TARGET_BASE = 65536
    +
    + +
    +
    +driver.CU_GRAPH_COND_ASSIGN_DEFAULT = 1
    +

    Conditional node handle flags Default value is applied when graph is launched.

    +
    + +
    +
    +driver.CU_GRAPH_KERNEL_NODE_PORT_DEFAULT = 0
    +

    This port activates when the kernel has finished executing.

    +
    + +
    +
    +driver.CU_GRAPH_KERNEL_NODE_PORT_PROGRAMMATIC = 1
    +

    This port activates when all blocks of the kernel have performed cudaTriggerProgrammaticLaunchCompletion() or have terminated. It must be used with edge type CU_GRAPH_DEPENDENCY_TYPE_PROGRAMMATIC. See also CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT.

    +
    + +
    +
    +driver.CU_GRAPH_KERNEL_NODE_PORT_LAUNCH_ORDER = 2
    +

    This port activates when all blocks of the kernel have begun execution. See also CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT.

    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_COOPERATIVE = 2
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_DIMENSION = 4
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE = 5
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_PRIORITY = 8
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE = 13
    +
    + +
    +
    +driver.CU_KERNEL_NODE_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT = 14
    +
    + +
    +
    +driver.CU_STREAM_ATTRIBUTE_ACCESS_POLICY_WINDOW = 1
    +
    + +
    +
    +driver.CU_STREAM_ATTRIBUTE_SYNCHRONIZATION_POLICY = 3
    +
    + +
    +
    +driver.CU_STREAM_ATTRIBUTE_PRIORITY = 8
    +
    + +
    +
    +driver.CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN_MAP = 9
    +
    + +
    +
    +driver.CU_STREAM_ATTRIBUTE_MEM_SYNC_DOMAIN = 10
    +
    + +
    +
    +driver.CU_MEMHOSTALLOC_PORTABLE = 1
    +

    If set, host memory is portable between CUDA contexts. Flag for cuMemHostAlloc()

    +
    + +
    +
    +driver.CU_MEMHOSTALLOC_DEVICEMAP = 2
    +

    If set, host memory is mapped into CUDA address space and cuMemHostGetDevicePointer() may be called on the host pointer. Flag for cuMemHostAlloc()

    +
    + +
    +
    +driver.CU_MEMHOSTALLOC_WRITECOMBINED = 4
    +

    If set, host memory is allocated as write-combined - fast to write, faster to DMA, slow to read except via SSE4 streaming load instruction (MOVNTDQA). Flag for cuMemHostAlloc()

    +
    + +
    +
    +driver.CU_MEMHOSTREGISTER_PORTABLE = 1
    +

    If set, host memory is portable between CUDA contexts. Flag for cuMemHostRegister()

    +
    + +
    +
    +driver.CU_MEMHOSTREGISTER_DEVICEMAP = 2
    +

    If set, host memory is mapped into CUDA address space and cuMemHostGetDevicePointer() may be called on the host pointer. Flag for cuMemHostRegister()

    +
    + +
    +
    +driver.CU_MEMHOSTREGISTER_IOMEMORY = 4
    +

    If set, the passed memory pointer is treated as pointing to some memory-mapped I/O space, e.g. belonging to a third-party PCIe device. On Windows the flag is a no-op. On Linux that memory is marked as non cache-coherent for the GPU and is expected to be physically contiguous. It may return CUDA_ERROR_NOT_PERMITTED if run as an unprivileged user, CUDA_ERROR_NOT_SUPPORTED on older Linux kernel versions. On all other platforms, it is not supported and CUDA_ERROR_NOT_SUPPORTED is returned. Flag for cuMemHostRegister()

    +
    + +
    +
    +driver.CU_MEMHOSTREGISTER_READ_ONLY = 8
    +

    If set, the passed memory pointer is treated as pointing to memory that is considered read-only by the device. On platforms without CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, this flag is required in order to register memory mapped to the CPU as read-only. Support for the use of this flag can be queried from the device attribute CU_DEVICE_ATTRIBUTE_READ_ONLY_HOST_REGISTER_SUPPORTED. Using this flag with a current context associated with a device that does not have this attribute set will cause cuMemHostRegister to error with CUDA_ERROR_NOT_SUPPORTED.

    +
    + +
    +
    +driver.CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL = 1
    +

    Indicates that the layered sparse CUDA array or CUDA mipmapped array has a single mip tail region for all layers

    +
    + +
    +
    +driver.CU_TENSOR_MAP_NUM_QWORDS = 16
    +

    Size of tensor map descriptor

    +
    + +
    +
    +driver.CUDA_EXTERNAL_MEMORY_DEDICATED = 1
    +

    Indicates that the external memory object is a dedicated resource

    +
    + +
    +
    +driver.CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC = 1
    +

    When the flags parameter of CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS contains this flag, it indicates that signaling an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects.

    +
    + +
    +
    +driver.CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC = 2
    +

    When the flags parameter of CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS contains this flag, it indicates that waiting on an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects.

    +
    + +
    +
    +driver.CUDA_NVSCISYNC_ATTR_SIGNAL = 1
    +

    When flags of cuDeviceGetNvSciSyncAttributes is set to this, it indicates that application needs signaler specific NvSciSyncAttr to be filled by cuDeviceGetNvSciSyncAttributes.

    +
    + +
    +
    +driver.CUDA_NVSCISYNC_ATTR_WAIT = 2
    +

    When flags of cuDeviceGetNvSciSyncAttributes is set to this, it indicates that application needs waiter specific NvSciSyncAttr to be filled by cuDeviceGetNvSciSyncAttributes.

    +
    + +
    +
    +driver.CU_MEM_CREATE_USAGE_TILE_POOL = 1
    +

    This flag if set indicates that the memory will be used as a tile pool.

    +
    + +
    +
    +driver.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC = 1
    +

    If set, each kernel launched as part of cuLaunchCooperativeKernelMultiDevice only waits for prior work in the stream corresponding to that GPU to complete before the kernel begins execution.

    +
    + +
    +
    +driver.CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC = 2
    +

    If set, any subsequent work pushed in a stream that participated in a call to cuLaunchCooperativeKernelMultiDevice will only wait for the kernel launched on the GPU corresponding to that stream to complete before it begins execution.

    +
    + +
    +
    +driver.CUDA_ARRAY3D_LAYERED = 1
    +

    If set, the CUDA array is a collection of layers, where each layer is either a 1D or a 2D array and the Depth member of CUDA_ARRAY3D_DESCRIPTOR specifies the number of layers, not the depth of a 3D array.

    +
    + +
    +
    +driver.CUDA_ARRAY3D_2DARRAY = 1
    +

    Deprecated, use CUDA_ARRAY3D_LAYERED

    +
    + +
    +
    +driver.CUDA_ARRAY3D_SURFACE_LDST = 2
    +

    This flag must be set in order to bind a surface reference to the CUDA array

    +
    + +
    +
    +driver.CUDA_ARRAY3D_CUBEMAP = 4
    +

    If set, the CUDA array is a collection of six 2D arrays, representing faces of a cube. The width of such a CUDA array must be equal to its height, and Depth must be six. If CUDA_ARRAY3D_LAYERED flag is also set, then the CUDA array is a collection of cubemaps and Depth must be a multiple of six.

    +
    + +
    +
    +driver.CUDA_ARRAY3D_TEXTURE_GATHER = 8
    +

    This flag must be set in order to perform texture gather operations on a CUDA array.

    +
    + +
    +
    +driver.CUDA_ARRAY3D_DEPTH_TEXTURE = 16
    +

    This flag if set indicates that the CUDA array is a DEPTH_TEXTURE.

    +
    + +
    +
    +driver.CUDA_ARRAY3D_COLOR_ATTACHMENT = 32
    +

    This flag indicates that the CUDA array may be bound as a color target in an external graphics API

    +
    + +
    +
    +driver.CUDA_ARRAY3D_SPARSE = 64
    +

    This flag if set indicates that the CUDA array or CUDA mipmapped array is a sparse CUDA array or CUDA mipmapped array respectively

    +
    + +
    +
    +driver.CUDA_ARRAY3D_DEFERRED_MAPPING = 128
    +

    This flag if set indicates that the CUDA array or CUDA mipmapped array will allow deferred memory mapping

    +
    + +
    +
    +driver.CUDA_ARRAY3D_VIDEO_ENCODE_DECODE = 256
    +

    This flag indicates that the CUDA array will be used for hardware accelerated video encode/decode operations.

    +
    + +
    +
    +driver.CU_TRSA_OVERRIDE_FORMAT = 1
    +

    Override the texref format with a format inferred from the array. Flag for cuTexRefSetArray()

    +
    + +
    +
    +driver.CU_TRSF_READ_AS_INTEGER = 1
    +

    Read the texture as integers rather than promoting the values to floats in the range [0,1]. Flag for cuTexRefSetFlags() and cuTexObjectCreate()

    +
    + +
    +
    +driver.CU_TRSF_NORMALIZED_COORDINATES = 2
    +

    Use normalized texture coordinates in the range [0,1) instead of [0,dim). Flag for cuTexRefSetFlags() and cuTexObjectCreate()

    +
    + +
    +
    +driver.CU_TRSF_SRGB = 16
    +

    Perform sRGB->linear conversion during texture read. Flag for cuTexRefSetFlags() and cuTexObjectCreate()

    +
    + +
    +
    +driver.CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION = 32
    +

    Disable any trilinear filtering optimizations. Flag for cuTexRefSetFlags() and cuTexObjectCreate()

    +
    + +
    +
    +driver.CU_TRSF_SEAMLESS_CUBEMAP = 64
    +

    Enable seamless cube map filtering. Flag for cuTexObjectCreate()

    +
    + +
    +
    +driver.CU_LAUNCH_PARAM_END_AS_INT = 0
    +

    C++ compile time constant for CU_LAUNCH_PARAM_END

    +
    + +
    +
    +driver.CU_LAUNCH_PARAM_END = 0
    +

    End of array terminator for the extra parameter to cuLaunchKernel

    +
    + +
    +
    +driver.CU_LAUNCH_PARAM_BUFFER_POINTER_AS_INT = 1
    +

    C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_POINTER

    +
    + +
    +
    +driver.CU_LAUNCH_PARAM_BUFFER_POINTER = 1
    +

    Indicator that the next value in the extra parameter to cuLaunchKernel will be a pointer to a buffer containing all kernel parameters used for launching kernel f. This buffer needs to honor all alignment/padding requirements of the individual parameters. If CU_LAUNCH_PARAM_BUFFER_SIZE is not also specified in the extra array, then CU_LAUNCH_PARAM_BUFFER_POINTER will have no effect.

    +
    + +
    +
    +driver.CU_LAUNCH_PARAM_BUFFER_SIZE_AS_INT = 2
    +

    C++ compile time constant for CU_LAUNCH_PARAM_BUFFER_SIZE

    +
    + +
    +
    +driver.CU_LAUNCH_PARAM_BUFFER_SIZE = 2
    +

    Indicator that the next value in the extra parameter to cuLaunchKernel will be a pointer to a size_t which contains the size of the buffer specified with CU_LAUNCH_PARAM_BUFFER_POINTER. It is required that CU_LAUNCH_PARAM_BUFFER_POINTER also be specified in the extra array if the value associated with CU_LAUNCH_PARAM_BUFFER_SIZE is not zero.

    +
    + +
    +
    +driver.CU_PARAM_TR_DEFAULT = -1
    +

    For texture references loaded into the module, use default texunit from texture reference.

    +
    + +
    +
    +driver.CU_DEVICE_CPU = -1
    +

    Device that represents the CPU

    +
    + +
    +
    +driver.CU_DEVICE_INVALID = -2
    +

    Device that represents an invalid device

    +
    + +
    +
    +driver.MAX_PLANES = 3
    +

    Maximum number of planes per frame

    +
    + +
    +
    +driver.CUDA_EGL_INFINITE_TIMEOUT = -1
    +

    Indicates that timeout for cuEGLStreamConsumerAcquireFrame is infinite.

    +
    + +
    +
    +

    Error Handling

    +

    This section describes the error handling functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuGetErrorString(error: CUresult)
    +

    Gets the string description of an error code.

    +

    Sets *pStr to the address of a NULL-terminated string description of +the error code error. If the error code is not recognized, +CUDA_ERROR_INVALID_VALUE will be returned and *pStr will +be set to the NULL address.

    +
    +
    Parameters:
    +

    error (CUresult) – Error code to convert to string

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGetErrorName(error: CUresult)
    +

    Gets the string representation of an error code enum name.

    +

    Sets *pStr to the address of a NULL-terminated string representation +of the name of the enum error code error. If the error code is not +recognized, CUDA_ERROR_INVALID_VALUE will be returned and +*pStr will be set to the NULL address.

    +
    +
    Parameters:
    +

    error (CUresult) – Error code to convert to string

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    CUresult, cudaGetErrorName

    +
    +
    + +
    +
    +

    Initialization

    +

    This section describes the initialization functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuInit(unsigned int Flags)
    +

    Initialize the CUDA driver API Initializes the driver API and must be called before any other function from the driver API in the current process. Currently, the Flags parameter must be 0. If cuInit() has not been called, any function from the driver API will return CUDA_ERROR_NOT_INITIALIZED.

    +
    +
    Parameters:
    +

    Flags (unsigned int) – Initialization flag for CUDA.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_SYSTEM_DRIVER_MISMATCH, CUDA_ERROR_COMPAT_NOT_SUPPORTED_ON_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    + +
    +
    +

    Version Management

    +

    This section describes the version management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuDriverGetVersion()
    +

    Returns the latest CUDA version supported by driver.

    +

    Returns in *driverVersion the version of CUDA supported by the +driver. The version is returned as (1000 * major + 10 * minor). For +example, CUDA 9.2 would be represented by 9020.

    +

    This function automatically returns +CUDA_ERROR_INVALID_VALUE if driverVersion is NULL.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Device Management

    +

    This section describes the device management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuDeviceGet(int ordinal)
    +

    Returns a handle to a compute device.

    +

    Returns in *device a device handle given an ordinal in the range [0, +cuDeviceGetCount()-1].

    +
    +
    Parameters:
    +

    ordinal (int) – Device number to get handle for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetCount()
    +

    Returns the number of compute-capable devices.

    +

    Returns in *count the number of devices with compute capability +greater than or equal to 2.0 that are available for execution. If there +is no such device, cuDeviceGetCount() returns 0.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetName(int length, dev)
    +

    Returns an identifier string for the device.

    +

    Returns an ASCII string identifying the device dev in the NULL- +terminated string pointed to by name. length specifies the maximum +length of the string that may be returned.

    +
    +
    Parameters:
    +
      +
    • length (int) – Maximum length of string to store in name

    • +
    • dev (CUdevice) – Device to get identifier string for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetUuid(dev)
    +

    Return an UUID for the device.

    +

    Note there is a later version of this API, +cuDeviceGetUuid_v2. It will supplant this version in 12.0, +which is retained for minor version compatibility.

    +

    Returns 16-octets identifying the device dev in the structure pointed +by the uuid.

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device to get identifier string for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetUuid_v2(dev)
    +

    Return an UUID for the device (11.4+)

    +

    Returns 16-octets identifying the device dev in the structure pointed +by the uuid. If the device is in MIG mode, returns its MIG UUID which +uniquely identifies the subscribed MIG compute instance.

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device to get identifier string for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetLuid(dev)
    +

    Return an LUID and device node mask for the device.

    +

    Return identifying information (luid and deviceNodeMask) to allow +matching device with graphics APIs.

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device to get identifier string for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceTotalMem(dev)
    +

    Returns the total amount of memory on the device.

    +

    Returns in *bytes the total amount of memory available on the device +dev in bytes.

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device handle

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetTexture1DLinearMaxWidth(pformat: CUarray_format, unsigned int numChannels, dev)
    +

    Returns the maximum number of elements allocatable in a 1D linear texture for a given texture element size.

    +

    Returns in maxWidthInElements the maximum number of texture elements +allocatable in a 1D linear texture for given pformat and +numChannels.

    +
    +
    Parameters:
    +
      +
    • pformat (CUarray_format) – Texture format.

    • +
    • numChannels (unsigned) – Number of channels per texture element.

    • +
    • dev (CUdevice) – Device handle.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetAttribute(attrib: CUdevice_attribute, dev)
    +

    Returns information about the device.

    +

    Returns in *pi the integer value of the attribute attrib on device +dev. The supported attributes are:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, dev, int flags)
    +

    Return NvSciSync attributes that this device can support.

    +

    Returns in nvSciSyncAttrList, the properties of NvSciSync that this +CUDA device, dev can support. The returned nvSciSyncAttrList can be +used to create an NvSciSync object that matches this device’s +capabilities.

    +

    If NvSciSyncAttrKey_RequiredPerm field in nvSciSyncAttrList is +already set this API will return CUDA_ERROR_INVALID_VALUE.

    +

    The applications should set nvSciSyncAttrList to a valid +NvSciSyncAttrList failing which this API will return +CUDA_ERROR_INVALID_HANDLE.

    +

    The flags controls how applications intends to use the NvSciSync +created from the nvSciSyncAttrList. The valid flags are:

    + +

    At least one of these flags must be set, failing which the API returns +CUDA_ERROR_INVALID_VALUE. Both the flags are orthogonal to +one another: a developer may set both these flags that allows to set +both wait and signal specific attributes in the same +nvSciSyncAttrList.

    +

    Note that this API updates the input nvSciSyncAttrList with values +equivalent to the following public attribute key-values: +NvSciSyncAttrKey_RequiredPerm is set to

    +
      +
    • NvSciSyncAccessPerm_SignalOnly if +CUDA_NVSCISYNC_ATTR_SIGNAL is set in flags.

    • +
    • NvSciSyncAccessPerm_WaitOnly if CUDA_NVSCISYNC_ATTR_WAIT +is set in flags.

    • +
    • NvSciSyncAccessPerm_WaitSignal if both +CUDA_NVSCISYNC_ATTR_WAIT and +CUDA_NVSCISYNC_ATTR_SIGNAL are set in flags. +NvSciSyncAttrKey_PrimitiveInfo is set to

    • +
    • NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid device.

    • +
    • NvSciSyncAttrValPrimitiveType_Syncpoint if device is a Tegra +device.

    • +
    • NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if device +is GA10X+. NvSciSyncAttrKey_GpuId is set to the same UUID that is +returned for this device from cuDeviceGetUuid.

    • +
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, +CUDA_ERROR_NOT_INITIALIZED, +CUDA_ERROR_INVALID_VALUE, +CUDA_ERROR_INVALID_HANDLE, +CUDA_ERROR_INVALID_DEVICE, +CUDA_ERROR_NOT_SUPPORTED, +CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Parameters:
    +
      +
    • nvSciSyncAttrList (Any) – Return NvSciSync attributes supported.

    • +
    • dev (CUdevice) – Valid Cuda Device to get NvSciSync attributes for.

    • +
    • flags (int) – flags describing NvSciSync usage.

    • +
    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceSetMemPool(dev, pool)
    +

    Sets the current memory pool of a device.

    +

    The memory pool must be local to the specified device. +cuMemAllocAsync allocates from the current mempool of the +provided stream’s device. By default, a device’s current memory pool is +its default memory pool.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Use cuMemAllocFromPoolAsync to specify asynchronous allocations from a device different than the one the stream runs on.

    +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetMemPool(dev)
    +

    Gets the current mempool for a device.

    +

    Returns the last pool provided to cuDeviceSetMemPool for +this device or the device’s default memory pool if +cuDeviceSetMemPool has never been called. By default the +current mempool is the default mempool for a device. Otherwise the +returned pool must have been set with cuDeviceSetMemPool.

    +
    +
    Parameters:
    +

    dev (CUdevice) – None

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetDefaultMemPool(dev)
    +

    Returns the default mempool of a device.

    +

    The default mempool of a device contains device memory from that +device.

    +
    +
    Parameters:
    +

    dev (CUdevice) – None

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetExecAffinitySupport(typename: CUexecAffinityType, dev)
    +

    Returns information about the execution affinity support of the device.

    +

    Returns in *pi whether execution affinity type typename is +supported by device dev. The supported types are:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuFlushGPUDirectRDMAWrites(target: CUflushGPUDirectRDMAWritesTarget, scope: CUflushGPUDirectRDMAWritesScope)
    +

    Blocks until remote writes are visible to the specified scope.

    +

    Blocks until GPUDirect RDMA writes to the target context via mappings +created through APIs like nvidia_p2p_get_pages (see +https://docs.nvidia.com/cuda/gpudirect-rdma for more information), are +visible to the specified scope.

    +

    If the scope equals or lies within the scope indicated by +CU_DEVICE_ATTRIBUTE_GPU_DIRECT_RDMA_WRITES_ORDERING, the +call will be a no-op and can be safely omitted for performance. This +can be determined by comparing the numerical values between the two +enums, with smaller scopes having smaller values.

    +

    Users may query support for this API via +CU_DEVICE_ATTRIBUTE_FLUSH_FLUSH_GPU_DIRECT_RDMA_OPTIONS.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    + +
    +
    +

    Primary Context Management

    +

    This section describes the primary context management functions of the low-level CUDA driver application programming interface.

    +

    The primary context is unique per device and shared with the CUDA runtime API. These functions allow integration with other libraries using CUDA.

    +
    +
    +cuda.bindings.driver.cuDevicePrimaryCtxRetain(dev)
    +

    Retain the primary context on the GPU.

    +

    Retains the primary context on the device. Once the user successfully +retains the primary context, the primary context will be active and +available to the user until the user releases it with +cuDevicePrimaryCtxRelease() or resets it with +cuDevicePrimaryCtxReset(). Unlike cuCtxCreate() +the newly retained context is not pushed onto the stack.

    +

    Retaining the primary context for the first time will fail with +CUDA_ERROR_UNKNOWN if the compute mode of the device is +CU_COMPUTEMODE_PROHIBITED. The function +cuDeviceGetAttribute() can be used with +CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the compute +mode of the device. The nvidia-smi tool can be used to set the +compute mode for devices. Documentation for nvidia-smi can be +obtained by passing a -h option to it.

    +

    Please note that the primary context always supports pinned +allocations. Other flags can be specified by +cuDevicePrimaryCtxSetFlags().

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device for which primary context is requested

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDevicePrimaryCtxRelease(dev)
    +

    Release the primary context on the GPU.

    +

    Releases the primary context interop on the device. A retained context +should always be released once the user is done using it. The context +is automatically reset once the last reference to it is released. This +behavior is different when the primary context was retained by the CUDA +runtime from CUDA 4.0 and earlier. In this case, the primary context +remains always active.

    +

    Releasing a primary context that has not been previously retained will +fail with CUDA_ERROR_INVALID_CONTEXT.

    +

    Please note that unlike cuCtxDestroy() this method does not +pop the context from stack in any circumstances.

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device which primary context is released

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_INVALID_CONTEXT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDevicePrimaryCtxSetFlags(dev, unsigned int flags)
    +

    Set flags for the primary context.

    +

    Sets the flags for the primary context on the device overwriting +perviously set ones.

    +

    The three LSBs of the flags parameter can be used to control how the +OS thread, which owns the CUDA context at the time of an API call, +interacts with the OS scheduler when waiting for results from the GPU. +Only one of the scheduling flags can be set when creating a context.

    +
      +
    • CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when +waiting for results from the GPU. This can decrease latency when +waiting for the GPU, but may lower the performance of CPU threads if +they are performing work in parallel with the CUDA thread.

    • +
    • CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread +when waiting for results from the GPU. This can increase latency when +waiting for the GPU, but can increase the performance of CPU threads +performing work in parallel with the GPU.

    • +
    • CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the +CPU thread on a synchronization primitive when waiting for the GPU to +finish work.

    • +
    • CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU +thread on a synchronization primitive when waiting for the GPU to +finish work. Deprecated: This flag was deprecated as of CUDA 4.0 +and was replaced with CU_CTX_SCHED_BLOCKING_SYNC.

    • +
    • CU_CTX_SCHED_AUTO: The default value if the flags +parameter is zero, uses a heuristic based on the number of active +CUDA contexts in the process C and the number of logical processors +in the system P. If C > P, then CUDA will yield to other OS +threads when waiting for the GPU (CU_CTX_SCHED_YIELD), +otherwise CUDA will not yield while waiting for results and actively +spin on the processor (CU_CTX_SCHED_SPIN). Additionally, +on Tegra devices, CU_CTX_SCHED_AUTO uses a heuristic +based on the power profile of the platform and may choose +CU_CTX_SCHED_BLOCKING_SYNC for low-powered devices.

    • +
    • CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce +local memory after resizing local memory for a kernel. This can +prevent thrashing by local memory allocations when launching many +kernels with high local memory usage at the cost of potentially +increased memory usage. Deprecated: This flag is deprecated and the +behavior enabled by this flag is now the default and cannot be +disabled.

    • +
    • CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been +enabled globally with cuCoredumpSetAttributeGlobal or +environment variables, this flag can be set during context creation +to instruct CUDA to create a coredump if this context raises an +exception during execution. These environment variables are described +in the CUDA-GDB user guide under the “GPU core dump support” section. +The initial settings will be taken from the global settings at the +time of context creation. The other settings that control coredump +output can be modified by calling cuCoredumpSetAttribute +from the created context after it becomes current.

    • +
    • CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU +coredumps have not been enabled globally with +cuCoredumpSetAttributeGlobal or environment variables, +this flag can be set during context creation to instruct CUDA to +create a coredump if data is written to a certain pipe that is +present in the OS space. These environment variables are described in +the CUDA-GDB user guide under the “GPU core dump support” section. It +is important to note that the pipe name must be set with +cuCoredumpSetAttributeGlobal before creating the context +if this flag is used. Setting this flag implies that +CU_CTX_COREDUMP_ENABLE is set. The initial settings will +be taken from the global settings at the time of context creation. +The other settings that control coredump output can be modified by +calling cuCoredumpSetAttribute from the created context +after it becomes current.

    • +
    • CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory +operations initiated on this context will always synchronize. See +further documentation in the section titled “API Synchronization +behavior” to learn more about cases when synchronous memory +operations can exhibit asynchronous behavior.

    • +
    +
    +
    Parameters:
    +
      +
    • dev (CUdevice) – Device for which the primary context flags are set

    • +
    • flags (unsigned int) – New flags for the device

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDevicePrimaryCtxGetState(dev)
    +

    Get the state of the primary context.

    +

    Returns in *flags the flags for the primary context of dev, and in +*active whether it is active. See +cuDevicePrimaryCtxSetFlags for flag values.

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device to get primary context flags for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDevicePrimaryCtxReset(dev)
    +

    Destroy all allocations and reset all state on the primary context.

    +

    Explicitly destroys and cleans up all resources associated with the +current device in the current process.

    +

    Note that it is responsibility of the calling function to ensure that +no other module in the process is using the device any more. For that +reason it is recommended to use cuDevicePrimaryCtxRelease() +in most cases. However it is safe for other modules to call +cuDevicePrimaryCtxRelease() even after resetting the +device. Resetting the primary context does not release it, an +application that has retained the primary context should explicitly +release its usage.

    +
    +
    Parameters:
    +

    dev (CUdevice) – Device for which primary context is destroyed

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_PRIMARY_CONTEXT_ACTIVE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +

    Context Management

    +

    This section describes the context management functions of the low-level CUDA driver application programming interface.

    +

    Please note that some functions are described in Primary Context Management section.

    +
    +
    +cuda.bindings.driver.cuCtxCreate(unsigned int flags, dev)
    +

    Create a CUDA context.

    +

    Creates a new CUDA context and associates it with the calling thread. +The flags parameter is described below. The context is created with a +usage count of 1 and the caller of cuCtxCreate() must call +cuCtxDestroy() when done using the context. If a context is +already current to the thread, it is supplanted by the newly created +context and may be restored by a subsequent call to +cuCtxPopCurrent().

    +

    The three LSBs of the flags parameter can be used to control how the +OS thread, which owns the CUDA context at the time of an API call, +interacts with the OS scheduler when waiting for results from the GPU. +Only one of the scheduling flags can be set when creating a context.

    +
      +
    • CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when +waiting for results from the GPU. This can decrease latency when +waiting for the GPU, but may lower the performance of CPU threads if +they are performing work in parallel with the CUDA thread.

    • +
    • CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread +when waiting for results from the GPU. This can increase latency when +waiting for the GPU, but can increase the performance of CPU threads +performing work in parallel with the GPU.

    • +
    • CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the +CPU thread on a synchronization primitive when waiting for the GPU to +finish work.

    • +
    • CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU +thread on a synchronization primitive when waiting for the GPU to +finish work. Deprecated: This flag was deprecated as of CUDA 4.0 +and was replaced with CU_CTX_SCHED_BLOCKING_SYNC.

    • +
    • CU_CTX_SCHED_AUTO: The default value if the flags +parameter is zero, uses a heuristic based on the number of active +CUDA contexts in the process C and the number of logical processors +in the system P. If C > P, then CUDA will yield to other OS +threads when waiting for the GPU (CU_CTX_SCHED_YIELD), +otherwise CUDA will not yield while waiting for results and actively +spin on the processor (CU_CTX_SCHED_SPIN). Additionally, +on Tegra devices, CU_CTX_SCHED_AUTO uses a heuristic +based on the power profile of the platform and may choose +CU_CTX_SCHED_BLOCKING_SYNC for low-powered devices.

    • +
    • CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned +allocations. This flag must be set in order to allocate pinned host +memory that is accessible to the GPU.

    • +
    • CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce +local memory after resizing local memory for a kernel. This can +prevent thrashing by local memory allocations when launching many +kernels with high local memory usage at the cost of potentially +increased memory usage. Deprecated: This flag is deprecated and the +behavior enabled by this flag is now the default and cannot be +disabled. Instead, the per-thread stack size can be controlled with +cuCtxSetLimit().

    • +
    • CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been +enabled globally with cuCoredumpSetAttributeGlobal or +environment variables, this flag can be set during context creation +to instruct CUDA to create a coredump if this context raises an +exception during execution. These environment variables are described +in the CUDA-GDB user guide under the “GPU core dump support” section. +The initial attributes will be taken from the global attributes at +the time of context creation. The other attributes that control +coredump output can be modified by calling +cuCoredumpSetAttribute from the created context after it +becomes current.

    • +
    • CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU +coredumps have not been enabled globally with +cuCoredumpSetAttributeGlobal or environment variables, +this flag can be set during context creation to instruct CUDA to +create a coredump if data is written to a certain pipe that is +present in the OS space. These environment variables are described in +the CUDA-GDB user guide under the “GPU core dump support” section. It +is important to note that the pipe name must be set with +cuCoredumpSetAttributeGlobal before creating the context +if this flag is used. Setting this flag implies that +CU_CTX_COREDUMP_ENABLE is set. The initial attributes +will be taken from the global attributes at the time of context +creation. The other attributes that control coredump output can be +modified by calling cuCoredumpSetAttribute from the +created context after it becomes current. Setting this flag on any +context creation is equivalent to setting the +CU_COREDUMP_ENABLE_USER_TRIGGER attribute to true +globally.

    • +
    • CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory +operations initiated on this context will always synchronize. See +further documentation in the section titled “API Synchronization +behavior” to learn more about cases when synchronous memory +operations can exhibit asynchronous behavior.

    • +
    +

    Context creation will fail with CUDA_ERROR_UNKNOWN if the +compute mode of the device is CU_COMPUTEMODE_PROHIBITED. +The function cuDeviceGetAttribute() can be used with +CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the compute +mode of the device. The nvidia-smi tool can be used to set the +compute mode for * devices. Documentation for nvidia-smi can be +obtained by passing a -h option to it.

    +
    +
    Parameters:
    +
      +
    • flags (unsigned int) – Context creation flags

    • +
    • dev (CUdevice) – Device to create context on

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    In most cases it is recommended to use cuDevicePrimaryCtxRetain.

    +
    + +
    +
    +cuda.bindings.driver.cuCtxCreate_v3(paramsArray: Optional[Tuple[CUexecAffinityParam] | List[CUexecAffinityParam]], int numParams, unsigned int flags, dev)
    +

    Create a CUDA context with execution affinity.

    +

    Creates a new CUDA context with execution affinity and associates it +with the calling thread. The paramsArray and flags parameter are +described below. The context is created with a usage count of 1 and the +caller of cuCtxCreate() must call +cuCtxDestroy() when done using the context. If a context is +already current to the thread, it is supplanted by the newly created +context and may be restored by a subsequent call to +cuCtxPopCurrent().

    +

    The type and the amount of execution resource the context can use is +limited by paramsArray and numParams. The paramsArray is an array +of CUexecAffinityParam and the numParams describes the size of the +array. If two CUexecAffinityParam in the array have the same type, +the latter execution affinity parameter overrides the former execution +affinity parameter. The supported execution affinity types are:

    +
      +
    • CU_EXEC_AFFINITY_TYPE_SM_COUNT limits the portion of SMs +that the context can use. The portion of SMs is specified as the +number of SMs via CUexecAffinitySmCount. This limit will be +internally rounded up to the next hardware-supported amount. Hence, +it is imperative to query the actual execution affinity of the +context via cuCtxGetExecAffinity after context creation. Currently, +this attribute is only supported under Volta+ MPS.

    • +
    +

    The three LSBs of the flags parameter can be used to control how the +OS thread, which owns the CUDA context at the time of an API call, +interacts with the OS scheduler when waiting for results from the GPU. +Only one of the scheduling flags can be set when creating a context.

    +
      +
    • CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when +waiting for results from the GPU. This can decrease latency when +waiting for the GPU, but may lower the performance of CPU threads if +they are performing work in parallel with the CUDA thread.

    • +
    • CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread +when waiting for results from the GPU. This can increase latency when +waiting for the GPU, but can increase the performance of CPU threads +performing work in parallel with the GPU.

    • +
    • CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the +CPU thread on a synchronization primitive when waiting for the GPU to +finish work.

    • +
    • CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU +thread on a synchronization primitive when waiting for the GPU to +finish work. Deprecated: This flag was deprecated as of CUDA 4.0 +and was replaced with CU_CTX_SCHED_BLOCKING_SYNC.

    • +
    • CU_CTX_SCHED_AUTO: The default value if the flags +parameter is zero, uses a heuristic based on the number of active +CUDA contexts in the process C and the number of logical processors +in the system P. If C > P, then CUDA will yield to other OS +threads when waiting for the GPU (CU_CTX_SCHED_YIELD), +otherwise CUDA will not yield while waiting for results and actively +spin on the processor (CU_CTX_SCHED_SPIN). Additionally, +on Tegra devices, CU_CTX_SCHED_AUTO uses a heuristic +based on the power profile of the platform and may choose +CU_CTX_SCHED_BLOCKING_SYNC for low-powered devices.

    • +
    • CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned +allocations. This flag must be set in order to allocate pinned host +memory that is accessible to the GPU.

    • +
    • CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce +local memory after resizing local memory for a kernel. This can +prevent thrashing by local memory allocations when launching many +kernels with high local memory usage at the cost of potentially +increased memory usage. Deprecated: This flag is deprecated and the +behavior enabled by this flag is now the default and cannot be +disabled. Instead, the per-thread stack size can be controlled with +cuCtxSetLimit().

    • +
    • CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been +enabled globally with cuCoredumpSetAttributeGlobal or +environment variables, this flag can be set during context creation +to instruct CUDA to create a coredump if this context raises an +exception during execution. These environment variables are described +in the CUDA-GDB user guide under the “GPU core dump support” section. +The initial attributes will be taken from the global attributes at +the time of context creation. The other attributes that control +coredump output can be modified by calling +cuCoredumpSetAttribute from the created context after it +becomes current.

    • +
    • CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU +coredumps have not been enabled globally with +cuCoredumpSetAttributeGlobal or environment variables, +this flag can be set during context creation to instruct CUDA to +create a coredump if data is written to a certain pipe that is +present in the OS space. These environment variables are described in +the CUDA-GDB user guide under the “GPU core dump support” section. It +is important to note that the pipe name must be set with +cuCoredumpSetAttributeGlobal before creating the context +if this flag is used. Setting this flag implies that +CU_CTX_COREDUMP_ENABLE is set. The initial attributes +will be taken from the global attributes at the time of context +creation. The other attributes that control coredump output can be +modified by calling cuCoredumpSetAttribute from the +created context after it becomes current. Setting this flag on any +context creation is equivalent to setting the +CU_COREDUMP_ENABLE_USER_TRIGGER attribute to true +globally.

    • +
    +

    Context creation will fail with CUDA_ERROR_UNKNOWN if the +compute mode of the device is CU_COMPUTEMODE_PROHIBITED. +The function cuDeviceGetAttribute() can be used with +CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the compute +mode of the device. The nvidia-smi tool can be used to set the +compute mode for * devices. Documentation for nvidia-smi can be +obtained by passing a -h option to it.

    +
    +
    Parameters:
    +
      +
    • paramsArray (List[CUexecAffinityParam]) – Execution affinity parameters

    • +
    • numParams (int) – Number of execution affinity parameters

    • +
    • flags (unsigned int) – Context creation flags

    • +
    • dev (CUdevice) – Device to create context on

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxCreate_v4(CUctxCreateParams ctxCreateParams: Optional[CUctxCreateParams], unsigned int flags, dev)
    +

    Create a CUDA context.

    +

    Creates a new CUDA context and associates it with the calling thread. +The flags parameter is described below. The context is created with a +usage count of 1 and the caller of cuCtxCreate() must call +cuCtxDestroy() when done using the context. If a context is +already current to the thread, it is supplanted by the newly created +context and may be restored by a subsequent call to +cuCtxPopCurrent().

    +

    CUDA context can be created with execution affinity. The type and the +amount of execution resource the context can use is limited by +paramsArray and numExecAffinityParams in execAffinity. The +paramsArray is an array of CUexecAffinityParam and the +numExecAffinityParams describes the size of the paramsArray. If two +CUexecAffinityParam in the array have the same type, the latter +execution affinity parameter overrides the former execution affinity +parameter. The supported execution affinity types are:

    +
      +
    • CU_EXEC_AFFINITY_TYPE_SM_COUNT limits the portion of SMs +that the context can use. The portion of SMs is specified as the +number of SMs via CUexecAffinitySmCount. This limit will be +internally rounded up to the next hardware-supported amount. Hence, +it is imperative to query the actual execution affinity of the +context via cuCtxGetExecAffinity after context creation. Currently, +this attribute is only supported under Volta+ MPS.

    • +
    +

    CUDA context can be created in CIG(CUDA in Graphics) mode by setting /p +cigParams. Hardware support and software support for graphics clients +can be determined using cuDeviceGetAttribute() with +CU_DEVICE_ATTRIBUTE_D3D12_CIG_SUPPORTED. Data from graphics +client is shared with CUDA via the /p sharedData in /pcigParams. For +D3D12, /p sharedData is a ID3D12CommandQueue handle.

    +

    Either /p execAffinityParams or /p cigParams can be set to a non-null +value. Setting both to a non-null value will result in an undefined +behavior.

    +

    The three LSBs of the flags parameter can be used to control how the +OS thread, which owns the CUDA context at the time of an API call, +interacts with the OS scheduler when waiting for results from the GPU. +Only one of the scheduling flags can be set when creating a context.

    +
      +
    • CU_CTX_SCHED_SPIN: Instruct CUDA to actively spin when +waiting for results from the GPU. This can decrease latency when +waiting for the GPU, but may lower the performance of CPU threads if +they are performing work in parallel with the CUDA thread.

    • +
    • CU_CTX_SCHED_YIELD: Instruct CUDA to yield its thread +when waiting for results from the GPU. This can increase latency when +waiting for the GPU, but can increase the performance of CPU threads +performing work in parallel with the GPU.

    • +
    • CU_CTX_SCHED_BLOCKING_SYNC: Instruct CUDA to block the +CPU thread on a synchronization primitive when waiting for the GPU to +finish work.

    • +
    • CU_CTX_BLOCKING_SYNC: Instruct CUDA to block the CPU +thread on a synchronization primitive when waiting for the GPU to +finish work. Deprecated: This flag was deprecated as of CUDA 4.0 +and was replaced with CU_CTX_SCHED_BLOCKING_SYNC.

    • +
    • CU_CTX_SCHED_AUTO: The default value if the flags +parameter is zero, uses a heuristic based on the number of active +CUDA contexts in the process C and the number of logical processors +in the system P. If C > P, then CUDA will yield to other OS +threads when waiting for the GPU (CU_CTX_SCHED_YIELD), +otherwise CUDA will not yield while waiting for results and actively +spin on the processor (CU_CTX_SCHED_SPIN). Additionally, +on Tegra devices, CU_CTX_SCHED_AUTO uses a heuristic +based on the power profile of the platform and may choose +CU_CTX_SCHED_BLOCKING_SYNC for low-powered devices.

    • +
    • CU_CTX_MAP_HOST: Instruct CUDA to support mapped pinned +allocations. This flag must be set in order to allocate pinned host +memory that is accessible to the GPU.

    • +
    • CU_CTX_LMEM_RESIZE_TO_MAX: Instruct CUDA to not reduce +local memory after resizing local memory for a kernel. This can +prevent thrashing by local memory allocations when launching many +kernels with high local memory usage at the cost of potentially +increased memory usage. Deprecated: This flag is deprecated and the +behavior enabled by this flag is now the default and cannot be +disabled. Instead, the per-thread stack size can be controlled with +cuCtxSetLimit().

    • +
    • CU_CTX_COREDUMP_ENABLE: If GPU coredumps have not been +enabled globally with cuCoredumpSetAttributeGlobal or +environment variables, this flag can be set during context creation +to instruct CUDA to create a coredump if this context raises an +exception during execution. These environment variables are described +in the CUDA-GDB user guide under the “GPU core dump support” section. +The initial attributes will be taken from the global attributes at +the time of context creation. The other attributes that control +coredump output can be modified by calling +cuCoredumpSetAttribute from the created context after it +becomes current. This flag is not supported when CUDA context is +created in CIG(CUDA in Graphics) mode.

    • +
    • CU_CTX_USER_COREDUMP_ENABLE: If user-triggered GPU +coredumps have not been enabled globally with +cuCoredumpSetAttributeGlobal or environment variables, +this flag can be set during context creation to instruct CUDA to +create a coredump if data is written to a certain pipe that is +present in the OS space. These environment variables are described in +the CUDA-GDB user guide under the “GPU core dump support” section. It +is important to note that the pipe name must be set with +cuCoredumpSetAttributeGlobal before creating the context +if this flag is used. Setting this flag implies that +CU_CTX_COREDUMP_ENABLE is set. The initial attributes +will be taken from the global attributes at the time of context +creation. The other attributes that control coredump output can be +modified by calling cuCoredumpSetAttribute from the +created context after it becomes current. Setting this flag on any +context creation is equivalent to setting the +CU_COREDUMP_ENABLE_USER_TRIGGER attribute to true +globally. This flag is not supported when CUDA context is created in +CIG(CUDA in Graphics) mode.

    • +
    • CU_CTX_SYNC_MEMOPS: Ensures that synchronous memory +operations initiated on this context will always synchronize. See +further documentation in the section titled “API Synchronization +behavior” to learn more about cases when synchronous memory +operations can exhibit asynchronous behavior.

    • +
    +

    Context creation will fail with CUDA_ERROR_UNKNOWN if the +compute mode of the device is CU_COMPUTEMODE_PROHIBITED. +The function cuDeviceGetAttribute() can be used with +CU_DEVICE_ATTRIBUTE_COMPUTE_MODE to determine the compute +mode of the device. The nvidia-smi tool can be used to set the +compute mode for * devices. Documentation for nvidia-smi can be +obtained by passing a -h option to it.

    +

    Context creation will fail with :: CUDA_ERROR_INVALID_VALUE if invalid +parameter was passed by client to create the CUDA context.

    +

    Context creation in CIG mode will fail with +CUDA_ERROR_NOT_SUPPORTED if CIG is not supported by the +device or the driver.

    +
    +
    Parameters:
    +
      +
    • ctxCreateParams (CUctxCreateParams) – Context creation parameters

    • +
    • flags (unsigned int) – Context creation flags

    • +
    • dev (CUdevice) – Device to create context on

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxDestroy(ctx)
    +

    Destroy a CUDA context.

    +

    Destroys the CUDA context specified by ctx. The context ctx will be +destroyed regardless of how many threads it is current to. It is the +responsibility of the calling function to ensure that no API call +issues using ctx while cuCtxDestroy() is executing.

    +

    Destroys and cleans up all resources associated with the context. It is +the caller’s responsibility to ensure that the context or its resources +are not accessed or passed in subsequent API calls and doing so will +result in undefined behavior. These resources include CUDA types +CUmodule, CUfunction, CUstream, +CUevent, CUarray, CUmipmappedArray, +CUtexObject, CUsurfObject, +CUtexref, CUsurfref, +CUgraphicsResource, CUlinkState, +CUexternalMemory and CUexternalSemaphore. These +resources also include memory allocations by cuMemAlloc(), +cuMemAllocHost(), cuMemAllocManaged() and +cuMemAllocPitch().

    +

    If ctx is current to the calling thread then ctx will also be +popped from the current thread’s context stack (as though +cuCtxPopCurrent() were called). If ctx is current to +other threads, then ctx will remain current to those threads, and +attempting to access ctx from those threads will result in the error +CUDA_ERROR_CONTEXT_IS_DESTROYED.

    +
    +
    Parameters:
    +

    ctx (CUcontext) – Context to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    cuCtxDestroy() will not destroy memory allocations by cuMemCreate(), cuMemAllocAsync() and cuMemAllocFromPoolAsync(). These memory allocations are not associated with any CUDA context and need to be destroyed explicitly.

    +
    + +
    +
    +cuda.bindings.driver.cuCtxPushCurrent(ctx)
    +

    Pushes a context on the current CPU thread.

    +

    Pushes the given context ctx onto the CPU thread’s stack of current +contexts. The specified context becomes the CPU thread’s current +context, so all CUDA functions that operate on the current context are +affected.

    +

    The previous current context may be made current again by calling +cuCtxDestroy() or cuCtxPopCurrent().

    +
    +
    Parameters:
    +

    ctx (CUcontext) – Context to push

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxPopCurrent()
    +

    Pops the current CUDA context from the current CPU thread.

    +

    Pops the current CUDA context from the CPU thread and passes back the +old context handle in *pctx. That context may then be made current to +a different CPU thread by calling cuCtxPushCurrent().

    +

    If a context was current to the CPU thread before +cuCtxCreate() or cuCtxPushCurrent() was called, +this function makes that context current to the CPU thread again.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxSetCurrent(ctx)
    +

    Binds the specified CUDA context to the calling CPU thread.

    +

    Binds the specified CUDA context to the calling CPU thread. If ctx is +NULL then the CUDA context previously bound to the calling CPU thread +is unbound and CUDA_SUCCESS is returned.

    +

    If there exists a CUDA context stack on the calling CPU thread, this +will replace the top of that stack with ctx. If ctx is NULL then +this will be equivalent to popping the top of the calling CPU thread’s +CUDA context stack (or a no-op if the calling CPU thread’s CUDA context +stack is empty).

    +
    +
    Parameters:
    +

    ctx (CUcontext) – Context to bind to the calling CPU thread

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetCurrent()
    +

    Returns the CUDA context bound to the calling CPU thread.

    +

    Returns in *pctx the CUDA context bound to the calling CPU thread. If +no context is bound to the calling CPU thread then *pctx is set to +NULL and CUDA_SUCCESS is returned.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetDevice()
    +

    Returns the device ID for the current context.

    +

    Returns in *device the ordinal of the current context’s device.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetFlags()
    +

    Returns the flags for the current context.

    +

    Returns in *flags the flags of the current context. See +cuCtxCreate for flag values.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxSetFlags(unsigned int flags)
    +

    Sets the flags for the current context.

    +

    Sets the flags for the current context overwriting previously set ones. +See cuDevicePrimaryCtxSetFlags for flag values.

    +
    +
    Parameters:
    +

    flags (unsigned int) – Flags to set on the current context

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetId(ctx)
    +

    Returns the unique Id associated with the context supplied.

    +

    Returns in ctxId the unique Id which is associated with a given +context. The Id is unique for the life of the program for this instance +of CUDA. If context is supplied as NULL and there is one current, the +Id of the current context is returned.

    +
    +
    Parameters:
    +

    ctx (CUcontext) – Context for which to obtain the Id

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxSynchronize()
    +

    Block for the current context’s tasks to complete.

    +

    Blocks until the current context has completed all preceding requested +tasks. If the current context is the primary context, green contexts +that have been created will also be synchronized. +cuCtxSynchronize() returns an error if one of the preceding +tasks failed. If the context was created with the +CU_CTX_SCHED_BLOCKING_SYNC flag, the CPU thread will block +until the GPU context has finished its work.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxSetLimit(limit: CUlimit, size_t value)
    +

    Set resource limits.

    +

    Setting limit to value is a request by the application to update +the current limit maintained by the context. The driver is free to +modify the requested value to meet h/w requirements (this could be +clamping to minimum or maximum values, rounding up to nearest element +size, etc). The application can use cuCtxGetLimit() to find +out exactly what the limit has been set to.

    +

    Setting each CUlimit has its own specific restrictions, so +each is discussed here.

    +
      +
    • CU_LIMIT_STACK_SIZE controls the stack size in bytes of +each GPU thread. The driver automatically increases the per-thread +stack size for each kernel launch as needed. This size isn’t reset +back to the original value after each launch. Setting this value will +take effect immediately, and if necessary, the device will block +until all preceding requested tasks are complete.

    • +
    • CU_LIMIT_PRINTF_FIFO_SIZE controls the size in bytes of +the FIFO used by the printf() device system call. Setting +CU_LIMIT_PRINTF_FIFO_SIZE must be performed before +launching any kernel that uses the printf() device system +call, otherwise CUDA_ERROR_INVALID_VALUE will be +returned.

    • +
    • CU_LIMIT_MALLOC_HEAP_SIZE controls the size in bytes of +the heap used by the malloc() and free() +device system calls. Setting CU_LIMIT_MALLOC_HEAP_SIZE +must be performed before launching any kernel that uses the +malloc() or free() device system calls, +otherwise CUDA_ERROR_INVALID_VALUE will be returned.

    • +
    • CU_LIMIT_DEV_RUNTIME_SYNC_DEPTH controls the maximum +nesting depth of a grid at which a thread can safely call +cudaDeviceSynchronize(). Setting this limit must be +performed before any launch of a kernel that uses the device runtime +and calls cudaDeviceSynchronize() above the default sync +depth, two levels of grids. Calls to +cudaDeviceSynchronize() will fail with error code +cudaErrorSyncDepthExceeded if the limitation is violated. +This limit can be set smaller than the default or up the maximum +launch depth of 24. When setting this limit, keep in mind that +additional levels of sync depth require the driver to reserve large +amounts of device memory which can no longer be used for user +allocations. If these reservations of device memory fail, +cuCtxSetLimit() will return +CUDA_ERROR_OUT_OF_MEMORY, and the limit can be reset to a +lower value. This limit is only applicable to devices of compute +capability < 9.0. Attempting to set this limit on devices of other +compute capability versions will result in the error +CUDA_ERROR_UNSUPPORTED_LIMIT being returned.

    • +
    • CU_LIMIT_DEV_RUNTIME_PENDING_LAUNCH_COUNT controls the +maximum number of outstanding device runtime launches that can be +made from the current context. A grid is outstanding from the point +of launch up until the grid is known to have been completed. Device +runtime launches which violate this limitation fail and return +cudaErrorLaunchPendingCountExceeded when +cudaGetLastError() is called after launch. If more +pending launches than the default (2048 launches) are needed for a +module using the device runtime, this limit can be increased. Keep in +mind that being able to sustain additional pending launches will +require the driver to reserve larger amounts of device memory upfront +which can no longer be used for allocations. If these reservations +fail, cuCtxSetLimit() will return +CUDA_ERROR_OUT_OF_MEMORY, and the limit can be reset to a +lower value. This limit is only applicable to devices of compute +capability 3.5 and higher. Attempting to set this limit on devices of +compute capability less than 3.5 will result in the error +CUDA_ERROR_UNSUPPORTED_LIMIT being returned.

    • +
    • CU_LIMIT_MAX_L2_FETCH_GRANULARITY controls the L2 cache +fetch granularity. Values can range from 0B to 128B. This is purely a +performance hint and it can be ignored or clamped depending on the +platform.

    • +
    • CU_LIMIT_PERSISTING_L2_CACHE_SIZE controls size in bytes +available for persisting L2 cache. This is purely a performance hint +and it can be ignored or clamped depending on the platform.

    • +
    +
    +
    Parameters:
    +
      +
    • limit (CUlimit) – Limit to set

    • +
    • value (size_t) – Size of limit

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_UNSUPPORTED_LIMIT, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_INVALID_CONTEXT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetLimit(limit: CUlimit)
    +

    Returns resource limits.

    +

    Returns in *pvalue the current size of limit. The supported +CUlimit values are:

    + +
    +
    Parameters:
    +

    limit (CUlimit) – Limit to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetCacheConfig()
    +

    Returns the preferred cache configuration for the current context.

    +

    On devices where the L1 cache and shared memory use the same hardware +resources, this function returns through pconfig the preferred cache +configuration for the current context. This is only a preference. The +driver will use the requested configuration if possible, but it is free +to choose a different configuration if required to execute functions.

    +

    This will return a pconfig of CU_FUNC_CACHE_PREFER_NONE +on devices where the size of the L1 cache and shared memory are fixed.

    +

    The supported cache configurations are:

    + +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxSetCacheConfig(config: CUfunc_cache)
    +

    Sets the preferred cache configuration for the current context.

    +

    On devices where the L1 cache and shared memory use the same hardware +resources, this sets through config the preferred cache configuration +for the current context. This is only a preference. The driver will use +the requested configuration if possible, but it is free to choose a +different configuration if required to execute the function. Any +function preference set via cuFuncSetCacheConfig() or +cuKernelSetCacheConfig() will be preferred over this +context-wide setting. Setting the context-wide cache configuration to +CU_FUNC_CACHE_PREFER_NONE will cause subsequent kernel +launches to prefer to not change the cache configuration unless +required to launch the kernel.

    +

    This setting does nothing on devices where the size of the L1 cache and +shared memory are fixed.

    +

    Launching a kernel with a different preference than the most recent +preference setting may insert a device-side synchronization point.

    +

    The supported cache configurations are:

    + +
    +
    Parameters:
    +

    config (CUfunc_cache) – Requested cache configuration

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetApiVersion(ctx)
    +

    Gets the context’s API version.

    +

    Returns a version number in version corresponding to the capabilities +of the context (e.g. 3010 or 3020), which library developers can use to +direct callers to a specific API version. If ctx is NULL, returns the +API version used to create the currently bound context.

    +

    Note that new API versions are only introduced when context +capabilities are changed that break binary compatibility, so the API +version and driver version may be different. For example, it is valid +for the API version to be 3020 while the driver version is 4020.

    +
    +
    Parameters:
    +

    ctx (CUcontext) – Context to check

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetStreamPriorityRange()
    +

    Returns numerical values that correspond to the least and greatest stream priorities.

    +

    Returns in *leastPriority and *greatestPriority the numerical +values that correspond to the least and greatest stream priorities +respectively. Stream priorities follow a convention where lower numbers +imply greater priorities. The range of meaningful stream priorities is +given by [*greatestPriority, *leastPriority]. If the user attempts +to create a stream with a priority value that is outside the meaningful +range as specified by this API, the priority is automatically clamped +down or up to either *leastPriority or *greatestPriority +respectively. See cuStreamCreateWithPriority for details on +creating a priority stream. A NULL may be passed in for +*leastPriority or *greatestPriority if the value is not desired.

    +

    This function will return ‘0’ in both *leastPriority and +*greatestPriority if the current context’s device does not support +stream priorities (see cuDeviceGetAttribute).

    +
    +
    Returns:
    +

      +
    • CUresultCUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    • +
    • leastPriority (int) – Pointer to an int in which the numerical value for least stream +priority is returned

    • +
    • greatestPriority (int) – Pointer to an int in which the numerical value for greatest stream +priority is returned

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxResetPersistingL2Cache()
    +

    Resets all persisting lines in cache to normal status.

    +

    cuCtxResetPersistingL2Cache Resets all persisting lines in +cache to normal status. Takes effect on function return.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    CUaccessPolicyWindow

    +
    +
    + +
    +
    +cuda.bindings.driver.cuCtxGetExecAffinity(typename: CUexecAffinityType)
    +

    Returns the execution affinity setting for the current context.

    +

    Returns in *pExecAffinity the current value of typename. The +supported CUexecAffinityType values are:

    + +
    +
    Parameters:
    +

    typename (CUexecAffinityType) – Execution affinity type to query

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    CUexecAffinityParam

    +
    +
    + +
    +
    +cuda.bindings.driver.cuCtxRecordEvent(hCtx, hEvent)
    +

    Records an event.

    +

    Captures in hEvent all the activities of the context hCtx at the +time of this call. hEvent and hCtx must be from the same CUDA +context, otherwise CUDA_ERROR_INVALID_HANDLE will be +returned. Calls such as cuEventQuery() or +cuCtxWaitEvent() will then examine or wait for completion +of the work that was captured. Uses of hCtx after this call do not +modify hEvent. If the context passed to hCtx is the primary +context, hEvent will capture all the activities of the primary +context and its green contexts. If the context passed to hCtx is a +context converted from green context via +cuCtxFromGreenCtx(), hEvent will capture only the +activities of the green context.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    The API will return CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED if the specified context hCtx has a stream in the capture mode. In such a case, the call will invalidate all the conflicting captures.

    +
    + +
    +
    +cuda.bindings.driver.cuCtxWaitEvent(hCtx, hEvent)
    +

    Make a context wait on an event.

    +

    Makes all future work submitted to context hCtx wait for all work +captured in hEvent. The synchronization will be performed on the +device and will not block the calling CPU thread. See +cuCtxRecordEvent() for details on what is captured by an +event. If the context passed to hCtx is the primary context, the +primary context and its green contexts will wait for hEvent. If the +context passed to hCtx is a context converted from green context via +cuCtxFromGreenCtx(), the green context will wait for +hEvent.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    hEvent may be from a different context or device than hCtx.

    +

    The API will return CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED and invalidate the capture if the specified event hEvent is part of an ongoing capture sequence or if the specified context hCtx has a stream in the capture mode.

    +
    + +
    +
    +

    Module Management

    +

    This section describes the module management functions of the low-level CUDA driver application programming interface.

    +
    +
    +class cuda.bindings.driver.CUmoduleLoadingMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Lazy Loading status

    +
    +
    +CU_MODULE_EAGER_LOADING = 1
    +

    Lazy Kernel Loading is not enabled

    +
    + +
    +
    +CU_MODULE_LAZY_LOADING = 2
    +

    Lazy Kernel Loading is enabled

    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleLoad(char *fname)
    +

    Loads a compute module.

    +

    Takes a filename fname and loads the corresponding module module +into the current context. The CUDA driver API does not attempt to +lazily allocate the resources needed by a module; if the memory for +functions and data (constant and global) needed by the module cannot be +allocated, cuModuleLoad() fails. The file should be a +cubin file as output by nvcc, or a PTX file either as output by +nvcc or handwritten, or a fatbin file as output by nvcc from +toolchain 4.0 or later.

    +
    +
    Parameters:
    +

    fname (bytes) – Filename of module to load

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleLoadData(image)
    +

    Load a module’s data.

    +

    Takes a pointer image and loads the corresponding module module +into the current context. The image may be a cubin or fatbin as +output by nvcc, or a NULL-terminated PTX, either as output by nvcc or +hand-written.

    +
    +
    Parameters:
    +

    image (Any) – Module data to load

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleLoadDataEx(image, unsigned int numOptions, options: Optional[Tuple[CUjit_option] | List[CUjit_option]], optionValues: Optional[Tuple[Any] | List[Any]])
    +

    Load a module’s data with options.

    +

    Takes a pointer image and loads the corresponding module module +into the current context. The image may be a cubin or fatbin as +output by nvcc, or a NULL-terminated PTX, either as output by nvcc or +hand-written.

    +
    +
    Parameters:
    +
      +
    • image (Any) – Module data to load

    • +
    • numOptions (unsigned int) – Number of options

    • +
    • options (List[CUjit_option]) – Options for JIT

    • +
    • optionValues (List[Any]) – Option values for JIT

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleLoadFatBinary(fatCubin)
    +

    Load a module’s data.

    +

    Takes a pointer fatCubin and loads the corresponding module module +into the current context. The pointer represents a fat binary object, +which is a collection of different cubin and/or PTX files, all +representing the same device code, but compiled and optimized for +different architectures.

    +

    Prior to CUDA 4.0, there was no documented API for constructing and +using fat binary objects by programmers. Starting with CUDA 4.0, fat +binary objects can be constructed by providing the -fatbin option to +nvcc. More information can be found in the nvcc document.

    +
    +
    Parameters:
    +

    fatCubin (Any) – Fat binary to load

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleUnload(hmod)
    +

    Unloads a module.

    +

    Unloads a module hmod from the current context. Attempting to unload +a module which was obtained from the Library Management API such as +cuLibraryGetModule will return +CUDA_ERROR_NOT_PERMITTED.

    +
    +
    Parameters:
    +

    hmod (CUmodule) – Module to unload

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_PERMITTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleGetLoadingMode()
    +

    Query lazy loading mode.

    +

    Returns lazy loading mode Module loading mode is controlled by +CUDA_MODULE_LOADING env variable

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuModuleLoad

    +
    +
    + +
    +
    +cuda.bindings.driver.cuModuleGetFunction(hmod, char *name)
    +

    Returns a function handle.

    +

    Returns in *hfunc the handle of the function of name name located +in module hmod. If no function of that name exists, +cuModuleGetFunction() returns +CUDA_ERROR_NOT_FOUND.

    +
    +
    Parameters:
    +
      +
    • hmod (CUmodule) – Module to retrieve function from

    • +
    • name (bytes) – Name of function to retrieve

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleGetFunctionCount(mod)
    +

    Returns the number of functions within a module.

    +

    Returns in count the number of functions in mod.

    +
    +
    Parameters:
    +

    mod (CUmodule) – Module to query

    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuModuleEnumerateFunctions(unsigned int numFunctions, mod)
    +

    Returns the function handles within a module.

    +

    Returns in functions a maximum number of numFunctions function +handles within mod. When function loading mode is set to LAZY the +function retrieved may be partially loaded. The loading state of a +function can be queried using cuFunctionIsLoaded. CUDA APIs +may load the function automatically when called with partially loaded +function handle which may incur additional latency. Alternatively, +cuFunctionLoad can be used to explicitly load a function. +The returned function handles become invalid when the module is +unloaded.

    +
    +
    Parameters:
    +
      +
    • numFunctions (unsigned int) – Maximum number of function handles may be returned to the buffer

    • +
    • mod (CUmodule) – Module to query from

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuModuleGetGlobal(hmod, char *name)
    +

    Returns a global pointer from a module.

    +

    Returns in *dptr and *bytes the base pointer and size of the global +of name name located in module hmod. If no variable of that name +exists, cuModuleGetGlobal() returns +CUDA_ERROR_NOT_FOUND. One of the parameters dptr or +numbytes (not both) can be NULL in which case it is ignored.

    +
    +
    Parameters:
    +
      +
    • hmod (CUmodule) – Module to retrieve global from

    • +
    • name (bytes) – Name of global to retrieve

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuModuleGetFunction, cuModuleGetTexRef, cuModuleLoad, cuModuleLoadData, cuModuleLoadDataEx, cuModuleLoadFatBinary, cuModuleUnload, cudaGetSymbolAddress, cudaGetSymbolSize

    +
    +
    + +
    +
    +cuda.bindings.driver.cuLinkCreate(unsigned int numOptions, options: Optional[Tuple[CUjit_option] | List[CUjit_option]], optionValues: Optional[Tuple[Any] | List[Any]])
    +

    Creates a pending JIT linker invocation.

    +

    If the call is successful, the caller owns the returned CUlinkState, +which should eventually be destroyed with cuLinkDestroy. +The device code machine size (32 or 64 bit) will match the calling +application.

    +

    Both linker and compiler options may be specified. Compiler options +will be applied to inputs to this linker action which must be compiled +from PTX. The options CU_JIT_WALL_TIME, +CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES, and +CU_JIT_ERROR_LOG_BUFFER_SIZE_BYTES will accumulate data +until the CUlinkState is destroyed.

    +

    The data passed in via cuLinkAddData and +cuLinkAddFile will be treated as relocatable (-rdc=true to +nvcc) when linking the final cubin during cuLinkComplete +and will have similar consequences as offline relocatable device code +linking.

    +

    optionValues must remain valid for the life of the CUlinkState if +output options are used. No other references to inputs are maintained +after this call returns.

    +
    +
    Parameters:
    +
      +
    • numOptions (unsigned int) – Size of options arrays

    • +
    • options (List[CUjit_option]) – Array of linker and compiler options

    • +
    • optionValues (List[Any]) – Array of option values, each cast to void *

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted

    +
    + +
    +
    +cuda.bindings.driver.cuLinkAddData(state, typename: CUjitInputType, data, size_t size, char *name, unsigned int numOptions, options: Optional[Tuple[CUjit_option] | List[CUjit_option]], optionValues: Optional[Tuple[Any] | List[Any]])
    +

    Add an input to a pending linker invocation.

    +

    Ownership of data is retained by the caller. No reference is retained +to any inputs after this call returns.

    +

    This method accepts only compiler options, which are used if the data +must be compiled from PTX, and does not accept any of +CU_JIT_WALL_TIME, CU_JIT_INFO_LOG_BUFFER, +CU_JIT_ERROR_LOG_BUFFER, +CU_JIT_TARGET_FROM_CUCONTEXT, or CU_JIT_TARGET.

    +
    +
    Parameters:
    +
      +
    • state (CUlinkState) – A pending linker action.

    • +
    • typename (CUjitInputType) – The type of the input data.

    • +
    • data (Any) – The input data. PTX must be NULL-terminated.

    • +
    • size (size_t) – The length of the input data.

    • +
    • name (bytes) – An optional name for this input in log messages.

    • +
    • numOptions (unsigned int) – Size of options.

    • +
    • options (List[CUjit_option]) – Options to be applied only for this input (overrides options from +cuLinkCreate).

    • +
    • optionValues (List[Any]) – Array of option values, each cast to void *.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_IMAGE, CUDA_ERROR_INVALID_PTX, CUDA_ERROR_UNSUPPORTED_PTX_VERSION, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_NO_BINARY_FOR_GPU

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted

    +
    + +
    +
    +cuda.bindings.driver.cuLinkAddFile(state, typename: CUjitInputType, char *path, unsigned int numOptions, options: Optional[Tuple[CUjit_option] | List[CUjit_option]], optionValues: Optional[Tuple[Any] | List[Any]])
    +

    Add a file input to a pending linker invocation.

    +

    No reference is retained to any inputs after this call returns.

    +

    This method accepts only compiler options, which are used if the input +must be compiled from PTX, and does not accept any of +CU_JIT_WALL_TIME, CU_JIT_INFO_LOG_BUFFER, +CU_JIT_ERROR_LOG_BUFFER, +CU_JIT_TARGET_FROM_CUCONTEXT, or CU_JIT_TARGET.

    +

    This method is equivalent to invoking cuLinkAddData on the +contents of the file.

    +
    +
    Parameters:
    +
      +
    • state (CUlinkState) – A pending linker action

    • +
    • typename (CUjitInputType) – The type of the input data

    • +
    • path (bytes) – Path to the input file

    • +
    • numOptions (unsigned int) – Size of options

    • +
    • options (List[CUjit_option]) – Options to be applied only for this input (overrides options from +cuLinkCreate)

    • +
    • optionValues (List[Any]) – Array of option values, each cast to void *

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_FILE_NOT_FOUND CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_IMAGE, CUDA_ERROR_INVALID_PTX, CUDA_ERROR_UNSUPPORTED_PTX_VERSION, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_NO_BINARY_FOR_GPU

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    For LTO-IR input, only LTO-IR compiled with toolkits prior to CUDA 12.0 will be accepted

    +
    + +
    +
    +cuda.bindings.driver.cuLinkComplete(state)
    +

    Complete a pending linker invocation.

    +

    Completes the pending linker action and returns the cubin image for the +linked device code, which can be used with +cuModuleLoadData. The cubin is owned by state, so it +should be loaded before state is destroyed via +cuLinkDestroy. This call does not destroy state.

    +
    +
    Parameters:
    +

    state (CUlinkState) – A pending linker invocation

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLinkDestroy(state)
    +

    Destroys state for a JIT linker invocation.

    +
    +
    Parameters:
    +

    state (CUlinkState) – State object for the linker invocation

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    cuLinkCreate

    +
    +
    + +
    +
    +

    Library Management

    +

    This section describes the library management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuLibraryLoadData(code, jitOptions: Optional[Tuple[CUjit_option] | List[CUjit_option]], jitOptionsValues: Optional[Tuple[Any] | List[Any]], unsigned int numJitOptions, libraryOptions: Optional[Tuple[CUlibraryOption] | List[CUlibraryOption]], libraryOptionValues: Optional[Tuple[Any] | List[Any]], unsigned int numLibraryOptions)
    +

    Load a library with specified code and options.

    +

    Takes a pointer code and loads the corresponding library library +based on the application defined library loading mode:

    +
      +
    • If module loading is set to EAGER, via the environment variables +described in “Module loading”, library is loaded eagerly into all +contexts at the time of the call and future contexts at the time of +creation until the library is unloaded with +cuLibraryUnload().

    • +
    • If the environment variables are set to LAZY, library is not +immediately loaded onto all existent contexts and will only be loaded +when a function is needed for that context, such as a kernel launch.

    • +
    +

    These environment variables are described in the CUDA programming guide +under the “CUDA environment variables” section.

    +

    The code may be a cubin or fatbin as output by nvcc, or a NULL- +terminated PTX, either as output by nvcc or hand-written. A fatbin +should also contain relocatable code when doing separate compilation.

    +

    Options are passed as an array via jitOptions and any corresponding +parameters are passed in jitOptionsValues. The number of total JIT +options is supplied via numJitOptions. Any outputs will be returned +via jitOptionsValues.

    +

    Library load options are passed as an array via libraryOptions and +any corresponding parameters are passed in libraryOptionValues. The +number of total library load options is supplied via +numLibraryOptions.

    +
    +
    Parameters:
    +
      +
    • code (Any) – Code to load

    • +
    • jitOptions (List[CUjit_option]) – Options for JIT

    • +
    • jitOptionsValues (List[Any]) – Option values for JIT

    • +
    • numJitOptions (unsigned int) – Number of options

    • +
    • libraryOptions (List[CUlibraryOption]) – Options for loading

    • +
    • libraryOptionValues (List[Any]) – Option values for loading

    • +
    • numLibraryOptions (unsigned int) – Number of options for loading

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    If the library contains managed variables and no device in the system supports managed variables this call is expected to return CUDA_ERROR_NOT_SUPPORTED

    +
    + +
    +
    +cuda.bindings.driver.cuLibraryLoadFromFile(char *fileName, jitOptions: Optional[Tuple[CUjit_option] | List[CUjit_option]], jitOptionsValues: Optional[Tuple[Any] | List[Any]], unsigned int numJitOptions, libraryOptions: Optional[Tuple[CUlibraryOption] | List[CUlibraryOption]], libraryOptionValues: Optional[Tuple[Any] | List[Any]], unsigned int numLibraryOptions)
    +

    Load a library with specified file and options.

    +

    Takes a pointer code and loads the corresponding library library +based on the application defined library loading mode:

    +
      +
    • If module loading is set to EAGER, via the environment variables +described in “Module loading”, library is loaded eagerly into all +contexts at the time of the call and future contexts at the time of +creation until the library is unloaded with +cuLibraryUnload().

    • +
    • If the environment variables are set to LAZY, library is not +immediately loaded onto all existent contexts and will only be loaded +when a function is needed for that context, such as a kernel launch.

    • +
    +

    These environment variables are described in the CUDA programming guide +under the “CUDA environment variables” section.

    +

    The file should be a cubin file as output by nvcc, or a PTX file +either as output by nvcc or handwritten, or a fatbin file as output +by nvcc. A fatbin should also contain relocatable code when doing +separate compilation.

    +

    Options are passed as an array via jitOptions and any corresponding +parameters are passed in jitOptionsValues. The number of total +options is supplied via numJitOptions. Any outputs will be returned +via jitOptionsValues.

    +

    Library load options are passed as an array via libraryOptions and +any corresponding parameters are passed in libraryOptionValues. The +number of total library load options is supplied via +numLibraryOptions.

    +
    +
    Parameters:
    +
      +
    • fileName (bytes) – File to load from

    • +
    • jitOptions (List[CUjit_option]) – Options for JIT

    • +
    • jitOptionsValues (List[Any]) – Option values for JIT

    • +
    • numJitOptions (unsigned int) – Number of options

    • +
    • libraryOptions (List[CUlibraryOption]) – Options for loading

    • +
    • libraryOptionValues (List[Any]) – Option values for loading

    • +
    • numLibraryOptions (unsigned int) – Number of options for loading

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    If the library contains managed variables and no device in the system supports managed variables this call is expected to return CUDA_ERROR_NOT_SUPPORTED

    +
    + +
    +
    +cuda.bindings.driver.cuLibraryUnload(library)
    +

    Unloads a library.

    +

    Unloads the library specified with library

    +
    +
    Parameters:
    +

    library (CUlibrary) – Library to unload

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLibraryGetKernel(library, char *name)
    +

    Returns a kernel handle.

    +

    Returns in pKernel the handle of the kernel with name name located +in library library. If kernel handle is not found, the call returns +CUDA_ERROR_NOT_FOUND.

    +
    +
    Parameters:
    +
      +
    • library (CUlibrary) – Library to retrieve kernel from

    • +
    • name (bytes) – Name of kernel to retrieve

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLibraryGetKernelCount(lib)
    +

    Returns the number of kernels within a library.

    +

    Returns in count the number of kernels in lib.

    +
    +
    Parameters:
    +

    lib (CUlibrary) – Library to query

    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuLibraryEnumerateKernels(unsigned int numKernels, lib)
    +

    Retrieve the kernel handles within a library.

    +

    Returns in kernels a maximum number of numKernels kernel handles +within lib. The returned kernel handle becomes invalid when the +library is unloaded.

    +
    +
    Parameters:
    +
      +
    • numKernels (unsigned int) – Maximum number of kernel handles may be returned to the buffer

    • +
    • lib (CUlibrary) – Library to query from

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLibraryGetModule(library)
    +

    Returns a module handle.

    +

    Returns in pMod the module handle associated with the current context +located in library library. If module handle is not found, the call +returns CUDA_ERROR_NOT_FOUND.

    +
    +
    Parameters:
    +

    library (CUlibrary) – Library to retrieve module from

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuKernelGetFunction(kernel)
    +

    Returns a function handle.

    +

    Returns in pFunc the handle of the function for the requested kernel +kernel and the current context. If function handle is not found, the +call returns CUDA_ERROR_NOT_FOUND.

    +
    +
    Parameters:
    +

    kernel (CUkernel) – Kernel to retrieve function for the requested context

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuKernelGetLibrary(kernel)
    +

    Returns a library handle.

    +

    Returns in pLib the handle of the library for the requested kernel +kernel

    +
    +
    Parameters:
    +

    kernel (CUkernel) – Kernel to retrieve library handle

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLibraryGetGlobal(library, char *name)
    +

    Returns a global device pointer.

    +

    Returns in *dptr and *bytes the base pointer and size of the global +with name name for the requested library library and the current +context. If no global for the requested name name exists, the call +returns CUDA_ERROR_NOT_FOUND. One of the parameters dptr +or numbytes (not both) can be NULL in which case it is ignored.

    +
    +
    Parameters:
    +
      +
    • library (CUlibrary) – Library to retrieve global from

    • +
    • name (bytes) – Name of global to retrieve

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLibraryGetManaged(library, char *name)
    +

    Returns a pointer to managed memory.

    +

    Returns in *dptr and *bytes the base pointer and size of the +managed memory with name name for the requested library library. If +no managed memory with the requested name name exists, the call +returns CUDA_ERROR_NOT_FOUND. One of the parameters dptr +or numbytes (not both) can be NULL in which case it is ignored. Note +that managed memory for library library is shared across devices and +is registered when the library is loaded into atleast one context.

    +
    +
    Parameters:
    +
      +
    • library (CUlibrary) – Library to retrieve managed memory from

    • +
    • name (bytes) – Name of managed memory to retrieve

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLibraryGetUnifiedFunction(library, char *symbol)
    +

    Returns a pointer to a unified function.

    +

    Returns in *fptr the function pointer to a unified function denoted +by symbol. If no unified function with name symbol exists, the call +returns CUDA_ERROR_NOT_FOUND. If there is no device with +attribute CU_DEVICE_ATTRIBUTE_UNIFIED_FUNCTION_POINTERS +present in the system, the call may return +CUDA_ERROR_NOT_FOUND.

    +
    +
    Parameters:
    +
      +
    • library (CUlibrary) – Library to retrieve function pointer memory from

    • +
    • symbol (bytes) – Name of function pointer to retrieve

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuKernelGetAttribute(attrib: CUfunction_attribute, kernel, dev)
    +

    Returns information about a kernel.

    +

    Returns in *pi the integer value of the attribute attrib for the +kernel kernel for the requested device dev. The supported +attributes are:

    +
      +
    • CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: The maximum +number of threads per block, beyond which a launch of the kernel +would fail. This number depends on both the kernel and the requested +device.

    • +
    • CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: The size in bytes of +statically-allocated shared memory per block required by this kernel. +This does not include dynamically-allocated shared memory requested +by the user at runtime.

    • +
    • CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: The size in bytes of +user-allocated constant memory required by this kernel.

    • +
    • CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: The size in bytes of +local memory used by each thread of this kernel.

    • +
    • CU_FUNC_ATTRIBUTE_NUM_REGS: The number of registers used +by each thread of this kernel.

    • +
    • CU_FUNC_ATTRIBUTE_PTX_VERSION: The PTX virtual +architecture version for which the kernel was compiled. This value is +the major PTX version * 10

      +
        +
      • the minor PTX version, so a PTX version 1.3 function would return +the value 13. Note that this may return the undefined value of 0 +for cubins compiled prior to CUDA 3.0.

      • +
      +
    • +
    • CU_FUNC_ATTRIBUTE_BINARY_VERSION: The binary architecture +version for which the kernel was compiled. This value is the major +binary version * 10 + the minor binary version, so a binary version +1.3 function would return the value 13. Note that this will return a +value of 10 for legacy cubins that do not have a properly-encoded +binary architecture version.

    • +
    • CU_FUNC_CACHE_MODE_CA: The attribute to indicate whether +the kernel has been compiled with user specified option “-Xptxas +–dlcm=ca” set.

    • +
    • CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: The +maximum size in bytes of dynamically-allocated shared memory.

    • +
    • CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: +Preferred shared memory-L1 cache split ratio in percent of total +shared memory.

    • +
    • CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET: If this +attribute is set, the kernel must launch with a valid cluster size +specified.

    • +
    • CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: The required +cluster width in blocks.

    • +
    • CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: The required +cluster height in blocks.

    • +
    • CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: The required +cluster depth in blocks.

    • +
    • CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED: +Indicates whether the function can be launched with non-portable +cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster +size may only function on the specific SKUs the program is tested on. +The launch might fail if the program is run on a different hardware +platform. CUDA API provides cudaOccupancyMaxActiveClusters to assist +with checking whether the desired size can be launched on the current +device. A portable cluster size is guaranteed to be functional on all +compute capabilities higher 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.

    • +
    • CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: +The block scheduling policy of a function. The value type is +CUclusterSchedulingPolicy.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    If another thread is trying to set the same attribute on the same device using cuKernelSetAttribute() simultaneously, the attribute query will give the old or new value depending on the interleavings chosen by the OS scheduler and memory consistency.

    +
    + +
    +
    +cuda.bindings.driver.cuKernelSetAttribute(attrib: CUfunction_attribute, int val, kernel, dev)
    +

    Sets information about a kernel.

    +

    This call sets the value of a specified attribute attrib on the +kernel kernel for the requested device dev to an integer value +specified by val. This function returns CUDA_SUCCESS if the new value +of the attribute could be successfully set. If the set fails, this call +will return an error. Not all attributes can have values set. +Attempting to set a value on a read-only attribute will result in an +error (CUDA_ERROR_INVALID_VALUE)

    +

    Note that attributes set using cuFuncSetAttribute() will +override the attribute set by this API irrespective of whether the call +to cuFuncSetAttribute() is made before or after this API +call. However, cuKernelGetAttribute() will always return +the attribute value set by this API.

    +

    Supported attributes are:

    + +
    +
    Parameters:
    +
      +
    • attrib (CUfunction_attribute) – Attribute requested

    • +
    • val (int) – Value to set

    • +
    • kernel (CUkernel) – Kernel to set attribute of

    • +
    • dev (CUdevice) – Device to set attribute of

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    The API has stricter locking requirements in comparison to its legacy counterpart cuFuncSetAttribute() due to device-wide semantics. If multiple threads are trying to set the same attribute on the same device simultaneously, the attribute setting will depend on the interleavings chosen by the OS scheduler and memory consistency.

    +
    + +
    +
    +cuda.bindings.driver.cuKernelSetCacheConfig(kernel, config: CUfunc_cache, dev)
    +

    Sets the preferred cache configuration for a device kernel.

    +

    On devices where the L1 cache and shared memory use the same hardware +resources, this sets through config the preferred cache configuration +for the device kernel kernel on the requested device dev. This is +only a preference. The driver will use the requested configuration if +possible, but it is free to choose a different configuration if +required to execute kernel. Any context-wide preference set via +cuCtxSetCacheConfig() will be overridden by this per-kernel +setting.

    +

    Note that attributes set using cuFuncSetCacheConfig() will +override the attribute set by this API irrespective of whether the call +to cuFuncSetCacheConfig() is made before or after this API +call.

    +

    This setting does nothing on devices where the size of the L1 cache and +shared memory are fixed.

    +

    Launching a kernel with a different preference than the most recent +preference setting may insert a device-side synchronization point.

    +

    The supported cache configurations are:

    + +
    +
    Parameters:
    +
      +
    • kernel (CUkernel) – Kernel to configure cache for

    • +
    • config (CUfunc_cache) – Requested cache configuration

    • +
    • dev (CUdevice) – Device to set attribute of

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    The API has stricter locking requirements in comparison to its legacy counterpart cuFuncSetCacheConfig() due to device-wide semantics. If multiple threads are trying to set a config on the same device simultaneously, the cache config setting will depend on the interleavings chosen by the OS scheduler and memory consistency.

    +
    + +
    +
    +cuda.bindings.driver.cuKernelGetName(hfunc)
    +

    Returns the function name for a CUkernel handle.

    +

    Returns in **name the function name associated with the kernel handle +hfunc . The function name is returned as a null-terminated string. +The returned name is only valid when the kernel handle is valid. If the +library is unloaded or reloaded, one must call the API again to get the +updated name. This API may return a mangled name if the function is not +declared as having C linkage. If either **name or hfunc is NULL, +CUDA_ERROR_INVALID_VALUE is returned.

    +
    +
    Parameters:
    +

    hfunc (CUkernel) – The function handle to retrieve the name for

    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuKernelGetParamInfo(kernel, size_t paramIndex)
    +

    Returns the offset and size of a kernel parameter in the device-side parameter layout.

    +

    Queries the kernel parameter at paramIndex into kernel’s list of +parameters, and returns in paramOffset and paramSize the offset and +size, respectively, where the parameter will reside in the device-side +parameter layout. This information can be used to update kernel node +parameters from the device via +cudaGraphKernelNodeSetParam() and +cudaGraphKernelNodeUpdatesApply(). paramIndex must be +less than the number of parameters that kernel takes. paramSize can +be set to NULL if only the parameter offset is desired.

    +
    +
    Parameters:
    +
      +
    • kernel (CUkernel) – The kernel to query

    • +
    • paramIndex (size_t) – The parameter index to query

    • +
    +
    +
    Returns:
    +

      +
    • CUresultCUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    • +
    • paramOffset (int) – Returns the offset into the device-side parameter layout at which +the parameter resides

    • +
    • paramSize (int) – Optionally returns the size of the parameter in the device-side +parameter layout

    • +
    +

    +
    +
    +
    +

    See also

    +

    cuFuncGetParamInfo

    +
    +
    + +
    +
    +

    Memory Management

    +

    This section describes the memory management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuMemGetInfo()
    +

    Gets free and total memory.

    +

    Returns in *total the total amount of memory available to the the +current context. Returns in *free the amount of memory on the device +that is free according to the OS. CUDA is not guaranteed to be able to +allocate all of the memory that the OS reports as free. In a multi- +tenet situation, free estimate returned is prone to race condition +where a new allocation/free done by a different process or a different +thread in the same process between the time when free memory was +estimated and reported, will result in deviation in free value reported +and actual free memory.

    +

    The integrated GPU on Tegra shares memory with CPU and other component +of the SoC. The free and total values returned by the API excludes the +SWAP memory space maintained by the OS on some platforms. The OS may +move some of the memory pages into swap area as the GPU or CPU allocate +or access memory. See Tegra app note on how to calculate total and free +memory on Tegra.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemAlloc(size_t bytesize)
    +

    Allocates device memory.

    +

    Allocates bytesize bytes of linear memory on the device and returns +in *dptr a pointer to the allocated memory. The allocated memory is +suitably aligned for any kind of variable. The memory is not cleared. +If bytesize is 0, cuMemAlloc() returns +CUDA_ERROR_INVALID_VALUE.

    +
    +
    Parameters:
    +

    bytesize (size_t) – Requested allocation size in bytes

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemAllocPitch(size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes)
    +

    Allocates pitched device memory.

    +

    Allocates at least WidthInBytes * Height bytes of linear memory on +the device and returns in *dptr a pointer to the allocated memory. +The function may pad the allocation to ensure that corresponding +pointers in any given row will continue to meet the alignment +requirements for coalescing as the address is updated from row to row. +ElementSizeBytes specifies the size of the largest reads and writes +that will be performed on the memory range. ElementSizeBytes may be +4, 8 or 16 (since coalesced memory transactions are not possible on +other data sizes). If ElementSizeBytes is smaller than the actual +read/write size of a kernel, the kernel will run correctly, but +possibly at reduced speed. The pitch returned in *pPitch by +cuMemAllocPitch() is the width in bytes of the allocation. +The intended usage of pitch is as a separate parameter of the +allocation, used to compute addresses within the 2D array. Given the +row and column of an array element of type T, the address is computed +as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    The pitch returned by cuMemAllocPitch() is guaranteed to +work with cuMemcpy2D() under all circumstances. For +allocations of 2D arrays, it is recommended that programmers consider +performing pitch allocations using cuMemAllocPitch(). Due +to alignment restrictions in the hardware, this is especially true if +the application will be performing 2D memory copies between different +regions of device memory (whether linear memory or CUDA arrays).

    +

    The byte alignment of the pitch returned by +cuMemAllocPitch() is guaranteed to match or exceed the +alignment requirement for texture binding with +cuTexRefSetAddress2D().

    +
    +
    Parameters:
    +
      +
    • WidthInBytes (size_t) – Requested allocation width in bytes

    • +
    • Height (size_t) – Requested allocation height in rows

    • +
    • ElementSizeBytes (unsigned int) – Size of largest reads/writes for range

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemFree(dptr)
    +

    Frees device memory.

    +

    Frees the memory space pointed to by dptr, which must have been +returned by a previous call to one of the following memory allocation +APIs - cuMemAlloc(), cuMemAllocPitch(), +cuMemAllocManaged(), cuMemAllocAsync(), +cuMemAllocFromPoolAsync()

    +

    Note - This API will not perform any implict synchronization when the +pointer was allocated with cuMemAllocAsync or +cuMemAllocFromPoolAsync. Callers must ensure that all +accesses to these pointer have completed before invoking +cuMemFree. For best performance and memory reuse, users +should use cuMemFreeAsync to free memory allocated via the +stream ordered memory allocator. For all other pointers, this API may +perform implicit synchronization.

    +
    +
    Parameters:
    +

    dptr (CUdeviceptr) – Pointer to memory to free

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemGetAddressRange(dptr)
    +

    Get information on memory allocations.

    +

    Returns the base address in *pbase and size in *psize of the +allocation by cuMemAlloc() or cuMemAllocPitch() +that contains the input pointer dptr. Both parameters pbase and +psize are optional. If one of them is NULL, it is ignored.

    +
    +
    Parameters:
    +

    dptr (CUdeviceptr) – Device pointer to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemAllocHost(size_t bytesize)
    +

    Allocates page-locked host memory.

    +

    Allocates bytesize bytes of host memory that is page-locked and +accessible to the device. The driver tracks the virtual memory ranges +allocated with this function and automatically accelerates calls to +functions such as cuMemcpy(). Since the memory can be +accessed directly by the device, it can be read or written with much +higher bandwidth than pageable memory obtained with functions such as +malloc().

    +

    On systems where +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES +is true, cuMemAllocHost may not page-lock the allocated +memory.

    +

    Page-locking excessive amounts of memory with +cuMemAllocHost() may degrade system performance, since it +reduces the amount of memory available to the system for paging. As a +result, this function is best used sparingly to allocate staging areas +for data exchange between host and device.

    +

    Note all host memory allocated using cuMemAllocHost() will +automatically be immediately accessible to all contexts on all devices +which support unified addressing (as may be queried using +CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING). The device pointer +that may be used to access this host memory from those contexts is +always equal to the returned host pointer *pp. See Unified +Addressing for additional details.

    +
    +
    Parameters:
    +

    bytesize (size_t) – Requested allocation size in bytes

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemFreeHost(p)
    +

    Frees page-locked host memory.

    +

    Frees the memory space pointed to by p, which must have been returned +by a previous call to cuMemAllocHost().

    +
    +
    Parameters:
    +

    p (Any) – Pointer to memory to free

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemHostAlloc(size_t bytesize, unsigned int Flags)
    +

    Allocates page-locked host memory.

    +

    Allocates bytesize bytes of host memory that is page-locked and +accessible to the device. The driver tracks the virtual memory ranges +allocated with this function and automatically accelerates calls to +functions such as cuMemcpyHtoD(). Since the memory can be +accessed directly by the device, it can be read or written with much +higher bandwidth than pageable memory obtained with functions such as +malloc().

    +

    On systems where +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES +is true, cuMemHostAlloc may not page-lock the allocated +memory.

    +

    Page-locking excessive amounts of memory may degrade system +performance, since it reduces the amount of memory available to the +system for paging. As a result, this function is best used sparingly to +allocate staging areas for data exchange between host and device.

    +

    The Flags parameter enables different options to be specified that +affect the allocation, as follows.

    +
      +
    • CU_MEMHOSTALLOC_PORTABLE: The memory returned by this +call will be considered as pinned memory by all CUDA contexts, not +just the one that performed the allocation.

    • +
    • CU_MEMHOSTALLOC_DEVICEMAP: Maps the allocation into the +CUDA address space. The device pointer to the memory may be obtained +by calling cuMemHostGetDevicePointer().

    • +
    • CU_MEMHOSTALLOC_WRITECOMBINED: Allocates the memory as +write-combined (WC). WC memory can be transferred across the PCI +Express bus more quickly on some system configurations, but cannot be +read efficiently by most CPUs. WC memory is a good option for buffers +that will be written by the CPU and read by the GPU via mapped pinned +memory or host->device transfers.

    • +
    +

    All of these flags are orthogonal to one another: a developer may +allocate memory that is portable, mapped and/or write-combined with no +restrictions.

    +

    The CU_MEMHOSTALLOC_DEVICEMAP flag may be specified on CUDA +contexts for devices that do not support mapped pinned memory. The +failure is deferred to cuMemHostGetDevicePointer() because +the memory may be mapped into other CUDA contexts via the +CU_MEMHOSTALLOC_PORTABLE flag.

    +

    The memory allocated by this function must be freed with +cuMemFreeHost().

    +

    Note all host memory allocated using cuMemHostAlloc() will +automatically be immediately accessible to all contexts on all devices +which support unified addressing (as may be queried using +CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING). Unless the flag +CU_MEMHOSTALLOC_WRITECOMBINED is specified, the device +pointer that may be used to access this host memory from those contexts +is always equal to the returned host pointer *pp. If the flag +CU_MEMHOSTALLOC_WRITECOMBINED is specified, then the +function cuMemHostGetDevicePointer() must be used to query +the device pointer, even if the context supports unified addressing. +See Unified Addressing for additional details.

    +
    +
    Parameters:
    +
      +
    • bytesize (size_t) – Requested allocation size in bytes

    • +
    • Flags (unsigned int) – Flags for allocation request

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemHostGetDevicePointer(p, unsigned int Flags)
    +

    Passes back device pointer of mapped pinned memory.

    +

    Passes back the device pointer pdptr corresponding to the mapped, +pinned host buffer p allocated by cuMemHostAlloc.

    +

    cuMemHostGetDevicePointer() will fail if the +CU_MEMHOSTALLOC_DEVICEMAP flag was not specified at the +time the memory was allocated, or if the function is called on a GPU +that does not support mapped pinned memory.

    +

    For devices that have a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, +the memory can also be accessed from the device using the host pointer +p. The device pointer returned by +cuMemHostGetDevicePointer() may or may not match the +original host pointer p and depends on the devices visible to the +application. If all devices visible to the application have a non-zero +value for the device attribute, the device pointer returned by +cuMemHostGetDevicePointer() will match the original pointer +p. If any device visible to the application has a zero value for the +device attribute, the device pointer returned by +cuMemHostGetDevicePointer() will not match the original +host pointer p, but it will be suitable for use on all devices +provided Unified Virtual Addressing is enabled. In such systems, it is +valid to access the memory using either pointer on devices that have a +non-zero value for the device attribute. Note however that such devices +should access the memory using only one of the two pointers and not +both.

    +

    Flags provides for future releases. For now, it must be set to 0.

    +
    +
    Parameters:
    +
      +
    • p (Any) – Host pointer

    • +
    • Flags (unsigned int) – Options (must be 0)

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemHostGetFlags(p)
    +

    Passes back flags that were used for a pinned allocation.

    +

    Passes back the flags pFlags that were specified when allocating the +pinned host buffer p allocated by cuMemHostAlloc.

    +

    cuMemHostGetFlags() will fail if the pointer does not +reside in an allocation performed by cuMemAllocHost() or +cuMemHostAlloc().

    +
    +
    Parameters:
    +

    p (Any) – Host pointer

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemAllocManaged(size_t bytesize, unsigned int flags)
    +

    Allocates memory that will be automatically managed by the Unified Memory system.

    +

    Allocates bytesize bytes of managed memory on the device and returns +in *dptr a pointer to the allocated memory. If the device doesn’t +support allocating managed memory, CUDA_ERROR_NOT_SUPPORTED +is returned. Support for managed memory can be queried using the device +attribute CU_DEVICE_ATTRIBUTE_MANAGED_MEMORY. The allocated +memory is suitably aligned for any kind of variable. The memory is not +cleared. If bytesize is 0, cuMemAllocManaged returns +CUDA_ERROR_INVALID_VALUE. The pointer is valid on the CPU +and on all GPUs in the system that support managed memory. All accesses +to this pointer must obey the Unified Memory programming model.

    +

    flags specifies the default stream association for this allocation. +flags must be one of CU_MEM_ATTACH_GLOBAL or +CU_MEM_ATTACH_HOST. If CU_MEM_ATTACH_GLOBAL is +specified, then this memory is accessible from any stream on any +device. If CU_MEM_ATTACH_HOST is specified, then the +allocation should not be accessed from devices that have a zero value +for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS; an explicit +call to cuStreamAttachMemAsync will be required to enable +access on such devices.

    +

    If the association is later changed via +cuStreamAttachMemAsync to a single stream, the default +association as specified during cuMemAllocManaged is +restored when that stream is destroyed. For managed variables, the +default association is always CU_MEM_ATTACH_GLOBAL. Note +that destroying a stream is an asynchronous operation, and as a result, +the change to default association won’t happen until all work in the +stream has completed.

    +

    Memory allocated with cuMemAllocManaged should be released +with cuMemFree.

    +

    Device memory oversubscription is possible for GPUs that have a non- +zero value for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Managed +memory on such GPUs may be evicted from device memory to host memory at +any time by the Unified Memory driver in order to make room for other +allocations.

    +

    In a system where all GPUs have a non-zero value for the device +attribute CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, +managed memory may not be populated when this API returns and instead +may be populated on access. In such systems, managed memory can migrate +to any processor’s memory at any time. The Unified Memory driver will +employ heuristics to maintain data locality and prevent excessive page +faults to the extent possible. The application can also guide the +driver about memory usage patterns via cuMemAdvise. The +application can also explicitly migrate memory to a desired processor’s +memory via cuMemPrefetchAsync.

    +

    In a multi-GPU system where all of the GPUs have a zero value for the +device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS and all the +GPUs have peer-to-peer support with each other, the physical storage +for managed memory is created on the GPU which is active at the time +cuMemAllocManaged is called. All other GPUs will reference +the data at reduced bandwidth via peer mappings over the PCIe bus. The +Unified Memory driver does not migrate memory among such GPUs.

    +

    In a multi-GPU system where not all GPUs have peer-to-peer support with +each other and where the value of the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS is zero for +at least one of those GPUs, the location chosen for physical storage of +managed memory is system-dependent.

    +
      +
    • On Linux, the location chosen will be device memory as long as the +current set of active contexts are on devices that either have peer- +to-peer support with each other or have a non-zero value for the +device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If there +is an active context on a GPU that does not have a non-zero value for +that device attribute and it does not have peer-to-peer support with +the other devices that have active contexts on them, then the +location for physical storage will be ‘zero-copy’ or host memory. +Note that this means that managed memory that is located in device +memory is migrated to host memory if a new context is created on a +GPU that doesn’t have a non-zero value for the device attribute and +does not support peer-to-peer with at least one of the other devices +that has an active context. This in turn implies that context +creation may fail if there is insufficient host memory to migrate all +managed allocations.

    • +
    • On Windows, the physical storage is always created in ‘zero-copy’ or +host memory. All GPUs will reference the data at reduced bandwidth +over the PCIe bus. In these circumstances, use of the environment +variable CUDA_VISIBLE_DEVICES is recommended to restrict CUDA to only +use those GPUs that have peer-to-peer support. Alternatively, users +can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero value to +force the driver to always use device memory for physical storage. +When this environment variable is set to a non-zero value, all +contexts created in that process on devices that support managed +memory have to be peer-to-peer compatible with each other. Context +creation will fail if a context is created on a device that supports +managed memory and is not peer-to-peer compatible with any of the +other managed memory supporting devices on which contexts were +previously created, even if those contexts have been destroyed. These +environment variables are described in the CUDA programming guide +under the “CUDA environment variables” section.

    • +
    • On ARM, managed memory is not available on discrete gpu with Drive +PX-2.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceRegisterAsyncNotification(device, callbackFunc, userData)
    +

    Registers a callback function to receive async notifications.

    +

    Registers callbackFunc to receive async notifications.

    +

    The userData parameter is passed to the callback function at async +notification time. Likewise, callback is also passed to the +callback function to distinguish between multiple registered callbacks.

    +

    The callback function being registered should be designed to return +quickly (~10ms). Any long running tasks should be queued for +execution on an application thread.

    +

    Callbacks may not call cuDeviceRegisterAsyncNotification or +cuDeviceUnregisterAsyncNotification. Doing so will result in +CUDA_ERROR_NOT_PERMITTED. Async notification callbacks +execute in an undefined order and may be serialized.

    +

    Returns in *callback a handle representing the registered callback +instance.

    +
    +
    Parameters:
    +
      +
    • device (CUdevice) – The device on which to register the callback

    • +
    • callbackFunc (CUasyncCallback) – The function to register as a callback

    • +
    • userData (Any) – A generic pointer to user data. This is passed into the callback +function.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceUnregisterAsyncNotification(device, callback)
    +

    Unregisters an async notification callback.

    +

    Unregisters callback so that the corresponding callback function will +stop receiving async notifications.

    +
    +
    Parameters:
    +
      +
    • device (CUdevice) – The device from which to remove callback.

    • +
    • callback (CUasyncCallbackHandle) – The callback instance to unregister from receiving async +notifications.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS CUDA_ERROR_NOT_SUPPORTED CUDA_ERROR_INVALID_DEVICE CUDA_ERROR_INVALID_VALUE CUDA_ERROR_NOT_PERMITTED CUDA_ERROR_UNKNOWN

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetByPCIBusId(char *pciBusId)
    +

    Returns a handle to a compute device.

    +

    Returns in *device a device handle given a PCI bus ID string.

    +

    where domain, bus, device, and function are all hexadecimal +values

    +
    +
    Parameters:
    +

    pciBusId (bytes) – String in one of the following forms:

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetPCIBusId(int length, dev)
    +

    Returns a PCI Bus Id string for the device.

    +

    Returns an ASCII string identifying the device dev in the NULL- +terminated string pointed to by pciBusId. length specifies the +maximum length of the string that may be returned.

    +

    where domain, bus, device, and function are all hexadecimal +values. pciBusId should be large enough to store 13 characters +including the NULL-terminator.

    +
    +
    Parameters:
    +
      +
    • length (int) – Maximum length of string to store in name

    • +
    • dev (CUdevice) – Device to get identifier string for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuIpcGetEventHandle(event)
    +

    Gets an interprocess handle for a previously allocated event.

    +

    Takes as input a previously allocated event. This event must have been +created with the CU_EVENT_INTERPROCESS and +CU_EVENT_DISABLE_TIMING flags set. This opaque handle may +be copied into other processes and opened with +cuIpcOpenEventHandle to allow efficient hardware +synchronization between GPU work in different processes.

    +

    After the event has been opened in the importing process, +cuEventRecord, cuEventSynchronize, +cuStreamWaitEvent and cuEventQuery may be used +in either process. Performing operations on the imported event after +the exported event has been freed with cuEventDestroy will +result in undefined behavior.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cuapiDeviceGetAttribute with +CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED

    +
    +
    Parameters:
    +

    event (CUevent or cudaEvent_t) – Event allocated with CU_EVENT_INTERPROCESS and +CU_EVENT_DISABLE_TIMING flags.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuIpcOpenEventHandle(CUipcEventHandle handle: CUipcEventHandle)
    +

    Opens an interprocess event handle for use in the current process.

    +

    Opens an interprocess event handle exported from another process with +cuIpcGetEventHandle. This function returns a +CUevent that behaves like a locally created event with the +CU_EVENT_DISABLE_TIMING flag specified. This event must be +freed with cuEventDestroy.

    +

    Performing operations on the imported event after the exported event +has been freed with cuEventDestroy will result in undefined +behavior.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cuapiDeviceGetAttribute with +CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED

    +
    +
    Parameters:
    +

    handle (CUipcEventHandle) – Interprocess handle to open

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuIpcGetMemHandle(dptr)
    +

    Gets an interprocess memory handle for an existing device memory allocation.

    +

    Takes a pointer to the base of an existing device memory allocation +created with cuMemAlloc and exports it for use in another +process. This is a lightweight operation and may be called multiple +times on an allocation without adverse effects.

    +

    If a region of memory is freed with cuMemFree and a +subsequent call to cuMemAlloc returns memory with the same +device address, cuIpcGetMemHandle will return a unique +handle for the new memory.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cuapiDeviceGetAttribute with +CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED

    +
    +
    Parameters:
    +

    dptr (CUdeviceptr) – Base pointer to previously allocated device memory

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuIpcOpenMemHandle(CUipcMemHandle handle: CUipcMemHandle, unsigned int Flags)
    +

    Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.

    +

    Maps memory exported from another process with +cuIpcGetMemHandle into the current device address space. +For contexts on different devices cuIpcOpenMemHandle can +attempt to enable peer access between the devices as if the user called +cuCtxEnablePeerAccess. This behavior is controlled by the +CU_IPC_MEM_LAZY_ENABLE_PEER_ACCESS flag. +cuDeviceCanAccessPeer can determine if a mapping is +possible.

    +

    Contexts that may open CUipcMemHandles are restricted in +the following way. CUipcMemHandles from each +CUdevice in a given process may only be opened by one +CUcontext per CUdevice per other process.

    +

    If the memory handle has already been opened by the current context, +the reference count on the handle is incremented by 1 and the existing +device pointer is returned.

    +

    Memory returned from cuIpcOpenMemHandle must be freed with +cuIpcCloseMemHandle.

    +

    Calling cuMemFree on an exported memory region before +calling cuIpcCloseMemHandle in the importing context will +result in undefined behavior.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cuapiDeviceGetAttribute with +CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    No guarantees are made about the address returned in *pdptr. In particular, multiple processes may not receive the same address for the same handle.

    +
    + +
    +
    +cuda.bindings.driver.cuIpcCloseMemHandle(dptr)
    +

    Attempts to close memory mapped with cuIpcOpenMemHandle.

    +

    Decrements the reference count of the memory returned by +cuIpcOpenMemHandle by 1. When the reference count reaches +0, this API unmaps the memory. The original allocation in the exporting +process as well as imported mappings in other processes will be +unaffected.

    +

    Any resources used to enable peer access will be freed if this is the +last mapping using them.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cuapiDeviceGetAttribute with +CU_DEVICE_ATTRIBUTE_IPC_EVENT_SUPPORTED

    +
    +
    Parameters:
    +

    dptr (CUdeviceptr) – Device pointer returned by cuIpcOpenMemHandle

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_MAP_FAILED, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemHostRegister(p, size_t bytesize, unsigned int Flags)
    +

    Registers an existing host memory range for use by CUDA.

    +

    Page-locks the memory range specified by p and bytesize and maps it +for the device(s) as specified by Flags. This memory range also is +added to the same tracking mechanism as cuMemHostAlloc to +automatically accelerate calls to functions such as +cuMemcpyHtoD(). Since the memory can be accessed directly +by the device, it can be read or written with much higher bandwidth +than pageable memory that has not been registered. Page-locking +excessive amounts of memory may degrade system performance, since it +reduces the amount of memory available to the system for paging. As a +result, this function is best used sparingly to register staging areas +for data exchange between host and device.

    +

    On systems where +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES +is true, cuMemHostRegister will not page-lock the memory +range specified by ptr but only populate unpopulated pages.

    +

    The Flags parameter enables different options to be specified that +affect the allocation, as follows.

    + +

    All of these flags are orthogonal to one another: a developer may page- +lock memory that is portable or mapped with no restrictions.

    +

    The CU_MEMHOSTREGISTER_DEVICEMAP flag may be specified on +CUDA contexts for devices that do not support mapped pinned memory. The +failure is deferred to cuMemHostGetDevicePointer() because +the memory may be mapped into other CUDA contexts via the +CU_MEMHOSTREGISTER_PORTABLE flag.

    +

    For devices that have a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_CAN_USE_HOST_POINTER_FOR_REGISTERED_MEM, +the memory can also be accessed from the device using the host pointer +p. The device pointer returned by +cuMemHostGetDevicePointer() may or may not match the +original host pointer ptr and depends on the devices visible to the +application. If all devices visible to the application have a non-zero +value for the device attribute, the device pointer returned by +cuMemHostGetDevicePointer() will match the original pointer +ptr. If any device visible to the application has a zero value for +the device attribute, the device pointer returned by +cuMemHostGetDevicePointer() will not match the original +host pointer ptr, but it will be suitable for use on all devices +provided Unified Virtual Addressing is enabled. In such systems, it is +valid to access the memory using either pointer on devices that have a +non-zero value for the device attribute. Note however that such devices +should access the memory using only of the two pointers and not both.

    +

    The memory page-locked by this function must be unregistered with +cuMemHostUnregister().

    +
    +
    Parameters:
    +
      +
    • p (Any) – Host pointer to memory to page-lock

    • +
    • bytesize (size_t) – Size in bytes of the address range to page-lock

    • +
    • Flags (unsigned int) – Flags for allocation request

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_HOST_MEMORY_ALREADY_REGISTERED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemHostUnregister(p)
    +

    Unregisters a memory range that was registered with cuMemHostRegister.

    +

    Unmaps the memory range whose base address is specified by p, and +makes it pageable again.

    +

    The base address must be the same one specified to +cuMemHostRegister().

    +
    +
    Parameters:
    +

    p (Any) – Host pointer to memory to unregister

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_HOST_MEMORY_NOT_REGISTERED,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy(dst, src, size_t ByteCount)
    +

    Copies memory.

    +

    Copies data between two pointers. dst and src are base pointers of +the destination and source, respectively. ByteCount specifies the +number of bytes to copy. Note that this function infers the type of the +transfer (host to host, host to device, device to device, or device to +host) from the pointer values. This function is only allowed in +contexts which support unified addressing.

    +
    +
    Parameters:
    +
      +
    • dst (CUdeviceptr) – Destination unified virtual address space pointer

    • +
    • src (CUdeviceptr) – Source unified virtual address space pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyPeer(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount)
    +

    Copies device memory between two contexts.

    +

    Copies from device memory in one context to device memory in another +context. dstDevice is the base device pointer of the destination +memory and dstContext is the destination context. srcDevice is the +base device pointer of the source memory and srcContext is the source +pointer. ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstContext (CUcontext) – Destination context

    • +
    • srcDevice (CUdeviceptr) – Source device pointer

    • +
    • srcContext (CUcontext) – Source context

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyHtoD(dstDevice, srcHost, size_t ByteCount)
    +

    Copies memory from Host to Device.

    +

    Copies from host memory to device memory. dstDevice and srcHost are +the base addresses of the destination and source, respectively. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • srcHost (Any) – Source host pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyDtoH(dstHost, srcDevice, size_t ByteCount)
    +

    Copies memory from Device to Host.

    +

    Copies from device to host memory. dstHost and srcDevice specify +the base pointers of the destination and source, respectively. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstHost (Any) – Destination host pointer

    • +
    • srcDevice (CUdeviceptr) – Source device pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyDtoD(dstDevice, srcDevice, size_t ByteCount)
    +

    Copies memory from Device to Device.

    +

    Copies from device memory to device memory. dstDevice and srcDevice +are the base pointers of the destination and source, respectively. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • srcDevice (CUdeviceptr) – Source device pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyDtoA(dstArray, size_t dstOffset, srcDevice, size_t ByteCount)
    +

    Copies memory from Device to Array.

    +

    Copies from device memory to a 1D CUDA array. dstArray and +dstOffset specify the CUDA array handle and starting index of the +destination data. srcDevice specifies the base pointer of the source. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstArray (CUarray) – Destination array

    • +
    • dstOffset (size_t) – Offset in bytes of destination array

    • +
    • srcDevice (CUdeviceptr) – Source device pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyAtoD(dstDevice, srcArray, size_t srcOffset, size_t ByteCount)
    +

    Copies memory from Array to Device.

    +

    Copies from one 1D CUDA array to device memory. dstDevice specifies +the base pointer of the destination and must be naturally aligned with +the CUDA array elements. srcArray and srcOffset specify the CUDA +array handle and the offset in bytes into the array where the copy is +to begin. ByteCount specifies the number of bytes to copy and must be +evenly divisible by the array element size.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • srcArray (CUarray) – Source array

    • +
    • srcOffset (size_t) – Offset in bytes of source array

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyHtoA(dstArray, size_t dstOffset, srcHost, size_t ByteCount)
    +

    Copies memory from Host to Array.

    +

    Copies from host memory to a 1D CUDA array. dstArray and dstOffset +specify the CUDA array handle and starting offset in bytes of the +destination data. pSrc specifies the base address of the source. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstArray (CUarray) – Destination array

    • +
    • dstOffset (size_t) – Offset in bytes of destination array

    • +
    • srcHost (Any) – Source host pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyAtoH(dstHost, srcArray, size_t srcOffset, size_t ByteCount)
    +

    Copies memory from Array to Host.

    +

    Copies from one 1D CUDA array to host memory. dstHost specifies the +base pointer of the destination. srcArray and srcOffset specify the +CUDA array handle and starting offset in bytes of the source data. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstHost (Any) – Destination device pointer

    • +
    • srcArray (CUarray) – Source array

    • +
    • srcOffset (size_t) – Offset in bytes of source array

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyAtoA(dstArray, size_t dstOffset, srcArray, size_t srcOffset, size_t ByteCount)
    +

    Copies memory from Array to Array.

    +

    Copies from one 1D CUDA array to another. dstArray and srcArray +specify the handles of the destination and source CUDA arrays for the +copy, respectively. dstOffset and srcOffset specify the destination +and source offsets in bytes into the CUDA arrays. ByteCount is the +number of bytes to be copied. The size of the elements in the CUDA +arrays need not be the same format, but the elements must be the same +size; and count must be evenly divisible by that size.

    +
    +
    Parameters:
    +
      +
    • dstArray (CUarray) – Destination array

    • +
    • dstOffset (size_t) – Offset in bytes of destination array

    • +
    • srcArray (CUarray) – Source array

    • +
    • srcOffset (size_t) – Offset in bytes of source array

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy2D(CUDA_MEMCPY2D pCopy: Optional[CUDA_MEMCPY2D])
    +

    Copies memory for 2D arrays.

    +

    Perform a 2D memory copy according to the parameters specified in +pCopy. The CUDA_MEMCPY2D structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • srcMemoryType and dstMemoryType specify the +type of memory of the source and destination, respectively; +CUmemorytype_enum is defined as:

    • +
    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If srcMemoryType is CU_MEMORYTYPE_UNIFIED, +srcDevice and srcPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. srcArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If srcMemoryType is CU_MEMORYTYPE_HOST, +srcHost and srcPitch specify the (host) base +address of the source data and the bytes per row to apply. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_DEVICE, +srcDevice and srcPitch specify the (device) +base address of the source data and the bytes per row to apply. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_ARRAY, +srcArray specifies the handle of the source data. +srcHost, srcDevice and srcPitch are +ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_HOST, +dstHost and dstPitch specify the (host) base +address of the destination data and the bytes per row to apply. +dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_UNIFIED, +dstDevice and dstPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. dstArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If dstMemoryType is CU_MEMORYTYPE_DEVICE, +dstDevice and dstPitch specify the (device) +base address of the destination data and the bytes per row to apply. +dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_ARRAY, +dstArray specifies the handle of the destination data. +dstHost, dstDevice and dstPitch are +ignored.

    +
      +
    • srcXInBytes and srcY specify the base address +of the source data for the copy.

    • +
    +

    For host pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, srcXInBytes must be evenly divisible by +the array element size.

    +
      +
    • dstXInBytes and dstY specify the base address +of the destination data for the copy.

    • +
    +

    For host pointers, the base address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, dstXInBytes must be evenly divisible by +the array element size.

    + +

    cuMemcpy2D() returns an error if any pitch is greater than +the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH). +cuMemAllocPitch() passes back pitches that always work with +cuMemcpy2D(). On intra-device memory copies (device to +device, CUDA array to device, CUDA array to CUDA array), +cuMemcpy2D() may fail for pitches not computed by +cuMemAllocPitch(). cuMemcpy2DUnaligned() does +not have this restriction, but may run significantly slower in the +cases where cuMemcpy2D() would have returned an error code.

    +
    +
    Parameters:
    +

    pCopy (CUDA_MEMCPY2D) – Parameters for the memory copy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy2DUnaligned(CUDA_MEMCPY2D pCopy: Optional[CUDA_MEMCPY2D])
    +

    Copies memory for 2D arrays.

    +

    Perform a 2D memory copy according to the parameters specified in +pCopy. The CUDA_MEMCPY2D structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • srcMemoryType and dstMemoryType specify the +type of memory of the source and destination, respectively; +CUmemorytype_enum is defined as:

    • +
    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If srcMemoryType is CU_MEMORYTYPE_UNIFIED, +srcDevice and srcPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. srcArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If srcMemoryType is CU_MEMORYTYPE_HOST, +srcHost and srcPitch specify the (host) base +address of the source data and the bytes per row to apply. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_DEVICE, +srcDevice and srcPitch specify the (device) +base address of the source data and the bytes per row to apply. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_ARRAY, +srcArray specifies the handle of the source data. +srcHost, srcDevice and srcPitch are +ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_UNIFIED, +dstDevice and dstPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. dstArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If dstMemoryType is CU_MEMORYTYPE_HOST, +dstHost and dstPitch specify the (host) base +address of the destination data and the bytes per row to apply. +dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_DEVICE, +dstDevice and dstPitch specify the (device) +base address of the destination data and the bytes per row to apply. +dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_ARRAY, +dstArray specifies the handle of the destination data. +dstHost, dstDevice and dstPitch are +ignored.

    +
      +
    • srcXInBytes and srcY specify the base address +of the source data for the copy.

    • +
    +

    For host pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, srcXInBytes must be evenly divisible by +the array element size.

    +
      +
    • dstXInBytes and dstY specify the base address +of the destination data for the copy.

    • +
    +

    For host pointers, the base address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, dstXInBytes must be evenly divisible by +the array element size.

    + +

    cuMemcpy2D() returns an error if any pitch is greater than +the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH). +cuMemAllocPitch() passes back pitches that always work with +cuMemcpy2D(). On intra-device memory copies (device to +device, CUDA array to device, CUDA array to CUDA array), +cuMemcpy2D() may fail for pitches not computed by +cuMemAllocPitch(). cuMemcpy2DUnaligned() does +not have this restriction, but may run significantly slower in the +cases where cuMemcpy2D() would have returned an error code.

    +
    +
    Parameters:
    +

    pCopy (CUDA_MEMCPY2D) – Parameters for the memory copy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy3D(CUDA_MEMCPY3D pCopy: Optional[CUDA_MEMCPY3D])
    +

    Copies memory for 3D arrays.

    +

    Perform a 3D memory copy according to the parameters specified in +pCopy. The CUDA_MEMCPY3D structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • srcMemoryType and dstMemoryType specify the +type of memory of the source and destination, respectively; +CUmemorytype_enum is defined as:

    • +
    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If srcMemoryType is CU_MEMORYTYPE_UNIFIED, +srcDevice and srcPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. srcArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If srcMemoryType is CU_MEMORYTYPE_HOST, +srcHost, srcPitch and srcHeight +specify the (host) base address of the source data, the bytes per row, +and the height of each 2D slice of the 3D array. srcArray +is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_DEVICE, +srcDevice, srcPitch and srcHeight +specify the (device) base address of the source data, the bytes per +row, and the height of each 2D slice of the 3D array. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_ARRAY, +srcArray specifies the handle of the source data. +srcHost, srcDevice, srcPitch and +srcHeight are ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_UNIFIED, +dstDevice and dstPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. dstArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If dstMemoryType is CU_MEMORYTYPE_HOST, +dstHost and dstPitch specify the (host) base +address of the destination data, the bytes per row, and the height of +each 2D slice of the 3D array. dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_DEVICE, +dstDevice and dstPitch specify the (device) +base address of the destination data, the bytes per row, and the height +of each 2D slice of the 3D array. dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_ARRAY, +dstArray specifies the handle of the destination data. +dstHost, dstDevice, dstPitch and +dstHeight are ignored.

    + +

    For host pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, srcXInBytes must be evenly divisible by +the array element size.

    +
      +
    • dstXInBytes, dstY and dstZ specify the base +address of the destination data for the copy.

    • +
    +

    For host pointers, the base address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, dstXInBytes must be evenly divisible by +the array element size.

    + +

    cuMemcpy3D() returns an error if any pitch is greater than +the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH).

    +

    The srcLOD and dstLOD members of the +CUDA_MEMCPY3D structure must be set to 0.

    +
    +
    Parameters:
    +

    pCopy (CUDA_MEMCPY3D) – Parameters for the memory copy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy3DPeer(CUDA_MEMCPY3D_PEER pCopy: Optional[CUDA_MEMCPY3D_PEER])
    +

    Copies memory between contexts.

    +

    Perform a 3D memory copy according to the parameters specified in +pCopy. See the definition of the CUDA_MEMCPY3D_PEER +structure for documentation of its parameters.

    +
    +
    Parameters:
    +

    pCopy (CUDA_MEMCPY3D_PEER) – Parameters for the memory copy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyAsync(dst, src, size_t ByteCount, hStream)
    +

    Copies memory asynchronously.

    +

    Copies data between two pointers. dst and src are base pointers of +the destination and source, respectively. ByteCount specifies the +number of bytes to copy. Note that this function infers the type of the +transfer (host to host, host to device, device to device, or device to +host) from the pointer values. This function is only allowed in +contexts which support unified addressing.

    +
    +
    Parameters:
    +
      +
    • dst (CUdeviceptr) – Destination unified virtual address space pointer

    • +
    • src (CUdeviceptr) – Source unified virtual address space pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyPeerAsync(dstDevice, dstContext, srcDevice, srcContext, size_t ByteCount, hStream)
    +

    Copies device memory between two contexts asynchronously.

    +

    Copies from device memory in one context to device memory in another +context. dstDevice is the base device pointer of the destination +memory and dstContext is the destination context. srcDevice is the +base device pointer of the source memory and srcContext is the source +pointer. ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstContext (CUcontext) – Destination context

    • +
    • srcDevice (CUdeviceptr) – Source device pointer

    • +
    • srcContext (CUcontext) – Source context

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyHtoDAsync(dstDevice, srcHost, size_t ByteCount, hStream)
    +

    Copies memory from Host to Device.

    +

    Copies from host memory to device memory. dstDevice and srcHost are +the base addresses of the destination and source, respectively. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • srcHost (Any) – Source host pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyDtoHAsync(dstHost, srcDevice, size_t ByteCount, hStream)
    +

    Copies memory from Device to Host.

    +

    Copies from device to host memory. dstHost and srcDevice specify +the base pointers of the destination and source, respectively. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstHost (Any) – Destination host pointer

    • +
    • srcDevice (CUdeviceptr) – Source device pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyDtoDAsync(dstDevice, srcDevice, size_t ByteCount, hStream)
    +

    Copies memory from Device to Device.

    +

    Copies from device memory to device memory. dstDevice and srcDevice +are the base pointers of the destination and source, respectively. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • srcDevice (CUdeviceptr) – Source device pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyHtoAAsync(dstArray, size_t dstOffset, srcHost, size_t ByteCount, hStream)
    +

    Copies memory from Host to Array.

    +

    Copies from host memory to a 1D CUDA array. dstArray and dstOffset +specify the CUDA array handle and starting offset in bytes of the +destination data. srcHost specifies the base address of the source. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstArray (CUarray) – Destination array

    • +
    • dstOffset (size_t) – Offset in bytes of destination array

    • +
    • srcHost (Any) – Source host pointer

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpyAtoHAsync(dstHost, srcArray, size_t srcOffset, size_t ByteCount, hStream)
    +

    Copies memory from Array to Host.

    +

    Copies from one 1D CUDA array to host memory. dstHost specifies the +base pointer of the destination. srcArray and srcOffset specify the +CUDA array handle and starting offset in bytes of the source data. +ByteCount specifies the number of bytes to copy.

    +
    +
    Parameters:
    +
      +
    • dstHost (Any) – Destination pointer

    • +
    • srcArray (CUarray) – Source array

    • +
    • srcOffset (size_t) – Offset in bytes of source array

    • +
    • ByteCount (size_t) – Size of memory copy in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy2DAsync(CUDA_MEMCPY2D pCopy: Optional[CUDA_MEMCPY2D], hStream)
    +

    Copies memory for 2D arrays.

    +

    Perform a 2D memory copy according to the parameters specified in +pCopy. The CUDA_MEMCPY2D structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • srcMemoryType and dstMemoryType specify the +type of memory of the source and destination, respectively; +CUmemorytype_enum is defined as:

    • +
    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If srcMemoryType is CU_MEMORYTYPE_HOST, +srcHost and srcPitch specify the (host) base +address of the source data and the bytes per row to apply. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_UNIFIED, +srcDevice and srcPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. srcArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If srcMemoryType is CU_MEMORYTYPE_DEVICE, +srcDevice and srcPitch specify the (device) +base address of the source data and the bytes per row to apply. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_ARRAY, +srcArray specifies the handle of the source data. +srcHost, srcDevice and srcPitch are +ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_UNIFIED, +dstDevice and dstPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. dstArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If dstMemoryType is CU_MEMORYTYPE_HOST, +dstHost and dstPitch specify the (host) base +address of the destination data and the bytes per row to apply. +dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_DEVICE, +dstDevice and dstPitch specify the (device) +base address of the destination data and the bytes per row to apply. +dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_ARRAY, +dstArray specifies the handle of the destination data. +dstHost, dstDevice and dstPitch are +ignored.

    +
      +
    • srcXInBytes and srcY specify the base address +of the source data for the copy.

    • +
    +

    For host pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, srcXInBytes must be evenly divisible by +the array element size.

    +
      +
    • dstXInBytes and dstY specify the base address +of the destination data for the copy.

    • +
    +

    For host pointers, the base address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, dstXInBytes must be evenly divisible by +the array element size.

    + +

    cuMemcpy2DAsync() returns an error if any pitch is greater +than the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH). +cuMemAllocPitch() passes back pitches that always work with +cuMemcpy2D(). On intra-device memory copies (device to +device, CUDA array to device, CUDA array to CUDA array), +cuMemcpy2DAsync() may fail for pitches not computed by +cuMemAllocPitch().

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy3DAsync(CUDA_MEMCPY3D pCopy: Optional[CUDA_MEMCPY3D], hStream)
    +

    Copies memory for 3D arrays.

    +

    Perform a 3D memory copy according to the parameters specified in +pCopy. The CUDA_MEMCPY3D structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • srcMemoryType and dstMemoryType specify the +type of memory of the source and destination, respectively; +CUmemorytype_enum is defined as:

    • +
    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If srcMemoryType is CU_MEMORYTYPE_UNIFIED, +srcDevice and srcPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. srcArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If srcMemoryType is CU_MEMORYTYPE_HOST, +srcHost, srcPitch and srcHeight +specify the (host) base address of the source data, the bytes per row, +and the height of each 2D slice of the 3D array. srcArray +is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_DEVICE, +srcDevice, srcPitch and srcHeight +specify the (device) base address of the source data, the bytes per +row, and the height of each 2D slice of the 3D array. +srcArray is ignored.

    +

    If srcMemoryType is CU_MEMORYTYPE_ARRAY, +srcArray specifies the handle of the source data. +srcHost, srcDevice, srcPitch and +srcHeight are ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_UNIFIED, +dstDevice and dstPitch specify the (unified +virtual address space) base address of the source data and the bytes +per row to apply. dstArray is ignored. This value may be +used only if unified addressing is supported in the calling context.

    +

    If dstMemoryType is CU_MEMORYTYPE_HOST, +dstHost and dstPitch specify the (host) base +address of the destination data, the bytes per row, and the height of +each 2D slice of the 3D array. dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_DEVICE, +dstDevice and dstPitch specify the (device) +base address of the destination data, the bytes per row, and the height +of each 2D slice of the 3D array. dstArray is ignored.

    +

    If dstMemoryType is CU_MEMORYTYPE_ARRAY, +dstArray specifies the handle of the destination data. +dstHost, dstDevice, dstPitch and +dstHeight are ignored.

    + +

    For host pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, srcXInBytes must be evenly divisible by +the array element size.

    +
      +
    • dstXInBytes, dstY and dstZ specify the base +address of the destination data for the copy.

    • +
    +

    For host pointers, the base address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For device pointers, the starting address is

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUDA arrays, dstXInBytes must be evenly divisible by +the array element size.

    + +

    cuMemcpy3DAsync() returns an error if any pitch is greater +than the maximum allowed (CU_DEVICE_ATTRIBUTE_MAX_PITCH).

    +

    The srcLOD and dstLOD members of the +CUDA_MEMCPY3D structure must be set to 0.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemcpy3DPeerAsync(CUDA_MEMCPY3D_PEER pCopy: Optional[CUDA_MEMCPY3D_PEER], hStream)
    +

    Copies memory between contexts asynchronously.

    +

    Perform a 3D memory copy according to the parameters specified in +pCopy. See the definition of the CUDA_MEMCPY3D_PEER +structure for documentation of its parameters.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD8(dstDevice, unsigned char uc, size_t N)
    +

    Initializes device memory.

    +

    Sets the memory range of N 8-bit values to the specified value uc.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • uc (unsigned char) – Value to set

    • +
    • N (size_t) – Number of elements

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD16(dstDevice, unsigned short us, size_t N)
    +

    Initializes device memory.

    +

    Sets the memory range of N 16-bit values to the specified value us. +The dstDevice pointer must be two byte aligned.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • us (unsigned short) – Value to set

    • +
    • N (size_t) – Number of elements

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD32(dstDevice, unsigned int ui, size_t N)
    +

    Initializes device memory.

    +

    Sets the memory range of N 32-bit values to the specified value ui. +The dstDevice pointer must be four byte aligned.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • ui (unsigned int) – Value to set

    • +
    • N (size_t) – Number of elements

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD2D8(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height)
    +

    Initializes device memory.

    +

    Sets the 2D memory range of Width 8-bit values to the specified value +uc. Height specifies the number of rows to set, and dstPitch +specifies the number of bytes between each row. This function performs +fastest when the pitch is one that has been passed back by +cuMemAllocPitch().

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstPitch (size_t) – Pitch of destination device pointer(Unused if Height is 1)

    • +
    • uc (unsigned char) – Value to set

    • +
    • Width (size_t) – Width of row

    • +
    • Height (size_t) – Number of rows

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD2D16(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height)
    +

    Initializes device memory.

    +

    Sets the 2D memory range of Width 16-bit values to the specified +value us. Height specifies the number of rows to set, and +dstPitch specifies the number of bytes between each row. The +dstDevice pointer and dstPitch offset must be two byte aligned. +This function performs fastest when the pitch is one that has been +passed back by cuMemAllocPitch().

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstPitch (size_t) – Pitch of destination device pointer(Unused if Height is 1)

    • +
    • us (unsigned short) – Value to set

    • +
    • Width (size_t) – Width of row

    • +
    • Height (size_t) – Number of rows

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD2D32(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height)
    +

    Initializes device memory.

    +

    Sets the 2D memory range of Width 32-bit values to the specified +value ui. Height specifies the number of rows to set, and +dstPitch specifies the number of bytes between each row. The +dstDevice pointer and dstPitch offset must be four byte aligned. +This function performs fastest when the pitch is one that has been +passed back by cuMemAllocPitch().

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstPitch (size_t) – Pitch of destination device pointer(Unused if Height is 1)

    • +
    • ui (unsigned int) – Value to set

    • +
    • Width (size_t) – Width of row

    • +
    • Height (size_t) – Number of rows

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD8Async(dstDevice, unsigned char uc, size_t N, hStream)
    +

    Sets device memory.

    +

    Sets the memory range of N 8-bit values to the specified value uc.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • uc (unsigned char) – Value to set

    • +
    • N (size_t) – Number of elements

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD16Async(dstDevice, unsigned short us, size_t N, hStream)
    +

    Sets device memory.

    +

    Sets the memory range of N 16-bit values to the specified value us. +The dstDevice pointer must be two byte aligned.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • us (unsigned short) – Value to set

    • +
    • N (size_t) – Number of elements

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD32Async(dstDevice, unsigned int ui, size_t N, hStream)
    +

    Sets device memory.

    +

    Sets the memory range of N 32-bit values to the specified value ui. +The dstDevice pointer must be four byte aligned.

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • ui (unsigned int) – Value to set

    • +
    • N (size_t) – Number of elements

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD2D8Async(dstDevice, size_t dstPitch, unsigned char uc, size_t Width, size_t Height, hStream)
    +

    Sets device memory.

    +

    Sets the 2D memory range of Width 8-bit values to the specified value +uc. Height specifies the number of rows to set, and dstPitch +specifies the number of bytes between each row. This function performs +fastest when the pitch is one that has been passed back by +cuMemAllocPitch().

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstPitch (size_t) – Pitch of destination device pointer(Unused if Height is 1)

    • +
    • uc (unsigned char) – Value to set

    • +
    • Width (size_t) – Width of row

    • +
    • Height (size_t) – Number of rows

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD2D16Async(dstDevice, size_t dstPitch, unsigned short us, size_t Width, size_t Height, hStream)
    +

    Sets device memory.

    +

    Sets the 2D memory range of Width 16-bit values to the specified +value us. Height specifies the number of rows to set, and +dstPitch specifies the number of bytes between each row. The +dstDevice pointer and dstPitch offset must be two byte aligned. +This function performs fastest when the pitch is one that has been +passed back by cuMemAllocPitch().

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstPitch (size_t) – Pitch of destination device pointer(Unused if Height is 1)

    • +
    • us (unsigned short) – Value to set

    • +
    • Width (size_t) – Width of row

    • +
    • Height (size_t) – Number of rows

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemsetD2D32Async(dstDevice, size_t dstPitch, unsigned int ui, size_t Width, size_t Height, hStream)
    +

    Sets device memory.

    +

    Sets the 2D memory range of Width 32-bit values to the specified +value ui. Height specifies the number of rows to set, and +dstPitch specifies the number of bytes between each row. The +dstDevice pointer and dstPitch offset must be four byte aligned. +This function performs fastest when the pitch is one that has been +passed back by cuMemAllocPitch().

    +
    +
    Parameters:
    +
      +
    • dstDevice (CUdeviceptr) – Destination device pointer

    • +
    • dstPitch (size_t) – Pitch of destination device pointer(Unused if Height is 1)

    • +
    • ui (unsigned int) – Value to set

    • +
    • Width (size_t) – Width of row

    • +
    • Height (size_t) – Number of rows

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArrayCreate(CUDA_ARRAY_DESCRIPTOR pAllocateArray: Optional[CUDA_ARRAY_DESCRIPTOR])
    +

    Creates a 1D or 2D CUDA array.

    +

    Creates a CUDA array according to the CUDA_ARRAY_DESCRIPTOR +structure pAllocateArray and returns a handle to the new CUDA array +in *pHandle. The CUDA_ARRAY_DESCRIPTOR is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • Width, and Height are the width, and height of the CUDA array (in +elements); the CUDA array is one-dimensional if height is 0, two- +dimensional otherwise;

    • +
    • Format specifies the format of the elements; +CUarray_format is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • NumChannels specifies the number of packed components per CUDA +array element; it may be 1, 2, or 4;

    • +
    +

    Here are examples of CUDA array descriptions:

    +

    Description for a CUDA array of 2048 floats:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    Description for a 64 x 64 CUDA array of floats:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    Description for a width x height CUDA array of 64-bit, 4x16-bit +float16’s:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    Description for a width x height CUDA array of 16-bit elements, +each of which is two 8-bit unsigned chars:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +
    +
    Parameters:
    +

    pAllocateArray (CUDA_ARRAY_DESCRIPTOR) – Array descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArrayGetDescriptor(hArray)
    +

    Get a 1D or 2D CUDA array descriptor.

    +

    Returns in *pArrayDescriptor a descriptor containing information on +the format and dimensions of the CUDA array hArray. It is useful for +subroutines that have been passed a CUDA array, but need to know the +CUDA array parameters for validation or other purposes.

    +
    +
    Parameters:
    +

    hArray (CUarray) – Array to get descriptor of

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArrayGetSparseProperties(array)
    +

    Returns the layout properties of a sparse CUDA array.

    +

    Returns the layout properties of a sparse CUDA array in +sparseProperties If the CUDA array is not allocated with flag +CUDA_ARRAY3D_SPARSE CUDA_ERROR_INVALID_VALUE +will be returned.

    +

    If the returned value in flags +contains CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL, then +miptailSize represents the +total size of the array. Otherwise, it will be zero. Also, the returned +value in miptailFirstLevel is +always zero. Note that the array must have been allocated using +cuArrayCreate or cuArray3DCreate. For CUDA +arrays obtained using cuMipmappedArrayGetLevel, +CUDA_ERROR_INVALID_VALUE will be returned. Instead, +cuMipmappedArrayGetSparseProperties must be used to obtain +the sparse properties of the entire CUDA mipmapped array to which +array belongs to.

    +
    +
    Parameters:
    +

    array (CUarray) – CUDA array to get the sparse properties of

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMipmappedArrayGetSparseProperties(mipmap)
    +

    Returns the layout properties of a sparse CUDA mipmapped array.

    +

    Returns the sparse array layout properties in sparseProperties If the +CUDA mipmapped array is not allocated with flag +CUDA_ARRAY3D_SPARSE CUDA_ERROR_INVALID_VALUE +will be returned.

    +

    For non-layered CUDA mipmapped arrays, +miptailSize returns the size +of the mip tail region. The mip tail region includes all mip levels +whose width, height or depth is less than that of the tile. For layered +CUDA mipmapped arrays, if +flags contains +CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL, then +miptailSize specifies the size +of the mip tail of all layers combined. Otherwise, +miptailSize specifies mip tail +size per layer. The returned value of +miptailFirstLevel is valid +only if miptailSize is non- +zero.

    +
    +
    Parameters:
    +

    mipmap (CUmipmappedArray) – CUDA mipmapped array to get the sparse properties of

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArrayGetMemoryRequirements(array, device)
    +

    Returns the memory requirements of a CUDA array.

    +

    Returns the memory requirements of a CUDA array in memoryRequirements +If the CUDA array is not allocated with flag +CUDA_ARRAY3D_DEFERRED_MAPPING +CUDA_ERROR_INVALID_VALUE will be returned.

    +

    The returned value in size +represents the total size of the CUDA array. The returned value in +alignment represents the +alignment necessary for mapping the CUDA array.

    +
    +
    Parameters:
    +
      +
    • array (CUarray) – CUDA array to get the memory requirements of

    • +
    • device (CUdevice) – Device to get the memory requirements for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMipmappedArrayGetMemoryRequirements(mipmap, device)
    +

    Returns the memory requirements of a CUDA mipmapped array.

    +

    Returns the memory requirements of a CUDA mipmapped array in +memoryRequirements If the CUDA mipmapped array is not allocated with +flag CUDA_ARRAY3D_DEFERRED_MAPPING +CUDA_ERROR_INVALID_VALUE will be returned.

    +

    The returned value in size +represents the total size of the CUDA mipmapped array. The returned +value in alignment +represents the alignment necessary for mapping the CUDA mipmapped +array.

    +
    +
    Parameters:
    +
      +
    • mipmap (CUmipmappedArray) – CUDA mipmapped array to get the memory requirements of

    • +
    • device (CUdevice) – Device to get the memory requirements for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArrayGetPlane(hArray, unsigned int planeIdx)
    +

    Gets a CUDA array plane from a CUDA array.

    +

    Returns in pPlaneArray a CUDA array that represents a single format +plane of the CUDA array hArray.

    +

    If planeIdx is greater than the maximum number of planes in this +array or if the array does not have a multi-planar format e.g: +CU_AD_FORMAT_NV12, then +CUDA_ERROR_INVALID_VALUE is returned.

    +

    Note that if the hArray has format CU_AD_FORMAT_NV12, +then passing in 0 for planeIdx returns a CUDA array of the same size +as hArray but with one channel and +CU_AD_FORMAT_UNSIGNED_INT8 as its format. If 1 is passed +for planeIdx, then the returned CUDA array has half the height and +width of hArray with two channels and +CU_AD_FORMAT_UNSIGNED_INT8 as its format.

    +
    +
    Parameters:
    +
      +
    • hArray (CUarray) – Multiplanar CUDA array

    • +
    • planeIdx (unsigned int) – Plane index

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArrayDestroy(hArray)
    +

    Destroys a CUDA array.

    +

    Destroys the CUDA array hArray.

    +
    +
    Parameters:
    +

    hArray (CUarray) – Array to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_ARRAY_IS_MAPPED, CUDA_ERROR_CONTEXT_IS_DESTROYED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArray3DCreate(CUDA_ARRAY3D_DESCRIPTOR pAllocateArray: Optional[CUDA_ARRAY3D_DESCRIPTOR])
    +

    Creates a 3D CUDA array.

    +

    Creates a CUDA array according to the +CUDA_ARRAY3D_DESCRIPTOR structure pAllocateArray and +returns a handle to the new CUDA array in *pHandle. The +CUDA_ARRAY3D_DESCRIPTOR is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • Width, Height, and Depth are the width, height, and depth of +the CUDA array (in elements); the following types of CUDA arrays can +be allocated:

      +
        +
      • A 1D array is allocated if Height and Depth extents are both +zero.

      • +
      • A 2D array is allocated if only Depth extent is zero.

      • +
      • A 3D array is allocated if all three extents are non-zero.

      • +
      • A 1D layered CUDA array is allocated if only Height is zero and +the CUDA_ARRAY3D_LAYERED flag is set. Each layer is a +1D array. The number of layers is determined by the depth extent.

      • +
      • A 2D layered CUDA array is allocated if all three extents are non- +zero and the CUDA_ARRAY3D_LAYERED flag is set. Each +layer is a 2D array. The number of layers is determined by the +depth extent.

      • +
      • A cubemap CUDA array is allocated if all three extents are non-zero +and the CUDA_ARRAY3D_CUBEMAP flag is set. Width must +be equal to Height, and Depth must be six. A cubemap is a +special type of 2D layered CUDA array, where the six layers +represent the six faces of a cube. The order of the six layers in +memory is the same as that listed in +CUarray_cubemap_face.

      • +
      • A cubemap layered CUDA array is allocated if all three extents are +non-zero, and both, CUDA_ARRAY3D_CUBEMAP and +CUDA_ARRAY3D_LAYERED flags are set. Width must be +equal to Height, and Depth must be a multiple of six. A cubemap +layered CUDA array is a special type of 2D layered CUDA array that +consists of a collection of cubemaps. The first six layers +represent the first cubemap, the next six layers form the second +cubemap, and so on.

      • +
      +
    • +
    • Format specifies the format of the elements; +CUarray_format is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • NumChannels specifies the number of packed components per CUDA +array element; it may be 1, 2, or 4;

    • +
    • Flags may be set to

      +
        +
      • CUDA_ARRAY3D_LAYERED to enable creation of layered CUDA +arrays. If this flag is set, Depth specifies the number of +layers, not the depth of a 3D array.

      • +
      • CUDA_ARRAY3D_SURFACE_LDST to enable surface references +to be bound to the CUDA array. If this flag is not set, +cuSurfRefSetArray will fail when attempting to bind the +CUDA array to a surface reference.

      • +
      • CUDA_ARRAY3D_CUBEMAP to enable creation of cubemaps. If +this flag is set, Width must be equal to Height, and Depth +must be six. If the CUDA_ARRAY3D_LAYERED flag is also +set, then Depth must be a multiple of six.

      • +
      • CUDA_ARRAY3D_TEXTURE_GATHER to indicate that the CUDA +array will be used for texture gather. Texture gather can only be +performed on 2D CUDA arrays.

      • +
      +
    • +
    +

    Width, Height and Depth must meet certain size requirements as +listed in the following table. All values are specified in elements. +Note that for brevity’s sake, the full name of the device attribute is +not specified. For ex., TEXTURE1D_WIDTH refers to the device attribute +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH.

    +

    Note that 2D CUDA arrays have different size requirements if the +CUDA_ARRAY3D_TEXTURE_GATHER flag is set. Width and +Height must not be greater than +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH and +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT +respectively, in that case.

    +

    View CUDA Toolkit Documentation for a table example

    +

    Here are examples of CUDA array descriptions:

    +

    Description for a CUDA array of 2048 floats:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    Description for a 64 x 64 CUDA array of floats:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    Description for a width x height x depth CUDA array of 64-bit, +4x16-bit float16’s:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +
    +
    Parameters:
    +

    pAllocateArray (CUDA_ARRAY3D_DESCRIPTOR) – 3D array descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuArray3DGetDescriptor(hArray)
    +

    Get a 3D CUDA array descriptor.

    +

    Returns in *pArrayDescriptor a descriptor containing information on +the format and dimensions of the CUDA array hArray. It is useful for +subroutines that have been passed a CUDA array, but need to know the +CUDA array parameters for validation or other purposes.

    +

    This function may be called on 1D and 2D arrays, in which case the +Height and/or Depth members of the descriptor struct will be set to +0.

    +
    +
    Parameters:
    +

    hArray (CUarray) – 3D array to get descriptor of

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMipmappedArrayCreate(CUDA_ARRAY3D_DESCRIPTOR pMipmappedArrayDesc: Optional[CUDA_ARRAY3D_DESCRIPTOR], unsigned int numMipmapLevels)
    +

    Creates a CUDA mipmapped array.

    +

    Creates a CUDA mipmapped array according to the +CUDA_ARRAY3D_DESCRIPTOR structure pMipmappedArrayDesc and +returns a handle to the new CUDA mipmapped array in *pHandle. +numMipmapLevels specifies the number of mipmap levels to be +allocated. This value is clamped to the range [1, 1 + +floor(log2(max(width, height, depth)))].

    +

    The CUDA_ARRAY3D_DESCRIPTOR is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • Width, Height, and Depth are the width, height, and depth of +the CUDA array (in elements); the following types of CUDA arrays can +be allocated:

      +
        +
      • A 1D mipmapped array is allocated if Height and Depth extents +are both zero.

      • +
      • A 2D mipmapped array is allocated if only Depth extent is zero.

      • +
      • A 3D mipmapped array is allocated if all three extents are non- +zero.

      • +
      • A 1D layered CUDA mipmapped array is allocated if only Height is +zero and the CUDA_ARRAY3D_LAYERED flag is set. Each +layer is a 1D array. The number of layers is determined by the +depth extent.

      • +
      • A 2D layered CUDA mipmapped array is allocated if all three extents +are non-zero and the CUDA_ARRAY3D_LAYERED flag is set. +Each layer is a 2D array. The number of layers is determined by the +depth extent.

      • +
      • A cubemap CUDA mipmapped array is allocated if all three extents +are non-zero and the CUDA_ARRAY3D_CUBEMAP flag is set. +Width must be equal to Height, and Depth must be six. A +cubemap is a special type of 2D layered CUDA array, where the six +layers represent the six faces of a cube. The order of the six +layers in memory is the same as that listed in +CUarray_cubemap_face.

      • +
      • A cubemap layered CUDA mipmapped array is allocated if all three +extents are non-zero, and both, CUDA_ARRAY3D_CUBEMAP +and CUDA_ARRAY3D_LAYERED flags are set. Width must be +equal to Height, and Depth must be a multiple of six. A cubemap +layered CUDA array is a special type of 2D layered CUDA array that +consists of a collection of cubemaps. The first six layers +represent the first cubemap, the next six layers form the second +cubemap, and so on.

      • +
      +
    • +
    • Format specifies the format of the elements; +CUarray_format is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • NumChannels specifies the number of packed components per CUDA +array element; it may be 1, 2, or 4;

    • +
    • Flags may be set to

      +
        +
      • CUDA_ARRAY3D_LAYERED to enable creation of layered CUDA +mipmapped arrays. If this flag is set, Depth specifies the number +of layers, not the depth of a 3D array.

      • +
      • CUDA_ARRAY3D_SURFACE_LDST to enable surface references +to be bound to individual mipmap levels of the CUDA mipmapped +array. If this flag is not set, cuSurfRefSetArray will +fail when attempting to bind a mipmap level of the CUDA mipmapped +array to a surface reference.

      • +
      +
    • +
    • CUDA_ARRAY3D_CUBEMAP to enable creation of mipmapped

    • +
    +

    cubemaps. If this flag is set, Width must be equal to Height, and +Depth must be six. If the CUDA_ARRAY3D_LAYERED flag is +also set, then Depth must be a multiple of six.

    +
    +
      +
    • CUDA_ARRAY3D_TEXTURE_GATHER to indicate that the CUDA +mipmapped array will be used for texture gather. Texture gather can +only be performed on 2D CUDA mipmapped arrays.

    • +
    +
    +

    Width, Height and Depth must meet certain size requirements as +listed in the following table. All values are specified in elements. +Note that for brevity’s sake, the full name of the device attribute is +not specified. For ex., TEXTURE1D_MIPMAPPED_WIDTH refers to the device +attribute +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_MIPMAPPED_WIDTH.

    +

    View CUDA Toolkit Documentation for a table example

    +
    +
    Parameters:
    +
      +
    • pMipmappedArrayDesc (CUDA_ARRAY3D_DESCRIPTOR) – mipmapped array descriptor

    • +
    • numMipmapLevels (unsigned int) – Number of mipmap levels

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMipmappedArrayGetLevel(hMipmappedArray, unsigned int level)
    +

    Gets a mipmap level of a CUDA mipmapped array.

    +

    Returns in *pLevelArray a CUDA array that represents a single mipmap +level of the CUDA mipmapped array hMipmappedArray.

    +

    If level is greater than the maximum number of levels in this +mipmapped array, CUDA_ERROR_INVALID_VALUE is returned.

    +
    +
    Parameters:
    +
      +
    • hMipmappedArray (CUmipmappedArray) – CUDA mipmapped array

    • +
    • level (unsigned int) – Mipmap level

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMipmappedArrayDestroy(hMipmappedArray)
    +

    Destroys a CUDA mipmapped array.

    +

    Destroys the CUDA mipmapped array hMipmappedArray.

    +
    +
    Parameters:
    +

    hMipmappedArray (CUmipmappedArray) – Mipmapped array to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_ARRAY_IS_MAPPED, CUDA_ERROR_CONTEXT_IS_DESTROYED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemGetHandleForAddressRange(dptr, size_t size, handleType: CUmemRangeHandleType, unsigned long long flags)
    +

    Retrieve handle for an address range.

    +

    Get a handle of the specified type to an address range. The address +range must have been obtained by a prior call to either +cuMemAlloc or cuMemAddressReserve. If the +address range was obtained via cuMemAddressReserve, it must +also be fully mapped via cuMemMap. The address range must +have been obtained by a prior call to either cuMemAllocHost +or cuMemHostAlloc on Tegra.

    +

    Users must ensure the dptr and size are aligned to the host page +size.

    +

    When requesting +CUmemRangeHandleType::CU_MEM_RANGE_HANDLE_TYPE_DMA_BUF_FD, users are +expected to query for dma_buf support for the platform by using +CU_DEVICE_ATTRIBUTE_DMA_BUF_SUPPORTED device attribute +before calling this API. The handle will be interpreted as a pointer +to an integer to store the dma_buf file descriptor. Users must ensure +the entire address range is backed and mapped when the address range is +allocated by cuMemAddressReserve. All the physical +allocations backing the address range must be resident on the same +device and have identical allocation properties. Users are also +expected to retrieve a new handle every time the underlying physical +allocation(s) corresponding to a previously queried VA range are +changed.

    +
    +
    Parameters:
    +
      +
    • dptr (CUdeviceptr) – Pointer to a valid CUDA device allocation. Must be aligned to host +page size.

    • +
    • size (size_t) – Length of the address range. Must be aligned to host page size.

    • +
    • handleType (CUmemRangeHandleType) – Type of handle requested (defines type and size of the handle +output parameter)

    • +
    • flags (unsigned long long) – Reserved, must be zero

    • +
    +
    +
    Returns:
    +

      +
    • CUresult – CUDA_SUCCESS CUDA_ERROR_INVALID_VALUE CUDA_ERROR_NOT_SUPPORTED

    • +
    • handle (Any) – Pointer to the location where the returned handle will be stored.

    • +
    +

    +
    +
    +
    + +
    +
    +

    Virtual Memory Management

    +

    This section describes the virtual memory management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuMemAddressReserve(size_t size, size_t alignment, addr, unsigned long long flags)
    +

    Allocate an address range reservation.

    +

    Reserves a virtual address range based on the given parameters, giving +the starting address of the range in ptr. This API requires a system +that supports UVA. The size and address parameters must be a multiple +of the host page size and the alignment must be a power of two or zero +for default alignment.

    +
    +
    Parameters:
    +
      +
    • size (size_t) – Size of the reserved virtual address range requested

    • +
    • alignment (size_t) – Alignment of the reserved virtual address range requested

    • +
    • addr (CUdeviceptr) – Fixed starting address range requested

    • +
    • flags (unsigned long long) – Currently unused, must be zero

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuMemAddressFree

    +
    +
    + +
    +
    +cuda.bindings.driver.cuMemAddressFree(ptr, size_t size)
    +

    Free an address range reservation.

    +

    Frees a virtual address range reserved by cuMemAddressReserve. The size +must match what was given to memAddressReserve and the ptr given must +match what was returned from memAddressReserve.

    +
    +
    Parameters:
    +
      +
    • ptr (CUdeviceptr) – Starting address of the virtual address range to free

    • +
    • size (size_t) – Size of the virtual address region to free

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    cuMemAddressReserve

    +
    +
    + +
    +
    +cuda.bindings.driver.cuMemCreate(size_t size, CUmemAllocationProp prop: Optional[CUmemAllocationProp], unsigned long long flags)
    +

    Create a CUDA memory handle representing a memory allocation of a given size described by the given properties.

    +

    This creates a memory allocation on the target device specified through +the prop structure. The created allocation will not have any device +or host mappings. The generic memory handle for the allocation can be +mapped to the address space of calling process via +cuMemMap. This handle cannot be transmitted directly to +other processes (see cuMemExportToShareableHandle). On +Windows, the caller must also pass an LPSECURITYATTRIBUTE in prop to +be associated with this handle which limits or allows access to this +handle for a recipient process (see +win32HandleMetaData for more). The +size of this allocation must be a multiple of the the value given via +cuMemGetAllocationGranularity with the +CU_MEM_ALLOC_GRANULARITY_MINIMUM flag. To create a CPU +allocation targeting a specific host NUMA node, applications must set +CUmemAllocationProp::CUmemLocation::type to +CU_MEM_LOCATION_TYPE_HOST_NUMA and +CUmemAllocationProp::CUmemLocation::id must specify the +NUMA ID of the CPU. On systems where NUMA is not available +CUmemAllocationProp::CUmemLocation::id must be set to 0. +Specifying CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT or +CU_MEM_LOCATION_TYPE_HOST as the +type will result in +CUDA_ERROR_INVALID_VALUE.

    +

    Applications can set +requestedHandleTypes to +CU_MEM_HANDLE_TYPE_FABRIC in order to create allocations +suitable for sharing within an IMEX domain. An IMEX domain is either an +OS instance or a group of securely connected OS instances using the +NVIDIA IMEX daemon. An IMEX channel is a global resource within the +IMEX domain that represents a logical entity that aims to provide fine +grained accessibility control for the participating processes. When +exporter and importer CUDA processes have been granted access to the +same IMEX channel, they can securely share memory. If the allocating +process does not have access setup for an IMEX channel, attempting to +create a CUmemGenericAllocationHandle with +CU_MEM_HANDLE_TYPE_FABRIC will result in +CUDA_ERROR_NOT_PERMITTED. The nvidia-modprobe CLI provides +more information regarding setting up of IMEX channels.

    +

    If CUmemAllocationProp::allocFlags::usage contains +CU_MEM_CREATE_USAGE_TILE_POOL flag then the memory +allocation is intended only to be used as backing tile pool for sparse +CUDA arrays and sparse CUDA mipmapped arrays. (see +cuMemMapArrayAsync).

    +
    +
    Parameters:
    +
      +
    • size (size_t) – Size of the allocation requested

    • +
    • prop (CUmemAllocationProp) – Properties of the allocation to create.

    • +
    • flags (unsigned long long) – flags for future use, must be zero now.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemRelease(handle)
    +

    Release a memory handle representing a memory allocation which was previously allocated through cuMemCreate.

    +

    Frees the memory that was allocated on a device through cuMemCreate.

    +

    The memory allocation will be freed when all outstanding mappings to +the memory are unmapped and when all outstanding references to the +handle (including it’s shareable counterparts) are also released. The +generic memory handle can be freed when there are still outstanding +mappings made with this handle. Each time a recipient process imports a +shareable handle, it needs to pair it with cuMemRelease for +the handle to be freed. If handle is not a valid handle the behavior +is undefined.

    +
    +
    Parameters:
    +

    handle (CUmemGenericAllocationHandle) – Value of handle which was returned previously by cuMemCreate.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    cuMemCreate

    +
    +
    + +
    +
    +cuda.bindings.driver.cuMemMap(ptr, size_t size, size_t offset, handle, unsigned long long flags)
    +

    Maps an allocation handle to a reserved virtual address range.

    +

    Maps bytes of memory represented by handle starting from byte +offset to size to address range [addr, addr + size]. This +range must be an address reservation previously reserved with +cuMemAddressReserve, and offset + size must be less +than the size of the memory allocation. Both ptr, size, and +offset must be a multiple of the value given via +cuMemGetAllocationGranularity with the +CU_MEM_ALLOC_GRANULARITY_MINIMUM flag. If handle +represents a multicast object, ptr, size and offset must be +aligned to the value returned by cuMulticastGetGranularity +with the flag CU_MULTICAST_MINIMUM_GRANULARITY. For best +performance however, it is recommended that ptr, size and offset +be aligned to the value returned by +cuMulticastGetGranularity with the flag +CU_MULTICAST_RECOMMENDED_GRANULARITY.

    +

    Please note calling cuMemMap does not make the address +accessible, the caller needs to update accessibility of a contiguous +mapped VA range by calling cuMemSetAccess.

    +

    Once a recipient process obtains a shareable memory handle from +cuMemImportFromShareableHandle, the process must use +cuMemMap to map the memory into its address ranges before +setting accessibility with cuMemSetAccess.

    +

    cuMemMap can only create mappings on VA range reservations +that are not currently mapped.

    +
    +
    Parameters:
    +
      +
    • ptr (CUdeviceptr) – Address where memory will be mapped.

    • +
    • size (size_t) – Size of the memory mapping.

    • +
    • offset (size_t) – Offset into the memory represented by

    • +
    • handle (CUmemGenericAllocationHandle) – Handle to a shareable memory

    • +
    • flags (unsigned long long) – flags for future use, must be zero now.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemMapArrayAsync(mapInfoList: Optional[Tuple[CUarrayMapInfo] | List[CUarrayMapInfo]], unsigned int count, hStream)
    +

    Maps or unmaps subregions of sparse CUDA arrays and sparse CUDA mipmapped arrays.

    +

    Performs map or unmap operations on subregions of sparse CUDA arrays +and sparse CUDA mipmapped arrays. Each operation is specified by a +CUarrayMapInfo entry in the mapInfoList array of size +count. The structure CUarrayMapInfo is defined as follow:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where resourceType specifies the type of +resource to be operated on. If resourceType +is set to CUresourcetype::CU_RESOURCE_TYPE_ARRAY then +CUarrayMapInfo::resource::array must be set to a valid +sparse CUDA array handle. The CUDA array must be either a 2D, 2D +layered or 3D CUDA array and must have been allocated using +cuArrayCreate or cuArray3DCreate with the flag +CUDA_ARRAY3D_SPARSE or +CUDA_ARRAY3D_DEFERRED_MAPPING. For CUDA arrays obtained +using cuMipmappedArrayGetLevel, +CUDA_ERROR_INVALID_VALUE will be returned. If +resourceType is set to +CUresourcetype::CU_RESOURCE_TYPE_MIPMAPPED_ARRAY then +CUarrayMapInfo::resource::mipmap must be set to a valid +sparse CUDA mipmapped array handle. The CUDA mipmapped array must be +either a 2D, 2D layered or 3D CUDA mipmapped array and must have been +allocated using cuMipmappedArrayCreate with the flag +CUDA_ARRAY3D_SPARSE or +CUDA_ARRAY3D_DEFERRED_MAPPING.

    +

    subresourceType specifies the type of +subresource within the resource. +CUarraySparseSubresourceType_enum is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where +CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL +indicates a sparse-miplevel which spans at least one tile in every +dimension. The remaining miplevels which are too small to span at least +one tile in any dimension constitute the mip tail region as indicated +by +CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL +subresource type.

    +

    If subresourceType is set to +CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_SPARSE_LEVEL +then CUarrayMapInfo::subresource::sparseLevel struct must +contain valid array subregion offsets and extents. The +CUarrayMapInfo::subresource::sparseLevel::offsetX, +CUarrayMapInfo::subresource::sparseLevel::offsetY and +CUarrayMapInfo::subresource::sparseLevel::offsetZ must +specify valid X, Y and Z offsets respectively. The +CUarrayMapInfo::subresource::sparseLevel::extentWidth, +CUarrayMapInfo::subresource::sparseLevel::extentHeight and +CUarrayMapInfo::subresource::sparseLevel::extentDepth must +specify valid width, height and depth extents respectively. These +offsets and extents must be aligned to the corresponding tile +dimension. For CUDA mipmapped arrays +CUarrayMapInfo::subresource::sparseLevel::level must +specify a valid mip level index. Otherwise, must be zero. For layered +CUDA arrays and layered CUDA mipmapped arrays +CUarrayMapInfo::subresource::sparseLevel::layer must +specify a valid layer index. Otherwise, must be zero. +CUarrayMapInfo::subresource::sparseLevel::offsetZ must be +zero and +CUarrayMapInfo::subresource::sparseLevel::extentDepth must +be set to 1 for 2D and 2D layered CUDA arrays and CUDA mipmapped +arrays. Tile extents can be obtained by calling +cuArrayGetSparseProperties and +cuMipmappedArrayGetSparseProperties

    +

    If subresourceType is set to +CUarraySparseSubresourceType::CU_ARRAY_SPARSE_SUBRESOURCE_TYPE_MIPTAIL +then CUarrayMapInfo::subresource::miptail struct must +contain valid mip tail offset in +CUarrayMapInfo::subresource::miptail::offset and size in +CUarrayMapInfo::subresource::miptail::size. Both, mip tail +offset and mip tail size must be aligned to the tile size. For layered +CUDA mipmapped arrays which don’t have the flag +CU_ARRAY_SPARSE_PROPERTIES_SINGLE_MIPTAIL set in +flags as returned by +cuMipmappedArrayGetSparseProperties, +CUarrayMapInfo::subresource::miptail::layer must specify a +valid layer index. Otherwise, must be zero.

    +

    If CUarrayMapInfo::resource::array or +CUarrayMapInfo::resource::mipmap was created with +CUDA_ARRAY3D_DEFERRED_MAPPING flag set the +subresourceType and the contents of +CUarrayMapInfo::subresource will be ignored.

    +

    memOperationType specifies the type of +operation. CUmemOperationType is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If memOperationType is set to +CUmemOperationType::CU_MEM_OPERATION_TYPE_MAP then the +subresource will be mapped onto the tile pool memory specified by +CUarrayMapInfo::memHandle at offset +offset. The tile pool allocation has to be +created by specifying the CU_MEM_CREATE_USAGE_TILE_POOL +flag when calling cuMemCreate. Also, +memHandleType must be set to +CUmemHandleType::CU_MEM_HANDLE_TYPE_GENERIC.

    +

    If memOperationType is set to +CUmemOperationType::CU_MEM_OPERATION_TYPE_UNMAP then an +unmapping operation is performed. CUarrayMapInfo::memHandle +must be NULL.

    +

    deviceBitMask specifies the list of devices +that must map or unmap physical memory. Currently, this mask must have +exactly one bit set, and the corresponding device must match the device +associated with the stream. If +memOperationType is set to +CUmemOperationType::CU_MEM_OPERATION_TYPE_MAP, the device +must also match the device associated with the tile pool memory +allocation as specified by CUarrayMapInfo::memHandle.

    +

    flags and +:py:obj:`~.CUarrayMapInfo.reserved`[] are unused and must be set to +zero.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemUnmap(ptr, size_t size)
    +

    Unmap the backing memory of a given address range.

    +

    The range must be the entire contiguous address range that was mapped +to. In other words, cuMemUnmap cannot unmap a sub-range of +an address range mapped by cuMemCreate / +cuMemMap. Any backing memory allocations will be freed if +there are no existing mappings and there are no unreleased memory +handles.

    +

    When cuMemUnmap returns successfully the address range is +converted to an address reservation and can be used for a future calls +to cuMemMap. Any new mapping to this virtual address will +need to have access granted through cuMemSetAccess, as all +mappings start with no accessibility setup.

    +
    +
    Parameters:
    +
      +
    • ptr (CUdeviceptr) – Starting address for the virtual address range to unmap

    • +
    • size (size_t) – Size of the virtual address range to unmap

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemSetAccess(ptr, size_t size, desc: Optional[Tuple[CUmemAccessDesc] | List[CUmemAccessDesc]], size_t count)
    +

    Set the access flags for each location specified in desc for the given virtual address range.

    +

    Given the virtual address range via ptr and size, and the locations +in the array given by desc and count, set the access flags for the +target locations. The range must be a fully mapped address range +containing all allocations created by cuMemMap / +cuMemCreate. Users cannot specify +CU_MEM_LOCATION_TYPE_HOST_NUMA accessibility for +allocations created on with other location types. Note: When +CUmemAccessDesc::CUmemLocation::type is +CU_MEM_LOCATION_TYPE_HOST_NUMA, +CUmemAccessDesc::CUmemLocation::id is ignored. When setting +the access flags for a virtual address range mapping a multicast +object, ptr and size must be aligned to the value returned by +cuMulticastGetGranularity with the flag +CU_MULTICAST_MINIMUM_GRANULARITY. For best performance +however, it is recommended that ptr and size be aligned to the +value returned by cuMulticastGetGranularity with the flag +CU_MULTICAST_RECOMMENDED_GRANULARITY.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemGetAccess(CUmemLocation location: Optional[CUmemLocation], ptr)
    +

    Get the access flags set for the given location and ptr.

    +
    +
    Parameters:
    +
      +
    • location (CUmemLocation) – Location in which to check the flags for

    • +
    • ptr (CUdeviceptr) – Address in which to check the access flags for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuMemSetAccess

    +
    +
    + +
    +
    +cuda.bindings.driver.cuMemExportToShareableHandle(handle, handleType: CUmemAllocationHandleType, unsigned long long flags)
    +

    Exports an allocation to a requested shareable handle type.

    +

    Given a CUDA memory handle, create a shareable memory allocation handle +that can be used to share the memory with other processes. The +recipient process can convert the shareable handle back into a CUDA +memory handle using cuMemImportFromShareableHandle and map +it with cuMemMap. The implementation of what this handle is +and how it can be transferred is defined by the requested handle type +in handleType

    +

    Once all shareable handles are closed and the allocation is released, +the allocated memory referenced will be released back to the OS and +uses of the CUDA handle afterward will lead to undefined behavior.

    +

    This API can also be used in conjunction with other APIs (e.g. Vulkan, +OpenGL) that support importing memory from the shareable type

    +
    +
    Parameters:
    +
      +
    • handle (CUmemGenericAllocationHandle) – CUDA handle for the memory allocation

    • +
    • handleType (CUmemAllocationHandleType) – Type of shareable handle requested (defines type and size of the +shareableHandle output parameter)

    • +
    • flags (unsigned long long) – Reserved, must be zero

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemImportFromShareableHandle(osHandle, shHandleType: CUmemAllocationHandleType)
    +

    Imports an allocation from a requested shareable handle type.

    +

    If the current process cannot support the memory described by this +shareable handle, this API will error as +CUDA_ERROR_NOT_SUPPORTED.

    +

    If shHandleType is CU_MEM_HANDLE_TYPE_FABRIC and the +importer process has not been granted access to the same IMEX channel +as the exporter process, this API will error as +CUDA_ERROR_NOT_PERMITTED.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Importing shareable handles exported from some graphics APIs(VUlkan, OpenGL, etc) created on devices under an SLI group may not be supported, and thus this API will return CUDA_ERROR_NOT_SUPPORTED. There is no guarantee that the contents of handle will be the same CUDA memory handle for the same given OS shareable handle, or the same underlying allocation.

    +
    + +
    +
    +cuda.bindings.driver.cuMemGetAllocationGranularity(CUmemAllocationProp prop: Optional[CUmemAllocationProp], option: CUmemAllocationGranularity_flags)
    +

    Calculates either the minimal or recommended granularity.

    +

    Calculates either the minimal or recommended granularity for a given +allocation specification and returns it in granularity. This +granularity can be used as a multiple for alignment, size, or address +mapping.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuMemCreate, cuMemMap

    +
    +
    + +
    +
    +cuda.bindings.driver.cuMemGetAllocationPropertiesFromHandle(handle)
    +

    Retrieve the contents of the property structure defining properties for this handle.

    +
    +
    Parameters:
    +

    handle (CUmemGenericAllocationHandle) – Handle which to perform the query on

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemRetainAllocationHandle(addr)
    +

    Given an address addr, returns the allocation handle of the backing memory allocation.

    +

    The handle is guaranteed to be the same handle value used to map the +memory. If the address requested is not mapped, the function will fail. +The returned handle must be released with corresponding number of calls +to cuMemRelease.

    +
    +
    Parameters:
    +

    addr (Any) – Memory address to query, that has been mapped previously.

    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    The address addr, can be any address in a range previously mapped by cuMemMap, and not necessarily the start address.

    +
    + +
    +
    +

    Stream Ordered Memory Allocator

    +

    This section describes the stream ordered memory allocator exposed by the low-level CUDA driver application programming interface.

    +

    overview

    +

    The asynchronous allocator allows the user to allocate and free in stream order. All asynchronous accesses of the allocation must happen between the stream executions of the allocation and the free. If the memory is accessed outside of the promised stream order, a use before allocation / use after free error will cause undefined behavior.

    +

    The allocator is free to reallocate the memory as long as it can guarantee that compliant memory accesses will not overlap temporally. The allocator may refer to internal stream ordering as well as inter-stream dependencies (such as CUDA events and null stream dependencies) when establishing the temporal guarantee. The allocator may also insert inter-stream dependencies to establish the temporal guarantee.

    +

    Supported Platforms

    +

    Whether or not a device supports the integrated stream ordered memory allocator may be queried by calling cuDeviceGetAttribute() with the device attribute CU_DEVICE_ATTRIBUTE_MEMORY_POOLS_SUPPORTED

    +
    +
    +cuda.bindings.driver.cuMemFreeAsync(dptr, hStream)
    +

    Frees memory with stream ordered semantics.

    +

    Inserts a free operation into hStream. The allocation must not be +accessed after stream execution reaches the free. After this API +returns, accessing the memory from any subsequent work launched on the +GPU or querying its pointer attributes results in undefined behavior.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT (default stream specified with no current context), CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +

    Notes

    +

    During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation.

    +
    + +
    +
    +cuda.bindings.driver.cuMemAllocAsync(size_t bytesize, hStream)
    +

    Allocates memory with stream ordered semantics.

    +

    Inserts an allocation operation into hStream. 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 memory pool current to the stream’s device.

    +
    +
    Parameters:
    +
      +
    • bytesize (size_t) – Number of bytes to allocate

    • +
    • hStream (CUstream or cudaStream_t) – The stream establishing the stream ordering contract and the memory +pool to allocate from

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    The default memory pool of a device contains device memory from that device.

    +

    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.

    +
    + +
    +
    +cuda.bindings.driver.cuMemPoolTrimTo(pool, size_t minBytesToKeep)
    +

    Tries to release memory back to the OS.

    +

    Releases memory back to the OS until the pool contains fewer than +minBytesToKeep reserved bytes, or there is no more memory that the +allocator can safely release. The allocator cannot release OS +allocations that back outstanding asynchronous allocations. The OS +allocations may happen at different granularity from the user +allocations.

    +
    +
    Parameters:
    +
      +
    • pool (CUmemoryPool or cudaMemPool_t) – The memory pool to trim

    • +
    • minBytesToKeep (size_t) – If the pool has less than minBytesToKeep reserved, the TrimTo +operation is a no-op. Otherwise the pool will be guaranteed to have +at least minBytesToKeep bytes reserved after the operation.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    : Allocations that have not been freed count as outstanding.

    +

    : Allocations that have been asynchronously freed but whose completion has not been observed on the host (eg. by a synchronize) can count as outstanding.

    +
    + +
    +
    +cuda.bindings.driver.cuMemPoolSetAttribute(pool, attr: CUmemPool_attribute, value)
    +

    Sets attributes of a memory pool.

    +

    Supported attributes are:

    +
      +
    • CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: (value type = +cuuint64_t) Amount of reserved memory in bytes to hold onto before +trying to release memory back to the OS. When more than the release +threshold bytes of memory are held by the memory pool, the allocator +will try to release memory back to the OS on the next call to stream, +event or context synchronize. (default 0)

    • +
    • CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: (value +type = int) Allow cuMemAllocAsync to use memory +asynchronously freed in another stream as long as a stream ordering +dependency of the allocating stream on the free action exists. Cuda +events and null stream interactions can create the required stream +ordered dependencies. (default enabled)

    • +
    • CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: (value type = +int) Allow reuse of already completed frees when there is no +dependency between the free and allocation. (default enabled)

    • +
    • CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: (value +type = int) Allow cuMemAllocAsync to insert new stream +dependencies in order to establish the stream ordering required to +reuse a piece of memory released by cuMemFreeAsync +(default enabled).

    • +
    • CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: (value type = +cuuint64_t) Reset the high watermark that tracks the amount of +backing memory that was allocated for the memory pool. It is illegal +to set this attribute to a non-zero value.

    • +
    • CU_MEMPOOL_ATTR_USED_MEM_HIGH: (value type = cuuint64_t) +Reset the high watermark that tracks the amount of used memory that +was allocated for the memory pool.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemPoolGetAttribute(pool, attr: CUmemPool_attribute)
    +

    Gets attributes of a memory pool.

    +

    Supported attributes are:

    +
      +
    • CU_MEMPOOL_ATTR_RELEASE_THRESHOLD: (value type = +cuuint64_t) Amount of reserved memory in bytes to hold onto before +trying to release memory back to the OS. When more than the release +threshold bytes of memory are held by the memory pool, the allocator +will try to release memory back to the OS on the next call to stream, +event or context synchronize. (default 0)

    • +
    • CU_MEMPOOL_ATTR_REUSE_FOLLOW_EVENT_DEPENDENCIES: (value +type = int) Allow cuMemAllocAsync to use memory +asynchronously freed in another stream as long as a stream ordering +dependency of the allocating stream on the free action exists. Cuda +events and null stream interactions can create the required stream +ordered dependencies. (default enabled)

    • +
    • CU_MEMPOOL_ATTR_REUSE_ALLOW_OPPORTUNISTIC: (value type = +int) Allow reuse of already completed frees when there is no +dependency between the free and allocation. (default enabled)

    • +
    • CU_MEMPOOL_ATTR_REUSE_ALLOW_INTERNAL_DEPENDENCIES: (value +type = int) Allow cuMemAllocAsync to insert new stream +dependencies in order to establish the stream ordering required to +reuse a piece of memory released by cuMemFreeAsync +(default enabled).

    • +
    • CU_MEMPOOL_ATTR_RESERVED_MEM_CURRENT: (value type = +cuuint64_t) Amount of backing memory currently allocated for the +mempool

    • +
    • CU_MEMPOOL_ATTR_RESERVED_MEM_HIGH: (value type = +cuuint64_t) High watermark of backing memory allocated for the +mempool since the last time it was reset.

    • +
    • CU_MEMPOOL_ATTR_USED_MEM_CURRENT: (value type = +cuuint64_t) Amount of memory from the pool that is currently in use +by the application.

    • +
    • CU_MEMPOOL_ATTR_USED_MEM_HIGH: (value type = cuuint64_t) +High watermark of the amount of memory from the pool that was in use +by the application.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemPoolSetAccess(pool, map: Optional[Tuple[CUmemAccessDesc] | List[CUmemAccessDesc]], size_t count)
    +

    Controls visibility of pools between devices.

    +
    +
    Parameters:
    +
      +
    • pool (CUmemoryPool or cudaMemPool_t) – The pool being modified

    • +
    • map (List[CUmemAccessDesc]) – Array of access descriptors. Each descriptor instructs the access +to enable for a single gpu.

    • +
    • count (size_t) – Number of descriptors in the map array.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemPoolGetAccess(memPool, CUmemLocation location: Optional[CUmemLocation])
    +

    Returns the accessibility of a pool from a device.

    +

    Returns the accessibility of the pool’s memory from the specified +location.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

      +
    • CUresult

    • +
    • flags (CUmemAccess_flags) – the accessibility of the pool from the specified location

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemPoolCreate(CUmemPoolProps poolProps: Optional[CUmemPoolProps])
    +

    Creates a memory pool.

    +

    Creates a CUDA memory pool and returns the handle in pool. The +poolProps determines the properties of the pool such as the backing +device and IPC capabilities.

    +

    To create a memory pool targeting a specific host NUMA node, +applications must set CUmemPoolProps::CUmemLocation::type +to CU_MEM_LOCATION_TYPE_HOST_NUMA and +CUmemPoolProps::CUmemLocation::id must specify the NUMA ID +of the host memory node. Specifying +CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT or +CU_MEM_LOCATION_TYPE_HOST as the +CUmemPoolProps::CUmemLocation::type will result in +CUDA_ERROR_INVALID_VALUE. By default, the pool’s memory +will be accessible from the device it is allocated on. In the case of +pools created with CU_MEM_LOCATION_TYPE_HOST_NUMA, 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 +maxSize. If set to 0, the maximum size of +the pool will default to a system dependent value.

    +

    Applications can set handleTypes to +CU_MEM_HANDLE_TYPE_FABRIC in order to create +CUmemoryPool suitable for sharing within an IMEX domain. An +IMEX domain is either an OS instance or a group of securely connected +OS instances using the NVIDIA IMEX daemon. An IMEX channel is a global +resource within the IMEX domain that represents a logical entity that +aims to provide fine grained accessibility control for the +participating processes. When exporter and importer CUDA processes have +been granted access to the same IMEX channel, they can securely share +memory. If the allocating process does not have access setup for an +IMEX channel, attempting to export a CUmemoryPool with +CU_MEM_HANDLE_TYPE_FABRIC will result in +CUDA_ERROR_NOT_PERMITTED. The nvidia-modprobe CLI provides +more information regarding setting up of IMEX channels.

    +
    +
    Parameters:
    +

    poolProps (CUmemPoolProps) – None

    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Specifying CU_MEM_HANDLE_TYPE_NONE creates a memory pool that will not support IPC.

    +
    + +
    +
    +cuda.bindings.driver.cuMemPoolDestroy(pool)
    +

    Destroys the specified memory pool.

    +

    If any pointers obtained from this pool haven’t been freed or the pool +has free operations that haven’t completed when +cuMemPoolDestroy is invoked, the function will return +immediately and the resources associated with the pool will be released +automatically once there are no more outstanding allocations.

    +

    Destroying the current mempool of a device sets the default mempool of +that device as the current mempool for that device.

    +
    +
    Parameters:
    +

    pool (CUmemoryPool or cudaMemPool_t) – None

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    A device’s default memory pool cannot be destroyed.

    +
    + +
    +
    +cuda.bindings.driver.cuMemAllocFromPoolAsync(size_t bytesize, pool, hStream)
    +

    Allocates memory from a specified pool with stream ordered semantics.

    +

    Inserts an allocation operation into hStream. 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.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    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.

    +
    + +
    +
    +cuda.bindings.driver.cuMemPoolExportToShareableHandle(pool, handleType: CUmemAllocationHandleType, unsigned long long flags)
    +

    Exports a memory pool to the requested handle type.

    +

    Given an IPC capable mempool, create an OS handle to share the pool +with another process. A recipient process can convert the shareable +handle into a mempool with +cuMemPoolImportFromShareableHandle. Individual pointers can +then be shared with the cuMemPoolExportPointer and +cuMemPoolImportPointer APIs. The implementation of what the +shareable handle is and how it can be transferred is defined by the +requested handle type.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    : To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than CU_MEM_HANDLE_TYPE_NONE.

    +
    + +
    +
    +cuda.bindings.driver.cuMemPoolImportFromShareableHandle(handle, handleType: CUmemAllocationHandleType, unsigned long long flags)
    +

    imports a memory pool from a shared handle.

    +

    Specific allocations can be imported from the imported pool with +cuMemPoolImportPointer.

    +

    If handleType is CU_MEM_HANDLE_TYPE_FABRIC and the +importer process has not been granted access to the same IMEX channel +as the exporter process, this API will error as +CUDA_ERROR_NOT_PERMITTED.

    +
    +
    Parameters:
    +
      +
    • handle (Any) – OS handle of the pool to open

    • +
    • handleType (CUmemAllocationHandleType) – The type of handle being imported

    • +
    • flags (unsigned long long) – must be 0

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Imported memory pools do not support creating new allocations. As such imported memory pools may not be used in cuDeviceSetMemPool or cuMemAllocFromPoolAsync calls.

    +
    + +
    +
    +cuda.bindings.driver.cuMemPoolExportPointer(ptr)
    +

    Export data to share a memory pool allocation between processes.

    +

    Constructs shareData_out for sharing a specific allocation from an +already shared memory pool. The recipient process can import the +allocation with the cuMemPoolImportPointer api. The data is +not a handle and may be shared through any IPC mechanism.

    +
    +
    Parameters:
    +

    ptr (CUdeviceptr) – pointer to memory being exported

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemPoolImportPointer(pool, CUmemPoolPtrExportData shareData: Optional[CUmemPoolPtrExportData])
    +

    Import a memory pool allocation from another process.

    +

    Returns in ptr_out a pointer to the imported memory. The imported +memory must not be accessed before the allocation operation completes +in the exporting process. The imported memory must be freed from all +importing processes before being freed in the exporting process. The +pointer may be freed with cuMemFree or cuMemFreeAsync. If +cuMemFreeAsync is used, the free must be completed on the importing +process before the free operation on the exporting process.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    The cuMemFreeAsync api may be used in the exporting process before the cuMemFreeAsync operation completes in its stream as long as the cuMemFreeAsync in the exporting process specifies a stream with a stream dependency on the importing process’s cuMemFreeAsync.

    +
    + +
    +
    +

    Multicast Object Management

    +

    This section describes the CUDA multicast object operations exposed by the low-level CUDA driver application programming interface.

    +

    overview

    +

    A multicast object created via cuMulticastCreate enables certain memory operations to be broadcast to a team of devices. Devices can be added to a multicast object via cuMulticastAddDevice. Memory can be bound on each participating device via either cuMulticastBindMem or cuMulticastBindAddr. Multicast objects can be mapped into a device’s virtual address space using the virtual memmory management APIs (see cuMemMap and cuMemSetAccess).

    +

    Supported Platforms

    +

    Support for multicast on a specific device can be queried using the device attribute CU_DEVICE_ATTRIBUTE_MULTICAST_SUPPORTED

    +
    +
    +cuda.bindings.driver.cuMulticastCreate(CUmulticastObjectProp prop: Optional[CUmulticastObjectProp])
    +

    Create a generic allocation handle representing a multicast object described by the given properties.

    +

    This creates a multicast object as described by prop. The number of +participating devices is specified by +numDevices. Devices can be added to +the multicast object via cuMulticastAddDevice. All +participating devices must be added to the multicast object before +memory can be bound to it. Memory is bound to the multicast object via +either cuMulticastBindMem or +cuMulticastBindAddr, and can be unbound via +cuMulticastUnbind. The total amount of memory that can be +bound per device is specified by +pysize. This size must be a +multiple of the value returned by cuMulticastGetGranularity +with the flag CU_MULTICAST_GRANULARITY_MINIMUM. For best +performance however, the size should be aligned to the value returned +by cuMulticastGetGranularity with the flag +CU_MULTICAST_GRANULARITY_RECOMMENDED.

    +

    After all participating devices have been added, multicast objects can +also be mapped to a device’s virtual address space using the virtual +memory management APIs (see cuMemMap and +cuMemSetAccess). Multicast objects can also be shared with +other processes by requesting a shareable handle via +cuMemExportToShareableHandle. Note that the desired types +of shareable handles must be specified in the bitmask +handleTypes. Multicast objects can be +released using the virtual memory management API +cuMemRelease.

    +
    +
    Parameters:
    +

    prop (CUmulticastObjectProp) – Properties of the multicast object to create.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMulticastAddDevice(mcHandle, dev)
    +

    Associate a device to a multicast object.

    +

    Associates a device to a multicast object. The added device will be a +part of the multicast team of size specified by +numDevices during +cuMulticastCreate. The association of the device to the +multicast object is permanent during the life time of the multicast +object. All devices must be added to the multicast team before any +memory can be bound to any device in the team. Any calls to +cuMulticastBindMem or cuMulticastBindAddr will +block until all devices have been added. Similarly all devices must be +added to the multicast team before a virtual address range can be +mapped to the multicast object. A call to cuMemMap will +block until all devices have been added.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMulticastBindMem(mcHandle, size_t mcOffset, memHandle, size_t memOffset, size_t size, unsigned long long flags)
    +

    Bind a memory allocation represented by a handle to a multicast object.

    +

    Binds a memory allocation specified by memHandle and created via +cuMemCreate to a multicast object represented by mcHandle +and created via cuMulticastCreate. The intended size of +the bind, the offset in the multicast range mcOffset as well as the +offset in the memory memOffset must be a multiple of the value +returned by cuMulticastGetGranularity with the flag +CU_MULTICAST_GRANULARITY_MINIMUM. For best performance +however, size, mcOffset and memOffset should be aligned to the +granularity of the memory allocation(see +cuMemGetAllocationGranularity) or to the value returned by +cuMulticastGetGranularity with the flag +CU_MULTICAST_GRANULARITY_RECOMMENDED.

    +

    The size + memOffset cannot be larger than the size of the +allocated memory. Similarly the size + mcOffset cannot be larger +than the size of the multicast object. The memory allocation must have +beeen created on one of the devices that was added to the multicast +team via cuMulticastAddDevice. Externally shareable as well +as imported multicast objects can be bound only to externally shareable +memory. Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if +there are insufficient resources required to perform the bind. This +call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary +system software is not initialized or running.

    +
    +
    Parameters:
    +
      +
    • mcHandle (CUmemGenericAllocationHandle) – Handle representing a multicast object.

    • +
    • mcOffset (size_t) – Offset into the multicast object for attachment.

    • +
    • memHandle (CUmemGenericAllocationHandle) – Handle representing a memory allocation.

    • +
    • memOffset (size_t) – Offset into the memory for attachment.

    • +
    • size (size_t) – Size of the memory that will be bound to the multicast object.

    • +
    • flags (unsigned long long) – Flags for future use, must be zero for now.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_SYSTEM_NOT_READY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMulticastBindAddr(mcHandle, size_t mcOffset, memptr, size_t size, unsigned long long flags)
    +

    Bind a memory allocation represented by a virtual address to a multicast object.

    +

    Binds a memory allocation specified by its mapped address memptr to a +multicast object represented by mcHandle. The memory must have been +allocated via cuMemCreate or cudaMallocAsync. +The intended size of the bind, the offset in the multicast range +mcOffset and memptr must be a multiple of the value returned by +cuMulticastGetGranularity with the flag +CU_MULTICAST_GRANULARITY_MINIMUM. For best performance +however, size, mcOffset and memptr should be aligned to the value +returned by cuMulticastGetGranularity with the flag +CU_MULTICAST_GRANULARITY_RECOMMENDED.

    +

    The size cannot be larger than the size of the allocated memory. +Similarly the size + mcOffset cannot be larger than the total size +of the multicast object. The memory allocation must have beeen created +on one of the devices that was added to the multicast team via +cuMulticastAddDevice. Externally shareable as well as +imported multicast objects can be bound only to externally shareable +memory. Note that this call will return CUDA_ERROR_OUT_OF_MEMORY if +there are insufficient resources required to perform the bind. This +call may also return CUDA_ERROR_SYSTEM_NOT_READY if the necessary +system software is not initialized or running.

    +
    +
    Parameters:
    +
      +
    • mcHandle (CUmemGenericAllocationHandle) – Handle representing a multicast object.

    • +
    • mcOffset (size_t) – Offset into multicast va range for attachment.

    • +
    • memptr (CUdeviceptr) – Virtual address of the memory allocation.

    • +
    • size (size_t) – Size of memory that will be bound to the multicast object.

    • +
    • flags (unsigned long long) – Flags for future use, must be zero now.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED, CUDA_ERROR_OUT_OF_MEMORY, CUDA_ERROR_SYSTEM_NOT_READY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMulticastUnbind(mcHandle, dev, size_t mcOffset, size_t size)
    +

    Unbind any memory allocations bound to a multicast object at a given offset and upto a given size.

    +

    Unbinds any memory allocations hosted on dev and bound to a multicast +object at mcOffset and upto a given size. The intended size of +the unbind and the offset in the multicast range ( mcOffset ) must be +a multiple of the value returned by +cuMulticastGetGranularity flag +CU_MULTICAST_GRANULARITY_MINIMUM. The size + mcOffset +cannot be larger than the total size of the multicast object.

    +
    +
    Parameters:
    +
      +
    • mcHandle (CUmemGenericAllocationHandle) – Handle representing a multicast object.

    • +
    • dev (CUdevice) – Device that hosts the memory allocation.

    • +
    • mcOffset (size_t) – Offset into the multicast object.

    • +
    • size (size_t) – Desired size to unbind.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_PERMITTED, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Warning: The mcOffset and the size must match the corresponding values specified during the bind call. Any other values may result in undefined behavior.

    +
    + +
    +
    +cuda.bindings.driver.cuMulticastGetGranularity(CUmulticastObjectProp prop: Optional[CUmulticastObjectProp], option: CUmulticastGranularity_flags)
    +

    Calculates either the minimal or recommended granularity for multicast object.

    +

    Calculates either the minimal or recommended granularity for a given +set of multicast object properties and returns it in granularity. This +granularity can be used as a multiple for size, bind offsets and +address mappings of the multicast object.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Unified Addressing

    +

    This section describes the unified addressing functions of the low-level CUDA driver application programming interface.

    +

    Overview

    +

    CUDA devices can share a unified address space with the host. For these devices there is no distinction between a device pointer and a host pointer – the same pointer value may be used to access memory from the host program and from a kernel running on the device (with exceptions enumerated below).

    +

    Supported Platforms

    +

    Whether or not a device supports unified addressing may be queried by calling cuDeviceGetAttribute() with the device attribute CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING.

    +

    Unified addressing is automatically enabled in 64-bit processes

    +

    Looking Up Information from Pointer Values

    +

    It is possible to look up information about the memory which backs a pointer value. For instance, one may want to know if a pointer points to host or device memory. As another example, in the case of device memory, one may want to know on which CUDA device the memory resides. These properties may be queried using the function cuPointerGetAttribute()

    +

    Since pointers are unique, it is not necessary to specify information about the pointers specified to the various copy functions in the CUDA API. The function cuMemcpy() may be used to perform a copy between two pointers, ignoring whether they point to host or device memory (making cuMemcpyHtoD(), cuMemcpyDtoD(), and cuMemcpyDtoH() unnecessary for devices supporting unified addressing). For multidimensional copies, the memory type CU_MEMORYTYPE_UNIFIED may be used to specify that the CUDA driver should infer the location of the pointer from its value.

    +

    Automatic Mapping of Host Allocated Host Memory

    +

    All host memory allocated in all contexts using cuMemAllocHost() and cuMemHostAlloc() is always directly accessible from all contexts on all devices that support unified addressing. This is the case regardless of whether or not the flags CU_MEMHOSTALLOC_PORTABLE and CU_MEMHOSTALLOC_DEVICEMAP are specified.

    +

    The pointer value through which allocated host memory may be accessed in kernels on all devices that support unified addressing is the same as the pointer value through which that memory is accessed on the host, so it is not necessary to call cuMemHostGetDevicePointer() to get the device pointer for these allocations.

    +

    Note that this is not the case for memory allocated using the flag CU_MEMHOSTALLOC_WRITECOMBINED, as discussed below.

    +

    Automatic Registration of Peer Memory

    +

    Upon enabling direct access from a context that supports unified addressing to another peer context that supports unified addressing using cuCtxEnablePeerAccess() all memory allocated in the peer context using cuMemAlloc() and cuMemAllocPitch() will immediately be accessible by the current context. The device pointer value through which any peer memory may be accessed in the current context is the same pointer value through which that memory may be accessed in the peer context.

    +

    Exceptions, Disjoint Addressing

    +

    Not all memory may be accessed on devices through the same pointer value through which they are accessed on the host. These exceptions are host memory registered using cuMemHostRegister() and host memory allocated using the flag CU_MEMHOSTALLOC_WRITECOMBINED. For these exceptions, there exists a distinct host and device address for the memory. The device address is guaranteed to not overlap any valid host pointer range and is guaranteed to have the same value across all contexts that support unified addressing.

    +

    This device address may be queried using cuMemHostGetDevicePointer() when a context using unified addressing is current. Either the host or the unified device pointer value may be used to refer to this memory through cuMemcpy() and similar functions using the CU_MEMORYTYPE_UNIFIED memory type.

    +
    +
    +cuda.bindings.driver.cuPointerGetAttribute(attribute: CUpointer_attribute, ptr)
    +

    Returns information about a pointer.

    +

    The supported attributes are:

    +
      +
    • CU_POINTER_ATTRIBUTE_CONTEXT:

    • +
    • Returns in *data the CUcontext in which ptr was +allocated or registered. The type of data must be +CUcontext *.

    • +
    • If ptr was not allocated by, mapped by, or registered with a +CUcontext which uses unified virtual addressing then +CUDA_ERROR_INVALID_VALUE is returned.

    • +
    • CU_POINTER_ATTRIBUTE_MEMORY_TYPE:

    • +
    • Returns in *data the physical memory type of the memory that ptr +addresses as a CUmemorytype enumerated value. The type of +data must be unsigned int.

    • +
    • If ptr addresses device memory then *data is set to +CU_MEMORYTYPE_DEVICE. The particular CUdevice +on which the memory resides is the CUdevice of the +CUcontext returned by the +CU_POINTER_ATTRIBUTE_CONTEXT attribute of ptr.

    • +
    • If ptr addresses host memory then *data is set to +CU_MEMORYTYPE_HOST.

    • +
    • If ptr was not allocated by, mapped by, or registered with a +CUcontext which uses unified virtual addressing then +CUDA_ERROR_INVALID_VALUE is returned.

    • +
    • If the current CUcontext does not support unified virtual +addressing then CUDA_ERROR_INVALID_CONTEXT is returned.

    • +
    • CU_POINTER_ATTRIBUTE_DEVICE_POINTER:

    • +
    • Returns in *data the device pointer value through which ptr may +be accessed by kernels running in the current CUcontext. +The type of data must be CUdeviceptr *.

    • +
    • If there exists no device pointer value through which kernels running +in the current CUcontext may access ptr then +CUDA_ERROR_INVALID_VALUE is returned.

    • +
    • If there is no current CUcontext then +CUDA_ERROR_INVALID_CONTEXT is returned.

    • +
    • Except in the exceptional disjoint addressing cases discussed below, +the value returned in *data will equal the input value ptr.

    • +
    • CU_POINTER_ATTRIBUTE_HOST_POINTER:

    • +
    • Returns in *data the host pointer value through which ptr may be +accessed by by the host program. The type of data must be void **. +If there exists no host pointer value through which the host program +may directly access ptr then CUDA_ERROR_INVALID_VALUE +is returned.

    • +
    • Except in the exceptional disjoint addressing cases discussed below, +the value returned in *data will equal the input value ptr.

    • +
    • CU_POINTER_ATTRIBUTE_P2P_TOKENS:

    • +
    • Returns in *data two tokens for use with the nv-p2p.h Linux kernel +interface. data must be a struct of type +CUDA_POINTER_ATTRIBUTE_P2P_TOKENS.

    • +
    • ptr must be a pointer to memory obtained from +pycuMemAlloc(). Note that p2pToken and +vaSpaceToken are only valid for the lifetime of the source +allocation. A subsequent allocation at the same address may return +completely different tokens. Querying this attribute has a side +effect of setting the attribute +CU_POINTER_ATTRIBUTE_SYNC_MEMOPS for the region of memory +that ptr points to.

    • +
    • CU_POINTER_ATTRIBUTE_SYNC_MEMOPS:

    • +
    • A boolean attribute which when set, ensures that synchronous memory +operations initiated on the region of memory that ptr points to +will always synchronize. See further documentation in the section +titled “API synchronization behavior” to learn more about cases when +synchronous memory operations can exhibit asynchronous behavior.

    • +
    • CU_POINTER_ATTRIBUTE_BUFFER_ID:

    • +
    • Returns in *data a buffer ID which is guaranteed to be unique +within the process. data must point to an unsigned long long.

    • +
    • ptr must be a pointer to memory obtained from a CUDA memory +allocation API. Every memory allocation from any of the CUDA memory +allocation APIs will have a unique ID over a process lifetime. +Subsequent allocations do not reuse IDs from previous freed +allocations. IDs are only unique within a single process.

    • +
    • CU_POINTER_ATTRIBUTE_IS_MANAGED:

    • +
    • Returns in *data a boolean that indicates whether the pointer +points to managed memory or not.

    • +
    • If ptr is not a valid CUDA pointer then +CUDA_ERROR_INVALID_VALUE is returned.

    • +
    • CU_POINTER_ATTRIBUTE_DEVICE_ORDINAL:

    • +
    • Returns in *data an integer representing a device ordinal of a +device against which the memory was allocated or registered.

    • +
    • CU_POINTER_ATTRIBUTE_IS_LEGACY_CUDA_IPC_CAPABLE:

    • +
    • Returns in *data a boolean that indicates if this pointer maps to +an allocation that is suitable for cudaIpcGetMemHandle.

    • +
    • CU_POINTER_ATTRIBUTE_RANGE_START_ADDR:

    • +
    • Returns in *data the starting address for the allocation referenced +by the device pointer ptr. Note that this is not necessarily the +address of the mapped region, but the address of the mappable address +range ptr references (e.g. from cuMemAddressReserve).

    • +
    • CU_POINTER_ATTRIBUTE_RANGE_SIZE:

    • +
    • Returns in *data the size for the allocation referenced by the +device pointer ptr. Note that this is not necessarily the size of +the mapped region, but the size of the mappable address range ptr +references (e.g. from cuMemAddressReserve). To retrieve +the size of the mapped region, see cuMemGetAddressRange

    • +
    • CU_POINTER_ATTRIBUTE_MAPPED:

    • +
    • Returns in *data a boolean that indicates if this pointer is in a +valid address range that is mapped to a backing allocation.

    • +
    • CU_POINTER_ATTRIBUTE_ALLOWED_HANDLE_TYPES:

    • +
    • Returns a bitmask of the allowed handle types for an allocation that +may be passed to cuMemExportToShareableHandle.

    • +
    • CU_POINTER_ATTRIBUTE_MEMPOOL_HANDLE:

    • +
    • Returns in *data the handle to the mempool that the allocation was +obtained from.

    • +
    +

    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

    +
      +
    • user memory registered using cuMemHostRegister

    • +
    • host memory allocated using cuMemHostAlloc with the +CU_MEMHOSTALLOC_WRITECOMBINED flag For these types of +allocation there will exist separate, disjoint host and device +addresses for accessing the allocation. In particular

    • +
    • The host address will correspond to an invalid unmapped device +address (which will result in an exception if accessed from the +device)

    • +
    • The device address will correspond to an invalid unmapped host +address (which will result in an exception if accessed from the +host). For these types of allocations, querying +CU_POINTER_ATTRIBUTE_HOST_POINTER and +CU_POINTER_ATTRIBUTE_DEVICE_POINTER may be used to +retrieve the host and device addresses from either address.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemPrefetchAsync(devPtr, size_t count, dstDevice, hStream)
    +

    Prefetches memory to the specified destination device.

    +

    Note there is a later version of this API, +cuMemPrefetchAsync_v2. It will supplant this version in +13.0, which is retained for minor version compatibility.

    +

    Prefetches memory to the specified destination device. devPtr is the +base device pointer of the memory to be prefetched and dstDevice is +the destination device. count specifies the number of bytes to copy. +hStream is the stream in which the operation is enqueued. The memory +range must refer to managed memory allocated via +cuMemAllocManaged or declared via managed variables or it +may also refer to system-allocated memory on systems with non-zero +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.

    +

    Passing in CU_DEVICE_CPU for dstDevice will prefetch the data to host +memory. If dstDevice is a GPU, then the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS must be non- +zero. Additionally, hStream must be associated with a device that has +a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS.

    +

    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 +the prefetch operation is enqueued in the stream.

    +

    If no physical memory has been allocated for this region, then this +memory region will be populated and mapped on the destination device. +If there’s insufficient memory to prefetch the desired region, the +Unified Memory driver may evict pages from other +cuMemAllocManaged allocations to host memory in order to +make room. Device memory allocated using cuMemAlloc or +cuArrayCreate will not be evicted.

    +

    By default, any mappings to the previous location of the migrated pages +are removed and mappings for the new location are only setup on +dstDevice. The exact behavior however also depends on the settings +applied to this memory range via cuMemAdvise as described +below:

    +

    If CU_MEM_ADVISE_SET_READ_MOSTLY was set on any subset of +this memory range, then that subset will create a read-only copy of the +pages on dstDevice.

    +

    If CU_MEM_ADVISE_SET_PREFERRED_LOCATION was called on any +subset of this memory range, then the pages will be migrated to +dstDevice even if dstDevice is not the preferred location of any +pages in the memory range.

    +

    If CU_MEM_ADVISE_SET_ACCESSED_BY was called on any subset +of this memory range, then mappings to those pages from all the +appropriate processors are updated to refer to the new location if +establishing such a mapping is possible. Otherwise, those mappings are +cleared.

    +

    Note that this API is not required for functionality and only serves to +improve performance by allowing the application to migrate data to a +suitable location before it is accessed. Memory accesses to this range +are always coherent and are allowed even when the data is actively +being migrated.

    +

    Note that this function is asynchronous with respect to the host and +all work on other devices.

    +
    +
    Parameters:
    +
      +
    • devPtr (CUdeviceptr) – Pointer to be prefetched

    • +
    • count (size_t) – Size in bytes

    • +
    • dstDevice (CUdevice) – Destination device to prefetch to

    • +
    • hStream (CUstream or cudaStream_t) – Stream to enqueue prefetch operation

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemPrefetchAsync_v2(devPtr, size_t count, CUmemLocation location: CUmemLocation, unsigned int flags, hStream)
    +

    Prefetches memory to the specified destination location.

    +

    Prefetches memory to the specified destination location. devPtr is +the base device pointer of the memory to be prefetched and location +specifies the destination location. count specifies the number of +bytes to copy. hStream is the stream in which the operation is +enqueued. The memory range must refer to managed memory allocated via +cuMemAllocManaged or declared via managed variables.

    +

    Specifying CU_MEM_LOCATION_TYPE_DEVICE for +type will prefetch memory to GPU specified by +device ordinal id which must have non-zero +value for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. +Additionally, hStream must be associated with a device that has a +non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Specifying +CU_MEM_LOCATION_TYPE_HOST as type +will prefetch data to host memory. Applications can request prefetching +memory to a specific host NUMA node by specifying +CU_MEM_LOCATION_TYPE_HOST_NUMA for +type and a valid host NUMA node id in +id Users can also request prefetching memory +to the host NUMA node closest to the current thread’s CPU by specifying +CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT for +type. Note when +type is etiher +CU_MEM_LOCATION_TYPE_HOST OR +CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT, +id will be ignored.

    +

    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 +the prefetch operation is enqueued in the stream.

    +

    If no physical memory has been allocated for this region, then this +memory region will be populated and mapped on the destination device. +If there’s insufficient memory to prefetch the desired region, the +Unified Memory driver may evict pages from other +cuMemAllocManaged allocations to host memory in order to +make room. Device memory allocated using cuMemAlloc or +cuArrayCreate will not be evicted.

    +

    By default, any mappings to the previous location of the migrated pages +are removed and mappings for the new location are only setup on the +destination location. The exact behavior however also depends on the +settings applied to this memory range via cuMemAdvise as +described below:

    +

    If CU_MEM_ADVISE_SET_READ_MOSTLY was set on any subset of +this memory range, then that subset will create a read-only copy of the +pages on destination location. If however the destination location is a +host NUMA node, then any pages of that subset that are already in +another host NUMA node will be transferred to the destination.

    +

    If CU_MEM_ADVISE_SET_PREFERRED_LOCATION was called on any +subset of this memory range, then the pages will be migrated to +location even if location is not the preferred location of any +pages in the memory range.

    +

    If CU_MEM_ADVISE_SET_ACCESSED_BY was called on any subset +of this memory range, then mappings to those pages from all the +appropriate processors are updated to refer to the new location if +establishing such a mapping is possible. Otherwise, those mappings are +cleared.

    +

    Note that this API is not required for functionality and only serves to +improve performance by allowing the application to migrate data to a +suitable location before it is accessed. Memory accesses to this range +are always coherent and are allowed even when the data is actively +being migrated.

    +

    Note that this function is asynchronous with respect to the host and +all work on other devices.

    +
    +
    Parameters:
    +
      +
    • devPtr (CUdeviceptr) – Pointer to be prefetched

    • +
    • count (size_t) – Size in bytes

    • +
    • dstDevice (CUmemLocation) – Destination device to prefetch to

    • +
    • flags (unsigned int) – flags for future use, must be zero now.

    • +
    • hStream (CUstream or cudaStream_t) – Stream to enqueue prefetch operation

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemAdvise(devPtr, size_t count, advice: CUmem_advise, device)
    +

    Advise about the usage of a given memory range.

    +

    Note there is a later version of this API, cuMemAdvise_v2. +It will supplant this version in 13.0, which is retained for minor +version compatibility.

    +

    Advise the Unified Memory subsystem about the usage pattern for the +memory range starting at devPtr with a size of count bytes. 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 the +advice is applied. The memory range must refer to managed memory +allocated via cuMemAllocManaged or declared via managed +variables. The memory range could also refer to system-allocated +pageable memory provided it represents a valid, host-accessible region +of memory and all additional constraints imposed by advice as +outlined below are also satisfied. Specifying an invalid system- +allocated pageable memory range results in an error being returned.

    +

    The advice parameter can take the following values:

    +
      +
    • CU_MEM_ADVISE_SET_READ_MOSTLY: This implies that the data +is mostly going to be read from and only occasionally written to. Any +read accesses from any processor to this region will create a read- +only copy of at least the accessed pages in that processor’s memory. +Additionally, if cuMemPrefetchAsync is called on this +region, it will create a read-only copy of the data on the +destination processor. If any processor writes to this region, all +copies of the corresponding page will be invalidated except for the +one where the write occurred. The device argument is ignored for +this advice. Note that for a page to be read-duplicated, the +accessing processor must either be the CPU or a GPU that has a non- +zero value for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Also, if a +context is created on a device that does not have the device +attribute CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS +set, then read-duplication will not occur until all such contexts are +destroyed. If the memory region refers to valid system-allocated +pageable memory, then the accessing device must have a non-zero value +for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS for a read- +only copy to be created on that device. Note however that if the +accessing device also has a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, +then setting this advice will not create a read-only copy when that +device accesses this memory region.

    • +
    • CU_MEM_ADVISE_UNSET_READ_MOSTLY: Undoes the effect of +CU_MEM_ADVISE_SET_READ_MOSTLY and also prevents the +Unified Memory driver from attempting heuristic read-duplication on +the memory range. Any read-duplicated copies of the data will be +collapsed into a single copy. The location for the collapsed copy +will be the preferred location if the page has a preferred location +and one of the read-duplicated copies was resident at that location. +Otherwise, the location chosen is arbitrary.

    • +
    • CU_MEM_ADVISE_SET_PREFERRED_LOCATION: This advice sets +the preferred location for the data to be the memory belonging to +device. Passing in CU_DEVICE_CPU for device sets the preferred +location as host memory. If device is a GPU, then it must have a +non-zero value for the device attribute +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 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 +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 +accesses from device will not result in a read-only copy being +created on that device as outlined in description for the advice +CU_MEM_ADVISE_SET_READ_MOSTLY. If the memory region +refers to valid system-allocated pageable memory, then device must +have a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.

    • +
    • CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION: Undoes the effect +of CU_MEM_ADVISE_SET_PREFERRED_LOCATION and changes the +preferred location to none.

    • +
    • CU_MEM_ADVISE_SET_ACCESSED_BY: This advice implies that +the data will be accessed by device. Passing in +CU_DEVICE_CPU for device will set the advice for the +CPU. If device is a GPU, then the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS must be +non-zero. This advice does not cause data migration and has no impact +on the location of the data per se. Instead, it causes the data to +always be mapped in the specified processor’s page tables, as long as +the location of the data permits a mapping to be established. If the +data gets migrated for any reason, the mappings are updated +accordingly. This advice is recommended in scenarios where data +locality is not important, but avoiding faults is. Consider for +example a system containing multiple GPUs with peer-to-peer access +enabled, where the data located on one GPU is occasionally accessed +by peer GPUs. In such scenarios, migrating data over to the other +GPUs is not as important because the accesses are infrequent and the +overhead of migration may be too high. But preventing faults can +still help improve performance, and so having a mapping set up in +advance is useful. Note that on CPU access of this data, the data may +be migrated to host memory because the CPU typically cannot access +device memory directly. Any GPU that had the +CU_MEM_ADVISE_SET_ACCESSED_BY flag set for this data will +now have its mapping updated to point to the page in host memory. If +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. Additionally, if +the preferred location of this memory region or any subset of it is +also device, then the policies associated with +CU_MEM_ADVISE_SET_PREFERRED_LOCATION will override the +policies of this advice. If the memory region refers to valid system- +allocated pageable memory, then device must have a non-zero value +for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, +if device has a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, +then this call has no effect.

    • +
    • CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of +CU_MEM_ADVISE_SET_ACCESSED_BY. Any mappings to the data +from device may be removed at any time causing accesses to result +in non-fatal page faults. If the memory region refers to valid +system-allocated pageable memory, then device must have a non-zero +value for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, +if device has a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, +then this call has no effect.

    • +
    +
    +
    Parameters:
    +
      +
    • devPtr (CUdeviceptr) – Pointer to memory to set the advice for

    • +
    • count (size_t) – Size in bytes of the memory range

    • +
    • advice (CUmem_advise) – Advice to be applied for the specified memory range

    • +
    • device (CUdevice) – Device to apply the advice for

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemAdvise_v2(devPtr, size_t count, advice: CUmem_advise, CUmemLocation location: CUmemLocation)
    +

    Advise about the usage of a given memory range.

    +

    Advise the Unified Memory subsystem about the usage pattern for the +memory range starting at devPtr with a size of count bytes. 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 the +advice is applied. The memory range must refer to managed memory +allocated via cuMemAllocManaged or declared via managed +variables. The memory range could also refer to system-allocated +pageable memory provided it represents a valid, host-accessible region +of memory and all additional constraints imposed by advice as +outlined below are also satisfied. Specifying an invalid system- +allocated pageable memory range results in an error being returned.

    +

    The advice parameter can take the following values:

    +
      +
    • CU_MEM_ADVISE_SET_READ_MOSTLY: This implies that the data +is mostly going to be read from and only occasionally written to. Any +read accesses from any processor to this region will create a read- +only copy of at least the accessed pages in that processor’s memory. +Additionally, if cuMemPrefetchAsync or +cuMemPrefetchAsync_v2 is called on this region, it will +create a read-only copy of the data on the destination processor. If +the target location for cuMemPrefetchAsync_v2 is a host +NUMA node and a read-only copy already exists on another host NUMA +node, that copy will be migrated to the targeted host NUMA node. If +any processor writes to this region, all copies of the corresponding +page will be invalidated except for the one where the write occurred. +If the writing processor is the CPU and the preferred location of the +page is a host NUMA node, then the page will also be migrated to that +host NUMA node. The location argument is ignored for this advice. +Note that for a page to be read-duplicated, the accessing processor +must either be the CPU or a GPU that has a non-zero value for the +device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. Also, if a +context is created on a device that does not have the device +attribute CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS +set, then read-duplication will not occur until all such contexts are +destroyed. If the memory region refers to valid system-allocated +pageable memory, then the accessing device must have a non-zero value +for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS for a read- +only copy to be created on that device. Note however that if the +accessing device also has a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, +then setting this advice will not create a read-only copy when that +device accesses this memory region.

    • +
    • CU_MEM_ADVISE_UNSET_READ_MOSTLY: Undoes the effect of +CU_MEM_ADVISE_SET_READ_MOSTLY and also prevents the +Unified Memory driver from attempting heuristic read-duplication on +the memory range. Any read-duplicated copies of the data will be +collapsed into a single copy. The location for the collapsed copy +will be the preferred location if the page has a preferred location +and one of the read-duplicated copies was resident at that location. +Otherwise, the location chosen is arbitrary. Note: The location +argument is ignored for this advice.

    • +
    • CU_MEM_ADVISE_SET_PREFERRED_LOCATION: This advice sets +the preferred location for the data to be the memory belonging to +location. When type is +CU_MEM_LOCATION_TYPE_HOST, id +is ignored and the preferred location is set to be host memory. To +set the preferred location to a specific host NUMA node, applications +must set type to +CU_MEM_LOCATION_TYPE_HOST_NUMA and +id must specify the NUMA ID of the host +NUMA node. If type is set to +CU_MEM_LOCATION_TYPE_HOST_NUMA_CURRENT, +id will be ignored and the the host NUMA +node closest to the calling thread’s CPU will be used as the +preferred location. If type is a +CU_MEM_LOCATION_TYPE_DEVICE, then +id must be a valid device ordinal and the +device must have a non-zero value for the device attribute +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 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 +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 +accesses from location will not result in a read-only copy being +created on that procesor as outlined in description for the advice +CU_MEM_ADVISE_SET_READ_MOSTLY. If the memory region +refers to valid system-allocated pageable memory, and +type is CU_MEM_LOCATION_TYPE_DEVICE then +id must be a valid device that has a non- +zero alue for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.

    • +
    • CU_MEM_ADVISE_UNSET_PREFERRED_LOCATION: Undoes the effect +of CU_MEM_ADVISE_SET_PREFERRED_LOCATION and changes the +preferred location to none. The location argument is ignored for +this advice.

    • +
    • CU_MEM_ADVISE_SET_ACCESSED_BY: This advice implies that +the data will be accessed by processor location. The +type must be either +CU_MEM_LOCATION_TYPE_DEVICE with +id representing a valid device ordinal or +CU_MEM_LOCATION_TYPE_HOST and +id will be ignored. All other location +types are invalid. If id is a GPU, then the +device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS must be +non-zero. This advice does not cause data migration and has no impact +on the location of the data per se. Instead, it causes the data to +always be mapped in the specified processor’s page tables, as long as +the location of the data permits a mapping to be established. If the +data gets migrated for any reason, the mappings are updated +accordingly. This advice is recommended in scenarios where data +locality is not important, but avoiding faults is. Consider for +example a system containing multiple GPUs with peer-to-peer access +enabled, where the data located on one GPU is occasionally accessed +by peer GPUs. In such scenarios, migrating data over to the other +GPUs is not as important because the accesses are infrequent and the +overhead of migration may be too high. But preventing faults can +still help improve performance, and so having a mapping set up in +advance is useful. Note that on CPU access of this data, the data may +be migrated to host memory because the CPU typically cannot access +device memory directly. Any GPU that had the +CU_MEM_ADVISE_SET_ACCESSED_BY flag set for this data will +now have its mapping updated to point to the page in host memory. If +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. Additionally, if +the preferred location of this memory region or any subset of it is +also location, then the policies associated with +CU_MEM_ADVISE_SET_PREFERRED_LOCATION will override the +policies of this advice. If the memory region refers to valid system- +allocated pageable memory, and type is +CU_MEM_LOCATION_TYPE_DEVICE then device in +id must have a non-zero value for the +device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, +if id has a non-zero value for the device +attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, +then this call has no effect.

    • +
    • CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of +CU_MEM_ADVISE_SET_ACCESSED_BY. Any mappings to the data +from location may be removed at any time causing accesses to result +in non-fatal page faults. If the memory region refers to valid +system-allocated pageable memory, and type +is CU_MEM_LOCATION_TYPE_DEVICE then device in +id must have a non-zero value for the +device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS. Additionally, +if id has a non-zero value for the device +attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS_USES_HOST_PAGE_TABLES, +then this call has no effect.

    • +
    +
    +
    Parameters:
    +
      +
    • devPtr (CUdeviceptr) – Pointer to memory to set the advice for

    • +
    • count (size_t) – Size in bytes of the memory range

    • +
    • advice (CUmem_advise) – Advice to be applied for the specified memory range

    • +
    • location (CUmemLocation) – location to apply the advice for

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemRangeGetAttribute(size_t dataSize, attribute: CUmem_range_attribute, devPtr, size_t count)
    +

    Query an attribute of a given memory range.

    +

    Query an attribute about the memory range starting at devPtr with a +size of count bytes. The memory range must refer to managed memory +allocated via cuMemAllocManaged or declared via managed +variables.

    +

    The attribute parameter can take the following values:

    +
      +
    • CU_MEM_RANGE_ATTRIBUTE_READ_MOSTLY: If this attribute is +specified, data will be interpreted as a 32-bit integer, and +dataSize must be 4. The result returned will be 1 if all pages in +the given memory range have read-duplication enabled, or 0 otherwise.

    • +
    • CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION: If this +attribute is specified, data will be interpreted as a 32-bit +integer, and dataSize must be 4. The result returned will be a GPU +device id if all pages in the memory range have that GPU as their +preferred location, or it will be CU_DEVICE_CPU if all pages in the +memory range have the CPU as their preferred location, or it will be +CU_DEVICE_INVALID if either all the pages don’t have the same +preferred location or some of the pages don’t have a preferred +location at all. Note that the actual location of the pages in the +memory range at the time of the query may be different from the +preferred location.

    • +
    • CU_MEM_RANGE_ATTRIBUTE_ACCESSED_BY: If this attribute is +specified, data will be interpreted as an array of 32-bit integers, +and dataSize must be a non-zero multiple of 4. The result returned +will be a list of device ids that had +CU_MEM_ADVISE_SET_ACCESSED_BY set for that entire memory +range. If any device does not have that advice set for the entire +memory range, that device will not be included. If data is larger +than the number of devices that have that advice set for that memory +range, CU_DEVICE_INVALID will be returned in all the extra space +provided. For ex., if dataSize is 12 (i.e. data has 3 elements) +and only device 0 has the advice set, then the result returned will +be { 0, CU_DEVICE_INVALID, CU_DEVICE_INVALID }. If data is smaller +than the number of devices that have that advice set, then only as +many devices will be returned as can fit in the array. There is no +guarantee on which specific devices will be returned, however.

    • +
    • CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION: If this +attribute is specified, data will be interpreted as a 32-bit +integer, and dataSize must be 4. The result returned will be the +last location to which all pages in the memory range were prefetched +explicitly via cuMemPrefetchAsync. This will either be a +GPU id or CU_DEVICE_CPU depending on whether the last location for +prefetch was a GPU or the CPU respectively. If any page in the memory +range was never explicitly prefetched or if all pages were not +prefetched to the same location, CU_DEVICE_INVALID will be returned. +Note that this simply returns the last location that the application +requested to prefetch the memory range to. It gives no indication as +to whether the prefetch operation to that location has completed or +even begun.

    • +
    • CU_MEM_RANGE_ATTRIBUTE_PREFERRED_LOCATION_TYPE: If this +attribute is specified, data will be interpreted as a +CUmemLocationType, and dataSize must be +sizeof(CUmemLocationType). The CUmemLocationType returned +will be CU_MEM_LOCATION_TYPE_DEVICE if all pages in the +memory range have the same GPU as their preferred location, or +CUmemLocationType will be +CU_MEM_LOCATION_TYPE_HOST if all pages in the memory +range have the CPU as their preferred location, or it will be +CU_MEM_LOCATION_TYPE_HOST_NUMA if all the pages in the +memory range have the same host NUMA node ID as their preferred +location or it will be CU_MEM_LOCATION_TYPE_INVALID if +either all the pages don’t have the same preferred location or some +of the pages don’t have a preferred location at all. Note that the +actual location type of the pages in the memory range at the time of +the query may be different from the preferred location type.

      + +
    • +
    • CU_MEM_RANGE_ATTRIBUTE_LAST_PREFETCH_LOCATION_TYPE: If +this attribute is specified, data will be interpreted as a +CUmemLocationType, and dataSize must be +sizeof(CUmemLocationType). The result returned will be the last +location to which all pages in the memory range were prefetched +explicitly via cuMemPrefetchAsync. The +CUmemLocationType returned will be +CU_MEM_LOCATION_TYPE_DEVICE if the last prefetch location +was a GPU or CU_MEM_LOCATION_TYPE_HOST if it was the CPU +or CU_MEM_LOCATION_TYPE_HOST_NUMA if the last prefetch +location was a specific host NUMA node. If any page in the memory +range was never explicitly prefetched or if all pages were not +prefetched to the same location, CUmemLocationType will +be CU_MEM_LOCATION_TYPE_INVALID. Note that this simply +returns the last location type that the application requested to +prefetch the memory range to. It gives no indication as to whether +the prefetch operation to that location has completed or even begun.

      + +
    • +
    +
    +
    Parameters:
    +
      +
    • dataSize (size_t) – Array containing the size of data

    • +
    • attribute (CUmem_range_attribute) – The attribute to query

    • +
    • devPtr (CUdeviceptr) – Start of the range to query

    • +
    • count (size_t) – Size of the range to query

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuMemRangeGetAttributes(dataSizes: Tuple[int] | List[int], attributes: Optional[Tuple[CUmem_range_attribute] | List[CUmem_range_attribute]], size_t numAttributes, devPtr, size_t count)
    +

    Query attributes of a given memory range.

    +

    Query attributes of the memory range starting at devPtr with a size +of count bytes. The memory range must refer to managed memory +allocated via cuMemAllocManaged or declared via managed +variables. The attributes array will be interpreted to have +numAttributes entries. The dataSizes array will also be interpreted +to have numAttributes entries. The results of the query will be +stored in data.

    +

    The list of supported attributes are given below. Please refer to +cuMemRangeGetAttribute for attribute descriptions and +restrictions.

    + +
    +
    Parameters:
    +
      +
    • dataSizes (List[int]) – Array containing the sizes of each result

    • +
    • attributes (List[CUmem_range_attribute]) – An array of attributes to query (numAttributes and the number of +attributes in this array should match)

    • +
    • numAttributes (size_t) – Number of attributes to query

    • +
    • devPtr (CUdeviceptr) – Start of the range to query

    • +
    • count (size_t) – Size of the range to query

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuPointerSetAttribute(value, attribute: CUpointer_attribute, ptr)
    +

    Set attributes on a previously allocated memory region.

    +

    The supported attributes are:

    +
      +
    • CU_POINTER_ATTRIBUTE_SYNC_MEMOPS:

    • +
    • A boolean attribute that can either be set (1) or unset (0). When +set, the region of memory that ptr points to is guaranteed to +always synchronize memory operations that are synchronous. If there +are some previously initiated synchronous memory operations that are +pending when this attribute is set, the function does not return +until those memory operations are complete. See further documentation +in the section titled “API synchronization behavior” to learn more +about cases when synchronous memory operations can exhibit +asynchronous behavior. value will be considered as a pointer to an +unsigned integer to which this attribute is to be set.

    • +
    +
    +
    Parameters:
    +
      +
    • value (Any) – Pointer to memory containing the value to be set

    • +
    • attribute (CUpointer_attribute) – Pointer attribute to set

    • +
    • ptr (CUdeviceptr) – Pointer to a memory region allocated using CUDA memory allocation +APIs

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuPointerGetAttributes(unsigned int numAttributes, attributes: Optional[Tuple[CUpointer_attribute] | List[CUpointer_attribute]], ptr)
    +

    Returns information about a pointer.

    +

    The supported attributes are (refer to +cuPointerGetAttribute for attribute descriptions and +restrictions):

    + +

    Unlike cuPointerGetAttribute, this function will not return +an error when the ptr encountered is not a valid CUDA pointer. +Instead, the attributes are assigned default NULL values and +CUDA_SUCCESS is returned.

    +

    If ptr was not allocated by, mapped by, or registered with a +CUcontext which uses UVA (Unified Virtual Addressing), +CUDA_ERROR_INVALID_CONTEXT is returned.

    +
    +
    Parameters:
    +
      +
    • numAttributes (unsigned int) – Number of attributes to query

    • +
    • attributes (List[CUpointer_attribute]) – An array of attributes to query (numAttributes and the number of +attributes in this array should match)

    • +
    • ptr (CUdeviceptr) – Pointer to query

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Stream Management

    +

    This section describes the stream management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuStreamCreate(unsigned int Flags)
    +

    Create a stream.

    +

    Creates a stream and returns a handle in phStream. The Flags +argument determines behaviors of the stream.

    +

    Valid values for Flags are:

    +
      +
    • CU_STREAM_DEFAULT: Default stream creation flag.

    • +
    • CU_STREAM_NON_BLOCKING: Specifies that work running in +the created stream may run concurrently with work in stream 0 (the +NULL stream), and that the created stream should perform no implicit +synchronization with stream 0.

    • +
    +
    +
    Parameters:
    +

    Flags (unsigned int) – Parameters for stream creation

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamCreateWithPriority(unsigned int flags, int priority)
    +

    Create a stream with the given priority.

    +

    Creates a stream with the specified priority and returns a handle in +phStream. This affects the scheduling priority of work in the stream. +Priorities provide a hint to preferentially run work with higher +priority when possible, but do not preempt already-running work or +provide any other functional guarantee on execution order.

    +

    priority follows a convention where lower numbers represent higher +priorities. ‘0’ represents default priority. The range of meaningful +numerical priorities can be queried using +cuCtxGetStreamPriorityRange. If the specified priority is +outside the numerical range returned by +cuCtxGetStreamPriorityRange, it will automatically be +clamped to the lowest or the highest number in the range.

    +
    +
    Parameters:
    +
      +
    • flags (unsigned int) – Flags for stream creation. See cuStreamCreate for a +list of valid flags

    • +
    • priority (int) – Stream priority. Lower numbers represent higher priorities. See +cuCtxGetStreamPriorityRange for more information about +meaningful stream priorities that can be passed.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Stream priorities are supported only on GPUs with compute capability 3.5 or higher.

    +

    In the current implementation, only compute kernels launched in priority streams are affected by the stream’s priority. Stream priorities have no effect on host-to-device and device-to-host memory operations.

    +
    + +
    +
    +cuda.bindings.driver.cuStreamGetPriority(hStream)
    +

    Query the priority of a given stream.

    +

    Query the priority of a stream created using +cuStreamCreate, cuStreamCreateWithPriority or +cuGreenCtxStreamCreate and return the priority in +priority. Note that if the stream was created with a priority outside +the numerical range returned by +cuCtxGetStreamPriorityRange, this function returns the +clamped priority. See cuStreamCreateWithPriority for +details about priority clamping.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamGetFlags(hStream)
    +

    Query the flags of a given stream.

    +

    Query the flags of a stream created using cuStreamCreate, +cuStreamCreateWithPriority or +cuGreenCtxStreamCreate and return the flags in flags.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamGetId(hStream)
    +

    Returns the unique Id associated with the stream handle supplied.

    +

    Returns in streamId the unique Id which is associated with the given +stream handle. The Id is unique for the life of the program.

    +

    The stream handle hStream can refer to any of the following:

    + +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamGetCtx(hStream)
    +

    Query the context associated with a stream.

    +

    Returns the CUDA context that the stream is associated with.

    +

    Note there is a later version of this API, +cuStreamGetCtx_v2. It will supplant this version in CUDA +13.0. It is recommended to use cuStreamGetCtx_v2 till then +as this version will return CUDA_ERROR_NOT_SUPPORTED for +streams created via the API cuGreenCtxStreamCreate.

    +

    The stream handle hStream can refer to any of the following:

    + +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamGetCtx_v2(hStream)
    +

    Query the contexts associated with a stream.

    +

    Returns the contexts that the stream is associated with.

    +

    If the stream is associated with a green context, the API returns the +green context in pGreenCtx and the primary context of the associated +device in pCtx.

    +

    If the stream is associated with a regular context, the API returns the +regular context in pCtx and NULL in pGreenCtx.

    +

    The stream handle hStream can refer to any of the following:

    + +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamWaitEvent(hStream, hEvent, unsigned int Flags)
    +

    Make a compute stream wait on an event.

    +

    Makes all future work submitted to hStream wait for all work captured +in hEvent. See cuEventRecord() for details on what is +captured by an event. The synchronization will be performed efficiently +on the device when applicable. hEvent may be from a different context +or device than hStream.

    +

    flags include:

    +
      +
    • CU_EVENT_WAIT_DEFAULT: Default event creation flag.

    • +
    • CU_EVENT_WAIT_EXTERNAL: Event is captured in the graph as +an external event node when performing stream capture. This flag is +invalid outside of stream capture.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamAddCallback(hStream, callback, userData, unsigned int flags)
    +

    Add a callback to a compute stream.

    +

    Adds a callback to be called on the host after all currently enqueued +items in the stream have completed. For each cuStreamAddCallback call, +the callback will be executed exactly once. The callback will block +later work in the stream until it is finished.

    +

    The callback may be passed CUDA_SUCCESS or an error code. +In the event of a device error, all subsequently executed callbacks +will receive an appropriate CUresult.

    +

    Callbacks must not make any CUDA API calls. Attempting to use a CUDA +API will result in CUDA_ERROR_NOT_PERMITTED. Callbacks must +not perform any synchronization that may depend on outstanding device +work or other callbacks that are not mandated to run earlier. Callbacks +without a mandated order (in independent streams) execute in undefined +order and may be serialized.

    +

    For the purposes of Unified Memory, callback execution makes a number +of guarantees:

    +
      +
    • The callback stream is considered idle for the duration of the +callback. Thus, for example, a callback may always use memory +attached to the callback stream.

    • +
    • The start of execution of a callback has the same effect as +synchronizing an event recorded in the same stream immediately prior +to the callback. It thus synchronizes streams which have been +“joined” prior to the callback.

    • +
    • Adding device work to any stream does not have the effect of making +the stream active until all preceding host functions and stream +callbacks have executed. Thus, for example, a callback might use +global attached memory even if work has been added to another stream, +if the work has been ordered behind the callback with an event.

    • +
    • Completion of a callback does not cause a stream to become active +except as described above. The callback stream will remain idle if no +device work follows the callback, and will remain idle across +consecutive callbacks without device work in between. Thus, for +example, stream synchronization can be done by signaling from a +callback at the end of the stream.

    • +
    +
    +
    Parameters:
    +
      +
    • hStream (CUstream or cudaStream_t) – Stream to add callback to

    • +
    • callback (CUstreamCallback) – The function to call once preceding stream operations are complete

    • +
    • userData (Any) – User specified data to be passed to the callback function

    • +
    • flags (unsigned int) – Reserved for future use, must be 0

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    This function is slated for eventual deprecation and removal. If you do not require the callback to execute in case of a device error, consider using cuLaunchHostFunc. Additionally, this function is not supported with cuStreamBeginCapture and cuStreamEndCapture, unlike cuLaunchHostFunc.

    +
    + +
    +
    +cuda.bindings.driver.cuStreamBeginCapture(hStream, mode: CUstreamCaptureMode)
    +

    Begins graph capture on a stream.

    +

    Begin graph capture on hStream. When a stream is in capture mode, all +operations pushed into the stream will not be executed, but will +instead be captured into a graph, which will be returned via +cuStreamEndCapture. Capture may not be initiated if +stream is CU_STREAM_LEGACY. Capture must be ended on the same stream +in which it was initiated, and it may only be initiated if the stream +is not already in capture mode. The capture mode may be queried via +cuStreamIsCapturing. A unique id representing the capture +sequence may be queried via cuStreamGetCaptureInfo.

    +

    If mode is not CU_STREAM_CAPTURE_MODE_RELAXED, +cuStreamEndCapture must be called on this stream from the +same thread.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.

    +
    + +
    +
    +cuda.bindings.driver.cuStreamBeginCaptureToGraph(hStream, hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], dependencyData: Optional[Tuple[CUgraphEdgeData] | List[CUgraphEdgeData]], size_t numDependencies, mode: CUstreamCaptureMode)
    +

    Begins graph capture on a stream to an existing graph.

    +

    Begin graph capture on hStream, placing new nodes into an existing +graph. When a stream is in capture mode, all operations pushed into the +stream will not be executed, but will instead be captured into +hGraph. The graph will not be instantiable until the user calls +cuStreamEndCapture.

    +

    Capture may not be initiated if stream is CU_STREAM_LEGACY. Capture +must be ended on the same stream in which it was initiated, and it may +only be initiated if the stream is not already in capture mode. The +capture mode may be queried via cuStreamIsCapturing. A +unique id representing the capture sequence may be queried via +cuStreamGetCaptureInfo.

    +

    If mode is not CU_STREAM_CAPTURE_MODE_RELAXED, +cuStreamEndCapture must be called on this stream from the +same thread.

    +
    +
    Parameters:
    +
      +
    • hStream (CUstream or cudaStream_t) – Stream in which to initiate capture.

    • +
    • hGraph (CUgraph or cudaGraph_t) – Graph to capture into.

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the first node captured in the stream. Can be NULL +if numDependencies is 0.

    • +
    • dependencyData (List[CUgraphEdgeData]) – Optional array of data associated with each dependency.

    • +
    • numDependencies (size_t) – Number of dependencies.

    • +
    • mode (CUstreamCaptureMode) – Controls the interaction of this capture sequence with other API +calls that are potentially unsafe. For more details see +cuThreadExchangeStreamCaptureMode.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.

    +
    + +
    +
    +cuda.bindings.driver.cuThreadExchangeStreamCaptureMode(mode: CUstreamCaptureMode)
    +

    Swaps the stream capture interaction mode for a thread.

    +

    Sets the calling thread’s stream capture interaction mode to the value +contained in *mode, and overwrites *mode with the previous mode for +the thread. To facilitate deterministic behavior across function or +module boundaries, callers are encouraged to use this API in a push-pop +fashion:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    During stream capture (see cuStreamBeginCapture), some +actions, such as a call to cudaMalloc, may be unsafe. In +the case of cudaMalloc, the operation is not enqueued +asynchronously to a stream, and is not observed by stream capture. +Therefore, if the sequence of operations captured via +cuStreamBeginCapture depended on the allocation being +replayed whenever the graph is launched, the captured graph would be +invalid.

    +

    Therefore, stream capture places restrictions on API calls that can be +made within or concurrently to a +cuStreamBeginCapture-cuStreamEndCapture +sequence. This behavior can be controlled via this API and flags to +cuStreamBeginCapture.

    +

    A thread’s mode is one of the following:

    +
      +
    • CU_STREAM_CAPTURE_MODE_GLOBAL: This is the default mode. If the +local thread has an ongoing capture sequence that was not initiated +with CU_STREAM_CAPTURE_MODE_RELAXED at cuStreamBeginCapture, or +if any other thread has a concurrent capture sequence initiated with +CU_STREAM_CAPTURE_MODE_GLOBAL, this thread is prohibited from +potentially unsafe API calls.

    • +
    • CU_STREAM_CAPTURE_MODE_THREAD_LOCAL: If the local thread has an +ongoing capture sequence not initiated with +CU_STREAM_CAPTURE_MODE_RELAXED, it is prohibited from potentially +unsafe API calls. Concurrent capture sequences in other threads are +ignored.

    • +
    • CU_STREAM_CAPTURE_MODE_RELAXED: The local thread is not prohibited +from potentially unsafe API calls. Note that the thread is still +prohibited from API calls which necessarily conflict with stream +capture, for example, attempting cuEventQuery on an event +that was last recorded inside a capture sequence.

    • +
    +
    +
    Parameters:
    +

    mode (CUstreamCaptureMode) – Pointer to mode value to swap with the current mode

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuStreamBeginCapture

    +
    +
    + +
    +
    +cuda.bindings.driver.cuStreamEndCapture(hStream)
    +

    Ends capture on a stream, returning the captured graph.

    +

    End capture on hStream, returning the captured graph via phGraph. +Capture must have been initiated on hStream via a call to +cuStreamBeginCapture. If capture was invalidated, due to a +violation of the rules of stream capture, then a NULL graph will be +returned.

    +

    If the mode argument to cuStreamBeginCapture was not +CU_STREAM_CAPTURE_MODE_RELAXED, this call must be from the +same thread as cuStreamBeginCapture.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Stream to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamIsCapturing(hStream)
    +

    Returns a stream’s capture status.

    +

    Return the capture status of hStream via captureStatus. After a +successful call, *captureStatus will contain one of the following:

    + +

    Note that, if this is called on CU_STREAM_LEGACY (the “null +stream”) while a blocking stream in the same context is capturing, it +will return CUDA_ERROR_STREAM_CAPTURE_IMPLICIT and +*captureStatus is unspecified after the call. The blocking stream +capture is not invalidated.

    +

    When a blocking stream is capturing, the legacy stream is in an +unusable state until the blocking stream capture is terminated. The +legacy stream is not supported for stream capture, but attempted use +would have an implicit dependency on the capturing stream(s).

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Stream to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamGetCaptureInfo(hStream)
    +

    Query a stream’s capture state.

    +

    Query stream state related to stream capture.

    +

    If called on CU_STREAM_LEGACY (the “null stream”) while a +stream not created with CU_STREAM_NON_BLOCKING is +capturing, returns CUDA_ERROR_STREAM_CAPTURE_IMPLICIT.

    +

    Valid data (other than capture status) is returned only if both of the +following are true:

    + +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – The stream to query

    +
    +
    Returns:
    +

      +
    • CUresultCUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_STREAM_CAPTURE_IMPLICIT

    • +
    • captureStatus_out (CUstreamCaptureStatus) – Location to return the capture status of the stream; required

    • +
    • id_out (cuuint64_t) – Optional location to return an id for the capture sequence, which +is unique over the lifetime of the process

    • +
    • graph_out (CUgraph) – Optional location to return the graph being captured into. All +operations other than destroy and node removal are permitted on the +graph while the capture sequence is in progress. This API does not +transfer ownership of the graph, which is transferred or destroyed +at cuStreamEndCapture. Note that the graph handle may +be invalidated before end of capture for certain errors. Nodes that +are or become unreachable from the original stream at +cuStreamEndCapture due to direct actions on the graph +do not trigger CUDA_ERROR_STREAM_CAPTURE_UNJOINED.

    • +
    • dependencies_out (List[CUgraphNode]) – Optional location to store a pointer to an array of nodes. The next +node to be captured in the stream will depend on this set of nodes, +absent operations such as event wait which modify this set. The +array pointer is valid until the next API call which operates on +the stream or until the capture is terminated. The node handles may +be copied out and are valid until they or the graph is destroyed. +The driver-owned array may also be passed directly to APIs that +operate on the graph (not the stream) without copying.

    • +
    • numDependencies_out (int) – Optional location to store the size of the array returned in +dependencies_out.

    • +
    +

    +
    +
    +
    +

    See also

    +
    +
    cuStreamGetCaptureInfo_v3

    py:obj:~.cuStreamBeginCapture, cuStreamIsCapturing, cuStreamUpdateCaptureDependencies

    +
    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuStreamGetCaptureInfo_v3(hStream)
    +

    Query a stream’s capture state (12.3+)

    +

    Query stream state related to stream capture.

    +

    If called on CU_STREAM_LEGACY (the “null stream”) while a +stream not created with CU_STREAM_NON_BLOCKING is +capturing, returns CUDA_ERROR_STREAM_CAPTURE_IMPLICIT.

    +

    Valid data (other than capture status) is returned only if both of the +following are true:

    + +

    If edgeData_out is non-NULL then dependencies_out must be as well. +If dependencies_out is non-NULL and edgeData_out is NULL, but there +is non-zero edge data for one or more of the current stream +dependencies, the call will return CUDA_ERROR_LOSSY_QUERY.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – The stream to query

    +
    +
    Returns:
    +

      +
    • CUresultCUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_STREAM_CAPTURE_IMPLICIT, CUDA_ERROR_LOSSY_QUERY

    • +
    • captureStatus_out (CUstreamCaptureStatus) – Location to return the capture status of the stream; required

    • +
    • id_out (cuuint64_t) – Optional location to return an id for the capture sequence, which +is unique over the lifetime of the process

    • +
    • graph_out (CUgraph) – Optional location to return the graph being captured into. All +operations other than destroy and node removal are permitted on the +graph while the capture sequence is in progress. This API does not +transfer ownership of the graph, which is transferred or destroyed +at cuStreamEndCapture. Note that the graph handle may +be invalidated before end of capture for certain errors. Nodes that +are or become unreachable from the original stream at +cuStreamEndCapture due to direct actions on the graph +do not trigger CUDA_ERROR_STREAM_CAPTURE_UNJOINED.

    • +
    • dependencies_out (List[CUgraphNode]) – Optional location to store a pointer to an array of nodes. The next +node to be captured in the stream will depend on this set of nodes, +absent operations such as event wait which modify this set. The +array pointer is valid until the next API call which operates on +the stream or until the capture is terminated. The node handles may +be copied out and are valid until they or the graph is destroyed. +The driver-owned array may also be passed directly to APIs that +operate on the graph (not the stream) without copying.

    • +
    • edgeData_out (List[CUgraphEdgeData]) – Optional location to store a pointer to an array of graph edge +data. This array parallels dependencies_out; the next node to be +added has an edge to dependencies_out`[i] with annotation +`edgeData_out`[i] for each `i. The array pointer is valid until +the next API call which operates on the stream or until the capture +is terminated.

    • +
    • numDependencies_out (int) – Optional location to store the size of the array returned in +dependencies_out.

    • +
    +

    +
    +
    +
    +

    See also

    +
    +
    cuStreamGetCaptureInfo

    py:obj:~.cuStreamBeginCapture, cuStreamIsCapturing, cuStreamUpdateCaptureDependencies

    +
    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuStreamUpdateCaptureDependencies(hStream, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, unsigned int flags)
    +

    Update the set of dependencies in a capturing stream (11.3+)

    +

    Modifies the dependency set of a capturing stream. The dependency set +is the set of nodes that the next captured node in the stream will +depend on.

    +

    Valid flags are CU_STREAM_ADD_CAPTURE_DEPENDENCIES and +CU_STREAM_SET_CAPTURE_DEPENDENCIES. These control whether +the set passed to the API is added to the existing set or replaces it. +A flags value of 0 defaults to +CU_STREAM_ADD_CAPTURE_DEPENDENCIES.

    +

    Nodes that are removed from the dependency set via this API do not +result in CUDA_ERROR_STREAM_CAPTURE_UNJOINED if they are +unreachable from the stream at cuStreamEndCapture.

    +

    Returns CUDA_ERROR_ILLEGAL_STATE if the stream is not +capturing.

    +

    This API is new in CUDA 11.3. Developers requiring compatibility across +minor versions to CUDA 11.0 should not use this API or provide a +fallback.

    +
    +
    Parameters:
    +
      +
    • hStream (CUstream or cudaStream_t) – The stream to update

    • +
    • dependencies (List[CUgraphNode]) – The set of dependencies to add

    • +
    • numDependencies (size_t) – The size of the dependencies array

    • +
    • flags (unsigned int) – See above

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_ILLEGAL_STATE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamUpdateCaptureDependencies_v2(hStream, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], dependencyData: Optional[Tuple[CUgraphEdgeData] | List[CUgraphEdgeData]], size_t numDependencies, unsigned int flags)
    +

    Update the set of dependencies in a capturing stream (12.3+)

    +

    Modifies the dependency set of a capturing stream. The dependency set +is the set of nodes that the next captured node in the stream will +depend on along with the edge data for those dependencies.

    +

    Valid flags are CU_STREAM_ADD_CAPTURE_DEPENDENCIES and +CU_STREAM_SET_CAPTURE_DEPENDENCIES. These control whether +the set passed to the API is added to the existing set or replaces it. +A flags value of 0 defaults to +CU_STREAM_ADD_CAPTURE_DEPENDENCIES.

    +

    Nodes that are removed from the dependency set via this API do not +result in CUDA_ERROR_STREAM_CAPTURE_UNJOINED if they are +unreachable from the stream at cuStreamEndCapture.

    +

    Returns CUDA_ERROR_ILLEGAL_STATE if the stream is not +capturing.

    +
    +
    Parameters:
    +
      +
    • hStream (CUstream or cudaStream_t) – The stream to update

    • +
    • dependencies (List[CUgraphNode]) – The set of dependencies to add

    • +
    • dependencyData (List[CUgraphEdgeData]) – Optional array of data associated with each dependency.

    • +
    • numDependencies (size_t) – The size of the dependencies array

    • +
    • flags (unsigned int) – See above

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_ILLEGAL_STATE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamAttachMemAsync(hStream, dptr, size_t length, unsigned int flags)
    +

    Attach memory to a stream asynchronously.

    +

    Enqueues an operation in hStream to specify stream association of +length bytes of memory starting from dptr. This function is a +stream-ordered operation, meaning that it is dependent on, and will +only take effect when, previous work in stream has completed. Any +previous association is automatically replaced.

    +

    dptr must point to one of the following types of memories:

    +
      +
    • managed memory declared using the managed keyword or allocated with +cuMemAllocManaged.

    • +
    • a valid host-accessible region of system-allocated pageable memory. +This type of memory may only be specified if the device associated +with the stream reports a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_PAGEABLE_MEMORY_ACCESS.

    • +
    +

    For managed allocations, length must be either zero or the entire +allocation’s size. Both indicate that the entire allocation’s stream +association is being changed. Currently, it is not possible to change +stream association for a portion of a managed allocation.

    +

    For pageable host allocations, length must be non-zero.

    +

    The stream association is specified using flags which must be one of +CUmemAttach_flags. If the CU_MEM_ATTACH_GLOBAL +flag is specified, the memory can be accessed by any stream on any +device. If the CU_MEM_ATTACH_HOST flag is specified, the +program makes a guarantee that it won’t access the memory on the device +from any stream on a device that has a zero value for the device +attribute CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If +the CU_MEM_ATTACH_SINGLE flag is specified and hStream is +associated with a device that has a zero value for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS, the program +makes a guarantee that it will only access the memory on the device +from hStream. It is illegal to attach singly to the NULL stream, +because the NULL stream is a virtual global stream and not a specific +stream. An error will be returned in this case.

    +

    When memory is associated with a single stream, the Unified Memory +system will allow CPU access to this memory region so long as all +operations in hStream have completed, regardless of whether other +streams are active. In effect, this constrains exclusive ownership of +the managed memory region by an active GPU to per-stream activity +instead of whole-GPU activity.

    +

    Accessing memory on the device from streams that are not associated +with it will produce undefined results. No error checking is performed +by the Unified Memory system to ensure that kernels launched into other +streams do not access this region.

    +

    It is a program’s responsibility to order calls to +cuStreamAttachMemAsync via events, synchronization or other +means to ensure legal access to memory at all times. Data visibility +and coherency will be changed appropriately for all kernels which +follow a stream-association change.

    +

    If hStream is destroyed while data is associated with it, the +association is removed and the association reverts to the default +visibility of the allocation as specified at +cuMemAllocManaged. For managed variables, the default +association is always CU_MEM_ATTACH_GLOBAL. Note that +destroying a stream is an asynchronous operation, and as a result, the +change to default association won’t happen until all work in the stream +has completed.

    +
    +
    Parameters:
    +
      +
    • hStream (CUstream or cudaStream_t) – Stream in which to enqueue the attach operation

    • +
    • dptr (CUdeviceptr) – Pointer to memory (must be a pointer to managed memory or to a +valid host-accessible region of system-allocated pageable memory)

    • +
    • length (size_t) – Length of memory

    • +
    • flags (unsigned int) – Must be one of CUmemAttach_flags

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamQuery(hStream)
    +

    Determine status of a compute stream.

    +

    Returns CUDA_SUCCESS if all operations in the stream +specified by hStream have completed, or +CUDA_ERROR_NOT_READY if not.

    +

    For the purposes of Unified Memory, a return value of +CUDA_SUCCESS is equivalent to having called +cuStreamSynchronize().

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Stream to query status of

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_NOT_READY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamSynchronize(hStream)
    +

    Wait until a stream’s tasks are completed.

    +
    +

    Waits until the device has completed all operations in the stream +specified by hStream. If the context was created with the +CU_CTX_SCHED_BLOCKING_SYNC flag, the CPU thread will block +until the stream is finished with all of its tasks.

    +
    +

    ote_null_stream

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuStreamDestroy(hStream)
    +

    Destroys a stream.

    +

    Destroys the stream specified by hStream.

    +

    In case the device is still doing work in the stream hStream when +cuStreamDestroy() is called, the function will return +immediately and the resources associated with hStream will be +released automatically once the device has completed all work in +hStream.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Stream to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamCopyAttributes(dst, src)
    +

    Copies attributes from source stream to destination stream.

    +

    Copies attributes from source stream src to destination stream dst. +Both streams must have the same context.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    CUaccessPolicyWindow

    +
    +
    + +
    +
    +cuda.bindings.driver.cuStreamGetAttribute(hStream, attr: CUstreamAttrID)
    +

    Queries stream attribute.

    +

    Queries attribute attr from hStream and stores it in corresponding +member of value_out.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    CUaccessPolicyWindow

    +
    +
    + +
    +
    +cuda.bindings.driver.cuStreamSetAttribute(hStream, attr: CUstreamAttrID, CUstreamAttrValue value: Optional[CUstreamAttrValue])
    +

    Sets stream attribute.

    +

    Sets attribute attr on hStream from corresponding attribute of +value. The updated attribute will be applied to subsequent work +submitted to the stream. It will not affect previously submitted work.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    CUaccessPolicyWindow

    +
    +
    + +
    +
    +

    Event Management

    +

    This section describes the event management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuEventCreate(unsigned int Flags)
    +

    Creates an event.

    +

    Creates an event *phEvent for the current context with the flags +specified via Flags. Valid flags include:

    + +
    +
    Parameters:
    +

    Flags (unsigned int) – Event creation flags

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEventRecord(hEvent, hStream)
    +

    Records an event.

    +

    Captures in hEvent the contents of hStream at the time of this +call. hEvent and hStream must be from the same context otherwise +CUDA_ERROR_INVALID_HANDLE is returned. Calls such as +cuEventQuery() or cuStreamWaitEvent() will then +examine or wait for completion of the work that was captured. Uses of +hStream after this call do not modify hEvent. See note on default +stream behavior for what is captured in the default case.

    +

    cuEventRecord() can be called multiple times on the same +event and will overwrite the previously captured state. Other APIs such +as cuStreamWaitEvent() use the most recently captured state +at the time of the API call, and are not affected by later calls to +cuEventRecord(). Before the first call to +cuEventRecord(), an event represents an empty set of work, +so for example cuEventQuery() would return +CUDA_SUCCESS.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEventRecordWithFlags(hEvent, hStream, unsigned int flags)
    +

    Records an event.

    +

    Captures in hEvent the contents of hStream at the time of this +call. hEvent and hStream must be from the same context otherwise +CUDA_ERROR_INVALID_HANDLE is returned. Calls such as +cuEventQuery() or cuStreamWaitEvent() will then +examine or wait for completion of the work that was captured. Uses of +hStream after this call do not modify hEvent. See note on default +stream behavior for what is captured in the default case.

    +

    cuEventRecordWithFlags() can be called multiple times on +the same event and will overwrite the previously captured state. Other +APIs such as cuStreamWaitEvent() use the most recently +captured state at the time of the API call, and are not affected by +later calls to cuEventRecordWithFlags(). Before the first +call to cuEventRecordWithFlags(), an event represents an +empty set of work, so for example cuEventQuery() would +return CUDA_SUCCESS.

    +

    flags include:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEventQuery(hEvent)
    +

    Queries an event’s status.

    +

    Queries the status of all work currently captured by hEvent. See +cuEventRecord() for details on what is captured by an +event.

    +

    Returns CUDA_SUCCESS if all captured work has been +completed, or CUDA_ERROR_NOT_READY if any captured work is +incomplete.

    +

    For the purposes of Unified Memory, a return value of +CUDA_SUCCESS is equivalent to having called +cuEventSynchronize().

    +
    +
    Parameters:
    +

    hEvent (CUevent or cudaEvent_t) – Event to query

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_READY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEventSynchronize(hEvent)
    +

    Waits for an event to complete.

    +

    Waits until the completion of all work currently captured in hEvent. +See cuEventRecord() for details on what is captured by an +event.

    +

    Waiting for an event that was created with the +CU_EVENT_BLOCKING_SYNC flag will cause the calling CPU +thread to block until the event has been completed by the device. If +the CU_EVENT_BLOCKING_SYNC flag has not been set, then the +CPU thread will busy-wait until the event has been completed by the +device.

    +
    +
    Parameters:
    +

    hEvent (CUevent or cudaEvent_t) – Event to wait for

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEventDestroy(hEvent)
    +

    Destroys an event.

    +

    Destroys the event specified by hEvent.

    +

    An event may be destroyed before it is complete (i.e., while +cuEventQuery() would return +CUDA_ERROR_NOT_READY). In this case, the call does not +block on completion of the event, and any associated resources will +automatically be released asynchronously at completion.

    +
    +
    Parameters:
    +

    hEvent (CUevent or cudaEvent_t) – Event to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEventElapsedTime(hStart, hEnd)
    +

    Computes the elapsed time between two events.

    +

    Computes the elapsed time between two events (in milliseconds with a +resolution of around 0.5 microseconds).

    +

    If either event was last recorded in a non-NULL stream, the resulting +time may be greater than expected (even if both used the same stream +handle). This happens because the cuEventRecord() operation +takes place asynchronously and there is no guarantee that the measured +latency is actually just between the two events. Any number of other +different stream operations could execute in between the two measured +events, thus altering the timing in a significant way.

    +

    If cuEventRecord() has not been called on either event then +CUDA_ERROR_INVALID_HANDLE is returned. If +cuEventRecord() has been called on both events but one or +both of them has not yet been completed (that is, +cuEventQuery() would return +CUDA_ERROR_NOT_READY on at least one of the events), +CUDA_ERROR_NOT_READY is returned. If either event was +created with the CU_EVENT_DISABLE_TIMING flag, then this +function will return CUDA_ERROR_INVALID_HANDLE.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    External Resource Interoperability

    +

    This section describes the external resource interoperability functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuImportExternalMemory(CUDA_EXTERNAL_MEMORY_HANDLE_DESC memHandleDesc: Optional[CUDA_EXTERNAL_MEMORY_HANDLE_DESC])
    +

    Imports an external memory object.

    +

    Imports an externally allocated memory object and returns a handle to +that in extMem_out.

    +

    The properties of the handle being imported must be described in +memHandleDesc. The CUDA_EXTERNAL_MEMORY_HANDLE_DESC +structure is defined as follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where type specifies the +type of handle being imported. CUexternalMemoryHandleType +is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD, then +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::fd must be a +valid file descriptor referencing a memory object. Ownership of the +file descriptor is transferred to the CUDA driver when the handle is +imported successfully. Performing any operations on the file descriptor +after it is imported results in undefined behavior.

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32, then exactly +one of +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle and +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name must +not be NULL. If +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that +references a memory object. Ownership of this handle is not transferred +to CUDA after the import operation, so the application must release the +handle using the appropriate system call. If +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name is +not NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a memory object.

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_WIN32_KMT, then +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle +must be non-NULL and +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name must +be NULL. The handle specified must be a globally shared KMT handle. +This handle does not hold a reference to the underlying object, and +thus will be invalid when all references to the memory object are +destroyed.

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP, then exactly one +of CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle +and CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name +must not be NULL. If +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that is +returned by ID3D12Device::CreateSharedHandle when referring to a +ID3D12Heap object. This handle holds a reference to the underlying +object. If +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name is +not NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a ID3D12Heap object.

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE, then exactly +one of +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle and +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name must +not be NULL. If +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that is +returned by ID3D12Device::CreateSharedHandle when referring to a +ID3D12Resource object. This handle holds a reference to the underlying +object. If +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name is +not NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a ID3D12Resource object.

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE, then +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle +must represent a valid shared NT handle that is returned by +IDXGIResource1::CreateSharedHandle when referring to a ID3D11Resource +object. If +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name is +not NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a ID3D11Resource object.

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT, then +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::handle +must represent a valid shared KMT handle that is returned by +IDXGIResource::GetSharedHandle when referring to a ID3D11Resource +object and +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::win32::name must +be NULL.

    +

    If type is +CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF, then +CUDA_EXTERNAL_MEMORY_HANDLE_DESC::handle::nvSciBufObject +must be non-NULL and reference a valid NvSciBuf object. If the NvSciBuf +object imported into CUDA is also mapped by other drivers, then the +application must use cuWaitExternalSemaphoresAsync or +cuSignalExternalSemaphoresAsync as appropriate barriers to +maintain coherence between CUDA and the other drivers. See +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC and +CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC for +memory synchronization.

    +

    The size of the memory object must be specified in +size.

    +

    Specifying the flag CUDA_EXTERNAL_MEMORY_DEDICATED in +flags indicates that the +resource is a dedicated resource. The definition of what a dedicated +resource is outside the scope of this extension. This flag must be set +if type is one of the +following: CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE +CU_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_RESOURCE_KMT

    +
    +
    Parameters:
    +

    memHandleDesc (CUDA_EXTERNAL_MEMORY_HANDLE_DESC) – Memory import handle descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    If the Vulkan memory imported into CUDA is mapped on the CPU then the application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges as well as appropriate Vulkan pipeline barriers to maintain coherence between CPU and GPU. For more information on these APIs, please refer to “Synchronization +and Cache Control” chapter from Vulkan specification.

    +
    + +
    +
    +cuda.bindings.driver.cuExternalMemoryGetMappedBuffer(extMem, CUDA_EXTERNAL_MEMORY_BUFFER_DESC bufferDesc: Optional[CUDA_EXTERNAL_MEMORY_BUFFER_DESC])
    +

    Maps a buffer onto an imported memory object.

    +

    Maps a buffer onto an imported memory object and returns a device +pointer in devPtr.

    +

    The properties of the buffer being mapped must be described in +bufferDesc. The CUDA_EXTERNAL_MEMORY_BUFFER_DESC +structure is defined as follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where offset is the offset +in the memory object where the buffer’s base address is. +size is the size of the +buffer. flags must be +zero.

    +

    The offset and size have to be suitably aligned to match the +requirements of the external API. Mapping two buffers whose ranges +overlap may or may not result in the same virtual address being +returned for the overlapped portion. In such cases, the application +must ensure that all accesses to that region from the GPU are volatile. +Otherwise writes made via one address are not guaranteed to be visible +via the other address, even if they’re issued by the same thread. It is +recommended that applications map the combined range instead of mapping +separate buffers and then apply the appropriate offsets to the returned +pointer to derive the individual buffers.

    +

    The returned pointer devPtr must be freed using +cuMemFree.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuExternalMemoryGetMappedMipmappedArray(extMem, CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC mipmapDesc: Optional[CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC])
    +

    Maps a CUDA mipmapped array onto an external memory object.

    +

    Maps a CUDA mipmapped array onto an external object and returns a +handle to it in mipmap.

    +

    The properties of the CUDA mipmapped array being mapped must be +described in mipmapDesc. The structure +CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC is defined as +follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where offset is +the offset in the memory object where the base level of the mipmap +chain is. +arrayDesc +describes the format, dimensions and type of the base level of the +mipmap chain. For further details on these parameters, please refer to +the documentation for cuMipmappedArrayCreate. Note that if +the mipmapped array is bound as a color target in the graphics API, +then the flag CUDA_ARRAY3D_COLOR_ATTACHMENT must be +specified in +CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC::arrayDesc::Flags. +numLevels +specifies the total number of levels in the mipmap chain.

    +

    If extMem was imported from a handle of type +CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF, then +numLevels must be +equal to 1.

    +

    The returned CUDA mipmapped array must be freed using +cuMipmappedArrayDestroy.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDestroyExternalMemory(extMem)
    +

    Destroys an external memory object.

    +

    Destroys the specified external memory object. Any existing buffers and +CUDA mipmapped arrays mapped onto this object must no longer be used +and must be explicitly freed using cuMemFree and +cuMipmappedArrayDestroy respectively.

    +
    +
    Parameters:
    +

    extMem (CUexternalMemory) – External memory object to be destroyed

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuImportExternalSemaphore(CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC semHandleDesc: Optional[CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC])
    +

    Imports an external semaphore.

    +

    Imports an externally allocated synchronization object and returns a +handle to that in extSem_out.

    +

    The properties of the handle being imported must be described in +semHandleDesc. The CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC is +defined as follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where type specifies +the type of handle being imported. +CUexternalSemaphoreHandleType is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD, then +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::fd must be a +valid file descriptor referencing a synchronization object. Ownership +of the file descriptor is transferred to the CUDA driver when the +handle is imported successfully. Performing any operations on the file +descriptor after it is imported results in undefined behavior.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32, then +exactly one of +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +and +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name +must not be NULL. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +is not NULL, then it must represent a valid shared NT handle that +references a synchronization object. Ownership of this handle is not +transferred to CUDA after the import operation, so the application must +release the handle using the appropriate system call. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name is +not NULL, then it must name a valid synchronization object.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT, then +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +must be non-NULL and +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name +must be NULL. The handle specified must be a globally shared KMT +handle. This handle does not hold a reference to the underlying object, +and thus will be invalid when all references to the synchronization +object are destroyed.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE, then exactly +one of +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +and +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name +must not be NULL. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +is not NULL, then it must represent a valid shared NT handle that is +returned by ID3D12Device::CreateSharedHandle when referring to a +ID3D12Fence object. This handle holds a reference to the underlying +object. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name is +not NULL, then it must name a valid synchronization object that refers +to a valid ID3D12Fence object.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE, then +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +represents a valid shared NT handle that is returned by +ID3D11Fence::CreateSharedHandle. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name is +not NULL, then it must name a valid synchronization object that refers +to a valid ID3D11Fence object.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, then +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::nvSciSyncObj +represents a valid NvSciSyncObj.

    +

    CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX, then +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +represents a valid shared NT handle that is returned by +IDXGIResource1::CreateSharedHandle when referring to a IDXGIKeyedMutex +object. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name is +not NULL, then it must name a valid synchronization object that refers +to a valid IDXGIKeyedMutex object.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT, +then +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +represents a valid shared KMT handle that is returned by +IDXGIResource::GetSharedHandle when referring to a IDXGIKeyedMutex +object and +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name +must be NULL.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD, +then CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::fd must +be a valid file descriptor referencing a synchronization object. +Ownership of the file descriptor is transferred to the CUDA driver when +the handle is imported successfully. Performing any operations on the +file descriptor after it is imported results in undefined behavior.

    +

    If type is +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32, +then exactly one of +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +and +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name +must not be NULL. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::handle +is not NULL, then it must represent a valid shared NT handle that +references a synchronization object. Ownership of this handle is not +transferred to CUDA after the import operation, so the application must +release the handle using the appropriate system call. If +CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC::handle::win32::name is +not NULL, then it must name a valid synchronization object.

    +
    +
    Parameters:
    +

    semHandleDesc (CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC) – Semaphore import handle descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuSignalExternalSemaphoresAsync(extSemArray: Optional[Tuple[CUexternalSemaphore] | List[CUexternalSemaphore]], paramsArray: Optional[Tuple[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS] | List[CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS]], unsigned int numExtSems, stream)
    +

    Signals a set of external semaphore objects.

    +

    Enqueues a signal operation on a set of externally allocated semaphore +object in the specified stream. The operations will be executed when +all prior operations in the stream complete.

    +

    The exact semantics of signaling a semaphore depends on the type of the +object.

    +

    If the semaphore object is any one of the following types: +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT then +signaling the semaphore will set it to the signaled state.

    +

    If the semaphore object is any one of the following types: +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 +then the semaphore will be set to the value specified in +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::fence::value.

    +

    If the semaphore object is of the type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC this API sets +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence +to a value that can be used by subsequent waiters of the same NvSciSync +object to order operations with those currently submitted in stream. +Such an update will overwrite previous contents of +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence. +By default, signaling such an external semaphore object causes +appropriate memory synchronization operations to be performed over all +external memory objects that are imported as +CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. This ensures that +any subsequent accesses made by other importers of the same set of +NvSciBuf memory object(s) are coherent. These operations can be skipped +by specifying the flag +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_SKIP_NVSCIBUF_MEMSYNC, which +can be used as a performance optimization when data coherency is not +required. But specifying this flag in scenarios where data coherency is +required results in undefined behavior. Also, for semaphore object of +the type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, if +the NvSciSyncAttrList used to create the NvSciSyncObj had not set the +flags in cuDeviceGetNvSciSyncAttributes to +CUDA_NVSCISYNC_ATTR_SIGNAL, this API will return +CUDA_ERROR_NOT_SUPPORTED. NvSciSyncFence associated with semaphore +object of the type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC can be +deterministic. For this the NvSciSyncAttrList used to create the +semaphore object must have value of +NvSciSyncAttrKey_RequireDeterministicFences key set to true. +Deterministic fences allow users to enqueue a wait over the semaphore +object even before corresponding signal is enqueued. For such a +semaphore object, CUDA guarantees that each signal operation will +increment the fence value by ‘1’. Users are expected to track count of +signals enqueued on the semaphore object and insert waits accordingly. +When such a semaphore object is signaled from multiple streams, due to +concurrent stream execution, it is possible that the order in which the +semaphore gets signaled is indeterministic. This could lead to waiters +of the semaphore getting unblocked incorrectly. Users are expected to +handle such situations, either by not using the same semaphore object +with deterministic fence support enabled in different streams or by +adding explicit dependency amongst such streams so that the semaphore +is signaled in order.

    +

    If the semaphore object is any one of the following types: +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT +then the keyed mutex will be released with the key specified in +CUDA_EXTERNAL_SEMAPHORE_PARAMS::params::keyedmutex::key.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuWaitExternalSemaphoresAsync(extSemArray: Optional[Tuple[CUexternalSemaphore] | List[CUexternalSemaphore]], paramsArray: Optional[Tuple[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS] | List[CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS]], unsigned int numExtSems, stream)
    +

    Waits on a set of external semaphore objects.

    +

    Enqueues a wait operation on a set of externally allocated semaphore +object in the specified stream. The operations will be executed when +all prior operations in the stream complete.

    +

    The exact semantics of waiting on a semaphore depends on the type of +the object.

    +

    If the semaphore object is any one of the following types: +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_WIN32_KMT then +waiting on the semaphore will wait until the semaphore reaches the +signaled state. The semaphore will then be reset to the unsignaled +state. Therefore for every signal operation, there can only be one wait +operation.

    +

    If the semaphore object is any one of the following types: +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D12_FENCE, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_FENCE, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_FD, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_TIMELINE_SEMAPHORE_WIN32 +then waiting on the semaphore will wait until the value of the +semaphore is greater than or equal to +CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::fence::value.

    +

    If the semaphore object is of the type +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC then, waiting +on the semaphore will wait until the +CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS::params::nvSciSync::fence +is signaled by the signaler of the NvSciSyncObj that was associated +with this semaphore object. By default, waiting on such an external +semaphore object causes appropriate memory synchronization operations +to be performed over all external memory objects that are imported as +CU_EXTERNAL_MEMORY_HANDLE_TYPE_NVSCIBUF. This ensures that +any subsequent accesses made by other importers of the same set of +NvSciBuf memory object(s) are coherent. These operations can be skipped +by specifying the flag +CUDA_EXTERNAL_SEMAPHORE_WAIT_SKIP_NVSCIBUF_MEMSYNC, which +can be used as a performance optimization when data coherency is not +required. But specifying this flag in scenarios where data coherency is +required results in undefined behavior. Also, for semaphore object of +the type CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_NVSCISYNC, if +the NvSciSyncAttrList used to create the NvSciSyncObj had not set the +flags in cuDeviceGetNvSciSyncAttributes to +CUDA_NVSCISYNC_ATTR_WAIT, this API will return +CUDA_ERROR_NOT_SUPPORTED.

    +

    If the semaphore object is any one of the following types: +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX, +CU_EXTERNAL_SEMAPHORE_HANDLE_TYPE_D3D11_KEYED_MUTEX_KMT +then the keyed mutex will be acquired when it is released with the key +specified in +CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::keyedmutex::key +or until the timeout specified by +CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS::params::keyedmutex::timeoutMs +has lapsed. The timeout interval can either be a finite value specified +in milliseconds or an infinite value. In case an infinite value is +specified the timeout never elapses. The windows INFINITE macro must be +used to specify infinite timeout.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_NOT_SUPPORTED, CUDA_ERROR_TIMEOUT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDestroyExternalSemaphore(extSem)
    +

    Destroys an external semaphore.

    +

    Destroys an external semaphore object and releases any references to +the underlying resource. Any outstanding signals or waits must have +completed before the semaphore is destroyed.

    +
    +
    Parameters:
    +

    extSem (CUexternalSemaphore) – External semaphore to be destroyed

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +

    Stream Memory Operations

    +

    This section describes the stream memory operations of the low-level CUDA driver application programming interface.

    +

    Support for the CU_STREAM_WAIT_VALUE_NOR flag can be queried with ::CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2.

    +

    Support for the cuStreamWriteValue64() and cuStreamWaitValue64() functions, as well as for the CU_STREAM_MEM_OP_WAIT_VALUE_64 and CU_STREAM_MEM_OP_WRITE_VALUE_64 flags, can be queried with CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.

    +

    Support for both CU_STREAM_WAIT_VALUE_FLUSH and CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES requires dedicated platform hardware features and can be queried with cuDeviceGetAttribute() and CU_DEVICE_ATTRIBUTE_CAN_FLUSH_REMOTE_WRITES.

    +

    Note that all memory pointers passed as parameters to these operations are device pointers. Where necessary a device pointer should be obtained, for example with cuMemHostGetDevicePointer().

    +

    None of the operations accepts pointers to managed memory buffers (cuMemAllocManaged).

    +

    Warning: Improper use of these APIs may deadlock the application. Synchronization ordering established through these APIs is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by these APIs should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.

    +
    +
    +cuda.bindings.driver.cuStreamWaitValue32(stream, addr, value, unsigned int flags)
    +

    Wait on a memory location.

    +

    Enqueues a synchronization of the stream on the given memory location. +Work ordered after the operation will block until the given condition +on the memory is satisfied. By default, the condition is to wait for +(int32_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other +condition types can be specified via flags.

    +

    If the memory was registered via cuMemHostRegister(), the +device pointer should be obtained with +cuMemHostGetDevicePointer(). This function cannot be used +with managed memory (cuMemAllocManaged).

    +

    Support for CU_STREAM_WAIT_VALUE_NOR can be queried with +cuDeviceGetAttribute() and +CU_DEVICE_ATTRIBUTE_CAN_USE_STREAM_WAIT_VALUE_NOR_V2.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.

    +
    + +
    +
    +cuda.bindings.driver.cuStreamWaitValue64(stream, addr, value, unsigned int flags)
    +

    Wait on a memory location.

    +

    Enqueues a synchronization of the stream on the given memory location. +Work ordered after the operation will block until the given condition +on the memory is satisfied. By default, the condition is to wait for +(int64_t)(*addr - value) >= 0, a cyclic greater-or-equal. Other +condition types can be specified via flags.

    +

    If the memory was registered via cuMemHostRegister(), the +device pointer should be obtained with +cuMemHostGetDevicePointer().

    +

    Support for this can be queried with cuDeviceGetAttribute() +and CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order.

    +
    + +
    +
    +cuda.bindings.driver.cuStreamWriteValue32(stream, addr, value, unsigned int flags)
    +

    Write a value to memory.

    +

    Write a value to memory.

    +

    If the memory was registered via cuMemHostRegister(), the +device pointer should be obtained with +cuMemHostGetDevicePointer(). This function cannot be used +with managed memory (cuMemAllocManaged).

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamWriteValue64(stream, addr, value, unsigned int flags)
    +

    Write a value to memory.

    +

    Write a value to memory.

    +

    If the memory was registered via cuMemHostRegister(), the +device pointer should be obtained with +cuMemHostGetDevicePointer().

    +

    Support for this can be queried with cuDeviceGetAttribute() +and CU_DEVICE_ATTRIBUTE_CAN_USE_64_BIT_STREAM_MEM_OPS.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuStreamBatchMemOp(stream, unsigned int count, paramArray: Optional[Tuple[CUstreamBatchMemOpParams] | List[CUstreamBatchMemOpParams]], unsigned int flags)
    +

    Batch operations to synchronize the stream via memory operations.

    +

    This is a batch version of cuStreamWaitValue32() and +cuStreamWriteValue32(). Batching operations may avoid some +performance overhead in both the API call and the device execution +versus adding them to the stream in separate API calls. The operations +are enqueued in the order they appear in the array.

    +

    See CUstreamBatchMemOpType for the full set of supported +operations, and cuStreamWaitValue32(), +cuStreamWaitValue64(), cuStreamWriteValue32(), +and cuStreamWriteValue64() for details of specific +operations.

    +

    See related APIs for details on querying support for specific +operations.

    +
    +
    Parameters:
    +
      +
    • stream (CUstream or cudaStream_t) – The stream to enqueue the operations in.

    • +
    • count (unsigned int) – The number of operations in the array. Must be less than 256.

    • +
    • paramArray (List[CUstreamBatchMemOpParams]) – The types and parameters of the individual operations.

    • +
    • flags (unsigned int) – Reserved for future expansion; must be 0.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).

    +
    + +
    +
    +

    Execution Control

    +

    This section describes the execution control functions of the low-level CUDA driver application programming interface.

    +
    +
    +class cuda.bindings.driver.CUfunctionLoadingState(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +CU_FUNCTION_LOADING_STATE_UNLOADED = 0
    +
    + +
    +
    +CU_FUNCTION_LOADING_STATE_LOADED = 1
    +
    + +
    +
    +CU_FUNCTION_LOADING_STATE_MAX = 2
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuFuncGetAttribute(attrib: CUfunction_attribute, hfunc)
    +

    Returns information about a function.

    +

    Returns in *pi the integer value of the attribute attrib on the +kernel given by hfunc. The supported attributes are:

    +
      +
    • CU_FUNC_ATTRIBUTE_MAX_THREADS_PER_BLOCK: The maximum +number of threads per block, beyond which a launch of the function +would fail. This number depends on both the function and the device +on which the function is currently loaded.

    • +
    • CU_FUNC_ATTRIBUTE_SHARED_SIZE_BYTES: The size in bytes of +statically-allocated shared memory per block required by this +function. This does not include dynamically-allocated shared memory +requested by the user at runtime.

    • +
    • CU_FUNC_ATTRIBUTE_CONST_SIZE_BYTES: The size in bytes of +user-allocated constant memory required by this function.

    • +
    • CU_FUNC_ATTRIBUTE_LOCAL_SIZE_BYTES: The size in bytes of +local memory used by each thread of this function.

    • +
    • CU_FUNC_ATTRIBUTE_NUM_REGS: The number of registers used +by each thread of this function.

    • +
    • CU_FUNC_ATTRIBUTE_PTX_VERSION: The PTX virtual +architecture version for which the function was compiled. This value +is the major PTX version * 10

      +
        +
      • the minor PTX version, so a PTX version 1.3 function would return +the value 13. Note that this may return the undefined value of 0 +for cubins compiled prior to CUDA 3.0.

      • +
      +
    • +
    • CU_FUNC_ATTRIBUTE_BINARY_VERSION: The binary architecture +version for which the function was compiled. This value is the major +binary version * 10 + the minor binary version, so a binary version +1.3 function would return the value 13. Note that this will return a +value of 10 for legacy cubins that do not have a properly-encoded +binary architecture version.

    • +
    • CU_FUNC_CACHE_MODE_CA: The attribute to indicate whether +the function has been compiled with user specified option “-Xptxas +–dlcm=ca” set .

    • +
    • CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES: The +maximum size in bytes of dynamically-allocated shared memory.

    • +
    • CU_FUNC_ATTRIBUTE_PREFERRED_SHARED_MEMORY_CARVEOUT: +Preferred shared memory-L1 cache split ratio in percent of total +shared memory.

    • +
    • CU_FUNC_ATTRIBUTE_CLUSTER_SIZE_MUST_BE_SET: If this +attribute is set, the kernel must launch with a valid cluster size +specified.

    • +
    • CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_WIDTH: The required +cluster width in blocks.

    • +
    • CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_HEIGHT: The required +cluster height in blocks.

    • +
    • CU_FUNC_ATTRIBUTE_REQUIRED_CLUSTER_DEPTH: The required +cluster depth in blocks.

    • +
    • CU_FUNC_ATTRIBUTE_NON_PORTABLE_CLUSTER_SIZE_ALLOWED: +Indicates whether the function can be launched with non-portable +cluster size. 1 is allowed, 0 is disallowed. A non-portable cluster +size may only function on the specific SKUs the program is tested on. +The launch might fail if the program is run on a different hardware +platform. CUDA API provides cudaOccupancyMaxActiveClusters to assist +with checking whether the desired size can be launched on the current +device. A portable cluster size is guaranteed to be functional on all +compute capabilities higher 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.

    • +
    • CU_FUNC_ATTRIBUTE_CLUSTER_SCHEDULING_POLICY_PREFERENCE: +The block scheduling policy of a function. The value type is +CUclusterSchedulingPolicy.

    • +
    +

    With a few execeptions, function attributes may also be queried on +unloaded function handles returned from +cuModuleEnumerateFunctions. +CUDA_ERROR_FUNCTION_NOT_LOADED is returned if the attribute +requires a fully loaded function but the function is not loaded. The +loading state of a function may be queried using +cuFuncIsloaded. cuFuncLoad may be called to +explicitly load a function before querying the following attributes +that require the function to be loaded:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuFuncSetAttribute(hfunc, attrib: CUfunction_attribute, int value)
    +

    Sets information about a function.

    +

    This call sets the value of a specified attribute attrib on the +kernel given by hfunc to an integer value specified by val This +function returns CUDA_SUCCESS if the new value of the attribute could +be successfully set. If the set fails, this call will return an error. +Not all attributes can have values set. Attempting to set a value on a +read-only attribute will result in an error (CUDA_ERROR_INVALID_VALUE)

    +

    Supported attributes for the cuFuncSetAttribute call are:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuFuncSetCacheConfig(hfunc, config: CUfunc_cache)
    +

    Sets the preferred cache configuration for a device function.

    +

    On devices where the L1 cache and shared memory use the same hardware +resources, this sets through config the preferred cache configuration +for the device function hfunc. This is only a preference. The driver +will use the requested configuration if possible, but it is free to +choose a different configuration if required to execute hfunc. Any +context-wide preference set via cuCtxSetCacheConfig() will +be overridden by this per-function setting unless the per-function +setting is CU_FUNC_CACHE_PREFER_NONE. In that case, the +current context-wide setting will be used.

    +

    This setting does nothing on devices where the size of the L1 cache and +shared memory are fixed.

    +

    Launching a kernel with a different preference than the most recent +preference setting may insert a device-side synchronization point.

    +

    The supported cache configurations are:

    + +
    +
    Parameters:
    +
      +
    • hfunc (CUfunction) – Kernel to configure cache for

    • +
    • config (CUfunc_cache) – Requested cache configuration

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuFuncGetModule(hfunc)
    +

    Returns a module handle.

    +

    Returns in *hmod the handle of the module that function hfunc is +located in. The lifetime of the module corresponds to the lifetime of +the context it was loaded in or until the module is explicitly +unloaded.

    +

    The CUDA runtime manages its own modules loaded into the primary +context. If the handle returned by this API refers to a module loaded +by the CUDA runtime, calling cuModuleUnload() on that +module will result in undefined behavior.

    +
    +
    Parameters:
    +

    hfunc (CUfunction) – Function to retrieve module for

    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuFuncGetName(hfunc)
    +

    Returns the function name for a CUfunction handle.

    +

    Returns in **name the function name associated with the function +handle hfunc . The function name is returned as a null-terminated +string. The returned name is only valid when the function handle is +valid. If the module is unloaded or reloaded, one must call the API +again to get the updated name. This API may return a mangled name if +the function is not declared as having C linkage. If either **name or +hfunc is NULL, CUDA_ERROR_INVALID_VALUE is returned.

    +
    +
    Parameters:
    +

    hfunc (CUfunction) – The function handle to retrieve the name for

    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuFuncGetParamInfo(func, size_t paramIndex)
    +

    Returns the offset and size of a kernel parameter in the device-side parameter layout.

    +

    Queries the kernel parameter at paramIndex into func’s list of +parameters, and returns in paramOffset and paramSize the offset and +size, respectively, where the parameter will reside in the device-side +parameter layout. This information can be used to update kernel node +parameters from the device via +cudaGraphKernelNodeSetParam() and +cudaGraphKernelNodeUpdatesApply(). paramIndex must be +less than the number of parameters that func takes. paramSize can +be set to NULL if only the parameter offset is desired.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – The function to query

    • +
    • paramIndex (size_t) – The parameter index to query

    • +
    +
    +
    Returns:
    +

      +
    • CUresultCUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    • +
    • paramOffset (int) – Returns the offset into the device-side parameter layout at which +the parameter resides

    • +
    • paramSize (int) – Optionally returns the size of the parameter in the device-side +parameter layout

    • +
    +

    +
    +
    +
    +

    See also

    +

    cuKernelGetParamInfo

    +
    +
    + +
    +
    +cuda.bindings.driver.cuFuncIsLoaded(function)
    +

    Returns if the function is loaded.

    +

    Returns in state the loading state of function.

    +
    +
    Parameters:
    +

    function (CUfunction) – the function to check

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuFuncLoad(function)
    +

    Loads a function.

    +

    Finalizes function loading for function. Calling this API with a +fully loaded function has no effect.

    +
    +
    Parameters:
    +

    function (CUfunction) – the function to load

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLaunchKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams, void_ptr extra)
    +

    Launches a CUDA function CUfunction or a CUDA kernel CUkernel.

    +

    Invokes the function CUfunction or the kernel +CUkernel f on a gridDimX x gridDimY x gridDimZ grid +of blocks. Each block contains blockDimX x blockDimY x blockDimZ +threads.

    +

    sharedMemBytes sets the amount of dynamic shared memory that will be +available to each thread block.

    +

    Kernel parameters to f can be specified in one of two ways:

    +

    1) Kernel parameters can be specified via kernelParams. If f has N +parameters, then kernelParams needs to be an array of N pointers. +Each of `kernelParams`[0] through `kernelParams`[N-1] must point to a +region of memory from which the actual kernel parameter will be copied. +The number of kernel parameters and their offsets and sizes do not need +to be specified as that information is retrieved directly from the +kernel’s image.

    +

    2) Kernel parameters can also be packaged by the application into a +single buffer that is passed in via the extra parameter. This places +the burden on the application of knowing each kernel parameter’s size +and alignment/padding within the buffer. Here is an example of using +the extra parameter in this manner:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    The extra parameter exists to allow cuLaunchKernel to +take additional less commonly used arguments. extra specifies a list +of names of extra settings and their corresponding values. Each extra +setting name is immediately followed by the corresponding value. The +list must be terminated with either NULL or +CU_LAUNCH_PARAM_END.

    + +

    The error CUDA_ERROR_INVALID_VALUE will be returned if +kernel parameters are specified with both kernelParams and extra +(i.e. both kernelParams and extra are non-NULL).

    +

    Calling cuLaunchKernel() invalidates the persistent +function state set through the following deprecated APIs: +cuFuncSetBlockShape(), cuFuncSetSharedSize(), +cuParamSetSize(), cuParamSeti(), +cuParamSetf(), cuParamSetv().

    +

    Note that to use cuLaunchKernel(), the kernel f must +either have been compiled with toolchain version 3.2 or later so that +it will contain kernel parameter information, or have no kernel +parameters. If either of these conditions is not met, then +cuLaunchKernel() will return +CUDA_ERROR_INVALID_IMAGE.

    +

    Note that the API can also be used to launch context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to launch the +kernel on will either be taken from the specified stream hStream or +the current context in case of NULL stream.

    +
    +
    Parameters:
    +
      +
    • f (CUfunction) – Function CUfunction or Kernel CUkernel to +launch

    • +
    • gridDimX (unsigned int) – Width of grid in blocks

    • +
    • gridDimY (unsigned int) – Height of grid in blocks

    • +
    • gridDimZ (unsigned int) – Depth of grid in blocks

    • +
    • blockDimX (unsigned int) – X dimension of each thread block

    • +
    • blockDimY (unsigned int) – Y dimension of each thread block

    • +
    • blockDimZ (unsigned int) – Z dimension of each thread block

    • +
    • sharedMemBytes (unsigned int) – Dynamic shared-memory size per thread block in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    • kernelParams (Any) – Array of pointers to kernel parameters

    • +
    • extra (List[Any]) – Extra options

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_IMAGE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_LAUNCH_FAILED, CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, CUDA_ERROR_LAUNCH_TIMEOUT, CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, CUDA_ERROR_SHARED_OBJECT_INIT_FAILED, CUDA_ERROR_NOT_FOUND

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLaunchKernelEx(CUlaunchConfig config: Optional[CUlaunchConfig], f, kernelParams, void_ptr extra)
    +

    Launches a CUDA function CUfunction or a CUDA kernel CUkernel with launch-time configuration.

    +

    Invokes the function CUfunction or the kernel +CUkernel f with the specified launch-time configuration +config.

    +

    The CUlaunchConfig structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • gridDimX is the width of the grid in +blocks.

    • +
    • gridDimY is the height of the grid in +blocks.

    • +
    • gridDimZ is the depth of the grid in +blocks.

    • +
    • blockDimX is the X dimension of each +thread block.

    • +
    • blockDimX is the Y dimension of each +thread block.

    • +
    • blockDimZ is the Z dimension of each +thread block.

    • +
    • sharedMemBytes is the dynamic shared- +memory size per thread block in bytes.

    • +
    • hStream is the handle to the stream to +perform the launch in. The CUDA context associated with this stream +must match that associated with function f.

    • +
    • attrs is an array of +numAttrs continguous +CUlaunchAttribute elements. The value of this pointer is +not considered if numAttrs is zero. +However, in that case, it is recommended to set the pointer to NULL.

    • +
    • numAttrs is the number of attributes +populating the first numAttrs positions of +the attrs array.

    • +
    +

    Launch-time configuration is specified by adding entries to +attrs. Each entry is an attribute ID and a +corresponding attribute value.

    +

    The CUlaunchAttribute structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • id is a unique enum identifying the +attribute.

    • +
    • value is a union that hold the +attribute value.

    • +
    +

    An example of using the config parameter:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    The CUlaunchAttributeID enum is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    and the corresponding CUlaunchAttributeValue union as :

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    Setting CU_LAUNCH_ATTRIBUTE_COOPERATIVE to a non-zero value +causes the kernel launch to be a cooperative launch, with exactly the +same usage and semantics of cuLaunchCooperativeKernel.

    +

    Setting +CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_STREAM_SERIALIZATION to a +non-zero values causes the kernel to use programmatic means to resolve +its stream dependency – enabling the CUDA runtime to opportunistically +allow the grid’s execution to overlap with the previous kernel in the +stream, if that kernel requests the overlap.

    +

    CU_LAUNCH_ATTRIBUTE_PROGRAMMATIC_EVENT records an event +along with the kernel launch. Event recorded through this launch +attribute is guaranteed to only trigger after all block in the +associated kernel trigger the event. A block can trigger the event +through PTX launchdep.release or CUDA builtin function +cudaTriggerProgrammaticLaunchCompletion(). A trigger can also be +inserted at the beginning of each block’s execution if +triggerAtBlockStart is set to non-0. Note that dependents (including +the CPU thread calling cuEventSynchronize()) are not +guaranteed to observe the release precisely when it is released. For +example, cuEventSynchronize() may only observe the event +trigger long after the associated kernel has completed. This recording +type is primarily meant for establishing programmatic dependency +between device tasks. The event supplied must not be an interprocess or +interop event. The event must disable timing (i.e. created with +CU_EVENT_DISABLE_TIMING flag set).

    +

    CU_LAUNCH_ATTRIBUTE_LAUNCH_COMPLETION_EVENT records an +event along with the kernel launch. Nominally, the event is triggered +once all blocks of the kernel have begun execution. Currently this is a +best effort. If a kernel B has a launch completion dependency on a +kernel A, B may wait until A is complete. Alternatively, blocks of B +may begin before all blocks of A have begun, for example:

    +
      +
    • If B can claim execution resources unavaiable to A, for example if +they run on different GPUs.

    • +
    • If B is a higher priority than A.

    • +
    +

    Exercise caution if such an ordering inversion could lead to deadlock. +The event supplied must not be an interprocess or interop event. The +event must disable timing (i.e. must be created with the +CU_EVENT_DISABLE_TIMING flag set).

    +

    Setting CU_LAUNCH_ATTRIBUTE_DEVICE_UPDATABLE_KERNEL_NODE to +1 on a captured launch causes the resulting kernel node to be device- +updatable. This attribute is specific to graphs, and passing it to a +launch in a non-capturing stream results in an error. Passing a value +other than 0 or 1 is not allowed.

    +

    On success, a handle will be returned via +CUlaunchAttributeValue::deviceUpdatableKernelNode::devNode +which can be passed to the various device-side update functions to +update the node’s kernel parameters from within another kernel. For +more information on the types of device updates that can be made, as +well as the relevant limitations thereof, see +cudaGraphKernelNodeUpdatesApply.

    +

    Kernel nodes which are device-updatable have additional restrictions +compared to regular kernel nodes. Firstly, device-updatable nodes +cannot be removed from their graph via cuGraphDestroyNode. +Additionally, once opted-in to this functionality, a node cannot opt +out, and any attempt to set the attribute to 0 will result in an error. +Graphs containing one or more device-updatable node also do not allow +multiple instantiation.

    +

    The effect of other attributes is consistent with their effect when set +via persistent APIs.

    +

    See cuStreamSetAttribute for

    + +

    See cuFuncSetAttribute for

    + +

    Kernel parameters to f can be specified in the same ways that they +can be using cuLaunchKernel.

    +

    Note that the API can also be used to launch context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to launch the +kernel on will either be taken from the specified stream +hStream or the current context in case of +NULL stream.

    +
    +
    Parameters:
    +
      +
    • config (CUlaunchConfig) – Config to launch

    • +
    • f (CUfunction) – Function CUfunction or Kernel CUkernel to +launch

    • +
    • kernelParams (Any) – Array of pointers to kernel parameters

    • +
    • extra (List[Any]) – Extra options

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_IMAGE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_LAUNCH_FAILED, CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, CUDA_ERROR_LAUNCH_TIMEOUT, CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE, CUDA_ERROR_SHARED_OBJECT_INIT_FAILED, CUDA_ERROR_NOT_FOUND

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLaunchCooperativeKernel(f, unsigned int gridDimX, unsigned int gridDimY, unsigned int gridDimZ, unsigned int blockDimX, unsigned int blockDimY, unsigned int blockDimZ, unsigned int sharedMemBytes, hStream, kernelParams)
    +

    Launches a CUDA function CUfunction or a CUDA kernel CUkernel where thread blocks can cooperate and synchronize as they execute.

    +

    Invokes the function CUfunction or the kernel +CUkernel f on a gridDimX x gridDimY x gridDimZ grid +of blocks. Each block contains blockDimX x blockDimY x blockDimZ +threads.

    +

    sharedMemBytes sets the amount of dynamic shared memory that will be +available to each thread block.

    +

    The device on which this kernel is invoked must have a non-zero value +for the device attribute +CU_DEVICE_ATTRIBUTE_COOPERATIVE_LAUNCH.

    +

    The total number of blocks launched cannot exceed the maximum number of +blocks per multiprocessor as returned by +cuOccupancyMaxActiveBlocksPerMultiprocessor (or +cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times +the number of multiprocessors as specified by the device attribute +CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT.

    +

    The kernel cannot make use of CUDA dynamic parallelism.

    +

    Kernel parameters must be specified via kernelParams. If f has N +parameters, then kernelParams needs to be an array of N pointers. +Each of `kernelParams`[0] through `kernelParams`[N-1] must point to a +region of memory from which the actual kernel parameter will be copied. +The number of kernel parameters and their offsets and sizes do not need +to be specified as that information is retrieved directly from the +kernel’s image.

    +

    Calling cuLaunchCooperativeKernel() sets persistent +function state that is the same as function state set through +cuLaunchKernel API

    +

    When the kernel f is launched via +cuLaunchCooperativeKernel(), the previous block shape, +shared size and parameter info associated with f is overwritten.

    +

    Note that to use cuLaunchCooperativeKernel(), the kernel +f must either have been compiled with toolchain version 3.2 or later +so that it will contain kernel parameter information, or have no kernel +parameters. If either of these conditions is not met, then +cuLaunchCooperativeKernel() will return +CUDA_ERROR_INVALID_IMAGE.

    +

    Note that the API can also be used to launch context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to launch the +kernel on will either be taken from the specified stream hStream or +the current context in case of NULL stream.

    +
    +
    Parameters:
    +
      +
    • f (CUfunction) – Function CUfunction or Kernel CUkernel to +launch

    • +
    • gridDimX (unsigned int) – Width of grid in blocks

    • +
    • gridDimY (unsigned int) – Height of grid in blocks

    • +
    • gridDimZ (unsigned int) – Depth of grid in blocks

    • +
    • blockDimX (unsigned int) – X dimension of each thread block

    • +
    • blockDimY (unsigned int) – Y dimension of each thread block

    • +
    • blockDimZ (unsigned int) – Z dimension of each thread block

    • +
    • sharedMemBytes (unsigned int) – Dynamic shared-memory size per thread block in bytes

    • +
    • hStream (CUstream or cudaStream_t) – Stream identifier

    • +
    • kernelParams (Any) – Array of pointers to kernel parameters

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_IMAGE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_LAUNCH_FAILED, CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, CUDA_ERROR_LAUNCH_TIMEOUT, CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE, CUDA_ERROR_SHARED_OBJECT_INIT_FAILED, CUDA_ERROR_NOT_FOUND

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLaunchCooperativeKernelMultiDevice(launchParamsList: Optional[Tuple[CUDA_LAUNCH_PARAMS] | List[CUDA_LAUNCH_PARAMS]], unsigned int numDevices, unsigned int flags)
    +

    Launches CUDA functions on multiple devices where thread blocks can cooperate and synchronize as they execute.

    +

    [Deprecated]

    +

    Invokes kernels as specified in the launchParamsList array where each +element of the array specifies all the parameters required to perform a +single kernel launch. These kernels can cooperate and synchronize as +they execute. The size of the array is specified by numDevices.

    +

    No two kernels can be launched on the same device. All the devices +targeted by this multi-device launch must be identical. All devices +must have a non-zero value for the device attribute +CU_DEVICE_ATTRIBUTE_COOPERATIVE_MULTI_DEVICE_LAUNCH.

    +

    All kernels launched must be identical with respect to the compiled +code. Note that any device, constant or managed variables present in +the module that owns the kernel launched on each device, are +independently instantiated on every device. It is the application’s +responsibility to ensure these variables are initialized and used +appropriately.

    +

    The size of the grids as specified in blocks, the size of the blocks +themselves and the amount of shared memory used by each thread block +must also match across all launched kernels.

    +

    The streams used to launch these kernels must have been created via +either cuStreamCreate or +cuStreamCreateWithPriority. The NULL stream or +CU_STREAM_LEGACY or CU_STREAM_PER_THREAD cannot +be used.

    +

    The total number of blocks launched per kernel cannot exceed the +maximum number of blocks per multiprocessor as returned by +cuOccupancyMaxActiveBlocksPerMultiprocessor (or +cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags) times +the number of multiprocessors as specified by the device attribute +CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT. Since the total +number of blocks launched per device has to match across all devices, +the maximum number of blocks that can be launched per device will be +limited by the device with the least number of multiprocessors.

    +

    The kernels cannot make use of CUDA dynamic parallelism.

    +

    The CUDA_LAUNCH_PARAMS structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • function specifies the kernel to be +launched. All functions must be identical with respect to the +compiled code. Note that you can also specify context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then casting to +CUfunction. In this case, the context to launch the +kernel on be taken from the specified stream +hStream.

    • +
    • gridDimX is the width of the grid in +blocks. This must match across all kernels launched.

    • +
    • gridDimY is the height of the grid in +blocks. This must match across all kernels launched.

    • +
    • gridDimZ is the depth of the grid in +blocks. This must match across all kernels launched.

    • +
    • blockDimX is the X dimension of each +thread block. This must match across all kernels launched.

    • +
    • blockDimX is the Y dimension of each +thread block. This must match across all kernels launched.

    • +
    • blockDimZ is the Z dimension of each +thread block. This must match across all kernels launched.

    • +
    • sharedMemBytes is the dynamic shared- +memory size per thread block in bytes. This must match across all +kernels launched.

    • +
    • hStream is the handle to the stream to +perform the launch in. This cannot be the NULL stream or +CU_STREAM_LEGACY or CU_STREAM_PER_THREAD. The +CUDA context associated with this stream must match that associated +with function.

    • +
    • kernelParams is an array of pointers +to kernel parameters. If function has +N parameters, then kernelParams needs +to be an array of N pointers. Each of +:py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams`[0] through +:py:obj:`~.CUDA_LAUNCH_PARAMS.kernelParams`[N-1] must point to a +region of memory from which the actual kernel parameter will be +copied. The number of kernel parameters and their offsets and sizes +do not need to be specified as that information is retrieved directly +from the kernel’s image.

    • +
    +

    By default, the kernel won’t begin execution on any GPU until all prior +work in all the specified streams has completed. This behavior can be +overridden by specifying the flag +CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_PRE_LAUNCH_SYNC. +When this flag is specified, each kernel will only wait for prior work +in the stream corresponding to that GPU to complete before it begins +execution.

    +

    Similarly, by default, any subsequent work pushed in any of the +specified streams will not begin execution until the kernels on all +GPUs have completed. This behavior can be overridden by specifying the +flag +CUDA_COOPERATIVE_LAUNCH_MULTI_DEVICE_NO_POST_LAUNCH_SYNC. +When this flag is specified, any subsequent work pushed in any of the +specified streams will only wait for the kernel launched on the GPU +corresponding to that stream to complete before it begins execution.

    +

    Calling cuLaunchCooperativeKernelMultiDevice() sets +persistent function state that is the same as function state set +through cuLaunchKernel API when called individually for +each element in launchParamsList.

    +

    When kernels are launched via +cuLaunchCooperativeKernelMultiDevice(), the previous block +shape, shared size and parameter info associated with each +function in launchParamsList is +overwritten.

    +

    Note that to use cuLaunchCooperativeKernelMultiDevice(), +the kernels must either have been compiled with toolchain version 3.2 +or later so that it will contain kernel parameter information, or have +no kernel parameters. If either of these conditions is not met, then +cuLaunchCooperativeKernelMultiDevice() will return +CUDA_ERROR_INVALID_IMAGE.

    +
    +
    Parameters:
    +
      +
    • launchParamsList (List[CUDA_LAUNCH_PARAMS]) – List of launch parameters, one per device

    • +
    • numDevices (unsigned int) – Size of the launchParamsList array

    • +
    • flags (unsigned int) – Flags to control launch behavior

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_IMAGE, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_LAUNCH_FAILED, CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES, CUDA_ERROR_LAUNCH_TIMEOUT, CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING, CUDA_ERROR_COOPERATIVE_LAUNCH_TOO_LARGE, CUDA_ERROR_SHARED_OBJECT_INIT_FAILED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuLaunchHostFunc(hStream, fn, userData)
    +

    Enqueues a host function call in a stream.

    +

    Enqueues a host function to run in a stream. The function will be +called after currently enqueued work and will block work added after +it.

    +

    The host function must not make any CUDA API calls. Attempting to use a +CUDA API may result in CUDA_ERROR_NOT_PERMITTED, but this +is not required. The host function must not perform any synchronization +that may depend on outstanding CUDA work not mandated to run earlier. +Host functions without a mandated order (such as in independent +streams) execute in undefined order and may be serialized.

    +

    For the purposes of Unified Memory, execution makes a number of +guarantees:

    +
      +
    • The stream is considered idle for the duration of the function’s +execution. Thus, for example, the function may always use memory +attached to the stream it was enqueued in.

    • +
    • The start of execution of the function has the same effect as +synchronizing an event recorded in the same stream immediately prior +to the function. It thus synchronizes streams which have been +“joined” prior to the function.

    • +
    • Adding device work to any stream does not have the effect of making +the stream active until all preceding host functions and stream +callbacks have executed. Thus, for example, a function might use +global attached memory even if work has been added to another stream, +if the work has been ordered behind the function call with an event.

    • +
    • Completion of the function does not cause a stream to become active +except as described above. The stream will remain idle if no device +work follows the function, and will remain idle across consecutive +host functions or stream callbacks without device work in between. +Thus, for example, stream synchronization can be done by signaling +from a host function at the end of the stream.

    • +
    +

    Note that, in contrast to cuStreamAddCallback, the function +will not be called in the event of an error in the CUDA context.

    +
    +
    Parameters:
    +
      +
    • hStream (CUstream or cudaStream_t) – Stream to enqueue function call in

    • +
    • fn (CUhostFn) – The function to call once preceding stream operations are complete

    • +
    • userData (Any) – User-specified data to be passed to the function

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +

    Graph Management

    +

    This section describes the graph management functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuGraphCreate(unsigned int flags)
    +

    Creates a graph.

    +

    Creates an empty graph, which is returned via phGraph.

    +
    +
    Parameters:
    +

    flags (unsigned int) – Graph creation flags, must be 0

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddKernelNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_KERNEL_NODE_PARAMS nodeParams: Optional[CUDA_KERNEL_NODE_PARAMS])
    +

    Creates a kernel execution node and adds it to a graph.

    +

    Creates a new kernel execution node and adds it to hGraph with +numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in phGraphNode.

    +

    The CUDA_KERNEL_NODE_PARAMS structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    When the graph is launched, the node will invoke kernel func on a +(gridDimX x gridDimY x gridDimZ) grid of blocks. Each block +contains (blockDimX x blockDimY x blockDimZ) threads.

    +

    sharedMemBytes sets the amount of dynamic shared memory that will be +available to each thread block.

    +

    Kernel parameters to func can be specified in one of two ways:

    +

    1) Kernel parameters can be specified via kernelParams. If the kernel +has N parameters, then kernelParams needs to be an array of N +pointers. Each pointer, from `kernelParams`[0] to `kernelParams`[N-1], +points to the region of memory from which the actual parameter will be +copied. The number of kernel parameters and their offsets and sizes do +not need to be specified as that information is retrieved directly from +the kernel’s image.

    +

    2) Kernel parameters for non-cooperative kernels can also be packaged +by the application into a single buffer that is passed in via extra. +This places the burden on the application of knowing each kernel +parameter’s size and alignment/padding within the buffer. The extra +parameter exists to allow this function to take additional less +commonly used arguments. extra specifies a list of names of extra +settings and their corresponding values. Each extra setting name is +immediately followed by the corresponding value. The list must be +terminated with either NULL or CU_LAUNCH_PARAM_END.

    + +

    The error CUDA_ERROR_INVALID_VALUE will be returned if +kernel parameters are specified with both kernelParams and extra +(i.e. both kernelParams and extra are non-NULL). +CUDA_ERROR_INVALID_VALUE will be returned if extra is +used for a cooperative kernel.

    +

    The kernelParams or extra array, as well as the argument values it +points to, are copied during this call.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • nodeParams (CUDA_KERNEL_NODE_PARAMS) – Parameters for the GPU execution node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Kernels launched using graphs must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.

    +
    + +
    +
    +cuda.bindings.driver.cuGraphKernelNodeGetParams(hNode)
    +

    Returns a kernel node’s parameters.

    +

    Returns the parameters of kernel node hNode in nodeParams. The +kernelParams or extra array returned in nodeParams, as well as +the argument values it points to, are owned by the node. This memory +remains valid until the node is destroyed or its parameters are +modified, and should not be modified directly. Use +cuGraphKernelNodeSetParams to update the parameters of this +node.

    +

    The params will contain either kernelParams or extra, according to +which of these was most recently set on the node.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphKernelNodeSetParams(hNode, CUDA_KERNEL_NODE_PARAMS nodeParams: Optional[CUDA_KERNEL_NODE_PARAMS])
    +

    Sets a kernel node’s parameters.

    +

    Sets the parameters of kernel node hNode to nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddMemcpyNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_MEMCPY3D copyParams: Optional[CUDA_MEMCPY3D], ctx)
    +

    Creates a memcpy node and adds it to a graph.

    +

    Creates a new memcpy node and adds it to hGraph with +numDependencies dependencies specified via dependencies. It is +possible for numDependencies to be 0, in which case the node will be +placed at the root of the graph. dependencies may not have any +duplicate entries. A handle to the new node will be returned in +phGraphNode.

    +

    When the graph is launched, the node will perform the memcpy described +by copyParams. See cuMemcpy3D() for a description of the +structure and its restrictions.

    +

    Memcpy nodes have some additional restrictions with regards to managed +memory, if the system contains at least one device which has a zero +value for the device attribute +CU_DEVICE_ATTRIBUTE_CONCURRENT_MANAGED_ACCESS. If one or +more of the operands refer to managed memory, then using the memory +type CU_MEMORYTYPE_UNIFIED is disallowed for those +operand(s). The managed memory will be treated as residing on either +the host or the device, depending on which memory type is specified.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • copyParams (CUDA_MEMCPY3D) – Parameters for the memory copy

    • +
    • ctx (CUcontext) – Context on which to run the node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphMemcpyNodeGetParams(hNode)
    +

    Returns a memcpy node’s parameters.

    +

    Returns the parameters of memcpy node hNode in nodeParams.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphMemcpyNodeSetParams(hNode, CUDA_MEMCPY3D nodeParams: Optional[CUDA_MEMCPY3D])
    +

    Sets a memcpy node’s parameters.

    +

    Sets the parameters of memcpy node hNode to nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddMemsetNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_MEMSET_NODE_PARAMS memsetParams: Optional[CUDA_MEMSET_NODE_PARAMS], ctx)
    +

    Creates a memset node and adds it to a graph.

    +

    Creates a new memset node and adds it to hGraph with +numDependencies dependencies specified via dependencies. It is +possible for numDependencies to be 0, in which case the node will be +placed at the root of the graph. dependencies may not have any +duplicate entries. A handle to the new node will be returned in +phGraphNode.

    +

    The element size must be 1, 2, or 4 bytes. When the graph is launched, +the node will perform the memset described by memsetParams.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • memsetParams (CUDA_MEMSET_NODE_PARAMS) – Parameters for the memory set

    • +
    • ctx (CUcontext) – Context on which to run the node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphMemsetNodeGetParams(hNode)
    +

    Returns a memset node’s parameters.

    +

    Returns the parameters of memset node hNode in nodeParams.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphMemsetNodeSetParams(hNode, CUDA_MEMSET_NODE_PARAMS nodeParams: Optional[CUDA_MEMSET_NODE_PARAMS])
    +

    Sets a memset node’s parameters.

    +

    Sets the parameters of memset node hNode to nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddHostNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_HOST_NODE_PARAMS nodeParams: Optional[CUDA_HOST_NODE_PARAMS])
    +

    Creates a host execution node and adds it to a graph.

    +

    Creates a new CPU execution node and adds it to hGraph with +numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in phGraphNode.

    +

    When the graph is launched, the node will invoke the specified CPU +function. Host nodes are not supported under MPS with pre-Volta GPUs.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • nodeParams (CUDA_HOST_NODE_PARAMS) – Parameters for the host node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphHostNodeGetParams(hNode)
    +

    Returns a host node’s parameters.

    +

    Returns the parameters of host node hNode in nodeParams.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphHostNodeSetParams(hNode, CUDA_HOST_NODE_PARAMS nodeParams: Optional[CUDA_HOST_NODE_PARAMS])
    +

    Sets a host node’s parameters.

    +

    Sets the parameters of host node hNode to nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddChildGraphNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, childGraph)
    +

    Creates a child graph node and adds it to a graph.

    +

    Creates a new node which executes an embedded graph, and adds it to +hGraph with numDependencies dependencies specified via +dependencies. It is possible for numDependencies to be 0, in which +case the node will be placed at the root of the graph. dependencies +may not have any duplicate entries. A handle to the new node will be +returned in phGraphNode.

    +

    If hGraph contains allocation or free nodes, this call will return an +error.

    +

    The node executes an embedded child graph. The child graph is cloned in +this call.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • childGraph (CUgraph or cudaGraph_t) – The graph to clone into this node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphChildGraphNodeGetGraph(hNode)
    +

    Gets a handle to the embedded graph of a child graph node.

    +

    Gets a handle to the embedded graph in a child graph node. This call +does not clone the graph. Changes to the graph will be reflected in the +node, and the node retains ownership of the graph.

    +

    Allocation and free nodes cannot be added to the returned graph. +Attempting to do so will return an error.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the embedded graph for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddEmptyNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies)
    +

    Creates an empty node and adds it to a graph.

    +

    Creates a new node which performs no operation, and adds it to hGraph +with numDependencies dependencies specified via dependencies. It is +possible for numDependencies to be 0, in which case the node will be +placed at the root of the graph. dependencies may not have any +duplicate entries. A handle to the new node will be returned in +phGraphNode.

    +

    An empty node performs no operation during execution, but can be used +for transitive ordering. For example, a phased execution graph with 2 +groups of n nodes with a barrier between them can be represented using +an empty node and 2*n dependency edges, rather than no empty node and +n^2 dependency edges.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddEventRecordNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, event)
    +

    Creates an event record node and adds it to a graph.

    +

    Creates a new event record node and adds it to hGraph with +numDependencies dependencies specified via dependencies and event +specified in event. It is possible for numDependencies to be 0, in +which case the node will be placed at the root of the graph. +dependencies may not have any duplicate entries. A handle to the new +node will be returned in phGraphNode.

    +

    Each launch of the graph will record event to capture execution of +the node’s dependencies.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • event (CUevent or cudaEvent_t) – Event for the node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphEventRecordNodeGetEvent(hNode)
    +

    Returns the event associated with an event record node.

    +

    Returns the event of event record node hNode in event_out.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the event for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphEventRecordNodeSetEvent(hNode, event)
    +

    Sets an event record node’s event.

    +

    Sets the event of event record node hNode to event.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddEventWaitNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, event)
    +

    Creates an event wait node and adds it to a graph.

    +

    Creates a new event wait node and adds it to hGraph with +numDependencies dependencies specified via dependencies and event +specified in event. It is possible for numDependencies to be 0, in +which case the node will be placed at the root of the graph. +dependencies may not have any duplicate entries. A handle to the new +node will be returned in phGraphNode.

    +

    The graph node will wait for all work captured in event. See +cuEventRecord() for details on what is captured by an +event. event may be from a different context or device than the +launch stream.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • event (CUevent or cudaEvent_t) – Event for the node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphEventWaitNodeGetEvent(hNode)
    +

    Returns the event associated with an event wait node.

    +

    Returns the event of event wait node hNode in event_out.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the event for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphEventWaitNodeSetEvent(hNode, event)
    +

    Sets an event wait node’s event.

    +

    Sets the event of event wait node hNode to event.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddExternalSemaphoresSignalNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS nodeParams: Optional[CUDA_EXT_SEM_SIGNAL_NODE_PARAMS])
    +

    Creates an external semaphore signal node and adds it to a graph.

    +

    Creates a new external semaphore signal node and adds it to hGraph +with numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in phGraphNode.

    +

    Performs a signal operation on a set of externally allocated semaphore +objects when the node is launched. The operation(s) will occur after +all of the node’s dependencies have completed.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExternalSemaphoresSignalNodeGetParams(hNode)
    +

    Returns an external semaphore signal node’s parameters.

    +

    Returns the parameters of an external semaphore signal node hNode in +params_out. The extSemArray and paramsArray returned in +params_out, are owned by the node. This memory remains valid until +the node is destroyed or its parameters are modified, and should not be +modified directly. Use +cuGraphExternalSemaphoresSignalNodeSetParams to update the +parameters of this node.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExternalSemaphoresSignalNodeSetParams(hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS nodeParams: Optional[CUDA_EXT_SEM_SIGNAL_NODE_PARAMS])
    +

    Sets an external semaphore signal node’s parameters.

    +

    Sets the parameters of an external semaphore signal node hNode to +nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddExternalSemaphoresWaitNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_EXT_SEM_WAIT_NODE_PARAMS nodeParams: Optional[CUDA_EXT_SEM_WAIT_NODE_PARAMS])
    +

    Creates an external semaphore wait node and adds it to a graph.

    +

    Creates a new external semaphore wait node and adds it to hGraph with +numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in phGraphNode.

    +

    Performs a wait operation on a set of externally allocated semaphore +objects when the node is launched. The node’s dependencies will not be +launched until the wait operation has completed.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExternalSemaphoresWaitNodeGetParams(hNode)
    +

    Returns an external semaphore wait node’s parameters.

    +

    Returns the parameters of an external semaphore wait node hNode in +params_out. The extSemArray and paramsArray returned in +params_out, are owned by the node. This memory remains valid until +the node is destroyed or its parameters are modified, and should not be +modified directly. Use +cuGraphExternalSemaphoresSignalNodeSetParams to update the +parameters of this node.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExternalSemaphoresWaitNodeSetParams(hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS nodeParams: Optional[CUDA_EXT_SEM_WAIT_NODE_PARAMS])
    +

    Sets an external semaphore wait node’s parameters.

    +

    Sets the parameters of an external semaphore wait node hNode to +nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddBatchMemOpNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams: Optional[CUDA_BATCH_MEM_OP_NODE_PARAMS])
    +

    Creates a batch memory operation node and adds it to a graph.

    +

    Creates a new batch memory operation node and adds it to hGraph with +numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in phGraphNode.

    +

    When the node is added, the paramArray inside nodeParams is copied +and therefore it can be freed after the call returns.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Warning: Improper use of this API may deadlock the application. Synchronization ordering established through this API is not visible to CUDA. CUDA tasks that are (even indirectly) ordered by this API should also have that order expressed with CUDA-visible dependencies such as events. This ensures that the scheduler does not serialize them in an improper order. For more information, see the Stream Memory Operations section in the programming guide(https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html).

    +
    + +
    +
    +cuda.bindings.driver.cuGraphBatchMemOpNodeGetParams(hNode)
    +

    Returns a batch mem op node’s parameters.

    +

    Returns the parameters of batch mem op node hNode in +nodeParams_out. The paramArray returned in nodeParams_out is +owned by the node. This memory remains valid until the node is +destroyed or its parameters are modified, and should not be modified +directly. Use cuGraphBatchMemOpNodeSetParams to update the +parameters of this node.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphBatchMemOpNodeSetParams(hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams: Optional[CUDA_BATCH_MEM_OP_NODE_PARAMS])
    +

    Sets a batch mem op node’s parameters.

    +

    Sets the parameters of batch mem op node hNode to nodeParams.

    +

    The paramArray inside nodeParams is copied and therefore it can be +freed after the call returns.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_OUT_OF_MEMORY

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecBatchMemOpNodeSetParams(hGraphExec, hNode, CUDA_BATCH_MEM_OP_NODE_PARAMS nodeParams: Optional[CUDA_BATCH_MEM_OP_NODE_PARAMS])
    +

    Sets the parameters for a batch mem op node in the given graphExec.

    +

    Sets the parameters of a batch mem op node in an executable graph +hGraphExec. The node is identified by the corresponding node hNode +in the non-executable graph, from which the executable graph was +instantiated.

    +

    The following fields on operations may be modified on an executable +graph:

    +

    op.waitValue.address op.waitValue.value[64] op.waitValue.flags bits +corresponding to wait type (i.e. CU_STREAM_WAIT_VALUE_FLUSH bit cannot +be modified) op.writeValue.address op.writeValue.value[64]

    +

    Other fields, such as the context, count or type of operations, and +other types of operations such as membars, may not be modified.

    +

    hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    The paramArray inside nodeParams is copied and therefore it can be +freed after the call returns.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddMemAllocNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUDA_MEM_ALLOC_NODE_PARAMS nodeParams: Optional[CUDA_MEM_ALLOC_NODE_PARAMS])
    +

    Creates an allocation node and adds it to a graph.

    +

    Creates a new allocation node and adds it to hGraph with +numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in phGraphNode.

    +

    When cuGraphAddMemAllocNode creates an allocation node, it +returns the address of the allocation in nodeParams.dptr. The +allocation’s address remains fixed across instantiations and launches.

    +

    If the allocation is freed in the same graph, by creating a free node +using cuGraphAddMemFreeNode, the allocation can be accessed +by nodes ordered after the allocation node but before the free node. +These allocations cannot be freed outside the owning graph, and they +can only be freed once in the owning graph.

    +

    If the allocation is not freed in the same graph, then it can be +accessed not only by nodes in the graph which are ordered after the +allocation node, but also by stream operations ordered after the +graph’s execution but before the allocation is freed.

    +

    Allocations which are not freed in the same graph can be freed by:

    + +

    It is not possible to free an allocation in both the owning graph and +another graph. If the allocation is freed in the same graph, a free +node cannot be added to another graph. If the allocation is freed in +another graph, a free node can no longer be added to the owning graph.

    +

    The following restrictions apply to graphs which contain allocation +and/or memory free nodes:

    +
      +
    • Nodes and edges of the graph cannot be deleted.

    • +
    • The graph cannot be used in a child node.

    • +
    • Only one instantiation of the graph may exist at any point in time.

    • +
    • The graph cannot be cloned.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphMemAllocNodeGetParams(hNode)
    +

    Returns a memory alloc node’s parameters.

    +

    Returns the parameters of a memory alloc node hNode in params_out. +The poolProps and accessDescs returned in params_out, are owned +by the node. This memory remains valid until the node is destroyed. The +returned parameters must not be modified.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddMemFreeNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, dptr)
    +

    Creates a memory free node and adds it to a graph.

    +

    Creates a new memory free node and adds it to hGraph with +numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in phGraphNode.

    +

    cuGraphAddMemFreeNode will return +CUDA_ERROR_INVALID_VALUE if the user attempts to free:

    +
      +
    • an allocation twice in the same graph.

    • +
    • an address that was not returned by an allocation node.

    • +
    • an invalid address.

    • +
    +

    The following restrictions apply to graphs which contain allocation +and/or memory free nodes:

    +
      +
    • Nodes and edges of the graph cannot be deleted.

    • +
    • The graph cannot be used in a child node.

    • +
    • Only one instantiation of the graph may exist at any point in time.

    • +
    • The graph cannot be cloned.

    • +
    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • dptr (CUdeviceptr) – Address of memory to free

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphMemFreeNodeGetParams(hNode)
    +

    Returns a memory free node’s parameters.

    +

    Returns the address of a memory free node hNode in dptr_out.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGraphMemTrim(device)
    +

    Free unused memory that was cached on the specified device for use with graphs back to the OS.

    +

    Blocks which are not in use by a graph that is either currently +executing or scheduled to execute are freed back to the operating +system.

    +
    +
    Parameters:
    +

    device (CUdevice) – The device for which cached memory should be freed.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetGraphMemAttribute(device, attr: CUgraphMem_attribute)
    +

    Query asynchronous allocation attributes related to graphs.

    +

    Valid attributes are:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceSetGraphMemAttribute(device, attr: CUgraphMem_attribute, value)
    +

    Set asynchronous allocation attributes related to graphs.

    +

    Valid attributes are:

    + +
    +
    Parameters:
    +
      +
    • device (CUdevice) – Specifies the scope of the query

    • +
    • attr (CUgraphMem_attribute) – attribute to get

    • +
    • value (Any) – pointer to value to set

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_DEVICE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphClone(originalGraph)
    +

    Clones a graph.

    +

    This function creates a copy of originalGraph and returns it in +phGraphClone. All parameters are copied into the cloned graph. The +original graph may be modified after this call without affecting the +clone.

    +

    Child graph nodes in the original graph are recursively copied into the +clone.

    +
    +
    Parameters:
    +

    originalGraph (CUgraph or cudaGraph_t) – Graph to clone

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeFindInClone(hOriginalNode, hClonedGraph)
    +

    Finds a cloned version of a node.

    +

    This function returns the node in hClonedGraph corresponding to +hOriginalNode in the original graph.

    +

    hClonedGraph must have been cloned from hOriginalGraph via +cuGraphClone. hOriginalNode must have been in +hOriginalGraph at the time of the call to cuGraphClone, +and the corresponding cloned node in hClonedGraph must not have been +removed. The cloned node is then returned via phClonedNode.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuGraphClone

    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeGetType(hNode)
    +

    Returns a node’s type.

    +

    Returns the node type of hNode in typename.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphGetNodes(hGraph, size_t numNodes=0)
    +

    Returns a graph’s nodes.

    +

    Returns a list of hGraph’s nodes. nodes may be NULL, in which case +this function will return the number of nodes in numNodes. Otherwise, +numNodes entries will be filled in. If numNodes is higher than the +actual number of nodes, the remaining entries in nodes will be set to +NULL, and the number of nodes actually obtained will be returned in +numNodes.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to query

    • +
    • numNodes (int) – See description

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphGetRootNodes(hGraph, size_t numRootNodes=0)
    +

    Returns a graph’s root nodes.

    +

    Returns a list of hGraph’s root nodes. rootNodes may be NULL, in +which case this function will return the number of root nodes in +numRootNodes. Otherwise, numRootNodes entries will be filled in. If +numRootNodes is higher than the actual number of root nodes, the +remaining entries in rootNodes will be set to NULL, and the number of +nodes actually obtained will be returned in numRootNodes.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to query

    • +
    • numRootNodes (int) – See description

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphGetEdges(hGraph, size_t numEdges=0)
    +

    Returns a graph’s dependency edges.

    +

    Returns a list of hGraph’s dependency edges. Edges are returned via +corresponding indices in from and to; that is, the node in to`[i] +has a dependency on the node in `from`[i]. `from and to may both be +NULL, in which case this function only returns the number of edges in +numEdges. Otherwise, numEdges entries will be filled in. If +numEdges is higher than the actual number of edges, the remaining +entries in from and to will be set to NULL, and the number of edges +actually returned will be written to numEdges.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to get the edges from

    • +
    • numEdges (int) – See description

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphGetEdges_v2(hGraph, size_t numEdges=0)
    +

    Returns a graph’s dependency edges (12.3+)

    +

    Returns a list of hGraph’s dependency edges. Edges are returned via +corresponding indices in from, to and edgeData; that is, the node +in to`[i] has a dependency on the node in `from`[i] with data +`edgeData`[i]. `from and to may both be NULL, in which case this +function only returns the number of edges in numEdges. Otherwise, +numEdges entries will be filled in. If numEdges is higher than the +actual number of edges, the remaining entries in from and to will +be set to NULL, and the number of edges actually returned will be +written to numEdges. edgeData may alone be NULL, in which case the +edges must all have default (zeroed) edge data. Attempting a lossy +query via NULL edgeData will result in +CUDA_ERROR_LOSSY_QUERY. If edgeData is non-NULL then +from and to must be as well.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to get the edges from

    • +
    • numEdges (int) – See description

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeGetDependencies(hNode, size_t numDependencies=0)
    +

    Returns a node’s dependencies.

    +

    Returns a list of node’s dependencies. dependencies may be NULL, in +which case this function will return the number of dependencies in +numDependencies. Otherwise, numDependencies entries will be filled +in. If numDependencies is higher than the actual number of +dependencies, the remaining entries in dependencies will be set to +NULL, and the number of nodes actually obtained will be returned in +numDependencies.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeGetDependencies_v2(hNode, size_t numDependencies=0)
    +

    Returns a node’s dependencies (12.3+)

    +

    Returns a list of node’s dependencies. dependencies may be NULL, in +which case this function will return the number of dependencies in +numDependencies. Otherwise, numDependencies entries will be filled +in. If numDependencies is higher than the actual number of +dependencies, the remaining entries in dependencies will be set to +NULL, and the number of nodes actually obtained will be returned in +numDependencies.

    +

    Note that if an edge has non-zero (non-default) edge data and +edgeData is NULL, this API will return +CUDA_ERROR_LOSSY_QUERY. If edgeData is non-NULL, then +dependencies must be as well.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeGetDependentNodes(hNode, size_t numDependentNodes=0)
    +

    Returns a node’s dependent nodes.

    +

    Returns a list of node’s dependent nodes. dependentNodes may be +NULL, in which case this function will return the number of dependent +nodes in numDependentNodes. Otherwise, numDependentNodes entries +will be filled in. If numDependentNodes is higher than the actual +number of dependent nodes, the remaining entries in dependentNodes +will be set to NULL, and the number of nodes actually obtained will be +returned in numDependentNodes.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeGetDependentNodes_v2(hNode, size_t numDependentNodes=0)
    +

    Returns a node’s dependent nodes (12.3+)

    +

    Returns a list of node’s dependent nodes. dependentNodes may be +NULL, in which case this function will return the number of dependent +nodes in numDependentNodes. Otherwise, numDependentNodes entries +will be filled in. If numDependentNodes is higher than the actual +number of dependent nodes, the remaining entries in dependentNodes +will be set to NULL, and the number of nodes actually obtained will be +returned in numDependentNodes.

    +

    Note that if an edge has non-zero (non-default) edge data and +edgeData is NULL, this API will return +CUDA_ERROR_LOSSY_QUERY. If edgeData is non-NULL, then +dependentNodes must be as well.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddDependencies(hGraph, from_: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], to: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies)
    +

    Adds dependency edges to a graph.

    +

    The number of dependencies to be added is defined by numDependencies +Elements in from and to at corresponding indices define a +dependency. Each node in from and to must belong to hGraph.

    +

    If numDependencies is 0, elements in from and to will be ignored. +Specifying an existing dependency will return an error.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which dependencies are added

    • +
    • from (List[CUgraphNode]) – Array of nodes that provide the dependencies

    • +
    • to (List[CUgraphNode]) – Array of dependent nodes

    • +
    • numDependencies (size_t) – Number of dependencies to be added

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddDependencies_v2(hGraph, from_: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], to: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], edgeData: Optional[Tuple[CUgraphEdgeData] | List[CUgraphEdgeData]], size_t numDependencies)
    +

    Adds dependency edges to a graph (12.3+)

    +

    The number of dependencies to be added is defined by numDependencies +Elements in from and to at corresponding indices define a +dependency. Each node in from and to must belong to hGraph.

    +

    If numDependencies is 0, elements in from and to will be ignored. +Specifying an existing dependency will return an error.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which dependencies are added

    • +
    • from (List[CUgraphNode]) – Array of nodes that provide the dependencies

    • +
    • to (List[CUgraphNode]) – Array of dependent nodes

    • +
    • edgeData (List[CUgraphEdgeData]) – Optional array of edge data. If NULL, default (zeroed) edge data is +assumed.

    • +
    • numDependencies (size_t) – Number of dependencies to be added

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphRemoveDependencies(hGraph, from_: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], to: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies)
    +

    Removes dependency edges from a graph.

    +

    The number of dependencies to be removed is defined by +numDependencies. Elements in from and to at corresponding indices +define a dependency. Each node in from and to must belong to +hGraph.

    +

    If numDependencies is 0, elements in from and to will be ignored. +Specifying a non-existing dependency will return an error.

    +

    Dependencies cannot be removed from graphs which contain allocation or +free nodes. Any attempt to do so will return an error.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph from which to remove dependencies

    • +
    • from (List[CUgraphNode]) – Array of nodes that provide the dependencies

    • +
    • to (List[CUgraphNode]) – Array of dependent nodes

    • +
    • numDependencies (size_t) – Number of dependencies to be removed

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphRemoveDependencies_v2(hGraph, from_: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], to: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], edgeData: Optional[Tuple[CUgraphEdgeData] | List[CUgraphEdgeData]], size_t numDependencies)
    +

    Removes dependency edges from a graph (12.3+)

    +

    The number of dependencies to be removed is defined by +numDependencies. Elements in from and to at corresponding indices +define a dependency. Each node in from and to must belong to +hGraph.

    +

    If numDependencies is 0, elements in from and to will be ignored. +Specifying an edge that does not exist in the graph, with data matching +edgeData, results in an error. edgeData is nullable, which is +equivalent to passing default (zeroed) data for each edge.

    +

    Dependencies cannot be removed from graphs which contain allocation or +free nodes. Any attempt to do so will return an error.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph from which to remove dependencies

    • +
    • from (List[CUgraphNode]) – Array of nodes that provide the dependencies

    • +
    • to (List[CUgraphNode]) – Array of dependent nodes

    • +
    • edgeData (List[CUgraphEdgeData]) – Optional array of edge data. If NULL, edge data is assumed to be +default (zeroed).

    • +
    • numDependencies (size_t) – Number of dependencies to be removed

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphDestroyNode(hNode)
    +

    Remove a node from the graph.

    +

    Removes hNode from its graph. This operation also severs any +dependencies of other nodes on hNode and vice versa.

    +

    Nodes which belong to a graph which contains allocation or free nodes +cannot be destroyed. Any attempt to do so will return an error.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to remove

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphInstantiate(hGraph, unsigned long long flags)
    +

    Creates an executable graph from a graph.

    +

    Instantiates hGraph as an executable graph. The graph is validated +for any structural constraints or intra-node constraints which were not +previously validated. If instantiation is successful, a handle to the +instantiated graph is returned in phGraphExec.

    +

    The flags parameter controls the behavior of instantiation and +subsequent graph launches. Valid flags are:

    +
      +
    • CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH, which +configures a graph containing memory allocation nodes to +automatically free any unfreed memory allocations before the graph is +relaunched.

    • +
    • CUDA_GRAPH_INSTANTIATE_FLAG_DEVICE_LAUNCH, which +configures the graph for launch from the device. If this flag is +passed, the executable graph handle returned can be used to launch +the graph from both the host and device. This flag can only be used +on platforms which support unified addressing. This flag cannot be +used in conjunction with +CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH.

    • +
    • CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, which +causes the graph to use the priorities from the per-node attributes +rather than the priority of the launch stream during execution. Note +that priorities are only available on kernel nodes, and are copied +from stream priority during stream capture.

    • +
    +

    If hGraph contains any allocation or free nodes, there can be at most +one executable graph in existence for that graph at a time. An attempt +to instantiate a second executable graph before destroying the first +with cuGraphExecDestroy will result in an error. The same +also applies if hGraph contains any device-updatable kernel nodes.

    +

    If hGraph contains kernels which call device-side cudaGraphLaunch() +from multiple contexts, this will result in an error.

    +

    Graphs instantiated for launch on the device have additional +restrictions which do not apply to host graphs:

    +
      +
    • The graph’s nodes must reside on a single context.

    • +
    • The graph can only contain kernel nodes, memcpy nodes, memset nodes, +and child graph nodes.

    • +
    • The graph cannot be empty and must contain at least one kernel, +memcpy, or memset node. Operation-specific restrictions are outlined +below.

    • +
    • Kernel nodes:

      +
        +
      • Use of CUDA Dynamic Parallelism is not permitted.

      • +
      • Cooperative launches are permitted as long as MPS is not in use.

      • +
      +
    • +
    • Memcpy nodes:

      +
        +
      • Only copies involving device memory and/or pinned device-mapped +host memory are permitted.

      • +
      • Copies involving CUDA arrays are not permitted.

      • +
      • Both operands must be accessible from the current context, and the +current context must match the context of other nodes in the graph.

      • +
      +
    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphInstantiateWithParams(hGraph, CUDA_GRAPH_INSTANTIATE_PARAMS instantiateParams: Optional[CUDA_GRAPH_INSTANTIATE_PARAMS])
    +

    Creates an executable graph from a graph.

    +

    Instantiates hGraph as an executable graph according to the +instantiateParams structure. The graph is validated for any +structural constraints or intra-node constraints which were not +previously validated. If instantiation is successful, a handle to the +instantiated graph is returned in phGraphExec.

    +

    instantiateParams controls the behavior of instantiation and +subsequent graph launches, as well as returning more detailed +information in the event of an error. +CUDA_GRAPH_INSTANTIATE_PARAMS is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    The flags field controls the behavior of instantiation and subsequent +graph launches. Valid flags are:

    + +

    If hGraph contains any allocation or free nodes, there can be at most +one executable graph in existence for that graph at a time. An attempt +to instantiate a second executable graph before destroying the first +with cuGraphExecDestroy will result in an error. The same +also applies if hGraph contains any device-updatable kernel nodes.

    +

    If hGraph contains kernels which call device-side cudaGraphLaunch() +from multiple contexts, this will result in an error.

    +

    Graphs instantiated for launch on the device have additional +restrictions which do not apply to host graphs:

    +
      +
    • The graph’s nodes must reside on a single context.

    • +
    • The graph can only contain kernel nodes, memcpy nodes, memset nodes, +and child graph nodes.

    • +
    • The graph cannot be empty and must contain at least one kernel, +memcpy, or memset node. Operation-specific restrictions are outlined +below.

    • +
    • Kernel nodes:

      +
        +
      • Use of CUDA Dynamic Parallelism is not permitted.

      • +
      • Cooperative launches are permitted as long as MPS is not in use.

      • +
      +
    • +
    • Memcpy nodes:

      +
        +
      • Only copies involving device memory and/or pinned device-mapped +host memory are permitted.

      • +
      • Copies involving CUDA arrays are not permitted.

      • +
      • Both operands must be accessible from the current context, and the +current context must match the context of other nodes in the graph.

      • +
      +
    • +
    +

    In the event of an error, the result_out and hErrNode_out fields +will contain more information about the nature of the error. Possible +error reporting includes:

    +
      +
    • CUDA_GRAPH_INSTANTIATE_ERROR, if passed an invalid value +or if an unexpected error occurred which is described by the return +value of the function. hErrNode_out will be set to NULL.

    • +
    • CUDA_GRAPH_INSTANTIATE_INVALID_STRUCTURE, if the graph +structure is invalid. hErrNode_out will be set to one of the +offending nodes.

    • +
    • CUDA_GRAPH_INSTANTIATE_NODE_OPERATION_NOT_SUPPORTED, if +the graph is instantiated for device launch but contains a node of an +unsupported node type, or a node which performs unsupported +operations, such as use of CUDA dynamic parallelism within a kernel +node. hErrNode_out will be set to this node.

    • +
    • CUDA_GRAPH_INSTANTIATE_MULTIPLE_CTXS_NOT_SUPPORTED, if +the graph is instantiated for device launch but a node’s context +differs from that of another node. This error can also be returned if +a graph is not instantiated for device launch and it contains kernels +which call device-side cudaGraphLaunch() from multiple contexts. +hErrNode_out will be set to this node.

    • +
    +

    If instantiation is successful, result_out will be set to +CUDA_GRAPH_INSTANTIATE_SUCCESS, and hErrNode_out will be +set to NULL.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecGetFlags(hGraphExec)
    +

    Query the instantiation flags of an executable graph.

    +

    Returns the flags that were passed to instantiation for the given +executable graph. CUDA_GRAPH_INSTANTIATE_FLAG_UPLOAD will +not be returned by this API as it does not affect the resulting +executable graph.

    +
    +
    Parameters:
    +

    hGraphExec (CUgraphExec or cudaGraphExec_t) – The executable graph to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecKernelNodeSetParams(hGraphExec, hNode, CUDA_KERNEL_NODE_PARAMS nodeParams: Optional[CUDA_KERNEL_NODE_PARAMS])
    +

    Sets the parameters for a kernel node in the given graphExec.

    +

    Sets the parameters of a kernel node in an executable graph +hGraphExec. The node is identified by the corresponding node hNode +in the non-executable graph, from which the executable graph was +instantiated.

    +

    hNode must not have been removed from the original graph. All +nodeParams fields may change, but the following restrictions apply to +func updates:

    +
      +
    • The owning context of the function cannot change.

    • +
    • A node whose function originally did not use CUDA dynamic parallelism +cannot be updated to a function which uses CDP

    • +
    • A node whose function originally did not make device-side update +calls cannot be updated to a function which makes device-side update +calls.

    • +
    • If hGraphExec was not instantiated for device launch, a node whose +function originally did not use device-side cudaGraphLaunch() cannot +be updated to a function which uses device-side cudaGraphLaunch() +unless the node resides on the same context as nodes which contained +such calls at instantiate-time. If no such calls were present at +instantiation, these updates cannot be performed at all.

    • +
    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    If hNode is a device-updatable kernel node, the next upload/launch of +hGraphExec will overwrite any previous device-side updates. +Additionally, applying host updates to a device-updatable kernel node +while it is being updated from the device will result in undefined +behavior.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecMemcpyNodeSetParams(hGraphExec, hNode, CUDA_MEMCPY3D copyParams: Optional[CUDA_MEMCPY3D], ctx)
    +

    Sets the parameters for a memcpy node in the given graphExec.

    +

    Updates the work represented by hNode in hGraphExec as though +hNode had contained copyParams at instantiation. hNode must remain +in the graph which was used to instantiate hGraphExec. Changed edges +to and from hNode are ignored.

    +

    The source and destination memory in copyParams must be allocated +from the same contexts as the original source and destination memory. +Both the instantiation-time memory operands and the memory operands in +copyParams must be 1-dimensional. Zero-length operations are not +supported.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    Returns CUDA_ERROR_INVALID_VALUE if the memory operands’ mappings +changed or either the original or new memory operands are +multidimensional.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecMemsetNodeSetParams(hGraphExec, hNode, CUDA_MEMSET_NODE_PARAMS memsetParams: Optional[CUDA_MEMSET_NODE_PARAMS], ctx)
    +

    Sets the parameters for a memset node in the given graphExec.

    +

    Updates the work represented by hNode in hGraphExec as though +hNode had contained memsetParams at instantiation. hNode must +remain in the graph which was used to instantiate hGraphExec. Changed +edges to and from hNode are ignored.

    +

    Zero sized operations are not supported.

    +

    The new destination pointer in memsetParams must be to the same kind of +allocation as the original destination pointer and have the same +context association and device mapping as the original destination +pointer.

    +

    Both the value and pointer address may be updated. Changing other +aspects of the memset (width, height, element size or pitch) may cause +the update to be rejected. Specifically, for 2d memsets, all dimension +changes are rejected. For 1d memsets, changes in height are explicitly +rejected and other changes are oportunistically allowed if the +resulting work maps onto the work resources already allocated for the +node.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecHostNodeSetParams(hGraphExec, hNode, CUDA_HOST_NODE_PARAMS nodeParams: Optional[CUDA_HOST_NODE_PARAMS])
    +

    Sets the parameters for a host node in the given graphExec.

    +

    Updates the work represented by hNode in hGraphExec as though +hNode had contained nodeParams at instantiation. hNode must remain +in the graph which was used to instantiate hGraphExec. Changed edges +to and from hNode are ignored.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecChildGraphNodeSetParams(hGraphExec, hNode, childGraph)
    +

    Updates node parameters in the child graph node in the given graphExec.

    +

    Updates the work represented by hNode in hGraphExec as though the +nodes contained in hNode’s graph had the parameters contained in +childGraph’s nodes at instantiation. hNode must remain in the graph +which was used to instantiate hGraphExec. Changed edges to and from +hNode are ignored.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    The topology of childGraph, as well as the node insertion order, must +match that of the graph contained in hNode. See +cuGraphExecUpdate() for a list of restrictions on what can +be updated in an instantiated graph. The update is recursive, so child +graph nodes contained within the top level child graph will also be +updated.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
    +

    Sets the event for an event record node in the given graphExec.

    +

    Sets the event of an event record node in an executable graph +hGraphExec. The node is identified by the corresponding node hNode +in the non-executable graph, from which the executable graph was +instantiated.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
    +

    Sets the event for an event wait node in the given graphExec.

    +

    Sets the event of an event wait node in an executable graph +hGraphExec. The node is identified by the corresponding node hNode +in the non-executable graph, from which the executable graph was +instantiated.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS nodeParams: Optional[CUDA_EXT_SEM_SIGNAL_NODE_PARAMS])
    +

    Sets the parameters for an external semaphore signal node in the given graphExec.

    +

    Sets the parameters of an external semaphore signal node in an +executable graph hGraphExec. The node is identified by the +corresponding node hNode in the non-executable graph, from which the +executable graph was instantiated.

    +

    hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    Changing nodeParams->numExtSems is not supported.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, CUDA_EXT_SEM_WAIT_NODE_PARAMS nodeParams: Optional[CUDA_EXT_SEM_WAIT_NODE_PARAMS])
    +

    Sets the parameters for an external semaphore wait node in the given graphExec.

    +

    Sets the parameters of an external semaphore wait node in an executable +graph hGraphExec. The node is identified by the corresponding node +hNode in the non-executable graph, from which the executable graph +was instantiated.

    +

    hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    Changing nodeParams->numExtSems is not supported.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled)
    +

    Enables or disables the specified node in the given graphExec.

    +

    Sets hNode to be either enabled or disabled. Disabled nodes are +functionally equivalent to empty nodes until they are reenabled. +Existing node parameters are not affected by disabling/enabling the +node.

    +

    The node is identified by the corresponding node hNode in the non- +executable graph, from which the executable graph was instantiated.

    +

    hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    If hNode is a device-updatable kernel node, the next upload/launch of +hGraphExec will overwrite any previous device-side updates. +Additionally, applying host updates to a device-updatable kernel node +while it is being updated from the device will result in undefined +behavior.

    +
    +
    Parameters:
    +
      +
    • hGraphExec (CUgraphExec or cudaGraphExec_t) – The executable graph in which to set the specified node

    • +
    • hNode (CUgraphNode or cudaGraphNode_t) – Node from the graph from which graphExec was instantiated

    • +
    • isEnabled (unsigned int) – Node is enabled if != 0, otherwise the node is disabled

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    Currently only kernel, memset and memcpy nodes are supported.

    +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeGetEnabled(hGraphExec, hNode)
    +

    Query whether a node in the given graphExec is enabled.

    +

    Sets isEnabled to 1 if hNode is enabled, or 0 if hNode is disabled.

    +

    The node is identified by the corresponding node hNode in the non- +executable graph, from which the executable graph was instantiated.

    +

    hNode must not have been removed from the original graph.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Currently only kernel, memset and memcpy nodes are supported.

    +

    This function will not reflect device-side updates for device-updatable kernel nodes.

    +
    + +
    +
    +cuda.bindings.driver.cuGraphUpload(hGraphExec, hStream)
    +

    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 +allocations owned by hGraphExec.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphLaunch(hGraphExec, hStream)
    +

    Launches an executable graph in a stream.

    +

    Executes hGraphExec in hStream. Only one instance of hGraphExec +may be executing at a time. Each launch is ordered behind both any +previous work in hStream and any previous launches of hGraphExec. +To execute a graph concurrently, it must be instantiated multiple times +into multiple executable graphs.

    +

    If any allocations created by hGraphExec remain unfreed (from a +previous launch) and hGraphExec was not instantiated with +CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH, the launch +will fail with CUDA_ERROR_INVALID_VALUE.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecDestroy(hGraphExec)
    +

    Destroys an executable graph.

    +

    Destroys the executable graph specified by hGraphExec, as well as all +of its executable nodes. If the executable graph is in-flight, it will +not be terminated, but rather freed asynchronously on completion.

    +
    +
    Parameters:
    +

    hGraphExec (CUgraphExec or cudaGraphExec_t) – Executable graph to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphDestroy(hGraph)
    +

    Destroys a graph.

    +

    Destroys the graph specified by hGraph, as well as all of its nodes.

    +
    +
    Parameters:
    +

    hGraph (CUgraph or cudaGraph_t) – Graph to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    cuGraphCreate

    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphExecUpdate(hGraphExec, hGraph)
    +

    Check whether an executable graph can be updated with a graph and perform the update if possible.

    +

    Updates the node parameters in the instantiated graph specified by +hGraphExec with the node parameters in a topologically identical +graph specified by hGraph.

    +

    Limitations:

    +
      +
    • Kernel nodes:

      +
        +
      • The owning context of the function cannot change.

      • +
      • A node whose function originally did not use CUDA dynamic +parallelism cannot be updated to a function which uses CDP.

      • +
      • A node whose function originally did not make device-side update +calls cannot be updated to a function which makes device-side +update calls.

      • +
      • A cooperative node cannot be updated to a non-cooperative node, and +vice-versa.

      • +
      • If the graph was instantiated with +CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY, the priority +attribute cannot change. Equality is checked on the originally +requested priority values, before they are clamped to the device’s +supported range.

      • +
      • If hGraphExec was not instantiated for device launch, a node +whose function originally did not use device-side cudaGraphLaunch() +cannot be updated to a function which uses device-side +cudaGraphLaunch() unless the node resides on the same context as +nodes which contained such calls at instantiate-time. If no such +calls were present at instantiation, these updates cannot be +performed at all.

      • +
      • Neither hGraph nor hGraphExec may contain device-updatable +kernel nodes.

      • +
      +
    • +
    • Memset and memcpy nodes:

      +
        +
      • The CUDA device(s) to which the operand(s) was allocated/mapped +cannot change.

      • +
      • The source/destination memory must be allocated from the same +contexts as the original source/destination memory.

      • +
      • For 2d memsets, only address and assinged value may be updated.

      • +
      • For 1d memsets, updating dimensions is also allowed, but may fail +if the resulting operation doesn’t map onto the work resources +already allocated for the node.

      • +
      +
    • +
    • Additional memcpy node restrictions:

      +
        +
      • Changing either the source or destination memory type(i.e. +CU_MEMORYTYPE_DEVICE, CU_MEMORYTYPE_ARRAY, etc.) is not supported.

      • +
      +
    • +
    • External semaphore wait nodes and record nodes:

      +
        +
      • Changing the number of semaphores is not supported.

      • +
      +
    • +
    • Conditional nodes:

      +
        +
      • Changing node parameters is not supported.

      • +
      • Changeing parameters of nodes within the conditional body graph is +subject to the rules above.

      • +
      • Conditional handle flags and default values are updated as part of +the graph update.

      • +
      +
    • +
    +

    Note: The API may add further restrictions in future releases. The +return code should always be checked.

    +

    cuGraphExecUpdate sets the result member of resultInfo to +CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED under the following +conditions:

    +
      +
    • The count of nodes directly in hGraphExec and hGraph differ, in +which case resultInfo->errorNode is set to NULL.

    • +
    • hGraph has more exit nodes than hGraph, in which case +resultInfo->errorNode is set to one of the exit nodes in hGraph.

    • +
    • A node in hGraph has a different number of dependencies than the +node from hGraphExec it is paired with, in which case +resultInfo->errorNode is set to the node from hGraph.

    • +
    • A node in hGraph has a dependency that does not match with the +corresponding dependency of the paired node from hGraphExec. +resultInfo->errorNode will be set to the node from hGraph. +resultInfo->errorFromNode will be set to the mismatched dependency. +The dependencies are paired based on edge order and a dependency does +not match when the nodes are already paired based on other edges +examined in the graph.

    • +
    +

    cuGraphExecUpdate sets the result member of resultInfo to:

    +
      +
    • CU_GRAPH_EXEC_UPDATE_ERROR if passed an invalid value.

    • +
    • CU_GRAPH_EXEC_UPDATE_ERROR_TOPOLOGY_CHANGED if the graph topology +changed

    • +
    • CU_GRAPH_EXEC_UPDATE_ERROR_NODE_TYPE_CHANGED if the type of a node +changed, in which case hErrorNode_out is set to the node from +hGraph.

    • +
    • CU_GRAPH_EXEC_UPDATE_ERROR_UNSUPPORTED_FUNCTION_CHANGE if the +function changed in an unsupported way(see note above), in which case +hErrorNode_out is set to the node from hGraph

    • +
    • CU_GRAPH_EXEC_UPDATE_ERROR_PARAMETERS_CHANGED if any parameters to a +node changed in a way that is not supported, in which case +hErrorNode_out is set to the node from hGraph.

    • +
    • CU_GRAPH_EXEC_UPDATE_ERROR_ATTRIBUTES_CHANGED if any attributes of a +node changed in a way that is not supported, in which case +hErrorNode_out is set to the node from hGraph.

    • +
    • CU_GRAPH_EXEC_UPDATE_ERROR_NOT_SUPPORTED if something about a node is +unsupported, like the node’s type or configuration, in which case +hErrorNode_out is set to the node from hGraph

    • +
    +

    If the update fails for a reason not listed above, the result member of +resultInfo will be set to CU_GRAPH_EXEC_UPDATE_ERROR. If the update +succeeds, the result member will be set to +CU_GRAPH_EXEC_UPDATE_SUCCESS.

    +

    cuGraphExecUpdate returns CUDA_SUCCESS when the updated was performed +successfully. It returns CUDA_ERROR_GRAPH_EXEC_UPDATE_FAILURE if the +graph update was not performed because it included changes which +violated constraints specific to instantiated graph update.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuGraphInstantiate

    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphKernelNodeCopyAttributes(dst, src)
    +

    Copies attributes from source node to destination node.

    +

    Copies attributes from source node src to destination node dst. +Both node must have the same context.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    CUaccessPolicyWindow

    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphKernelNodeGetAttribute(hNode, attr: CUkernelNodeAttrID)
    +

    Queries node attribute.

    +

    Queries attribute attr from node hNode and stores it in +corresponding member of value_out.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    CUaccessPolicyWindow

    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphKernelNodeSetAttribute(hNode, attr: CUkernelNodeAttrID, CUkernelNodeAttrValue value: Optional[CUkernelNodeAttrValue])
    +

    Sets node attribute.

    +

    Sets attribute attr on node hNode from corresponding attribute of +value.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    CUaccessPolicyWindow

    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphDebugDotPrint(hGraph, char *path, unsigned int flags)
    +

    Write a DOT file describing graph structure.

    +

    Using the provided hGraph, write to path a DOT formatted +description of the graph. By default this includes the graph topology, +node types, node id, kernel names and memcpy direction. flags can be +specified to write more detailed information about each node type such +as parameter values, kernel attributes, node and function handles.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – The graph to create a DOT file from

    • +
    • path (bytes) – The path to write the DOT file to

    • +
    • flags (unsigned int) – Flags from CUgraphDebugDot_flags for specifying which additional +node information to write

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_OPERATING_SYSTEM

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags)
    +

    Create a user object.

    +

    Create a user object with the specified destructor callback and initial +reference count. The initial references are owned by the caller.

    +

    Destructor callbacks cannot make CUDA API calls and should avoid +blocking behavior, as they are executed by a shared internal thread. +Another thread may be signaled to perform such actions, if it does not +block forward progress of tasks scheduled through CUDA.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • ptr (Any) – The pointer to pass to the destroy function

    • +
    • destroy (CUhostFn) – Callback to free the user object when it is no longer in use

    • +
    • initialRefcount (unsigned int) – The initial refcount to create the object with, typically 1. The +initial references are owned by the calling thread.

    • +
    • flags (unsigned int) – Currently it is required to pass +CU_USER_OBJECT_NO_DESTRUCTOR_SYNC, which is the only +defined flag. This indicates that the destroy callback cannot be +waited on by any CUDA API. Users requiring synchronization of the +callback should signal its completion manually.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuUserObjectRetain(object, unsigned int count)
    +

    Retain a reference to a user object.

    +

    Retains new references to a user object. The new references are owned +by the caller.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • object (CUuserObject) – The object to retain

    • +
    • count (unsigned int) – The number of references to retain, typically 1. Must be nonzero +and not larger than INT_MAX.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuUserObjectRelease(object, unsigned int count)
    +

    Release a reference to a user object.

    +

    Releases user object references owned by the caller. The object’s +destructor is invoked if the reference count reaches zero.

    +

    It is undefined behavior to release references not owned by the caller, +or to use a user object handle after all references are released.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • object (CUuserObject) – The object to release

    • +
    • count (unsigned int) – The number of references to release, typically 1. Must be nonzero +and not larger than INT_MAX.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags)
    +

    Retain a reference to a user object from a graph.

    +

    Creates or moves user object references that will be owned by a CUDA +graph.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – The graph to associate the reference with

    • +
    • object (CUuserObject) – The user object to retain a reference for

    • +
    • count (unsigned int) – The number of references to add to the graph, typically 1. Must be +nonzero and not larger than INT_MAX.

    • +
    • flags (unsigned int) – The optional flag CU_GRAPH_USER_OBJECT_MOVE transfers +references from the calling thread, rather than create new +references. Pass 0 to create new references.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphReleaseUserObject(graph, object, unsigned int count)
    +

    Release a user object reference from a graph.

    +

    Releases user object references owned by a graph.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – The graph that will release the reference

    • +
    • object (CUuserObject) – The user object to release a reference for

    • +
    • count (unsigned int) – The number of references to release, typically 1. Must be nonzero +and not larger than INT_MAX.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddNode(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], size_t numDependencies, CUgraphNodeParams 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.

    +

    A handle to the new node will be returned in phGraphNode.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • nodeParams (CUgraphNodeParams) – Specification of the node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphAddNode_v2(hGraph, dependencies: Optional[Tuple[CUgraphNode] | List[CUgraphNode]], dependencyData: Optional[Tuple[CUgraphEdgeData] | List[CUgraphEdgeData]], size_t numDependencies, CUgraphNodeParams nodeParams: Optional[CUgraphNodeParams])
    +

    Adds a node of arbitrary type to a graph (12.3+)

    +

    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.

    +

    A handle to the new node will be returned in phGraphNode.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • dependencies (List[CUgraphNode]) – Dependencies of the node

    • +
    • dependencyData (List[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 (CUgraphNodeParams) – Specification of the node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphNodeSetParams(hNode, CUgraphNodeParams nodeParams: Optional[CUgraphNodeParams])
    +

    Update’s 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.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphExecNodeSetParams(hGraphExec, hNode, CUgraphNodeParams nodeParams: Optional[CUgraphNodeParams])
    +

    Update’s a graph node’s parameters in an instantiated graph.

    +

    Sets the parameters of a node in an executable graph hGraphExec. The +node is identified by the corresponding node hNode in the non- +executable graph from which the executable graph was instantiated. +hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    Allowed changes to parameters on executable graphs are as follows:

    +

    View CUDA Toolkit Documentation for a table example

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_NOT_SUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphConditionalHandleCreate(hGraph, ctx, unsigned int defaultLaunchValue, unsigned int flags)
    +

    Create a conditional handle.

    +

    Creates a conditional handle associated with hGraph.

    +

    The conditional handle must be associated with a conditional node in +this graph or one of its children.

    +

    Handles not associated with a conditional node may cause graph +instantiation to fail.

    +

    Handles can only be set from the context with which they are +associated.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph which will contain the conditional node using this handle.

    • +
    • ctx (CUcontext) – Context for the handle and associated conditional node.

    • +
    • defaultLaunchValue (unsigned int) – Optional initial value for the conditional variable.

    • +
    • flags (unsigned int) – Currently must be CU_GRAPH_COND_ASSIGN_DEFAULT or 0.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuGraphAddNode

    +
    +
    + +
    +
    +

    Occupancy

    +

    This section describes the occupancy calculation functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize)
    +

    Returns occupancy of a function.

    +

    Returns in *numBlocks the number of the maximum active blocks per +streaming multiprocessor.

    +

    Note that the API can also be used with context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to use for +calculations will be the current context.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – Kernel for which occupancy is calculated

    • +
    • blockSize (int) – Block size the kernel is intended to be launched with

    • +
    • dynamicSMemSize (size_t) – Per-block dynamic shared memory usage intended, in bytes

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags)
    +

    Returns occupancy of a function.

    +

    Returns in *numBlocks the number of the maximum active blocks per +streaming multiprocessor.

    +

    The Flags parameter controls how special cases are handled. The valid +flags are:

    + +

    Note that the API can also be with launch context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to use for +calculations will be the current context.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – Kernel for which occupancy is calculated

    • +
    • blockSize (int) – Block size the kernel is intended to be launched with

    • +
    • dynamicSMemSize (size_t) – Per-block dynamic shared memory usage intended, in bytes

    • +
    • flags (unsigned int) – Requested behavior for the occupancy calculator

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuOccupancyMaxPotentialBlockSize(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit)
    +

    Suggest a launch configuration with reasonable occupancy.

    +

    Returns in *blockSize a reasonable block size that can achieve the +maximum occupancy (or, the maximum number of active warps with the +fewest blocks per multiprocessor), and in *minGridSize the minimum +grid size to achieve the maximum occupancy.

    +

    If blockSizeLimit is 0, the configurator will use the maximum block +size permitted by the device / function instead.

    +

    If per-block dynamic shared memory allocation is not needed, the user +should leave both blockSizeToDynamicSMemSize and dynamicSMemSize as +0.

    +

    If per-block dynamic shared memory allocation is needed, then if the +dynamic shared memory size is constant regardless of block size, the +size should be passed through dynamicSMemSize, and +blockSizeToDynamicSMemSize should be NULL.

    +

    Otherwise, if the per-block dynamic shared memory size varies with +different block sizes, the user needs to provide a unary function +through blockSizeToDynamicSMemSize that computes the dynamic shared +memory needed by func for any given block size. dynamicSMemSize is +ignored. An example signature is:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    Note that the API can also be used with context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to use for +calculations will be the current context.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – Kernel for which launch configuration is calculated

    • +
    • blockSizeToDynamicSMemSize (CUoccupancyB2DSize) – A function that calculates how much per-block dynamic shared memory +func uses based on the block size

    • +
    • dynamicSMemSize (size_t) – Dynamic shared memory usage intended, in bytes

    • +
    • blockSizeLimit (int) – The maximum block size func is designed to handle

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaOccupancyMaxPotentialBlockSize

    +
    +
    + +
    +
    +cuda.bindings.driver.cuOccupancyMaxPotentialBlockSizeWithFlags(func, blockSizeToDynamicSMemSize, size_t dynamicSMemSize, int blockSizeLimit, unsigned int flags)
    +

    Suggest a launch configuration with reasonable occupancy.

    +

    An extended version of cuOccupancyMaxPotentialBlockSize. In +addition to arguments passed to +cuOccupancyMaxPotentialBlockSize, +cuOccupancyMaxPotentialBlockSizeWithFlags also takes a +Flags parameter.

    +

    The Flags parameter controls how special cases are handled. The valid +flags are:

    +
      +
    • CU_OCCUPANCY_DEFAULT, which maintains the default +behavior as cuOccupancyMaxPotentialBlockSize;

    • +
    • CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE, which suppresses +the default behavior on platform where global caching affects +occupancy. On such platforms, the launch configurations that produces +maximal occupancy might not support global caching. Setting +CU_OCCUPANCY_DISABLE_CACHING_OVERRIDE guarantees that the +the produced launch configuration is global caching compatible at a +potential cost of occupancy. More information can be found about this +feature in the “Unified L1/Texture Cache” section of the Maxwell +tuning guide.

    • +
    +

    Note that the API can also be used with context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to use for +calculations will be the current context.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – Kernel for which launch configuration is calculated

    • +
    • blockSizeToDynamicSMemSize (CUoccupancyB2DSize) – A function that calculates how much per-block dynamic shared memory +func uses based on the block size

    • +
    • dynamicSMemSize (size_t) – Dynamic shared memory usage intended, in bytes

    • +
    • blockSizeLimit (int) – The maximum block size func is designed to handle

    • +
    • flags (unsigned int) – Options

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaOccupancyMaxPotentialBlockSizeWithFlags

    +
    +
    + +
    +
    +cuda.bindings.driver.cuOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize)
    +

    Returns dynamic shared memory available per block when launching numBlocks blocks on SM.

    +

    Returns in *dynamicSmemSize the maximum size of dynamic shared memory +to allow numBlocks blocks per SM.

    +

    Note that the API can also be used with context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to use for +calculations will be the current context.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – Kernel function for which occupancy is calculated

    • +
    • numBlocks (int) – Number of blocks to fit on SM

    • +
    • blockSize (int) – Size of the blocks

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuOccupancyMaxPotentialClusterSize(func, CUlaunchConfig config: Optional[CUlaunchConfig])
    +

    Given the kernel function (func) and launch configuration (config), return the maximum cluster size in *clusterSize.

    +

    The cluster dimensions in config are ignored. If func has a required +cluster size set (see cudaFuncGetAttributes / +cuFuncGetAttribute),`*clusterSize` will reflect the +required cluster size.

    +

    By default this function will always return a value that’s portable on +future hardware. A higher value may be returned if the kernel function +allows non-portable cluster sizes.

    +

    This function will respect the compile time launch bounds.

    +

    Note that the API can also be used with context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to use for +calculations will either be taken from the specified stream +config->hStream or the current context in case of NULL stream.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – Kernel function for which maximum cluster size is calculated

    • +
    • config (CUlaunchConfig) – Launch configuration for the given kernel function

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuOccupancyMaxActiveClusters(func, CUlaunchConfig config: Optional[CUlaunchConfig])
    +

    Given the kernel function (func) and launch configuration (config), return the maximum number of clusters that could co-exist on the target device in *numClusters.

    +

    If the function has required cluster size already set (see +cudaFuncGetAttributes / cuFuncGetAttribute), +the cluster size from config must either be unspecified or match the +required size. Without required sizes, the cluster size must be +specified in config, else the function will return an error.

    +

    Note that various attributes of the kernel function may affect +occupancy calculation. Runtime environment may affect how the hardware +schedules the clusters, so the calculated occupancy is not guaranteed +to be achievable.

    +

    Note that the API can also be used with context-less kernel +CUkernel by querying the handle using +cuLibraryGetKernel() and then passing it to the API by +casting to CUfunction. Here, the context to use for +calculations will either be taken from the specified stream +config->hStream or the current context in case of NULL stream.

    +
    +
    Parameters:
    +
      +
    • func (CUfunction) – Kernel function for which maximum number of clusters are calculated

    • +
    • config (CUlaunchConfig) – Launch configuration for the given kernel function

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Texture Object Management

    +

    This section describes the texture object management functions of the low-level CUDA driver application programming interface. The texture object API is only supported on devices of compute capability 3.0 or higher.

    +
    +
    +cuda.bindings.driver.cuTexObjectCreate(CUDA_RESOURCE_DESC pResDesc: Optional[CUDA_RESOURCE_DESC], CUDA_TEXTURE_DESC pTexDesc: Optional[CUDA_TEXTURE_DESC], CUDA_RESOURCE_VIEW_DESC pResViewDesc: Optional[CUDA_RESOURCE_VIEW_DESC])
    +

    Creates a texture object.

    +

    Creates a texture object and returns it in pTexObject. pResDesc +describes the data to texture from. pTexDesc describes how the data +should be sampled. pResViewDesc is an optional argument that +specifies an alternate format for the data described by pResDesc, and +also describes the subresource region to restrict access to when +texturing. pResViewDesc can only be specified if the type of resource +is a CUDA array or a CUDA mipmapped array not in a block compressed +format.

    +

    Texture objects are only supported on devices of compute capability 3.0 +or higher. Additionally, a texture object is an opaque value, and, as +such, should only be accessed through CUDA API calls.

    +

    The CUDA_RESOURCE_DESC structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • resType specifies the type of resource +to texture from. CUresourceType is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    +

    If resType is set to +CU_RESOURCE_TYPE_ARRAY, +CUDA_RESOURCE_DESC::res::array::hArray must be set to a +valid CUDA array handle.

    +

    If resType is set to +CU_RESOURCE_TYPE_MIPMAPPED_ARRAY, +CUDA_RESOURCE_DESC::res::mipmap::hMipmappedArray must be +set to a valid CUDA mipmapped array handle.

    +

    If resType is set to +CU_RESOURCE_TYPE_LINEAR, +CUDA_RESOURCE_DESC::res::linear::devPtr must be set to a +valid device pointer, that is aligned to +CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT. +CUDA_RESOURCE_DESC::res::linear::format and +CUDA_RESOURCE_DESC::res::linear::numChannels describe the +format of each component and the number of components per array +element. CUDA_RESOURCE_DESC::res::linear::sizeInBytes +specifies the size of the array in bytes. The total number of elements +in the linear address range cannot exceed +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH. The +number of elements is computed as (sizeInBytes / (sizeof(format) * +numChannels)).

    +

    If resType is set to +CU_RESOURCE_TYPE_PITCH2D, +CUDA_RESOURCE_DESC::res::pitch2D::devPtr must be set to a +valid device pointer, that is aligned to +CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT. +CUDA_RESOURCE_DESC::res::pitch2D::format and +CUDA_RESOURCE_DESC::res::pitch2D::numChannels describe the +format of each component and the number of components per array +element. CUDA_RESOURCE_DESC::res::pitch2D::width and +CUDA_RESOURCE_DESC::res::pitch2D::height specify the width +and height of the array in elements, and cannot exceed +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_WIDTH and +CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_HEIGHT +respectively. +CUDA_RESOURCE_DESC::res::pitch2D::pitchInBytes specifies +the pitch between two rows in bytes and has to be aligned to +CU_DEVICE_ATTRIBUTE_TEXTURE_PITCH_ALIGNMENT. Pitch cannot +exceed CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_LINEAR_PITCH.

    +
      +
    • flags must be set to zero.

    • +
    +

    The CUDA_TEXTURE_DESC struct is defined as

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where

    +
      +
    • addressMode specifies the addressing +mode for each dimension of the texture data. +CUaddress_mode is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • This is ignored if resType is +CU_RESOURCE_TYPE_LINEAR. Also, if the flag, +CU_TRSF_NORMALIZED_COORDINATES is not set, the only +supported address mode is CU_TR_ADDRESS_MODE_CLAMP.

    • +
    • filterMode specifies the filtering mode +to be used when fetching from the texture. CUfilter_mode is defined +as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • This is ignored if resType is +CU_RESOURCE_TYPE_LINEAR.

    • +
    • flags can be any combination of the +following:

      +
        +
      • CU_TRSF_READ_AS_INTEGER, which suppresses the default +behavior of having the texture promote integer data to floating +point data in the range [0, 1]. Note that texture with 32-bit +integer format would not be promoted, regardless of whether or not +this flag is specified.

      • +
      • CU_TRSF_NORMALIZED_COORDINATES, which suppresses the +default behavior of having the texture coordinates range from [0, +Dim) where Dim is the width or height of the CUDA array. Instead, +the texture coordinates [0, 1.0) reference the entire breadth of +the array dimension; Note that for CUDA mipmapped arrays, this flag +has to be set.

      • +
      • CU_TRSF_DISABLE_TRILINEAR_OPTIMIZATION, which disables +any trilinear filtering optimizations. Trilinear optimizations +improve texture filtering performance by allowing bilinear +filtering on textures in scenarios where it can closely approximate +the expected results.

      • +
      • CU_TRSF_SEAMLESS_CUBEMAP, which enables seamless cube +map filtering. This flag can only be specified if the underlying +resource is a CUDA array or a CUDA mipmapped array that was created +with the flag CUDA_ARRAY3D_CUBEMAP. When seamless cube +map filtering is enabled, texture address modes specified by +addressMode are ignored. Instead, if +the filterMode is set to +CU_TR_FILTER_MODE_POINT the address mode +CU_TR_ADDRESS_MODE_CLAMP will be applied for all +dimensions. If the filterMode is set +to CU_TR_FILTER_MODE_LINEAR seamless cube map filtering +will be performed when sampling along the cube face borders.

      • +
      +
    • +
    • maxAnisotropy specifies the maximum +anisotropy ratio to be used when doing anisotropic filtering. This +value will be clamped to the range [1,16].

    • +
    • mipmapFilterMode specifies the filter +mode when the calculated mipmap level lies between two defined mipmap +levels.

    • +
    • mipmapLevelBias specifies the offset to +be applied to the calculated mipmap level.

    • +
    • minMipmapLevelClamp specifies the lower +end of the mipmap level range to clamp access to.

    • +
    • maxMipmapLevelClamp specifies the upper +end of the mipmap level range to clamp access to.

    • +
    +

    The CUDA_RESOURCE_VIEW_DESC struct is defined as

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • format specifies how the data +contained in the CUDA array or CUDA mipmapped array should be +interpreted. Note that this can incur a change in size of the texture +data. If the resource view format is a block compressed format, then +the underlying CUDA array or CUDA mipmapped array has to have a base +of format CU_AD_FORMAT_UNSIGNED_INT32. with 2 or 4 +channels, depending on the block compressed format. For ex., BC1 and +BC4 require the underlying CUDA array to have a format of +CU_AD_FORMAT_UNSIGNED_INT32 with 2 channels. The other BC +formats require the underlying resource to have the same base format +but with 4 channels.

    • +
    • width specifies the new width of +the texture data. If the resource view format is a block compressed +format, this value has to be 4 times the original width of the +resource. For non block compressed formats, this value has to be +equal to that of the original resource.

    • +
    • height specifies the new height +of the texture data. If the resource view format is a block +compressed format, this value has to be 4 times the original height +of the resource. For non block compressed formats, this value has to +be equal to that of the original resource.

    • +
    • depth specifies the new depth of +the texture data. This value has to be equal to that of the original +resource.

    • +
    • firstMipmapLevel specifies the +most detailed mipmap level. This will be the new mipmap level zero. +For non-mipmapped resources, this value has to be +zero.:py:obj:~.CUDA_TEXTURE_DESC.minMipmapLevelClamp and +maxMipmapLevelClamp will be relative to +this value. For ex., if the firstMipmapLevel is set to 2, and a +minMipmapLevelClamp of 1.2 is specified, then the actual minimum +mipmap level clamp will be 3.2.

    • +
    • lastMipmapLevel specifies the +least detailed mipmap level. For non-mipmapped resources, this value +has to be zero.

    • +
    • firstLayer specifies the first +layer index for layered textures. This will be the new layer zero. +For non-layered resources, this value has to be zero.

    • +
    • lastLayer specifies the last +layer index for layered textures. For non-layered resources, this +value has to be zero.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuTexObjectDestroy(texObject)
    +

    Destroys a texture object.

    +

    Destroys the texture object specified by texObject.

    +
    +
    Parameters:
    +

    texObject (CUtexObject) – Texture object to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuTexObjectGetResourceDesc(texObject)
    +

    Returns a texture object’s resource descriptor.

    +

    Returns the resource descriptor for the texture object specified by +texObject.

    +
    +
    Parameters:
    +

    texObject (CUtexObject) – Texture object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuTexObjectGetTextureDesc(texObject)
    +

    Returns a texture object’s texture descriptor.

    +

    Returns the texture descriptor for the texture object specified by +texObject.

    +
    +
    Parameters:
    +

    texObject (CUtexObject) – Texture object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuTexObjectGetResourceViewDesc(texObject)
    +

    Returns a texture object’s resource view descriptor.

    +

    Returns the resource view descriptor for the texture object specified +by texObject. If no resource view was set for texObject, the +CUDA_ERROR_INVALID_VALUE is returned.

    +
    +
    Parameters:
    +

    texObject (CUtexObject) – Texture object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Surface Object Management

    +

    This section describes the surface object management functions of the low-level CUDA driver application programming interface. The surface object API is only supported on devices of compute capability 3.0 or higher.

    +
    +
    +cuda.bindings.driver.cuSurfObjectCreate(CUDA_RESOURCE_DESC pResDesc: Optional[CUDA_RESOURCE_DESC])
    +

    Creates a surface object.

    +

    Creates a surface object and returns it in pSurfObject. pResDesc +describes the data to perform surface load/stores on. +resType must be +CU_RESOURCE_TYPE_ARRAY and +CUDA_RESOURCE_DESC::res::array::hArray must be set to a +valid CUDA array handle. flags must be +set to zero.

    +

    Surface objects are only supported on devices of compute capability 3.0 +or higher. Additionally, a surface object is an opaque value, and, as +such, should only be accessed through CUDA API calls.

    +
    +
    Parameters:
    +

    pResDesc (CUDA_RESOURCE_DESC) – Resource descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuSurfObjectDestroy(surfObject)
    +

    Destroys a surface object.

    +

    Destroys the surface object specified by surfObject.

    +
    +
    Parameters:
    +

    surfObject (CUsurfObject) – Surface object to destroy

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuSurfObjectGetResourceDesc(surfObject)
    +

    Returns a surface object’s resource descriptor.

    +

    Returns the resource descriptor for the surface object specified by +surfObject.

    +
    +
    Parameters:
    +

    surfObject (CUsurfObject) – Surface object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Tensor Map Object Managment

    +

    This section describes the tensor map object management functions of the low-level CUDA driver application programming interface. The tensor core API is only supported on devices of compute capability 9.0 or higher.

    +
    +
    +cuda.bindings.driver.cuTensorMapEncodeTiled(tensorDataType: CUtensorMapDataType, tensorRank, globalAddress, globalDim: Tuple[cuuint64_t] | List[cuuint64_t] | None, globalStrides: Tuple[cuuint64_t] | List[cuuint64_t] | None, boxDim: Tuple[cuuint32_t] | List[cuuint32_t] | None, elementStrides: Tuple[cuuint32_t] | List[cuuint32_t] | None, interleave: CUtensorMapInterleave, swizzle: CUtensorMapSwizzle, l2Promotion: CUtensorMapL2promotion, oobFill: CUtensorMapFloatOOBfill)
    +

    Create a tensor map descriptor object representing tiled memory region.

    +

    Creates a descriptor for Tensor Memory Access (TMA) object specified by +the parameters describing a tiled region and returns it in tensorMap.

    +

    Tensor map objects are only supported on devices of compute capability +9.0 or higher. Additionally, a tensor map object is an opaque value, +and, as such, should only be accessed through CUDA API calls.

    +

    The parameters passed are bound to the following requirements:

    +
      +
    • tensorMap address must be aligned to 64 bytes.

    • +
    • tensorDataType has to be an enum from +CUtensorMapDataType which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • tensorRank must be non-zero and less than or equal to the maximum +supported dimensionality of 5. If interleave is not +CU_TENSOR_MAP_INTERLEAVE_NONE, then tensorRank must +additionally be greater than or equal to 3.

    • +
    • globalAddress, which specifies the starting address of the memory +region described, must be 32 byte aligned when interleave is +CU_TENSOR_MAP_INTERLEAVE_32B and 16 byte aligned +otherwise.

    • +
    • globalDim array, which specifies tensor size of each of the +tensorRank dimensions, must be non-zero and less than or equal to +2^32.

    • +
    • globalStrides array, which specifies tensor stride of each of the +lower tensorRank - 1 dimensions in bytes, must be a multiple of 16 +and less than 2^40. Additionally, the stride must be a multiple of 32 +when interleave is CU_TENSOR_MAP_INTERLEAVE_32B. Each +following dimension specified includes previous dimension stride:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • boxDim array, which specifies number of elements to be traversed +along each of the tensorRank dimensions, must be non-zero and less +than or equal to 256. When interleave is +CU_TENSOR_MAP_INTERLEAVE_NONE, { boxDim`[0] * +elementSizeInBytes( `tensorDataType ) } must be a multiple of 16 +bytes.

    • +
    • elementStrides array, which specifies the iteration step along each +of the tensorRank dimensions, must be non-zero and less than or +equal to 8. Note that when interleave is +CU_TENSOR_MAP_INTERLEAVE_NONE, the first element of this +array is ignored since TMA doesn’t support the stride for dimension +zero. When all elements of elementStrides array is one, boxDim +specifies the number of elements to load. However, if the +`elementStrides`[i] is not equal to one, then TMA loads ceil( +`boxDim`[i] / `elementStrides`[i]) number of elements along i-th +dimension. To load N elements along i-th dimension, `boxDim`[i] must +be set to N * `elementStrides`[i].

    • +
    • interleave specifies the interleaved layout of type +CUtensorMapInterleave, which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 +bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16 +uses 32 bytes. When interleave is +CU_TENSOR_MAP_INTERLEAVE_NONE and swizzle is not +CU_TENSOR_MAP_SWIZZLE_NONE, the bounding box inner +dimension (computed as boxDim`[0] multiplied by element size derived +from `tensorDataType) must be less than or equal to the swizzle +size.

      +
        +
      • CU_TENSOR_MAP_SWIZZLE_32B implies the bounding box inner dimension +will be <= 32.

      • +
      • CU_TENSOR_MAP_SWIZZLE_64B implies the bounding box inner dimension +will be <= 64.

      • +
      • CU_TENSOR_MAP_SWIZZLE_128B implies the bounding box inner dimension +will be <= 128.

      • +
      +
    • +
    • swizzle, which specifies the shared memory bank swizzling pattern, +has to be of type CUtensorMapSwizzle which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • Data are organized in a specific order in global memory; however, +this may not match the order in which the application accesses data +in shared memory. This difference in data organization may cause bank +conflicts when shared memory is accessed. In order to avoid this +problem, data can be loaded to shared memory with shuffling across +shared memory banks. When interleave is +CU_TENSOR_MAP_INTERLEAVE_32B, swizzle must be +CU_TENSOR_MAP_SWIZZLE_32B. Other interleave modes can +have any swizzling pattern.

    • +
    • l2Promotion specifies L2 fetch size which indicates the byte +granurality at which L2 requests is filled from DRAM. It must be of +type CUtensorMapL2promotion, which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • oobFill, which indicates whether zero or a special NaN constant +should be used to fill out-of-bound elements, must be of type +CUtensorMapFloatOOBfill which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • Note that +CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA can +only be used when tensorDataType represents a floating-point data +type.

    • +
    +
    +
    Parameters:
    +
      +
    • tensorDataType (CUtensorMapDataType) – Tensor data type

    • +
    • tensorRank (Any) – Dimensionality of tensor

    • +
    • globalAddress (Any) – Starting address of memory region described by tensor

    • +
    • globalDim (List[cuuint64_t]) – Array containing tensor size (number of elements) along each of the +tensorRank dimensions

    • +
    • globalStrides (List[cuuint64_t]) – Array containing stride size (in bytes) along each of the +tensorRank - 1 dimensions

    • +
    • boxDim (List[cuuint32_t]) – Array containing traversal box size (number of elments) along each +of the tensorRank dimensions. Specifies how many elements to be +traversed along each tensor dimension.

    • +
    • elementStrides (List[cuuint32_t]) – Array containing traversal stride in each of the tensorRank +dimensions

    • +
    • interleave (CUtensorMapInterleave) – Type of interleaved layout the tensor addresses

    • +
    • swizzle (CUtensorMapSwizzle) – Bank swizzling pattern inside shared memory

    • +
    • l2Promotion (CUtensorMapL2promotion) – L2 promotion size

    • +
    • oobFill (CUtensorMapFloatOOBfill) – Indicate whether zero or special NaN constant must be used to fill +out-of-bound elements

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuTensorMapEncodeIm2col(tensorDataType: CUtensorMapDataType, tensorRank, globalAddress, globalDim: Tuple[cuuint64_t] | List[cuuint64_t] | None, globalStrides: Tuple[cuuint64_t] | List[cuuint64_t] | None, pixelBoxLowerCorner: Tuple[int] | List[int] | None, pixelBoxUpperCorner: Tuple[int] | List[int] | None, channelsPerPixel, pixelsPerColumn, elementStrides: Tuple[cuuint32_t] | List[cuuint32_t] | None, interleave: CUtensorMapInterleave, swizzle: CUtensorMapSwizzle, l2Promotion: CUtensorMapL2promotion, oobFill: CUtensorMapFloatOOBfill)
    +

    Create a tensor map descriptor object representing im2col memory region.

    +

    Creates a descriptor for Tensor Memory Access (TMA) object specified by +the parameters describing a im2col memory layout and returns it in +tensorMap.

    +

    Tensor map objects are only supported on devices of compute capability +9.0 or higher. Additionally, a tensor map object is an opaque value, +and, as such, should only be accessed through CUDA API calls.

    +

    The parameters passed are bound to the following requirements:

    +
      +
    • tensorMap address must be aligned to 64 bytes.

    • +
    • tensorDataType has to be an enum from +CUtensorMapDataType which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • tensorRank, which specifies the number of tensor dimensions, must +be 3, 4, or 5.

    • +
    • globalAddress, which specifies the starting address of the memory +region described, must be 32 byte aligned when interleave is +CU_TENSOR_MAP_INTERLEAVE_32B and 16 byte aligned +otherwise.

    • +
    • globalDim array, which specifies tensor size of each of the +tensorRank dimensions, must be non-zero and less than or equal to +2^32.

    • +
    • globalStrides array, which specifies tensor stride of each of the +lower tensorRank - 1 dimensions in bytes, must be a multiple of 16 +and less than 2^40. Additionally, the stride must be a multiple of 32 +when interleave is CU_TENSOR_MAP_INTERLEAVE_32B. Each +following dimension specified includes previous dimension stride:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • pixelBoxLowerCorner array specifies the coordinate offsets {D, H, +W} of the bounding box from top/left/front corner. The number of +offsets and their precision depend on the tensor dimensionality:

      +
        +
      • When tensorRank is 3, one signed offset within range [-32768, +32767] is supported.

      • +
      • When tensorRank is 4, two signed offsets each within range [-128, +127] are supported.

      • +
      • When tensorRank is 5, three offsets each within range [-16, 15] +are supported.

      • +
      +
    • +
    • pixelBoxUpperCorner array specifies the coordinate offsets {D, H, +W} of the bounding box from bottom/right/back corner. The number of +offsets and their precision depend on the tensor dimensionality:

      +
        +
      • When tensorRank is 3, one signed offset within range [-32768, +32767] is supported.

      • +
      • When tensorRank is 4, two signed offsets each within range [-128, +127] are supported.

      • +
      • When tensorRank is 5, three offsets each within range [-16, 15] +are supported. The bounding box specified by pixelBoxLowerCorner +and pixelBoxUpperCorner must have non-zero area.

      • +
      +
    • +
    • channelsPerPixel, which specifies the number of elements which must +be accessed along C dimension, must be less than or equal to 256.

    • +
    • pixelsPerColumn, which specifies the number of elements that must +be accessed along the {N, D, H, W} dimensions, must be less than or +equal to 1024.

    • +
    • elementStrides array, which specifies the iteration step along each +of the tensorRank dimensions, must be non-zero and less than or +equal to 8. Note that when interleave is +CU_TENSOR_MAP_INTERLEAVE_NONE, the first element of this +array is ignored since TMA doesn’t support the stride for dimension +zero. When all elements of the elementStrides array are one, +boxDim specifies the number of elements to load. However, if +elementStrides`[i] is not equal to one for some `i, then TMA loads +ceil( `boxDim`[i] / `elementStrides`[i]) number of elements along +i-th dimension. To load N elements along i-th dimension, `boxDim`[i] +must be set to N * `elementStrides`[i].

    • +
    • interleave specifies the interleaved layout of type +CUtensorMapInterleave, which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • TMA supports interleaved layouts like NC/8HWC8 where C8 utilizes 16 +bytes in memory assuming 2 byte per channel or NC/16HWC16 where C16 +uses 32 bytes. When interleave is +CU_TENSOR_MAP_INTERLEAVE_NONE and swizzle is not +CU_TENSOR_MAP_SWIZZLE_NONE, the bounding box inner +dimension (computed as boxDim`[0] multiplied by element size derived +from `tensorDataType) must be less than or equal to the swizzle +size.

      +
        +
      • CU_TENSOR_MAP_SWIZZLE_32B implies the bounding box inner dimension +will be <= 32.

      • +
      • CU_TENSOR_MAP_SWIZZLE_64B implies the bounding box inner dimension +will be <= 64.

      • +
      • CU_TENSOR_MAP_SWIZZLE_128B implies the bounding box inner dimension +will be <= 128.

      • +
      +
    • +
    • swizzle, which specifies the shared memory bank swizzling pattern, +has to be of type CUtensorMapSwizzle which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • Data are organized in a specific order in global memory; however, +this may not match the order in which the application accesses data +in shared memory. This difference in data organization may cause bank +conflicts when shared memory is accessed. In order to avoid this +problem, data can be loaded to shared memory with shuffling across +shared memory banks. When interleave is +CU_TENSOR_MAP_INTERLEAVE_32B, swizzle must be +CU_TENSOR_MAP_SWIZZLE_32B. Other interleave modes can +have any swizzling pattern.

    • +
    • l2Promotion specifies L2 fetch size which indicates the byte +granularity at which L2 requests are filled from DRAM. It must be of +type CUtensorMapL2promotion, which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • oobFill, which indicates whether zero or a special NaN constant +should be used to fill out-of-bound elements, must be of type +CUtensorMapFloatOOBfill which is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    • Note that +CU_TENSOR_MAP_FLOAT_OOB_FILL_NAN_REQUEST_ZERO_FMA can +only be used when tensorDataType represents a floating-point data +type.

    • +
    +
    +
    Parameters:
    +
      +
    • tensorDataType (CUtensorMapDataType) – Tensor data type

    • +
    • tensorRank (Any) – Dimensionality of tensor; must be at least 3

    • +
    • globalAddress (Any) – Starting address of memory region described by tensor

    • +
    • globalDim (List[cuuint64_t]) – Array containing tensor size (number of elements) along each of the +tensorRank dimensions

    • +
    • globalStrides (List[cuuint64_t]) – Array containing stride size (in bytes) along each of the +tensorRank - 1 dimensions

    • +
    • pixelBoxLowerCorner (List[int]) – Array containing DHW dimensions of lower box corner

    • +
    • pixelBoxUpperCorner (List[int]) – Array containing DHW dimensions of upper box corner

    • +
    • channelsPerPixel (Any) – Number of channels per pixel

    • +
    • pixelsPerColumn (Any) – Number of pixels per column

    • +
    • elementStrides (List[cuuint32_t]) – Array containing traversal stride in each of the tensorRank +dimensions

    • +
    • interleave (CUtensorMapInterleave) – Type of interleaved layout the tensor addresses

    • +
    • swizzle (CUtensorMapSwizzle) – Bank swizzling pattern inside shared memory

    • +
    • l2Promotion (CUtensorMapL2promotion) – L2 promotion size

    • +
    • oobFill (CUtensorMapFloatOOBfill) – Indicate whether zero or special NaN constant will be used to fill +out-of-bound elements

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuTensorMapReplaceAddress(CUtensorMap tensorMap: Optional[CUtensorMap], globalAddress)
    +

    Modify an existing tensor map descriptor with an updated global address.

    +

    Modifies the descriptor for Tensor Memory Access (TMA) object passed in +tensorMap with an updated globalAddress.

    +

    Tensor map objects are only supported on devices of compute capability +9.0 or higher. Additionally, a tensor map object is an opaque value, +and, as such, should only be accessed through CUDA API calls.

    +
    +
    Parameters:
    +
      +
    • tensorMap (CUtensorMap) – Tensor map object to modify

    • +
    • globalAddress (Any) – Starting address of memory region described by tensor, must follow +previous alignment requirements

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +

    Peer Context Memory Access

    +

    This section describes the direct peer context memory access functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuDeviceCanAccessPeer(dev, peerDev)
    +

    Queries if a device may directly access a peer device’s memory.

    +

    Returns in *canAccessPeer a value of 1 if contexts on dev are +capable of directly accessing memory from contexts on peerDev and 0 +otherwise. If direct access of peerDev from dev is possible, then +access may be enabled on two specific contexts by calling +cuCtxEnablePeerAccess().

    +
    +
    Parameters:
    +
      +
    • dev (CUdevice) – Device from which allocations on peerDev are to be directly +accessed.

    • +
    • peerDev (CUdevice) – Device on which the allocations to be directly accessed by dev +reside.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxEnablePeerAccess(peerContext, unsigned int Flags)
    +

    Enables direct access to memory allocations in a peer context.

    +

    If both the current context and peerContext are on devices which +support unified addressing (as may be queried using +CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING) and same major +compute capability, then on success all allocations from peerContext +will immediately be accessible by the current context. See +Unified Addressing for additional details.

    +

    Note that access granted by this call is unidirectional and that in +order to access memory from the current context in peerContext, a +separate symmetric call to cuCtxEnablePeerAccess() is +required.

    +

    Note that there are both device-wide and system-wide limitations per +system configuration, as noted in the CUDA Programming Guide under the +section “Peer-to-Peer Memory Access”.

    +

    Returns CUDA_ERROR_PEER_ACCESS_UNSUPPORTED if +cuDeviceCanAccessPeer() indicates that the +CUdevice of the current context cannot directly access +memory from the CUdevice of peerContext.

    +

    Returns CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED if direct +access of peerContext from the current context has already been +enabled.

    +

    Returns CUDA_ERROR_TOO_MANY_PEERS if direct peer access is +not possible because hardware resources required for peer access have +been exhausted.

    +

    Returns CUDA_ERROR_INVALID_CONTEXT if there is no current +context, peerContext is not a valid context, or if the current +context is peerContext.

    +

    Returns CUDA_ERROR_INVALID_VALUE if Flags is not 0.

    +
    +
    Parameters:
    +
      +
    • peerContext (CUcontext) – Peer context to enable direct access to from the current context

    • +
    • Flags (unsigned int) – Reserved for future use and must be set to 0

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_PEER_ACCESS_ALREADY_ENABLED, CUDA_ERROR_TOO_MANY_PEERS, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_PEER_ACCESS_UNSUPPORTED, CUDA_ERROR_INVALID_VALUE

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxDisablePeerAccess(peerContext)
    +

    Disables direct access to memory allocations in a peer context and unregisters any registered allocations.

    +

    Returns CUDA_ERROR_PEER_ACCESS_NOT_ENABLED if direct peer +access has not yet been enabled from peerContext to the current +context.

    +

    Returns CUDA_ERROR_INVALID_CONTEXT if there is no current +context, or if peerContext is not a valid context.

    +
    +
    Parameters:
    +

    peerContext (CUcontext) – Peer context to disable direct access to

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_PEER_ACCESS_NOT_ENABLED, CUDA_ERROR_INVALID_CONTEXT,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetP2PAttribute(attrib: CUdevice_P2PAttribute, srcDevice, dstDevice)
    +

    Queries attributes of the link between two devices.

    +

    Returns in *value the value of the requested attribute attrib of +the link between srcDevice and dstDevice. The supported attributes +are:

    + +

    Returns CUDA_ERROR_INVALID_DEVICE if srcDevice or +dstDevice are not valid or if they represent the same device.

    +

    Returns CUDA_ERROR_INVALID_VALUE if attrib is not valid +or if value is a null pointer.

    +
    +
    Parameters:
    +
      +
    • attrib (CUdevice_P2PAttribute) – The requested attribute of the link between srcDevice and +dstDevice.

    • +
    • srcDevice (CUdevice) – The source device of the target link.

    • +
    • dstDevice (CUdevice) – The destination device of the target link.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Graphics Interoperability

    +

    This section describes the graphics interoperability functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuGraphicsUnregisterResource(resource)
    +

    Unregisters a graphics resource for access by CUDA.

    +

    Unregisters the graphics resource resource so it is not accessible by +CUDA unless registered again.

    +

    If resource is invalid then CUDA_ERROR_INVALID_HANDLE is +returned.

    +
    +
    Parameters:
    +

    resource (CUgraphicsResource) – Resource to unregister

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_UNKNOWN

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    cuGraphicsD3D9RegisterResource, cuGraphicsD3D10RegisterResource, cuGraphicsD3D11RegisterResource, cuGraphicsGLRegisterBuffer, cuGraphicsGLRegisterImage, cudaGraphicsUnregisterResource

    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel)
    +

    Get an array through which to access a subresource of a mapped graphics resource.

    +

    Returns in *pArray an array through which the subresource of the +mapped graphics resource resource which corresponds to array index +arrayIndex and mipmap level mipLevel may be accessed. The value set +in *pArray may change every time that resource is mapped.

    +

    If resource is not a texture then it cannot be accessed via an array +and CUDA_ERROR_NOT_MAPPED_AS_ARRAY is returned. If +arrayIndex is not a valid array index for resource then +CUDA_ERROR_INVALID_VALUE is returned. If mipLevel is not +a valid mipmap level for resource then +CUDA_ERROR_INVALID_VALUE is returned. If resource is not +mapped then CUDA_ERROR_NOT_MAPPED is returned.

    +
    +
    Parameters:
    +
      +
    • resource (CUgraphicsResource) – Mapped resource to access

    • +
    • arrayIndex (unsigned int) – Array index for array textures or cubemap face index as defined by +CUarray_cubemap_face for cubemap textures for the +subresource to access

    • +
    • mipLevel (unsigned int) – Mipmap level for the subresource to access

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsResourceGetMappedMipmappedArray(resource)
    +

    Get a mipmapped array through which to access a mapped graphics resource.

    +

    Returns in *pMipmappedArray a mipmapped array through which the +mapped graphics resource resource. The value set in +*pMipmappedArray may change every time that resource is mapped.

    +

    If resource is not a texture then it cannot be accessed via a +mipmapped array and CUDA_ERROR_NOT_MAPPED_AS_ARRAY is +returned. If resource is not mapped then +CUDA_ERROR_NOT_MAPPED is returned.

    +
    +
    Parameters:
    +

    resource (CUgraphicsResource) – Mapped resource to access

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsResourceGetMappedPointer(resource)
    +

    Get a device pointer through which to access a mapped graphics resource.

    +

    Returns in *pDevPtr a pointer through which the mapped graphics +resource resource may be accessed. Returns in pSize the size of the +memory in bytes which may be accessed from that pointer. The value set +in pPointer may change every time that resource is mapped.

    +

    If resource is not a buffer then it cannot be accessed via a pointer +and CUDA_ERROR_NOT_MAPPED_AS_POINTER is returned. If +resource is not mapped then CUDA_ERROR_NOT_MAPPED is +returned.

    +
    +
    Parameters:
    +

    resource (CUgraphicsResource) – None

    +
    +
    Returns:
    +

      +
    • CUresult

    • +
    • pDevPtr (CUdeviceptr) – None

    • +
    • pSize (int) – None

    • +
    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuGraphicsResourceSetMapFlags(resource, unsigned int flags)
    +

    Set usage flags for mapping a graphics resource.

    +

    Set flags for mapping the graphics resource resource.

    +

    Changes to flags will take effect the next time resource is mapped. +The flags argument may be any of the following:

    +
      +
    • CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE: Specifies no hints +about how this resource will be used. It is therefore assumed that +this resource will be read from and written to by CUDA kernels. This +is the default value.

    • +
    • CU_GRAPHICS_MAP_RESOURCE_FLAGS_READONLY: Specifies that +CUDA kernels which access this resource will not write to this +resource.

    • +
    • CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITEDISCARD: Specifies +that CUDA kernels which access this resource will not read from this +resource and will write over the entire contents of the resource, so +none of the data previously stored in the resource will be preserved.

    • +
    +

    If resource is presently mapped for access by CUDA then +CUDA_ERROR_ALREADY_MAPPED is returned. If flags is not +one of the above values then CUDA_ERROR_INVALID_VALUE is +returned.

    +
    +
    Parameters:
    +
      +
    • resource (CUgraphicsResource) – Registered resource to set flags for

    • +
    • flags (unsigned int) – Parameters for resource mapping

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_VALUE, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_ALREADY_MAPPED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsMapResources(unsigned int count, resources, hStream)
    +

    Map graphics resources for access by CUDA.

    +

    Maps the count graphics resources in resources for access by CUDA.

    +

    The resources in resources may be accessed by CUDA until they are +unmapped. The graphics API from which resources were registered +should not access any resources while they are mapped by CUDA. If an +application does so, the results are undefined.

    +

    This function provides the synchronization guarantee that any graphics +calls issued before cuGraphicsMapResources() will complete +before any subsequent CUDA work issued in stream begins.

    +

    If resources includes any duplicate entries then +CUDA_ERROR_INVALID_HANDLE is returned. If any of +resources are presently mapped for access by CUDA then +CUDA_ERROR_ALREADY_MAPPED is returned.

    +
    +
    Parameters:
    +
      +
    • count (unsigned int) – Number of resources to map

    • +
    • resources (CUgraphicsResource) – Resources to map for CUDA usage

    • +
    • hStream (CUstream or cudaStream_t) – Stream with which to synchronize

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_ALREADY_MAPPED, CUDA_ERROR_UNKNOWN

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsUnmapResources(unsigned int count, resources, hStream)
    +

    Unmap graphics resources.

    +

    Unmaps the count graphics resources in resources.

    +

    Once unmapped, the resources in resources may not be accessed by CUDA +until they are mapped again.

    +

    This function provides the synchronization guarantee that any CUDA work +issued in stream before cuGraphicsUnmapResources() will +complete before any subsequently issued graphics work begins.

    +

    If resources includes any duplicate entries then +CUDA_ERROR_INVALID_HANDLE is returned. If any of +resources are not presently mapped for access by CUDA then +CUDA_ERROR_NOT_MAPPED is returned.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_NOT_MAPPED, CUDA_ERROR_UNKNOWN

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +

    Driver Entry Point Access

    +

    This section describes the driver entry point access functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuGetProcAddress(char *symbol, int cudaVersion, flags)
    +

    Returns the requested driver API function pointer.

    +

    Returns in **pfn the address of the CUDA driver function for the +requested CUDA version and flags.

    +

    The CUDA version is specified as (1000 * major + 10 * minor), so CUDA +11.2 should be specified as 11020. For a requested driver symbol, if +the specified CUDA version is greater than or equal to the CUDA version +in which the driver symbol was introduced, this API will return the +function pointer to the corresponding versioned function.

    +

    The pointer returned by the API should be cast to a function pointer +matching the requested driver function’s definition in the API header +file. The function pointer typedef can be picked up from the +corresponding typedefs header file. For example, cudaTypedefs.h +consists of function pointer typedefs for driver APIs defined in +h.

    +

    The API will return CUDA_SUCCESS and set the returned pfn +to NULL if the requested driver function is not supported on the +platform, no ABI compatible driver function exists for the specified +cudaVersion or if the driver symbol is invalid.

    +

    It will also set the optional symbolStatus to one of the values in +CUdriverProcAddressQueryResult with the following meanings:

    + +

    The requested flags can be:

    + +
    +
    Parameters:
    +
      +
    • symbol (bytes) – The base name of the driver API function to look for. As an +example, for the driver API cuMemAlloc_v2, symbol +would be cuMemAlloc and cudaVersion would be the ABI compatible +CUDA version for the _v2 variant.

    • +
    • cudaVersion (int) – The CUDA version to look for the requested driver symbol

    • +
    • flags (Any) – Flags to specify search options.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Coredump Attributes Control API

    +

    This section describes the coredump attribute control functions of the low-level CUDA driver application programming interface.

    +
    +
    +class cuda.bindings.driver.CUcoredumpSettings(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for choosing a coredump attribute to get/set

    +
    +
    +CU_COREDUMP_ENABLE_ON_EXCEPTION = 1
    +
    + +
    +
    +CU_COREDUMP_TRIGGER_HOST = 2
    +
    + +
    +
    +CU_COREDUMP_LIGHTWEIGHT = 3
    +
    + +
    +
    +CU_COREDUMP_ENABLE_USER_TRIGGER = 4
    +
    + +
    +
    +CU_COREDUMP_FILE = 5
    +
    + +
    +
    +CU_COREDUMP_PIPE = 6
    +
    + +
    +
    +CU_COREDUMP_GENERATION_FLAGS = 7
    +
    + +
    +
    +CU_COREDUMP_MAX = 8
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUCoredumpGenerationFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for controlling coredump contents

    +
    +
    +CU_COREDUMP_DEFAULT_FLAGS = 0
    +
    + +
    +
    +CU_COREDUMP_SKIP_NONRELOCATED_ELF_IMAGES = 1
    +
    + +
    +
    +CU_COREDUMP_SKIP_GLOBAL_MEMORY = 2
    +
    + +
    +
    +CU_COREDUMP_SKIP_SHARED_MEMORY = 4
    +
    + +
    +
    +CU_COREDUMP_SKIP_LOCAL_MEMORY = 8
    +
    + +
    +
    +CU_COREDUMP_SKIP_ABORT = 16
    +
    + +
    +
    +CU_COREDUMP_SKIP_CONSTBANK_MEMORY = 32
    +
    + +
    +
    +CU_COREDUMP_LIGHTWEIGHT_FLAGS = 47
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCoredumpGetAttribute(attrib: CUcoredumpSettings)
    +

    Allows caller to fetch a coredump attribute value for the current context.

    +

    Returns in *value the requested value specified by attrib. It is up +to the caller to ensure that the data type and size of *value matches +the request.

    +

    If the caller calls this function with *value equal to NULL, the size +of the memory region (in bytes) expected for attrib will be placed in +size.

    +

    The supported attributes are:

    +
      +
    • CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where +true means that GPU exceptions from this context will +create a coredump at the location specified by +CU_COREDUMP_FILE. The default value is false +unless set to true globally or locally, or the +CU_CTX_USER_COREDUMP_ENABLE flag was set during context creation.

    • +
    • CU_COREDUMP_TRIGGER_HOST: Bool where true +means that the host CPU will also create a coredump. The default +value is true unless set to false globally or +or locally. This value is deprecated as of CUDA 12.5 - raise the +CU_COREDUMP_SKIP_ABORT flag to disable host device +abort() if needed.

    • +
    • CU_COREDUMP_LIGHTWEIGHT: Bool where true +means that any resulting coredumps will not have a dump of GPU memory +or non-reloc ELF images. The default value is false +unless set to true globally or locally. This attribute is +deprecated as of CUDA 12.5, please use +CU_COREDUMP_GENERATION_FLAGS instead.

    • +
    • CU_COREDUMP_ENABLE_USER_TRIGGER: Bool where +true means that a coredump can be created by writing to +the system pipe specified by CU_COREDUMP_PIPE. The +default value is false unless set to true +globally or locally.

    • +
    • CU_COREDUMP_FILE: String of up to 1023 characters that +defines the location where any coredumps generated by this context +will be written. The default value is +core.cuda.HOSTNAME.PID where HOSTNAME is the +host name of the machine running the CUDA applications and +PID is the process ID of the CUDA application.

    • +
    • CU_COREDUMP_PIPE: String of up to 1023 characters that +defines the name of the pipe that will be monitored if user-triggered +coredumps are enabled. The default value is +corepipe.cuda.HOSTNAME.PID where HOSTNAME is +the host name of the machine running the CUDA application and +PID is the process ID of the CUDA application.

    • +
    • CU_COREDUMP_GENERATION_FLAGS: An integer with values to +allow granular control the data contained in a coredump specified as +a bitwise OR combination of the following values:

      + +
    • +
    +
    +
    Parameters:
    +
      +
    • attrib (CUcoredumpSettings) – The enum defining which value to fetch.

    • +
    • size (int) – The size of the memory region value points to.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCoredumpGetAttributeGlobal(attrib: CUcoredumpSettings)
    +

    Allows caller to fetch a coredump attribute value for the entire application.

    +

    Returns in *value the requested value specified by attrib. It is up +to the caller to ensure that the data type and size of *value matches +the request.

    +

    If the caller calls this function with *value equal to NULL, the size +of the memory region (in bytes) expected for attrib will be placed in +size.

    +

    The supported attributes are:

    +
      +
    • CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where +true means that GPU exceptions from this context will +create a coredump at the location specified by +CU_COREDUMP_FILE. The default value is false.

    • +
    • CU_COREDUMP_TRIGGER_HOST: Bool where true +means that the host CPU will also create a coredump. The default +value is true unless set to false globally or +or locally. This value is deprecated as of CUDA 12.5 - raise the +CU_COREDUMP_SKIP_ABORT flag to disable host device +abort() if needed.

    • +
    • CU_COREDUMP_LIGHTWEIGHT: Bool where true +means that any resulting coredumps will not have a dump of GPU memory +or non-reloc ELF images. The default value is false. This +attribute is deprecated as of CUDA 12.5, please use +CU_COREDUMP_GENERATION_FLAGS instead.

    • +
    • CU_COREDUMP_ENABLE_USER_TRIGGER: Bool where +true means that a coredump can be created by writing to +the system pipe specified by CU_COREDUMP_PIPE. The +default value is false.

    • +
    • CU_COREDUMP_FILE: String of up to 1023 characters that +defines the location where any coredumps generated by this context +will be written. The default value is +core.cuda.HOSTNAME.PID where HOSTNAME is the +host name of the machine running the CUDA applications and +PID is the process ID of the CUDA application.

    • +
    • CU_COREDUMP_PIPE: String of up to 1023 characters that +defines the name of the pipe that will be monitored if user-triggered +coredumps are enabled. The default value is +corepipe.cuda.HOSTNAME.PID where HOSTNAME is +the host name of the machine running the CUDA application and +PID is the process ID of the CUDA application.

    • +
    • CU_COREDUMP_GENERATION_FLAGS: An integer with values to +allow granular control the data contained in a coredump specified as +a bitwise OR combination of the following values:

      + +
    • +
    +
    +
    Parameters:
    +
      +
    • attrib (CUcoredumpSettings) – The enum defining which value to fetch.

    • +
    • size (int) – The size of the memory region value points to.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCoredumpSetAttribute(attrib: CUcoredumpSettings, value)
    +

    Allows caller to set a coredump attribute value for the current context.

    +

    This function should be considered an alternate interface to the CUDA- +GDB environment variables defined in this document: +https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump

    +

    An important design decision to note is that any coredump environment +variable values set before CUDA initializes will take permanent +precedence over any values set with this function. This decision was +made to ensure no change in behavior for any users that may be +currently using these variables to get coredumps.

    +

    *value shall contain the requested value specified by set. It is up +to the caller to ensure that the data type and size of *value matches +the request.

    +

    If the caller calls this function with *value equal to NULL, the size +of the memory region (in bytes) expected for set will be placed in +size.

    +

    /note This function will return CUDA_ERROR_NOT_SUPPORTED if +the caller attempts to set CU_COREDUMP_ENABLE_ON_EXCEPTION +on a GPU of with Compute Capability < 6.0. +cuCoredumpSetAttributeGlobal works on those platforms as an +alternative.

    +

    /note CU_COREDUMP_ENABLE_USER_TRIGGER and +CU_COREDUMP_PIPE cannot be set on a per-context basis.

    +

    The supported attributes are:

    +
      +
    • CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where +true means that GPU exceptions from this context will +create a coredump at the location specified by +CU_COREDUMP_FILE. The default value is false.

    • +
    • CU_COREDUMP_TRIGGER_HOST: Bool where true +means that the host CPU will also create a coredump. The default +value is true unless set to false globally or +or locally. This value is deprecated as of CUDA 12.5 - raise the +CU_COREDUMP_SKIP_ABORT flag to disable host device +abort() if needed.

    • +
    • CU_COREDUMP_LIGHTWEIGHT: Bool where true +means that any resulting coredumps will not have a dump of GPU memory +or non-reloc ELF images. The default value is false. This +attribute is deprecated as of CUDA 12.5, please use +CU_COREDUMP_GENERATION_FLAGS instead.

    • +
    • CU_COREDUMP_FILE: String of up to 1023 characters that +defines the location where any coredumps generated by this context +will be written. The default value is +core.cuda.HOSTNAME.PID where HOSTNAME is the +host name of the machine running the CUDA applications and +PID is the process ID of the CUDA application.

    • +
    • CU_COREDUMP_GENERATION_FLAGS: An integer with values to +allow granular control the data contained in a coredump specified as +a bitwise OR combination of the following values:

      + +
    • +
    +
    +
    Parameters:
    +
      +
    • attrib (CUcoredumpSettings) – The enum defining which value to set.

    • +
    • value (Any) – void* containing the requested data.

    • +
    • size (int) – The size of the memory region value points to.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCoredumpSetAttributeGlobal(attrib: CUcoredumpSettings, value)
    +

    Allows caller to set a coredump attribute value globally.

    +

    This function should be considered an alternate interface to the CUDA- +GDB environment variables defined in this document: +https://docs.nvidia.com/cuda/cuda-gdb/index.html#gpu-coredump

    +

    An important design decision to note is that any coredump environment +variable values set before CUDA initializes will take permanent +precedence over any values set with this function. This decision was +made to ensure no change in behavior for any users that may be +currently using these variables to get coredumps.

    +

    *value shall contain the requested value specified by set. It is up +to the caller to ensure that the data type and size of *value matches +the request.

    +

    If the caller calls this function with *value equal to NULL, the size +of the memory region (in bytes) expected for set will be placed in +size.

    +

    The supported attributes are:

    +
      +
    • CU_COREDUMP_ENABLE_ON_EXCEPTION: Bool where +true means that GPU exceptions from this context will +create a coredump at the location specified by +CU_COREDUMP_FILE. The default value is false.

    • +
    • CU_COREDUMP_TRIGGER_HOST: Bool where true +means that the host CPU will also create a coredump. The default +value is true unless set to false globally or +or locally. This value is deprecated as of CUDA 12.5 - raise the +CU_COREDUMP_SKIP_ABORT flag to disable host device +abort() if needed.

    • +
    • CU_COREDUMP_LIGHTWEIGHT: Bool where true +means that any resulting coredumps will not have a dump of GPU memory +or non-reloc ELF images. The default value is false. This +attribute is deprecated as of CUDA 12.5, please use +CU_COREDUMP_GENERATION_FLAGS instead.

    • +
    • CU_COREDUMP_ENABLE_USER_TRIGGER: Bool where +true means that a coredump can be created by writing to +the system pipe specified by CU_COREDUMP_PIPE. The +default value is false.

    • +
    • CU_COREDUMP_FILE: String of up to 1023 characters that +defines the location where any coredumps generated by this context +will be written. The default value is +core.cuda.HOSTNAME.PID where HOSTNAME is the +host name of the machine running the CUDA applications and +PID is the process ID of the CUDA application.

    • +
    • CU_COREDUMP_PIPE: String of up to 1023 characters that +defines the name of the pipe that will be monitored if user-triggered +coredumps are enabled. This value may not be changed after +CU_COREDUMP_ENABLE_USER_TRIGGER is set to +true. The default value is +corepipe.cuda.HOSTNAME.PID where HOSTNAME is +the host name of the machine running the CUDA application and +PID is the process ID of the CUDA application.

    • +
    • CU_COREDUMP_GENERATION_FLAGS: An integer with values to +allow granular control the data contained in a coredump specified as +a bitwise OR combination of the following values:

      + +
    • +
    +
    +
    Parameters:
    +
      +
    • attrib (CUcoredumpSettings) – The enum defining which value to set.

    • +
    • value (Any) – void* containing the requested data.

    • +
    • size (int) – The size of the memory region value points to.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Green Contexts

    +

    This section describes the APIs for creation and manipulation of green contexts in the CUDA driver. Green contexts are a lightweight alternative to traditional contexts, with the ability to pass in a set of resources that they should be initialized with. This allows the developer to represent distinct spatial partitions of the GPU, provision resources for them, and target them via the same programming model that CUDA exposes (streams, kernel launches, etc.).

    +

    There are 4 main steps to using these new set of APIs.

    +
      +
      1. +
      2. Start with an initial set of resources, for example via cuDeviceGetDevResource. Only SM type is supported today.

      3. +
      +
    • +
      1. +
      2. Partition this set of resources by providing them as input to a partition API, for example: cuDevSmResourceSplitByCount.

      3. +
      +
    • +
      1. +
      2. Finalize the specification of resources by creating a descriptor via cuDevResourceGenerateDesc.

      3. +
      +
    • +
      1. +
      2. Provision the resources and create a green context via cuGreenCtxCreate.

      3. +
      +
    • +
    +

    For CU_DEV_RESOURCE_TYPE_SM, the partitions created have minimum SM count requirements, often rounding up and aligning the minCount provided to cuDevSmResourceSplitByCount. The following is a guideline for each architecture and may be subject to change:

    +
      +
    • On Compute Architecture 6.X: The minimum count is 1 SM.

    • +
    • On Compute Architecture 7.X: The minimum count is 2 SMs and must be a multiple of 2.

    • +
    • On Compute Architecture 8.X: The minimum count is 4 SMs and must be a multiple of 2.

    • +
    • On Compute Architecture 9.0+: The minimum count is 8 SMs and must be a multiple of 8.

    • +
    +

    In the future, flags can be provided to tradeoff functional and performance characteristics versus finer grained SM partitions.

    +

    Even if the green contexts have disjoint SM partitions, it is not guaranteed that the kernels launched in them will run concurrently or have forward progress guarantees. This is due to other resources (like HW connections, see ::CUDA_DEVICE_MAX_CONNECTIONS) that could cause a dependency. Additionally, in certain scenarios, it is possible for the workload to run on more SMs than was provisioned (but never less). The following are two scenarios which can exhibit this behavior:

    +
      +
    • On Volta+ MPS: When CUDA_MPS_ACTIVE_THREAD_PERCENTAGE is used, the set of SMs that are used for running kernels can be scaled up to the value of SMs used for the MPS client.

    • +
    • 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.

    • +
    +
    +
    +class cuda.bindings.driver.CUdevSmResource_st(void_ptr _ptr=0)
    +
    +
    +smCount
    +

    The amount of streaming multiprocessors available in this resource. +This is an output parameter only, do not write to this field.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevResource_st(void_ptr _ptr=0)
    +
    +
    +type
    +

    Type of resource, dictates which union field was last set

    +
    +
    Type:
    +

    CUdevResourceType

    +
    +
    +
    + +
    +
    +_internal_padding
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +sm
    +

    Resource corresponding to CU_DEV_RESOURCE_TYPE_SM ``. type.

    +
    +
    Type:
    +

    CUdevSmResource

    +
    +
    +
    + +
    +
    +_oversize
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevSmResource
    +
    +
    +smCount
    +

    The amount of streaming multiprocessors available in this resource. +This is an output parameter only, do not write to this field.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevResource
    +
    +
    +type
    +

    Type of resource, dictates which union field was last set

    +
    +
    Type:
    +

    CUdevResourceType

    +
    +
    +
    + +
    +
    +_internal_padding
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +sm
    +

    Resource corresponding to CU_DEV_RESOURCE_TYPE_SM ``. type.

    +
    +
    Type:
    +

    CUdevSmResource

    +
    +
    +
    + +
    +
    +_oversize
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUgreenCtxCreate_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +CU_GREEN_CTX_DEFAULT_STREAM = 1
    +

    Required. Creates a default stream to use inside the green context

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevSmResourceSplit_flags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING = 1
    +
    + +
    +
    +CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE = 2
    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevResourceType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Type of resource

    +
    +
    +CU_DEV_RESOURCE_TYPE_INVALID = 0
    +
    + +
    +
    +CU_DEV_RESOURCE_TYPE_SM = 1
    +

    Streaming multiprocessors related information

    +
    + +
    + +
    +
    +class cuda.bindings.driver.CUdevResourceDesc(*args, **kwargs)
    +

    An opaque descriptor handle. The descriptor encapsulates multiple created and configured resources. Created via cuDevResourceGenerateDesc

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGreenCtxCreate(desc, dev, unsigned int flags)
    +

    Creates a green context with a specified set of resources.

    +

    This API creates a green context with the resources specified in the +descriptor desc and returns it in the handle represented by phCtx. +This API will retain the primary context on device dev, which will is +released when the green context is destroyed. It is advised to have the +primary context active before calling this API to avoid the heavy cost +of triggering primary context initialization and deinitialization +multiple times.

    +

    The API does not set the green context current. In order to set it +current, you need to explicitly set it current by first converting the +green context to a CUcontext using cuCtxFromGreenCtx and +subsequently calling cuCtxSetCurrent / +cuCtxPushCurrent. It should be noted that a green context +can be current to only one thread at a time. There is no internal +synchronization to make API calls accessing the same green context from +multiple threads work.

    +

    Note: The API is not supported on 32-bit platforms.

    +

    The supported flags are:

    +
      +
    • CU_GREEN_CTX_DEFAULT_STREAM : Creates a default stream to use +inside the green context. Required.

    • +
    +
    +
    Parameters:
    +
      +
    • desc (CUdevResourceDesc) – Descriptor generated via cuDevResourceGenerateDesc +which contains the set of resources to be used

    • +
    • dev (CUdevice) – Device on which to create the green context.

    • +
    • flags (unsigned int) – One of the supported green context creation flags. +CU_GREEN_CTX_DEFAULT_STREAM is required.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGreenCtxDestroy(hCtx)
    +

    Destroys a green context.

    +

    Destroys the green context, releasing the primary context of the device +that this green context was created for. Any resources provisioned for +this green context (that were initially available via the resource +descriptor) are released as well.

    +
    +
    Parameters:
    +

    hCtx (CUgreenCtx) – Green context to be destroyed

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_CONTEXT_IS_DESTROYED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxFromGreenCtx(hCtx)
    +

    Converts a green context into the primary context.

    +

    The API converts a green context into the primary context returned in +pContext. It is important to note that the converted context +pContext is a normal primary context but with the resources of the +specified green context hCtx. Once converted, it can then be used to +set the context current with cuCtxSetCurrent or with any of +the CUDA APIs that accept a CUcontext parameter.

    +

    Users are expected to call this API before calling any CUDA APIs that +accept a CUcontext. Failing to do so will result in the APIs returning +CUDA_ERROR_INVALID_CONTEXT.

    +
    +
    Parameters:
    +

    hCtx (CUgreenCtx) – Green context to convert

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuGreenCtxCreate

    +
    +
    + +
    +
    +cuda.bindings.driver.cuDeviceGetDevResource(device, typename: CUdevResourceType)
    +

    Get device resources.

    +

    Get the typename resources available to the device. This may often +be the starting point for further partitioning or configuring of +resources.

    +

    Note: The API is not supported on 32-bit platforms.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuCtxGetDevResource(hCtx, typename: CUdevResourceType)
    +

    Get context resources.

    +

    Get the typename resources available to the context represented by +hCtx Note: The API is not supported on 32-bit platforms.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGreenCtxGetDevResource(hCtx, typename: CUdevResourceType)
    +

    Get green context resources.

    +

    Get the typename resources available to the green context represented +by hCtx

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDevSmResourceSplitByCount(unsigned int nbGroups, CUdevResource input_: Optional[CUdevResource], unsigned int useFlags, unsigned int minCount)
    +

    Splits CU_DEV_RESOURCE_TYPE_SM resources.

    +

    Splits CU_DEV_RESOURCE_TYPE_SM resources into nbGroups, adhering to +the minimum SM count specified in minCount and the usage flags in +useFlags. If result is NULL, the API simulates a split and provides +the amount of groups that would be created in nbGroups. Otherwise, +nbGroups must point to the amount of elements in result and on +return, the API will overwrite nbGroups with the amount actually +created. The groups are written to the array in result. nbGroups +can be less than the total amount if a smaller number of groups is +needed.

    +

    This API is used to spatially partition the input resource. The input +resource needs to come from one of cuDeviceGetDevResource, +cuCtxGetDevResource, or +cuGreenCtxGetDevResource. A limitation of the API is that +the output results cannot be split again without first creating a +descriptor and a green context with that descriptor.

    +

    When creating the groups, the API will take into account the +performance and functional characteristics of the input resource, and +guarantee a split that will create a disjoint set of symmetrical +partitions. This may lead to fewer groups created than purely dividing +the total SM count by the minCount due to cluster requirements or +alignment and granularity requirements for the minCount.

    +

    The remainder set does not have the same functional or performance +guarantees as the groups in result. Its use should be carefully +planned and future partitions of the remainder set are discouraged.

    +

    The following flags are supported:

    +
      +
    • CU_DEV_SM_RESOURCE_SPLIT_IGNORE_SM_COSCHEDULING : Lower the minimum +SM count and alignment, and treat each SM independent of its +hierarchy. This allows more fine grained partitions but at the cost +of advanced features (such as large clusters on compute capability +9.0+).

    • +
    • CU_DEV_SM_RESOURCE_SPLIT_MAX_POTENTIAL_CLUSTER_SIZE : Compute +Capability 9.0+ only. Attempt to create groups that may allow for +maximally sized thread clusters. This can be queried post green +context creation using +cuOccupancyMaxPotentialClusterSize.

    • +
    +

    A successful API call must either have:

    +
      +
    • A valid array of result pointers of size passed in nbGroups, with +input of type CU_DEV_RESOURCE_TYPE_SM. Value of minCount must +be between 0 and the SM count specified in input. remaining may +be NULL.

    • +
    • NULL passed in for result, with a valid integer pointer in +nbGroups and input of type CU_DEV_RESOURCE_TYPE_SM. Value of +minCount must be between 0 and the SM count specified in input. +remaining may be NULL. This queries the number of groups that would +be created by the API.

    • +
    +

    Note: The API is not supported on 32-bit platforms.

    +
    +
    Parameters:
    +
      +
    • nbGroups (unsigned int) – This is a pointer, specifying the number of groups that would be or +should be created as described below.

    • +
    • input (CUdevResource) – Input SM resource to be split. Must be a valid +CU_DEV_RESOURCE_TYPE_SM resource.

    • +
    • useFlags (unsigned int) – Flags specifying how these partitions are used or which constraints +to abide by when splitting the input. Zero is valid for default +behavior.

    • +
    • minCount (unsigned int) – Minimum number of SMs required

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuDevResourceGenerateDesc(resources: Optional[Tuple[CUdevResource] | List[CUdevResource]], unsigned int nbResources)
    +

    Generate a resource descriptor.

    +

    Generates a single resource descriptor with the set of resources +specified in resources. The generated resource descriptor is +necessary for the creation of green contexts via the +cuGreenCtxCreate API. Resources of the same type can be +passed in, provided they meet the requirements as noted below.

    +

    A successful API call must have:

    +
      +
    • A valid output pointer for the phDesc descriptor as well as a valid +array of resources pointers, with the array size passed in +nbResources. If multiple resources are provided in resources, the +device they came from must be the same, otherwise +CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned. If multiple +resources are provided in resources and they are of type +CU_DEV_RESOURCE_TYPE_SM, they must be outputs (whether +result or remaining) from the same split API instance, otherwise +CUDA_ERROR_INVALID_RESOURCE_CONFIGURATION is returned.

    • +
    +

    Note: The API is not supported on 32-bit platforms.

    +
    +
    Parameters:
    +
      +
    • resources (List[CUdevResource]) – Array of resources to be included in the descriptor

    • +
    • nbResources (unsigned int) – Number of resources passed in resources

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGreenCtxRecordEvent(hCtx, hEvent)
    +

    Records an event.

    +

    Captures in hEvent all the activities of the green context of hCtx +at the time of this call. hEvent and hCtx must be from the same +primary context otherwise CUDA_ERROR_INVALID_HANDLE is +returned. Calls such as cuEventQuery() or +cuGreenCtxWaitEvent() will then examine or wait for +completion of the work that was captured. Uses of hCtx after this +call do not modify hEvent.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    The API will return CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED if the specified green context hCtx has a stream in the capture mode. In such a case, the call will invalidate all the conflicting captures.

    +
    + +
    +
    +cuda.bindings.driver.cuGreenCtxWaitEvent(hCtx, hEvent)
    +

    Make a green context wait on an event.

    +

    Makes all future work submitted to green context hCtx wait for all +work captured in hEvent. The synchronization will be performed on the +device and will not block the calling CPU thread. See +cuGreenCtxRecordEvent() or cuEventRecord(), for +details on what is captured by an event.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_DEINITIALIZED, CUDA_ERROR_NOT_INITIALIZED, CUDA_ERROR_INVALID_CONTEXT, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +

    Notes

    +

    hEvent may be from a different context or device than hCtx.

    +

    The API will return CUDA_ERROR_STREAM_CAPTURE_UNSUPPORTED and invalidate the capture if the specified event hEvent is part of an ongoing capture sequence or if the specified green context hCtx has a stream in the capture mode.

    +
    + +
    +
    +cuda.bindings.driver.cuStreamGetGreenCtx(hStream)
    +

    Query the green context associated with a stream.

    +

    Returns the CUDA green context that the stream is associated with, or +NULL if the stream is not associated with any green context.

    +

    The stream handle hStream can refer to any of the following:

    + +

    Passing an invalid handle will result in undefined behavior.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGreenCtxStreamCreate(greenCtx, unsigned int flags, int priority)
    +

    Create a stream for use in the green context.

    +

    Creates a stream for use in the specified green context greenCtx and +returns a handle in phStream. The stream can be destroyed by calling +cuStreamDestroy(). Note that the API ignores the context +that is current to the calling thread and creates a stream in the +specified green context greenCtx.

    +

    The supported values for flags are:

    +
      +
    • CU_STREAM_NON_BLOCKING: This must be specified. It +indicates that work running in the created stream may run +concurrently with work in the default stream, and that the created +stream should perform no implicit synchronization with the default +stream.

    • +
    +

    Specifying priority affects the scheduling priority of work in the +stream. Priorities provide a hint to preferentially run work with +higher priority when possible, but do not preempt already-running work +or provide any other functional guarantee on execution order. +priority follows a convention where lower numbers represent higher +priorities. ‘0’ represents default priority. The range of meaningful +numerical priorities can be queried using +cuCtxGetStreamPriorityRange. If the specified priority is +outside the numerical range returned by +cuCtxGetStreamPriorityRange, it will automatically be +clamped to the lowest or the highest number in the range.

    +
    +
    Parameters:
    +
      +
    • greenCtx (CUgreenCtx) – Green context for which to create the stream for

    • +
    • flags (unsigned int) – Flags for stream creation. CU_STREAM_NON_BLOCKING must be +specified.

    • +
    • priority (int) – Stream priority. Lower numbers represent higher priorities. See +cuCtxGetStreamPriorityRange for more information about +meaningful stream priorities that can be passed.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    In the current implementation, only compute kernels launched in priority streams are affected by the stream’s priority. Stream priorities have no effect on host-to-device and device-to-host memory operations.

    +
    + +
    +
    +driver.RESOURCE_ABI_VERSION = 1
    +
    + +
    +
    +driver.RESOURCE_ABI_EXTERNAL_BYTES = 48
    +
    + +
    +
    +

    EGL Interoperability

    +

    This section describes the EGL interoperability functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuGraphicsEGLRegisterImage(image, unsigned int flags)
    +

    Registers an EGL image.

    +

    Registers the EGLImageKHR specified by image for access by CUDA. A +handle to the registered object is returned as pCudaResource. +Additional Mapping/Unmapping is not required for the registered +resource and cuGraphicsResourceGetMappedEglFrame can be +directly called on the pCudaResource.

    +

    The application will be responsible for synchronizing access to shared +objects. The application must ensure that any pending operation which +access the objects have completed before passing control to CUDA. This +may be accomplished by issuing and waiting for glFinish command on all +GLcontexts (for OpenGL and likewise for other APIs). The application +will be also responsible for ensuring that any pending operation on the +registered CUDA resource has completed prior to executing subsequent +commands in other APIs accesing the same memory objects. This can be +accomplished by calling cuCtxSynchronize or cuEventSynchronize +(preferably).

    +

    The surface’s intended usage is specified using flags, as follows:

    + +

    The EGLImageKHR is an object which can be used to create EGLImage +target resource. It is defined as a void pointer. typedef void* +EGLImageKHR

    +
    +
    Parameters:
    +
      +
    • image (EGLImageKHR) – An EGLImageKHR image which can be used to create target resource.

    • +
    • flags (unsigned int) – Map flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamConsumerConnect(stream)
    +

    Connect CUDA to EGLStream as a consumer.

    +

    Connect CUDA as a consumer to EGLStreamKHR specified by stream.

    +

    The EGLStreamKHR is an EGL object that transfers a sequence of image +frames from one API to another.

    +
    +
    Parameters:
    +

    stream (EGLStreamKHR) – EGLStreamKHR handle

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamConsumerConnectWithFlags(stream, unsigned int flags)
    +

    Connect CUDA to EGLStream as a consumer with given flags.

    +

    Connect CUDA as a consumer to EGLStreamKHR specified by stream with +specified flags defined by CUeglResourceLocationFlags.

    +

    The flags specify whether the consumer wants to access frames from +system memory or video memory. Default is +CU_EGL_RESOURCE_LOCATION_VIDMEM.

    +
    +
    Parameters:
    +
      +
    • stream (EGLStreamKHR) – EGLStreamKHR handle

    • +
    • flags (unsigned int) – Flags denote intended location - system or video.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamConsumerDisconnect(conn)
    +

    Disconnect CUDA as a consumer to EGLStream .

    +

    Disconnect CUDA as a consumer to EGLStreamKHR.

    +
    +
    Parameters:
    +

    conn (CUeglStreamConnection) – Conection to disconnect.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_CONTEXT,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout)
    +

    Acquire an image frame from the EGLStream with CUDA as a consumer.

    +

    Acquire an image frame from EGLStreamKHR. This API can also acquire an +old frame presented by the producer unless explicitly disabled by +setting EGL_SUPPORT_REUSE_NV flag to EGL_FALSE during stream +initialization. By default, EGLStream is created with this flag set to +EGL_TRUE. cuGraphicsResourceGetMappedEglFrame can be called +on pCudaResource to get CUeglFrame.

    +
    +
    Parameters:
    +
      +
    • conn (CUeglStreamConnection) – Connection on which to acquire

    • +
    • pCudaResource (CUgraphicsResource) – CUDA resource on which the stream frame will be mapped for use.

    • +
    • pStream (CUstream) – CUDA stream for synchronization and any data migrations implied by +CUeglResourceLocationFlags.

    • +
    • timeout (unsigned int) – Desired timeout in usec for a new frame to be acquired. If set as +CUDA_EGL_INFINITE_TIMEOUT, acquire waits infinitely. +After timeout occurs CUDA consumer tries to acquire an old frame if +available and EGL_SUPPORT_REUSE_NV flag is set.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_LAUNCH_TIMEOUT,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
    +

    Releases the last frame acquired from the EGLStream.

    +

    Release the acquired image frame specified by pCudaResource to +EGLStreamKHR. If EGL_SUPPORT_REUSE_NV flag is set to EGL_TRUE, at the +time of EGL creation this API doesn’t release the last frame acquired +on the EGLStream. By default, EGLStream is created with this flag set +to EGL_TRUE.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamProducerConnect(stream, width, height)
    +

    Connect CUDA to EGLStream as a producer.

    +

    Connect CUDA as a producer to EGLStreamKHR specified by stream.

    +

    The EGLStreamKHR is an EGL object that transfers a sequence of image +frames from one API to another.

    +
    +
    Parameters:
    +
      +
    • stream (EGLStreamKHR) – EGLStreamKHR handle

    • +
    • width (EGLint) – width of the image to be submitted to the stream

    • +
    • height (EGLint) – height of the image to be submitted to the stream

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamProducerDisconnect(conn)
    +

    Disconnect CUDA as a producer to EGLStream .

    +

    Disconnect CUDA as a producer to EGLStreamKHR.

    +
    +
    Parameters:
    +

    conn (CUeglStreamConnection) – Conection to disconnect.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_INVALID_CONTEXT,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamProducerPresentFrame(conn, CUeglFrame eglframe: CUeglFrame, pStream)
    +

    Present a CUDA eglFrame to the EGLStream with CUDA as a producer.

    +

    When a frame is presented by the producer, it gets associated with the +EGLStream and thus it is illegal to free the frame before the producer +is disconnected. If a frame is freed and reused it may lead to +undefined behavior.

    +

    If producer and consumer are on different GPUs (iGPU and dGPU) then +frametype CU_EGL_FRAME_TYPE_ARRAY is not supported. +CU_EGL_FRAME_TYPE_PITCH can be used for such cross-device +applications.

    +

    The CUeglFrame is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For CUeglFrame of type CU_EGL_FRAME_TYPE_PITCH, +the application may present sub-region of a memory allocation. In that +case, the pitched pointer will specify the start address of the sub- +region in the allocation and corresponding CUeglFrame +fields will specify the dimensions of the sub-region.

    +
    +
    Parameters:
    +
      +
    • conn (CUeglStreamConnection) – Connection on which to present the CUDA array

    • +
    • eglframe (CUeglFrame) – CUDA Eglstream Proucer Frame handle to be sent to the consumer over +EglStream.

    • +
    • pStream (CUstream) – CUDA stream on which to present the frame.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE,

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuEGLStreamProducerReturnFrame(conn, CUeglFrame eglframe: Optional[CUeglFrame], pStream)
    +

    Return the CUDA eglFrame to the EGLStream released by the consumer.

    +

    This API can potentially return CUDA_ERROR_LAUNCH_TIMEOUT if the +consumer has not returned a frame to EGL stream. If timeout is returned +the application can retry.

    +
    +
    Parameters:
    +
      +
    • conn (CUeglStreamConnection) – Connection on which to return

    • +
    • eglframe (CUeglFrame) – CUDA Eglstream Proucer Frame handle returned from the consumer over +EglStream.

    • +
    • pStream (CUstream) – CUDA stream on which to return the frame.

    • +
    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_HANDLE, CUDA_ERROR_LAUNCH_TIMEOUT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel)
    +

    Get an eglFrame through which to access a registered EGL graphics resource.

    +

    Returns in *eglFrame an eglFrame pointer through which the registered +graphics resource resource may be accessed. This API can only be +called for registered EGL graphics resources.

    +

    The CUeglFrame is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If resource is not registered then CUDA_ERROR_NOT_MAPPED +is returned.

    +
    +
    Parameters:
    +
      +
    • resource (CUgraphicsResource) – None

    • +
    • index (unsigned int) – None

    • +
    • mipLevel (unsigned int) – None

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.driver.cuEventCreateFromEGLSync(eglSync, unsigned int flags)
    +

    Creates an event from EGLSync object.

    +

    Creates an event *phEvent from an EGLSyncKHR eglSync with the flags +specified via flags. Valid flags include:

    +
      +
    • CU_EVENT_DEFAULT: Default event creation flag.

    • +
    • CU_EVENT_BLOCKING_SYNC: Specifies that the created event +should use blocking synchronization. A CPU thread that uses +cuEventSynchronize() to wait on an event created with +this flag will block until the event has actually been completed.

    • +
    +

    Once the eglSync gets destroyed, cuEventDestroy is the +only API that can be invoked on the event.

    +

    cuEventRecord and TimingData are not supported for events +created from EGLSync.

    +

    The EGLSyncKHR is an opaque handle to an EGL sync object. typedef void* +EGLSyncKHR

    +
    +
    Parameters:
    +
      +
    • eglSync (EGLSyncKHR) – Opaque handle to EGLSync object

    • +
    • flags (unsigned int) – Event creation flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    OpenGL Interoperability

    +

    This section describes the OpenGL interoperability functions of the low-level CUDA driver application programming interface. Note that mapping of OpenGL resources is performed with the graphics API agnostic, resource mapping interface described in Graphics Interoperability.

    +
    +
    +class cuda.bindings.driver.CUGLDeviceList(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA devices corresponding to an OpenGL device

    +
    +
    +CU_GL_DEVICE_LIST_ALL = 1
    +

    The CUDA devices for all GPUs used by the current OpenGL context

    +
    + +
    +
    +CU_GL_DEVICE_LIST_CURRENT_FRAME = 2
    +

    The CUDA devices for the GPUs used by the current OpenGL context in its currently rendering frame

    +
    + +
    +
    +CU_GL_DEVICE_LIST_NEXT_FRAME = 3
    +

    The CUDA devices for the GPUs to be used by the current OpenGL context in the next frame

    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsGLRegisterBuffer(buffer, unsigned int Flags)
    +

    Registers an OpenGL buffer object.

    +

    Registers the buffer object specified by buffer for access by CUDA. A +handle to the registered object is returned as pCudaResource. The +register flags Flags specify the intended usage, as follows:

    + +
    +
    Parameters:
    +
      +
    • buffer (GLuint) – name of buffer object to be registered

    • +
    • Flags (unsigned int) – Register flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsGLRegisterImage(image, target, unsigned int Flags)
    +

    Register an OpenGL texture or renderbuffer object.

    +

    Registers the texture or renderbuffer object specified by image for +access by CUDA. A handle to the registered object is returned as +pCudaResource.

    +

    target must match the type of the object, and must be one of +GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE, +GL_TEXTURE_CUBE_MAP, GL_TEXTURE_3D, +GL_TEXTURE_2D_ARRAY, or GL_RENDERBUFFER.

    +

    The register flags Flags specify the intended usage, as follows:

    + +

    The following image formats are supported. For brevity’s sake, the list +is abbreviated. For ex., {GL_R, GL_RG} X {8, 16} would expand to the +following 4 formats {GL_R8, GL_R16, GL_RG8, GL_RG16} :

    +
      +
    • GL_RED, GL_RG, GL_RGBA, GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, +GL_INTENSITY

    • +
    • {GL_R, GL_RG, GL_RGBA} X {8, 16, 16F, 32F, 8UI, 16UI, 32UI, 8I, 16I, +32I}

    • +
    • {GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, GL_INTENSITY} X {8, 16, +16F_ARB, 32F_ARB, 8UI_EXT, 16UI_EXT, 32UI_EXT, 8I_EXT, 16I_EXT, +32I_EXT}

    • +
    +

    The following image classes are currently disallowed:

    +
      +
    • Textures with borders

    • +
    • Multisampled renderbuffers

    • +
    +
    +
    Parameters:
    +
      +
    • image (GLuint) – name of texture or renderbuffer object to be registered

    • +
    • target (GLenum) – Identifies the type of object specified by image

    • +
    • Flags (unsigned int) – Register flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGLGetDevices(unsigned int cudaDeviceCount, deviceList: CUGLDeviceList)
    +

    Gets the CUDA devices associated with the current OpenGL context.

    +

    Returns in *pCudaDeviceCount the number of CUDA-compatible devices +corresponding to the current OpenGL context. Also returns in +*pCudaDevices at most cudaDeviceCount of the CUDA-compatible devices +corresponding to the current OpenGL context. If any of the GPUs being +used by the current OpenGL context are not CUDA capable then the call +will return CUDA_ERROR_NO_DEVICE.

    +

    The deviceList argument may be any of the following: +CU_GL_DEVICE_LIST_ALL: Query all devices used by the current OpenGL +context. CU_GL_DEVICE_LIST_CURRENT_FRAME: Query the devices used by the +current OpenGL context to render the current frame (in SLI). +CU_GL_DEVICE_LIST_NEXT_FRAME: Query the devices used by the current +OpenGL context to render the next frame (in SLI). Note that this is a +prediction, it can’t be guaranteed that this is correct in all cases.

    +
    +
    Parameters:
    +
      +
    • cudaDeviceCount (unsigned int) – The size of the output device array pCudaDevices.

    • +
    • deviceList (CUGLDeviceList) – The set of devices to return.

    • +
    +
    +
    Returns:
    +

      +
    • CUresult – CUDA_SUCCESS +CUDA_ERROR_NO_DEVICE +CUDA_ERROR_INVALID_VALUE +CUDA_ERROR_INVALID_CONTEXT +CUDA_ERROR_INVALID_GRAPHICS_CONTEXT

    • +
    • pCudaDeviceCount (unsigned int) – Returned number of CUDA devices.

    • +
    • pCudaDevices (List[CUdevice]) – Returned CUDA devices.

    • +
    +

    +
    +
    +
    +

    See also

    +

    cudaGLGetDevices

    +
    +

    Notes

    +

    This function is not supported on Mac OS X.

    +
    + +
    +
    +

    Profiler Control

    +

    This section describes the profiler control functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuProfilerStart()
    +

    Enable profiling.

    +

    Enables profile collection by the active profiling tool for the current +context. If profiling is already enabled, then +cuProfilerStart() has no effect.

    +

    cuProfilerStart and cuProfilerStop APIs are used to programmatically +control the profiling granularity by allowing profiling to be done only +on selective pieces of code.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_CONTEXT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    cuProfilerInitialize, cuProfilerStop, cudaProfilerStart

    +
    +
    + +
    +
    +cuda.bindings.driver.cuProfilerStop()
    +

    Disable profiling.

    +

    Disables profile collection by the active profiling tool for the +current context. If profiling is already disabled, then +cuProfilerStop() has no effect.

    +

    cuProfilerStart and cuProfilerStop APIs are used to programmatically +control the profiling granularity by allowing profiling to be done only +on selective pieces of code.

    +
    +
    Returns:
    +

    CUDA_SUCCESS, CUDA_ERROR_INVALID_CONTEXT

    +
    +
    Return type:
    +

    CUresult

    +
    +
    +
    +

    See also

    +

    cuProfilerInitialize, cuProfilerStart, cudaProfilerStop

    +
    +
    + +
    +
    +

    VDPAU Interoperability

    +

    This section describes the VDPAU interoperability functions of the low-level CUDA driver application programming interface.

    +
    +
    +cuda.bindings.driver.cuVDPAUGetDevice(vdpDevice, vdpGetProcAddress)
    +

    Gets the CUDA device associated with a VDPAU device.

    +

    Returns in *pDevice the CUDA device associated with a vdpDevice, if +applicable.

    +
    +
    Parameters:
    +
      +
    • vdpDevice (VdpDevice) – A VdpDevice handle

    • +
    • vdpGetProcAddress (VdpGetProcAddress) – VDPAU’s VdpGetProcAddress function pointer

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuVDPAUCtxCreate(unsigned int flags, device, vdpDevice, vdpGetProcAddress)
    +

    Create a CUDA context for interoperability with VDPAU.

    +

    Creates a new CUDA context, initializes VDPAU interoperability, and +associates the CUDA context with the calling thread. It must be called +before performing any other VDPAU interoperability operations. It may +fail if the needed VDPAU driver facilities are not available. For usage +of the flags parameter, see cuCtxCreate().

    +
    +
    Parameters:
    +
      +
    • flags (unsigned int) – Options for CUDA context creation

    • +
    • device (CUdevice) – Device on which to create the context

    • +
    • vdpDevice (VdpDevice) – The VdpDevice to interop with

    • +
    • vdpGetProcAddress (VdpGetProcAddress) – VDPAU’s VdpGetProcAddress function pointer

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags)
    +

    Registers a VDPAU VdpVideoSurface object.

    +

    Registers the VdpVideoSurface specified by vdpSurface for access by +CUDA. A handle to the registered object is returned as pCudaResource. +The surface’s intended usage is specified using flags, as follows:

    + +

    The VdpVideoSurface is presented as an array of subresources that may +be accessed using pointers returned by +cuGraphicsSubResourceGetMappedArray. The exact number of +valid arrayIndex values depends on the VDPAU surface format. The +mapping is shown in the table below. mipLevel must be 0.

    +
    +
    Parameters:
    +
      +
    • vdpSurface (VdpVideoSurface) – The VdpVideoSurface to be registered

    • +
    • flags (unsigned int) – Map flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.driver.cuGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags)
    +

    Registers a VDPAU VdpOutputSurface object.

    +

    Registers the VdpOutputSurface specified by vdpSurface for access by +CUDA. A handle to the registered object is returned as pCudaResource. +The surface’s intended usage is specified using flags, as follows:

    + +

    The VdpOutputSurface is presented as an array of subresources that may +be accessed using pointers returned by +cuGraphicsSubResourceGetMappedArray. The exact number of +valid arrayIndex values depends on the VDPAU surface format. The +mapping is shown in the table below. mipLevel must be 0.

    +
    +
    Parameters:
    +
      +
    • vdpSurface (VdpOutputSurface) – The VdpOutputSurface to be registered

    • +
    • flags (unsigned int) – Map flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/module/nvrtc.html b/docs/cuda-bindings/latest/module/nvrtc.html new file mode 100644 index 000000000..970f188e5 --- /dev/null +++ b/docs/cuda-bindings/latest/module/nvrtc.html @@ -0,0 +1,1356 @@ + + + + + + + + + + nvrtc - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    nvrtc

    +
    +

    Error Handling

    +

    NVRTC defines the following enumeration type and function for API call error handling.

    +
    +
    +class cuda.bindings.nvrtc.nvrtcResult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    The enumerated type nvrtcResult defines API call result codes. +NVRTC API functions return nvrtcResult to indicate the call result.

    +
    +
    +NVRTC_SUCCESS = 0
    +
    + +
    +
    +NVRTC_ERROR_OUT_OF_MEMORY = 1
    +
    + +
    +
    +NVRTC_ERROR_PROGRAM_CREATION_FAILURE = 2
    +
    + +
    +
    +NVRTC_ERROR_INVALID_INPUT = 3
    +
    + +
    +
    +NVRTC_ERROR_INVALID_PROGRAM = 4
    +
    + +
    +
    +NVRTC_ERROR_INVALID_OPTION = 5
    +
    + +
    +
    +NVRTC_ERROR_COMPILATION = 6
    +
    + +
    +
    +NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7
    +
    + +
    +
    +NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8
    +
    + +
    +
    +NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9
    +
    + +
    +
    +NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10
    +
    + +
    +
    +NVRTC_ERROR_INTERNAL_ERROR = 11
    +
    + +
    +
    +NVRTC_ERROR_TIME_FILE_WRITE_FAILED = 12
    +
    + +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetErrorString(result: nvrtcResult)
    +

    nvrtcGetErrorString is a helper function that returns a string describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to “NVRTC_SUCCESS”. For unrecognized enumeration values, it returns “NVRTC_ERROR unknown”.

    +
    +
    Parameters:
    +

    result (nvrtcResult) – CUDA Runtime Compilation API result code.

    +
    +
    Returns:
    +

      +
    • nvrtcResult.NVRTC_SUCCESS – nvrtcResult.NVRTC_SUCCESS

    • +
    • bytes – Message string for the given nvrtcResult code.

    • +
    +

    +
    +
    +
    + +
    +
    +

    General Information Query

    +

    NVRTC defines the following function for general information query.

    +
    +
    +cuda.bindings.nvrtc.nvrtcVersion()
    +

    nvrtcVersion sets the output parameters major and minor with the CUDA Runtime Compilation version number.

    +
    +
    Returns:
    +

      +
    • nvrtcResult

      + +
    • +
    • major (int) – CUDA Runtime Compilation major version number.

    • +
    • minor (int) – CUDA Runtime Compilation minor version number.

    • +
    +

    +
    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetNumSupportedArchs()
    +

    nvrtcGetNumSupportedArchs sets the output parameter numArchs with the number of architectures supported by NVRTC. This can then be used to pass an array to nvrtcGetSupportedArchs to get the supported architectures.

    +

    see nvrtcGetSupportedArchs

    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetSupportedArchs()
    +

    nvrtcGetSupportedArchs populates the array passed via the output parameter supportedArchs with the architectures supported by NVRTC. The array is sorted in the ascending order. The size of the array to be passed can be determined using nvrtcGetNumSupportedArchs.

    +

    see nvrtcGetNumSupportedArchs

    +
    +
    Returns:
    +

    +

    +
    +
    +
    + +
    +
    +

    Compilation

    +

    NVRTC defines the following type and functions for actual compilation.

    +
    +
    +class cuda.bindings.nvrtc.nvrtcProgram(*args, **kwargs)
    +

    nvrtcProgram is the unit of compilation, and an opaque handle for a program.

    +

    To compile a CUDA program string, an instance of nvrtcProgram must be created first with nvrtcCreateProgram, then compiled with nvrtcCompileProgram.

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcCreateProgram(char *src, char *name, int numHeaders, headers: Optional[Tuple[bytes] | List[bytes]], includeNames: Optional[Tuple[bytes] | List[bytes]])
    +

    nvrtcCreateProgram creates an instance of nvrtcProgram with the given input parameters, and sets the output parameter prog with it.

    +
    +
    Parameters:
    +
      +
    • src (bytes) – CUDA program source.

    • +
    • name (bytes) – CUDA program name. name can be NULL; “default_program” is +used when name is NULL or “”.

    • +
    • numHeaders (int) – Number of headers used. numHeaders must be greater than or equal +to 0.

    • +
    • headers (List[bytes]) – Sources of the headers. headers can be NULL when numHeaders +is 0.

    • +
    • includeNames (List[bytes]) – Name of each header by which they can be included in the CUDA +program source. includeNames can be NULL when numHeaders is +0. These headers must be included with the exact names specified +here.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    nvrtcDestroyProgram

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcDestroyProgram(prog)
    +

    nvrtcDestroyProgram destroys the given program.

    +
    +
    Parameters:
    +

    prog (nvrtcProgram) – CUDA Runtime Compilation program.

    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    +

    See also

    +

    nvrtcCreateProgram

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcCompileProgram(prog, int numOptions, options: Optional[Tuple[bytes] | List[bytes]])
    +

    nvrtcCompileProgram compiles the given program.

    +

    It supports compile options listed in Supported Compile +Options.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • numOptions (int) – Number of compiler options passed.

    • +
    • options (List[bytes]) – Compiler options in the form of C string array. options can be +NULL when numOptions is 0.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetPTXSize(prog)
    +

    nvrtcGetPTXSize sets the value of ptxSizeRet with the size of the PTX generated by the previous compilation of prog (including the trailing NULL).

    +
    +
    Parameters:
    +

    prog (nvrtcProgram) – CUDA Runtime Compilation program.

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    nvrtcGetPTX

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetPTX(prog, char *ptx)
    +

    nvrtcGetPTX stores the PTX generated by the previous compilation of prog in the memory pointed by ptx.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • ptx (bytes) – Compiled result.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    +

    See also

    +

    nvrtcGetPTXSize

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetCUBINSize(prog)
    +

    nvrtcGetCUBINSize sets the value of cubinSizeRet with the size of the cubin generated by the previous compilation of prog. The value of cubinSizeRet is set to 0 if the value specified to -arch is a virtual architecture instead of an actual architecture.

    +
    +
    Parameters:
    +

    prog (nvrtcProgram) – CUDA Runtime Compilation program.

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    nvrtcGetCUBIN

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetCUBIN(prog, char *cubin)
    +

    nvrtcGetCUBIN stores the cubin generated by the previous compilation of prog in the memory pointed by cubin. No cubin is available if the value specified to -arch is a virtual architecture instead of an actual architecture.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • cubin (bytes) – Compiled and assembled result.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    +

    See also

    +

    nvrtcGetCUBINSize

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetNVVMSize(prog)
    +

    DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIRSize (and nvrtcGetLTOIR) instead.

    +
    +
    Parameters:
    +

    prog (nvrtcProgram) – None

    +
    +
    Returns:
    +

      +
    • nvrtcResult

    • +
    • nvvmSizeRet (int) – None

    • +
    +

    +
    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetNVVM(prog, char *nvvm)
    +

    DEPRECATION NOTICE: This function will be removed in a future release. Please use nvrtcGetLTOIR (and nvrtcGetLTOIRSize) instead.

    +
    +
    Parameters:
    +
    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetLTOIRSize(prog)
    +

    nvrtcGetLTOIRSize sets the value of LTOIRSizeRet with the size of the LTO IR generated by the previous compilation of prog. The value of LTOIRSizeRet is set to 0 if the program was not compiled with -dlto.

    +
    +
    Parameters:
    +

    prog (nvrtcProgram) – CUDA Runtime Compilation program.

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    nvrtcGetLTOIR

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetLTOIR(prog, char *LTOIR)
    +

    nvrtcGetLTOIR stores the LTO IR generated by the previous compilation of prog in the memory pointed by LTOIR. No LTO IR is available if the program was compiled without -dlto.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • LTOIR (bytes) – Compiled result.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    +

    See also

    +

    nvrtcGetLTOIRSize

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetOptiXIRSize(prog)
    +

    nvrtcGetOptiXIRSize sets the value of optixirSizeRet with the size of the OptiX IR generated by the previous compilation of prog. The value of nvrtcGetOptiXIRSize is set to 0 if the program was compiled with options incompatible with OptiX IR generation.

    +
    +
    Parameters:
    +

    prog (nvrtcProgram) – CUDA Runtime Compilation program.

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    nvrtcGetOptiXIR

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetOptiXIR(prog, char *optixir)
    +

    nvrtcGetOptiXIR stores the OptiX IR generated by the previous compilation of prog in the memory pointed by optixir. No OptiX IR is available if the program was compiled with options incompatible with OptiX IR generation.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • Optix (bytes) – IR Compiled result.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    +

    See also

    +

    nvrtcGetOptiXIRSize

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetProgramLogSize(prog)
    +

    nvrtcGetProgramLogSize sets logSizeRet with the size of the log generated by the previous compilation of prog (including the trailing NULL).

    +

    Note that compilation log may be generated with warnings and +informative messages, even when the compilation of prog succeeds.

    +
    +
    Parameters:
    +

    prog (nvrtcProgram) – CUDA Runtime Compilation program.

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    nvrtcGetProgramLog

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetProgramLog(prog, char *log)
    +

    nvrtcGetProgramLog stores the log generated by the previous compilation of prog in the memory pointed by log.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • log (bytes) – Compilation log.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    + +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcAddNameExpression(prog, char *name_expression)
    +

    nvrtcAddNameExpression notes the given name expression denoting the address of a global function or device/__constant__ variable.

    +

    The identical name expression string must be provided on a subsequent +call to nvrtcGetLoweredName to extract the lowered name.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • name_expression (bytes) – constant expression denoting the address of a global function or +device/__constant__ variable.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    Return type:
    +

    nvrtcResult

    +
    +
    +
    +

    See also

    +

    nvrtcGetLoweredName

    +
    +
    + +
    +
    +cuda.bindings.nvrtc.nvrtcGetLoweredName(prog, char *name_expression)
    +

    nvrtcGetLoweredName extracts the lowered (mangled) name for a global function or device/__constant__ variable, and updates lowered_name to point to it. The memory containing the name is released when the NVRTC program is destroyed by nvrtcDestroyProgram. The identical name expression must have been previously provided to nvrtcAddNameExpression.

    +
    +
    Parameters:
    +
      +
    • prog (nvrtcProgram) – CUDA Runtime Compilation program.

    • +
    • name_expression (bytes) – constant expression denoting the address of a global function or +device/__constant__ variable.

    • +
    +
    +
    Returns:
    +

      +
    • nvrtcResult – NVRTC_SUCCESS +NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION +NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID

    • +
    • lowered_name (bytes) – initialized by the function to point to a C string containing the +lowered (mangled) name corresponding to the provided name +expression.

    • +
    +

    +
    +
    + +
    + +
    +
    +

    Supported Compile Options

    +

    NVRTC supports the compile options below. Option names with two preceding dashs (--) are long option names and option names with one preceding dash (-) are short option names. Short option names can be used instead of long option names. When a compile option takes an argument, an assignment operator (=) is used to separate the compile option argument from the compile option name, e.g., "--gpu-architecture=compute_60". Alternatively, the compile option name and the argument can be specified in separate strings without an assignment operator, .e.g, "--gpu-architecture" "compute_60". Single-character short option names, such as -D, -U, and -I, do not require an assignment operator, and the compile option name and the argument can be present in the same string with or without spaces between them. For instance, "-D=<def>", "-D<def>", and "-D <def>" are all supported.

    +

    The valid compiler options are:

    +
      +
    • Compilation targets

      +
        +
      • --gpu-architecture=<arch> (-arch)

        +

        Specify the name of the class of GPU architectures for which the input must be compiled.

        +
          +
        • Valid <arch>s:

          +
            +
          • compute_50

          • +
          • compute_52

          • +
          • compute_53

          • +
          • compute_60

          • +
          • compute_61

          • +
          • compute_62

          • +
          • compute_70

          • +
          • compute_72

          • +
          • compute_75

          • +
          • compute_80

          • +
          • compute_87

          • +
          • compute_89

          • +
          • compute_90

          • +
          • compute_90a

          • +
          • sm_50

          • +
          • sm_52

          • +
          • sm_53

          • +
          • sm_60

          • +
          • sm_61

          • +
          • sm_62

          • +
          • sm_70

          • +
          • sm_72

          • +
          • sm_75

          • +
          • sm_80

          • +
          • sm_87

          • +
          • sm_89

          • +
          • sm_90

          • +
          • sm_90a

          • +
          +
        • +
        • Default: compute_52

        • +
        +
      • +
      +
    • +
    • Separate compilation / whole-program compilation

      +
        +
      • --device-c (-dc)

        +

        Generate relocatable code that can be linked with other relocatable device code. It is equivalent to –relocatable-device-code=true.

        +
      • +
      • --device-w (-dw)

        +

        Generate non-relocatable code. It is equivalent to --relocatable-device-code=false.

        +
      • +
      • --relocatable-device-code={true|false} (-rdc)

        +

        Enable (disable) the generation of relocatable device code.

        +
          +
        • Default: false

        • +
        +
      • +
      • --extensible-whole-program (-ewp)

        +

        Do extensible whole program compilation of device code.

        +
          +
        • Default: false

        • +
        +
      • +
      +
    • +
    • Debugging support

      +
        +
      • --device-debug (-G)

        +

        Generate debug information. If –dopt is not specified, then turns off all optimizations.

        +
      • +
      • --generate-line-info (-lineinfo)

        +

        Generate line-number information.

        +
      • +
      +
    • +
    • Code generation

      +
        +
      • --dopt on (-dopt)

      • +
      • --dopt=on

        +

        Enable device code optimization. When specified along with ‘-G’, enables limited debug information generation for optimized device code (currently, only line number information). When ‘-G’ is not specified, ‘-dopt=on’ is implicit.

        +
      • +
      • --ptxas-options <options> (-Xptxas)

      • +
      • --ptxas-options=<options>

        +

        Specify options directly to ptxas, the PTX optimizing assembler.

        +
      • +
      • --maxrregcount=<N> (-maxrregcount)

        +

        Specify the maximum amount of registers that GPU functions can use. Until a function-specific limit, a higher value will generally increase the performance of individual GPU threads that execute this function. However, because thread registers are allocated from a global register pool on each GPU, a higher value of this option will also reduce the maximum thread block size, thereby reducing the amount of thread parallelism. Hence, a good maxrregcount value is the result of a trade-off. If this option is not specified, then no maximum is assumed. Value less than the minimum registers required by ABI will be bumped up by the compiler to ABI minimum limit.

        +
      • +
      • --ftz={true|false} (-ftz)

        +

        When performing single-precision floating-point operations, flush denormal values to zero or preserve denormal values. --use_fast_math implies --ftz=true.

        +
          +
        • Default: false

        • +
        +
      • +
      • --prec-sqrt={true|false} (-prec-sqrt)

        +

        For single-precision floating-point square root, use IEEE round-to-nearest mode or use a faster approximation. --use_fast_math implies --prec-sqrt=false.

        +
          +
        • Default: true

        • +
        +
      • +
      • --prec-div={true|false} (-prec-div)

        +

        For single-precision floating-point division and reciprocals, use IEEE round-to-nearest mode or use a faster approximation. --use_fast_math implies --prec-div=false.

        +
          +
        • Default: true

        • +
        +
      • +
      • --fmad={true|false} (-fmad)

        +

        Enables (disables) the contraction of floating-point multiplies and adds/subtracts into floating-point multiply-add operations (FMAD, FFMA, or DFMA). --use_fast_math implies --fmad=true.

        +
          +
        • Default: true

        • +
        +
      • +
      • --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.

        +
      • +
      • --extra-device-vectorization (-extra-device-vectorization)

        +

        Enables more aggressive device code vectorization in the NVVM optimizer.

        +
      • +
      • --modify-stack-limit={true|false} (-modify-stack-limit)

        +

        On Linux, during compilation, use setrlimit() to increase stack size to maximum allowed. The limit is reset to the previous value at the end of compilation. Note: setrlimit() changes the value for the entire process.

        +
          +
        • Default: true

        • +
        +
      • +
      • --dlink-time-opt (-dlto)

        +

        Generate intermediate code for later link-time optimization. It implies -rdc=true. Note: when this option is used the nvrtcGetLTOIR API should be used, as PTX or Cubin will not be generated.

        +
      • +
      • --gen-opt-lto (-gen-opt-lto)

        +

        Run the optimizer passes before generating the LTO IR.

        +
      • +
      • --optix-ir (-optix-ir)

        +

        Generate OptiX IR. The Optix IR is only intended for consumption by OptiX through appropriate APIs. This feature is not supported with link-time-optimization (-dlto)

        +
      • +
      +
    • +
    +

    . Note: when this option is used the nvrtcGetOptiX API should be used, as PTX or Cubin will not be generated.

    +
    +
      +
    • --jump-table-density=[0-101] (-jtd)

      +

      Specify the case density percentage in switch statements, and use it as a minimal threshold to determine whether jump table(brx.idx instruction) will be used to implement a switch statement. Default value is 101. The percentage ranges from 0 to 101 inclusively.

      +
    • +
    • --device-stack-protector={true|false} (-device-stack-protector)

      +

      Enable (disable) the generation of stack canaries in device code.

      +
        +
      • Default: false

      • +
      +
    • +
    +
    +
      +
    • Preprocessing

      +
        +
      • --define-macro=<def> (-D)

        +

        <def> can be either <name> or <name=definitions>.

        +
          +
        • <name>

          +

          Predefine <name> as a macro with definition 1.

          +
        • +
        • <name>=<definition>

          +

          The contents of <definition> are tokenized and preprocessed as if they appeared during translation phase three in a #define directive. In particular, the definition will be truncated by embedded new line characters.

          +
        • +
        +
      • +
      • --undefine-macro=<def> (-U)

        +

        Cancel any previous definition of <def>.

        +
      • +
      • --include-path=<dir> (-I)

        +

        Add the directory <dir> to the list of directories to be searched for headers. These paths are searched after the list of headers given to nvrtcCreateProgram.

        +
      • +
      • --pre-include=<header> (-include)

        +

        Preinclude <header> during preprocessing.

        +
      • +
      • --no-source-include (-no-source-include) The preprocessor by default adds the directory of each input sources to the include path. This option disables this feature and only considers the path specified explicitly.

      • +
      +
    • +
    • Language Dialect

      +
        +
      • --std={c++03|c++11|c++14|c++17|c++20} (-std={c++11|c++14|c++17|c++20})

        +

        Set language dialect to C++03, C++11, C++14, C++17 or C++20

        +
          +
        • Default: c++17

        • +
        +
      • +
      • --builtin-move-forward={true|false} (-builtin-move-forward)

        +

        Provide builtin definitions of std::move and std::forward, when C++11 or later language dialect is selected.

        +
          +
        • Default: true

        • +
        +
      • +
      • --builtin-initializer-list={true|false} (-builtin-initializer-list)

        +

        Provide builtin definitions of std::initializer_list class and member functions when C++11 or later language dialect is selected.

        +
          +
        • Default: true

        • +
        +
      • +
      +
    • +
    • Misc.

      +
        +
      • --disable-warnings (-w)

        +

        Inhibit all warning messages.

        +
      • +
      • --restrict (-restrict)

        +

        Programmer assertion that all kernel pointer parameters are restrict pointers.

        +
      • +
      • --device-as-default-execution-space (-default-device)

        +

        Treat entities with no execution space annotation as device entities.

        +
      • +
      • --device-int128 (-device-int128)

        +

        Allow the __int128 type in device code. Also causes the macro CUDACC_RTC_INT128 to be defined.

        +
      • +
      • --optimization-info=<kind> (-opt-info)

        +

        Provide optimization reports for the specified kind of optimization. The following kind tags are supported:

        +
          +
        • inline : emit a remark when a function is inlined.

        • +
        +
      • +
      • --display-error-number (-err-no)

        +

        Display diagnostic number for warning messages. (Default)

        +
      • +
      • --no-display-error-number (-no-err-no)

        +

        Disables the display of a diagnostic number for warning messages.

        +
      • +
      • --diag-error=<error-number>,… (-diag-error)

        +

        Emit error for specified diagnostic message number(s). Message numbers can be separated by comma.

        +
      • +
      • --diag-suppress=<error-number>,… (-diag-suppress)

        +

        Suppress specified diagnostic message number(s). Message numbers can be separated by comma.

        +
      • +
      • --diag-warn=<error-number>,… (-diag-warn)

        +

        Emit warning for specified diagnostic message number(s). Message numbers can be separated by comma.

        +
      • +
      • --brief-diagnostics={true|false} (-brief-diag)

        +

        This option disables or enables showing source line and column info in a diagnostic. The –brief-diagnostics=true will not show the source line and column info.

        +
          +
        • Default: false

        • +
        +
      • +
      • --time=<file-name> (-time)

        +

        Generate a comma separated value table with the time taken by each compilation phase, and append it at the end of the file given as the option argument. If the file does not exist, the column headings are generated in the first row of the table. If the file name is ‘-’, the timing data is written to the compilation log.

        +
      • +
      • --split-compile= <number of threads> (-split-compile= <number of threads>)

        +

        Perform compiler optimizations in parallel. Split compilation attempts to reduce compile time by enabling the compiler to run certain optimization passes concurrently. This option accepts a numerical value that specifies the maximum number of threads the compiler can use. One can also allow the compiler to use the maximum threads available on the system by setting –split-compile=0. Setting –split-compile=1 will cause this option to be ignored.

        +
      • +
      • --fdevice-syntax-only (-fdevice-syntax-only)

        +

        Ends device compilation after front-end syntax checking. This option does not generate valid device code.

        +
      • +
      • --minimal (-minimal)

        +

        Omit certain language features to reduce compile time for small programs. In particular, the following are omitted:

        +
          +
        • Texture and surface functions and associated types, e.g., cudaTextureObject_t.

        • +
        • CUDA Runtime Functions that are provided by the cudadevrt device code library, typically named with prefix “cuda”, e.g., cudaMalloc.

        • +
        • Kernel launch from device code.

        • +
        • Types and macros associated with CUDA Runtime and Driver APIs, provided by cuda/tools/cudart/driver_types.h, typically named with prefix “cuda”, e.g., cudaError_t.

        • +
        +
      • +
      • --device-stack-protector (-device-stack-protector)

        +

        Enable stack canaries in device code. Stack canaries make it more difficult to exploit certain types of memory safety bugs involving stack-local variables. The compiler uses heuristics to assess the risk of such a bug in each function. Only those functions which are deemed high-risk make use of a stack canary.

        +
      • +
      +
    • +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/module/runtime.html b/docs/cuda-bindings/latest/module/runtime.html new file mode 100644 index 000000000..886888c51 --- /dev/null +++ b/docs/cuda-bindings/latest/module/runtime.html @@ -0,0 +1,25542 @@ + + + + + + + + + + runtime - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    runtime

    +
    +

    Profiler Control

    +

    This section describes the profiler control functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaProfilerStart()
    +

    Enable profiling.

    +

    Enables profile collection by the active profiling tool for the current +context. If profiling is already enabled, then +cudaProfilerStart() has no effect.

    +

    cudaProfilerStart and cudaProfilerStop APIs are used to +programmatically control the profiling granularity by allowing +profiling to be done only on selective pieces of code.

    +
    +
    Returns:
    +

    cudaSuccess

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaProfilerStop()
    +

    Disable profiling.

    +

    Disables profile collection by the active profiling tool for the +current context. If profiling is already disabled, then +cudaProfilerStop() has no effect.

    +

    cudaProfilerStart and cudaProfilerStop APIs are used to +programmatically control the profiling granularity by allowing +profiling to be done only on selective pieces of code.

    +
    +
    Returns:
    +

    cudaSuccess

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +

    Device Management

    +

    impl_private

    +

    This section describes the device management functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaDeviceReset()
    +

    Destroy all allocations and reset all state on the current device in the current process.

    +

    Explicitly destroys and cleans up all resources associated with the +current device in the current process. It is the caller’s +responsibility to ensure that the resources are not accessed or passed +in subsequent API calls and doing so will result in undefined behavior. +These resources include CUDA types cudaStream_t, +cudaEvent_t, cudaArray_t, +cudaMipmappedArray_t, cudaPitchedPtr, +cudaTextureObject_t, cudaSurfaceObject_t, +textureReference, surfaceReference, +cudaExternalMemory_t, cudaExternalSemaphore_t +and cudaGraphicsResource_t. These resources also include +memory allocations by cudaMalloc, +cudaMallocHost, cudaMallocManaged and +cudaMallocPitch. Any subsequent API call to this device +will reinitialize the device.

    +

    Note that this function will reset the device immediately. It is the +caller’s responsibility to ensure that the device is not being accessed +by any other host threads from the process when this function is +called.

    +
    +
    Returns:
    +

    cudaSuccess

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaDeviceSynchronize

    +
    +

    Notes

    +

    cudaDeviceReset() will not destroy memory allocations by cudaMallocAsync() and cudaMallocFromPoolAsync(). These memory allocations need to be destroyed explicitly.

    +

    If a non-primary CUcontext is current to the thread, cudaDeviceReset() will destroy only the internal CUDA RT state for that CUcontext.

    +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceSynchronize()
    +

    Wait for compute device to finish.

    +

    Blocks until the device has completed all preceding requested tasks. +cudaDeviceSynchronize() returns an error if one of the +preceding tasks has failed. If the +cudaDeviceScheduleBlockingSync flag was set for this +device, the host thread will block until the device has finished its +work.

    +
    +
    Returns:
    +

    cudaSuccess

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceSetLimit(limit: cudaLimit, size_t value)
    +

    Set resource limits.

    +

    Setting limit to value is a request by the application to update +the current limit maintained by the device. The driver is free to +modify the requested value to meet h/w requirements (this could be +clamping to minimum or maximum values, rounding up to nearest element +size, etc). The application can use cudaDeviceGetLimit() to +find out exactly what the limit has been set to.

    +

    Setting each cudaLimit has its own specific restrictions, +so each is discussed here.

    +
      +
    • cudaLimitStackSize controls the stack size in bytes of +each GPU thread.

    • +
    • cudaLimitPrintfFifoSize controls the size in bytes of the +shared FIFO used by the printf() device system call. +Setting cudaLimitPrintfFifoSize must not be performed +after launching any kernel that uses the printf() device +system call - in such case cudaErrorInvalidValue will be +returned.

    • +
    • cudaLimitMallocHeapSize controls the size in bytes of the +heap used by the malloc() and free() device +system calls. Setting cudaLimitMallocHeapSize must not be +performed after launching any kernel that uses the +malloc() or free() device system calls - in +such case cudaErrorInvalidValue will be returned.

    • +
    • cudaLimitDevRuntimeSyncDepth controls the maximum nesting +depth of a grid at which a thread can safely call +cudaDeviceSynchronize(). Setting this limit must be +performed before any launch of a kernel that uses the device runtime +and calls cudaDeviceSynchronize() above the default sync +depth, two levels of grids. Calls to +cudaDeviceSynchronize() will fail with error code +cudaErrorSyncDepthExceeded if the limitation is violated. +This limit can be set smaller than the default or up the maximum +launch depth of 24. When setting this limit, keep in mind that +additional levels of sync depth require the runtime to reserve large +amounts of device memory which can no longer be used for user +allocations. If these reservations of device memory fail, +cudaDeviceSetLimit will return +cudaErrorMemoryAllocation, and the limit can be reset to +a lower value. This limit is only applicable to devices of compute +capability < 9.0. Attempting to set this limit on devices of other +compute capability will results in error +cudaErrorUnsupportedLimit being returned.

    • +
    • cudaLimitDevRuntimePendingLaunchCount controls the +maximum number of outstanding device runtime launches that can be +made from the current device. A grid is outstanding from the point of +launch up until the grid is known to have been completed. Device +runtime launches which violate this limitation fail and return +cudaErrorLaunchPendingCountExceeded when +cudaGetLastError() is called after launch. If more +pending launches than the default (2048 launches) are needed for a +module using the device runtime, this limit can be increased. Keep in +mind that being able to sustain additional pending launches will +require the runtime to reserve larger amounts of device memory +upfront which can no longer be used for allocations. If these +reservations fail, cudaDeviceSetLimit will return +cudaErrorMemoryAllocation, and the limit can be reset to +a lower value. This limit is only applicable to devices of compute +capability 3.5 and higher. Attempting to set this limit on devices of +compute capability less than 3.5 will result in the error +cudaErrorUnsupportedLimit being returned.

    • +
    • cudaLimitMaxL2FetchGranularity controls the L2 cache +fetch granularity. Values can range from 0B to 128B. This is purely a +performance hint and it can be ignored or clamped depending on the +platform.

    • +
    • cudaLimitPersistingL2CacheSize controls size in bytes +available for persisting L2 cache. This is purely a performance hint +and it can be ignored or clamped depending on the platform.

    • +
    +
    +
    Parameters:
    +
      +
    • limit (cudaLimit) – Limit to set

    • +
    • value (size_t) – Size of limit

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorUnsupportedLimit, cudaErrorInvalidValue, cudaErrorMemoryAllocation

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetLimit(limit: cudaLimit)
    +

    Return resource limits.

    +

    Returns in *pValue the current size of limit. The following +cudaLimit values are supported.

    + +
    +
    Parameters:
    +

    limit (cudaLimit) – Limit to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetTexture1DLinearMaxWidth(cudaChannelFormatDesc fmtDesc: Optional[cudaChannelFormatDesc], int device)
    +

    Returns the maximum number of elements allocatable in a 1D linear texture for a given element size.

    +

    Returns in maxWidthInElements the maximum number of elements +allocatable in a 1D linear texture for given format descriptor +fmtDesc.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetCacheConfig()
    +

    Returns the preferred cache configuration for the current device.

    +

    On devices where the L1 cache and shared memory use the same hardware +resources, this returns through pCacheConfig the preferred cache +configuration for the current device. This is only a preference. The +runtime will use the requested configuration if possible, but it is +free to choose a different configuration if required to execute +functions.

    +

    This will return a pCacheConfig of +cudaFuncCachePreferNone on devices where the size of the L1 +cache and shared memory are fixed.

    +

    The supported cache configurations are:

    + +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaDeviceSetCacheConfig, cudaFuncSetCacheConfig (C API), cudaFuncSetCacheConfig (C++ API), cuCtxGetCacheConfig

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetStreamPriorityRange()
    +

    Returns numerical values that correspond to the least and greatest stream priorities.

    +

    Returns in *leastPriority and *greatestPriority the numerical +values that correspond to the least and greatest stream priorities +respectively. Stream priorities follow a convention where lower numbers +imply greater priorities. The range of meaningful stream priorities is +given by [*greatestPriority, *leastPriority]. If the user attempts +to create a stream with a priority value that is outside the the +meaningful range as specified by this API, the priority is +automatically clamped down or up to either *leastPriority or +*greatestPriority respectively. See +cudaStreamCreateWithPriority for details on creating a +priority stream. A NULL may be passed in for *leastPriority or +*greatestPriority if the value is not desired.

    +

    This function will return ‘0’ in both *leastPriority and +*greatestPriority if the current context’s device does not support +stream priorities (see cudaDeviceGetAttribute).

    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess

    • +
    • leastPriority (int) – Pointer to an int in which the numerical value for least stream +priority is returned

    • +
    • greatestPriority (int) – Pointer to an int in which the numerical value for greatest stream +priority is returned

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceSetCacheConfig(cacheConfig: cudaFuncCache)
    +

    Sets the preferred cache configuration for the current device.

    +

    On devices where the L1 cache and shared memory use the same hardware +resources, this sets through cacheConfig the preferred cache +configuration for the current device. This is only a preference. The +runtime will use the requested configuration if possible, but it is +free to choose a different configuration if required to execute the +function. Any function preference set via +cudaFuncSetCacheConfig (C API) or cudaFuncSetCacheConfig +(C++ API) will be preferred over this device-wide setting. Setting the +device-wide cache configuration to cudaFuncCachePreferNone +will cause subsequent kernel launches to prefer to not change the cache +configuration unless required to launch the kernel.

    +

    This setting does nothing on devices where the size of the L1 cache and +shared memory are fixed.

    +

    Launching a kernel with a different preference than the most recent +preference setting may insert a device-side synchronization point.

    +

    The supported cache configurations are:

    + +
    +
    Parameters:
    +

    cacheConfig (cudaFuncCache) – Requested cache configuration

    +
    +
    Returns:
    +

    cudaSuccess

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaDeviceGetCacheConfig, cudaFuncSetCacheConfig (C API), cudaFuncSetCacheConfig (C++ API), cuCtxSetCacheConfig

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetByPCIBusId(char *pciBusId)
    +

    Returns a handle to a compute device.

    +

    Returns in *device a device ordinal given a PCI bus ID string.

    +

    where domain, bus, device, and function are all hexadecimal +values

    +
    +
    Parameters:
    +

    pciBusId (bytes) – String in one of the following forms:

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetPCIBusId(int length, int device)
    +

    Returns a PCI Bus Id string for the device.

    +

    Returns an ASCII string identifying the device dev in the NULL- +terminated string pointed to by pciBusId. length specifies the +maximum length of the string that may be returned.

    +

    where domain, bus, device, and function are all hexadecimal +values. pciBusId should be large enough to store 13 characters +including the NULL-terminator.

    +
    +
    Parameters:
    +
      +
    • length (int) – Maximum length of string to store in name

    • +
    • device (int) – Device to get identifier string for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaIpcGetEventHandle(event)
    +

    Gets an interprocess handle for a previously allocated event.

    +

    Takes as input a previously allocated event. This event must have been +created with the cudaEventInterprocess and +cudaEventDisableTiming flags set. This opaque handle may be +copied into other processes and opened with +cudaIpcOpenEventHandle to allow efficient hardware +synchronization between GPU work in different processes.

    +

    After the event has been been opened in the importing process, +cudaEventRecord, cudaEventSynchronize, +cudaStreamWaitEvent and cudaEventQuery may be +used in either process. Performing operations on the imported event +after the exported event has been freed with +cudaEventDestroy will result in undefined behavior.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cudaDeviceGetAttribute with +cudaDevAttrIpcEventSupport

    +
    +
    Parameters:
    +

    event (CUevent or cudaEvent_t) – Event allocated with cudaEventInterprocess and +cudaEventDisableTiming flags.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaIpcOpenEventHandle(cudaIpcEventHandle_t handle: cudaIpcEventHandle_t)
    +

    Opens an interprocess event handle for use in the current process.

    +

    Opens an interprocess event handle exported from another process with +cudaIpcGetEventHandle. This function returns a +cudaEvent_t that behaves like a locally created event with +the cudaEventDisableTiming flag specified. This event must +be freed with cudaEventDestroy.

    +

    Performing operations on the imported event after the exported event +has been freed with cudaEventDestroy will result in +undefined behavior.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cudaDeviceGetAttribute with +cudaDevAttrIpcEventSupport

    +
    +
    Parameters:
    +

    handle (cudaIpcEventHandle_t) – Interprocess handle to open

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaIpcGetMemHandle(devPtr)
    +

    Gets an interprocess memory handle for an existing device memory allocation.

    +

    Takes a pointer to the base of an existing device memory allocation +created with cudaMalloc and exports it for use in another +process. This is a lightweight operation and may be called multiple +times on an allocation without adverse effects.

    +

    If a region of memory is freed with cudaFree and a +subsequent call to cudaMalloc returns memory with the same +device address, cudaIpcGetMemHandle will return a unique +handle for the new memory.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cudaDeviceGetAttribute with +cudaDevAttrIpcEventSupport

    +
    +
    Parameters:
    +

    devPtr (Any) – Base pointer to previously allocated device memory

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaIpcOpenMemHandle(cudaIpcMemHandle_t handle: cudaIpcMemHandle_t, unsigned int flags)
    +

    Opens an interprocess memory handle exported from another process and returns a device pointer usable in the local process.

    +

    Maps memory exported from another process with +cudaIpcGetMemHandle into the current device address space. +For contexts on different devices cudaIpcOpenMemHandle can +attempt to enable peer access between the devices as if the user called +cudaDeviceEnablePeerAccess. This behavior is controlled by +the cudaIpcMemLazyEnablePeerAccess flag. +cudaDeviceCanAccessPeer can determine if a mapping is +possible.

    +

    cudaIpcOpenMemHandle can open handles to devices that may +not be visible in the process calling the API.

    +

    Contexts that may open cudaIpcMemHandles are restricted in +the following way. cudaIpcMemHandles from each device in a +given process may only be opened by one context per device per other +process.

    +

    If the memory handle has already been opened by the current context, +the reference count on the handle is incremented by 1 and the existing +device pointer is returned.

    +

    Memory returned from cudaIpcOpenMemHandle must be freed +with cudaIpcCloseMemHandle.

    +

    Calling cudaFree on an exported memory region before +calling cudaIpcCloseMemHandle in the importing context will +result in undefined behavior.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cudaDeviceGetAttribute with +cudaDevAttrIpcEventSupport

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +
    +
    No guarantees are made about the address returned in *devPtr.

    In particular, multiple processes may not receive the same address for the same handle.

    +
    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaIpcCloseMemHandle(devPtr)
    +

    Attempts to close memory mapped with cudaIpcOpenMemHandle.

    +

    Decrements the reference count of the memory returnd by +cudaIpcOpenMemHandle by 1. When the reference count reaches +0, this API unmaps the memory. The original allocation in the exporting +process as well as imported mappings in other processes will be +unaffected.

    +

    Any resources used to enable peer access will be freed if this is the +last mapping using them.

    +

    IPC functionality is restricted to devices with support for unified +addressing on Linux and Windows operating systems. IPC functionality on +Windows is supported for compatibility purposes but not recommended as +it comes with performance cost. Users can test their device for IPC +functionality by calling cudaDeviceGetAttribute with +cudaDevAttrIpcEventSupport

    +
    +
    Parameters:
    +

    devPtr (Any) – Device pointer returned by cudaIpcOpenMemHandle

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorMapBufferObjectFailed, cudaErrorNotSupported, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceFlushGPUDirectRDMAWrites(target: cudaFlushGPUDirectRDMAWritesTarget, scope: cudaFlushGPUDirectRDMAWritesScope)
    +

    Blocks until remote writes are visible to the specified scope.

    +

    Blocks until remote writes to the target context via mappings created +through GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see +https://docs.nvidia.com/cuda/gpudirect-rdma for more information), are +visible to the specified scope.

    +

    If the scope equals or lies within the scope indicated by +cudaDevAttrGPUDirectRDMAWritesOrdering, the call will be a +no-op and can be safely omitted for performance. This can be determined +by comparing the numerical values between the two enums, with smaller +scopes having smaller values.

    +

    Users may query support for this API via +cudaDevAttrGPUDirectRDMAFlushWritesOptions.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorNotSupported,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceRegisterAsyncNotification(int device, callbackFunc, userData)
    +

    Registers a callback function to receive async notifications.

    +

    Registers callbackFunc to receive async notifications.

    +

    The userData parameter is passed to the callback function at async +notification time. Likewise, callback is also passed to the callback +function to distinguish between multiple registered callbacks.

    +

    The callback function being registered should be designed to return +quickly (~10ms). Any long running tasks should be queued for execution +on an application thread.

    +

    Callbacks may not call cudaDeviceRegisterAsyncNotification or +cudaDeviceUnregisterAsyncNotification. Doing so will result in +cudaErrorNotPermitted. Async notification callbacks execute +in an undefined order and may be serialized.

    +

    Returns in *callback a handle representing the registered callback +instance.

    +
    +
    Parameters:
    +
      +
    • device (int) – The device on which to register the callback

    • +
    • callbackFunc (cudaAsyncCallback) – The function to register as a callback

    • +
    • userData (Any) – A generic pointer to user data. This is passed into the callback +function.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceUnregisterAsyncNotification(int device, callback)
    +

    Unregisters an async notification callback.

    +

    Unregisters callback so that the corresponding callback function will +stop receiving async notifications.

    +
    +
    Parameters:
    +
      +
    • device (int) – The device from which to remove callback.

    • +
    • callback (cudaAsyncCallbackHandle_t) – The callback instance to unregister from receiving async +notifications.

    • +
    +
    +
    Returns:
    +

    cudaSuccess cudaErrorNotSupported cudaErrorInvalidDevice cudaErrorInvalidValue cudaErrorNotPermitted cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetDeviceCount()
    +

    Returns the number of compute-capable devices.

    +

    Returns in *count the number of devices with compute capability +greater or equal to 2.0 that are available for execution.

    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess

    • +
    • count (int) – Returns the number of devices with compute capability greater or +equal to 2.0

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetDeviceProperties(int device)
    +

    Returns information about the compute-device.

    +

    Returns in *prop the properties of device dev. The +cudaDeviceProp structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • name[256] is an ASCII string identifying the device.

    • +
    • uuid is a 16-byte unique identifier.

    • +
    • totalGlobalMem is the total amount of global memory +available on the device in bytes.

    • +
    • sharedMemPerBlock is the maximum amount of shared memory +available to a thread block in bytes.

    • +
    • regsPerBlock is the maximum number of 32-bit registers +available to a thread block.

    • +
    • warpSize is the warp size in threads.

    • +
    • memPitch is the maximum pitch in bytes allowed by the +memory copy functions that involve memory regions allocated through +cudaMallocPitch().

    • +
    • maxThreadsPerBlock is the maximum number of threads per +block.

    • +
    • maxThreadsDim[3] contains the maximum size of each +dimension of a block.

    • +
    • maxGridSize[3] contains the maximum size of each +dimension of a grid.

    • +
    • clockRate is the clock frequency in kilohertz.

    • +
    • totalConstMem is the total amount of constant memory +available on the device in bytes.

    • +
    • major, minor are the major and minor revision +numbers defining the device’s compute capability.

    • +
    • textureAlignment is the alignment requirement; texture +base addresses that are aligned to textureAlignment bytes +do not need an offset applied to texture fetches.

    • +
    • texturePitchAlignment is the pitch alignment requirement +for 2D texture references that are bound to pitched memory.

    • +
    • deviceOverlap is 1 if the device can concurrently copy +memory between host and device while executing a kernel, or 0 if not. +Deprecated, use instead asyncEngineCount.

    • +
    • multiProcessorCount is the number of multiprocessors on +the device.

    • +
    • kernelExecTimeoutEnabled is 1 if there is a run time +limit for kernels executed on the device, or 0 if not.

    • +
    • integrated is 1 if the device is an integrated +(motherboard) GPU and 0 if it is a discrete (card) component.

    • +
    • canMapHostMemory is 1 if the device can map host memory +into the CUDA address space for use with +cudaHostAlloc()/cudaHostGetDevicePointer(), +or 0 if not.

    • +
    • computeMode is the compute mode that the device is +currently in. Available modes are as follows:

      +
        +
      • cudaComputeModeDefault: Default mode - Device is not restricted and +multiple threads can use cudaSetDevice() with this +device.

      • +
      • cudaComputeModeProhibited: Compute-prohibited mode - No threads can +use cudaSetDevice() with this device.

      • +
      • cudaComputeModeExclusiveProcess: Compute-exclusive-process mode - +Many threads in one process will be able to use +cudaSetDevice() with this device. When an occupied +exclusive mode device is chosen with cudaSetDevice, all +subsequent non-device management runtime functions will return +cudaErrorDevicesUnavailable.

      • +
      +
    • +
    • maxTexture1D is the maximum 1D texture size.

    • +
    • maxTexture1DMipmap is the maximum 1D mipmapped texture +texture size.

    • +
    • maxTexture1DLinear is the maximum 1D texture size for +textures bound to linear memory.

    • +
    • maxTexture2D[2] contains the maximum 2D texture +dimensions.

    • +
    • maxTexture2DMipmap[2] contains the maximum 2D mipmapped +texture dimensions.

    • +
    • maxTexture2DLinear[3] contains the maximum 2D texture +dimensions for 2D textures bound to pitch linear memory.

    • +
    • maxTexture2DGather[2] contains the maximum 2D texture +dimensions if texture gather operations have to be performed.

    • +
    • maxTexture3D[3] contains the maximum 3D texture +dimensions.

    • +
    • maxTexture3DAlt[3] contains the maximum alternate 3D +texture dimensions.

    • +
    • maxTextureCubemap is the maximum cubemap texture width or +height.

    • +
    • maxTexture1DLayered[2] contains the maximum 1D layered +texture dimensions.

    • +
    • maxTexture2DLayered[3] contains the maximum 2D layered +texture dimensions.

    • +
    • maxTextureCubemapLayered[2] contains the maximum cubemap +layered texture dimensions.

    • +
    • maxSurface1D is the maximum 1D surface size.

    • +
    • maxSurface2D[2] contains the maximum 2D surface +dimensions.

    • +
    • maxSurface3D[3] contains the maximum 3D surface +dimensions.

    • +
    • maxSurface1DLayered[2] contains the maximum 1D layered +surface dimensions.

    • +
    • maxSurface2DLayered[3] contains the maximum 2D layered +surface dimensions.

    • +
    • maxSurfaceCubemap is the maximum cubemap surface width or +height.

    • +
    • maxSurfaceCubemapLayered[2] contains the maximum cubemap +layered surface dimensions.

    • +
    • surfaceAlignment specifies the alignment requirements for +surfaces.

    • +
    • concurrentKernels is 1 if the device supports executing +multiple kernels within the same context simultaneously, or 0 if not. +It is not guaranteed that multiple kernels will be resident on the +device concurrently so this feature should not be relied upon for +correctness.

    • +
    • ECCEnabled is 1 if the device has ECC support turned on, +or 0 if not.

    • +
    • pciBusID is the PCI bus identifier of the device.

    • +
    • pciDeviceID is the PCI device (sometimes called slot) +identifier of the device.

    • +
    • pciDomainID is the PCI domain identifier of the device.

    • +
    • tccDriver is 1 if the device is using a TCC driver or 0 +if not.

    • +
    • asyncEngineCount is 1 when the device can concurrently +copy memory between host and device while executing a kernel. It is 2 +when the device can concurrently copy memory between host and device +in both directions and execute a kernel at the same time. It is 0 if +neither of these is supported.

    • +
    • unifiedAddressing is 1 if the device shares a unified +address space with the host and 0 otherwise.

    • +
    • memoryClockRate is the peak memory clock frequency in +kilohertz.

    • +
    • memoryBusWidth is the memory bus width in bits.

    • +
    • l2CacheSize is L2 cache size in bytes.

    • +
    • persistingL2CacheMaxSize is L2 cache’s maximum persisting +lines size in bytes.

    • +
    • maxThreadsPerMultiProcessor is the number of maximum +resident threads per multiprocessor.

    • +
    • streamPrioritiesSupported is 1 if the device supports +stream priorities, or 0 if it is not supported.

    • +
    • globalL1CacheSupported is 1 if the device supports +caching of globals in L1 cache, or 0 if it is not supported.

    • +
    • localL1CacheSupported is 1 if the device supports caching +of locals in L1 cache, or 0 if it is not supported.

    • +
    • sharedMemPerMultiprocessor is the maximum amount of +shared memory available to a multiprocessor in bytes; this amount is +shared by all thread blocks simultaneously resident on a +multiprocessor.

    • +
    • regsPerMultiprocessor is the maximum number of 32-bit +registers available to a multiprocessor; this number is shared by all +thread blocks simultaneously resident on a multiprocessor.

    • +
    • managedMemory is 1 if the device supports allocating +managed memory on this system, or 0 if it is not supported.

    • +
    • isMultiGpuBoard is 1 if the device is on a multi-GPU +board (e.g. Gemini cards), and 0 if not;

    • +
    • multiGpuBoardGroupID is a unique identifier for a group +of devices associated with the same board. Devices on the same multi- +GPU board will share the same identifier.

    • +
    • hostNativeAtomicSupported is 1 if the link between the +device and the host supports native atomic operations, or 0 if it is +not supported.

    • +
    • singleToDoublePrecisionPerfRatio is the ratio of single +precision performance (in floating-point operations per second) to +double precision performance.

    • +
    • pageableMemoryAccess is 1 if the device supports +coherently accessing pageable memory without calling cudaHostRegister +on it, and 0 otherwise.

    • +
    • concurrentManagedAccess is 1 if the device can coherently +access managed memory concurrently with the CPU, and 0 otherwise.

    • +
    • computePreemptionSupported is 1 if the device supports +Compute Preemption, and 0 otherwise.

    • +
    • canUseHostPointerForRegisteredMem is 1 if the device can +access host registered memory at the same virtual address as the CPU, +and 0 otherwise.

    • +
    • cooperativeLaunch is 1 if the device supports launching +cooperative kernels via cudaLaunchCooperativeKernel, and +0 otherwise.

    • +
    • cooperativeMultiDeviceLaunch is 1 if the device supports +launching cooperative kernels via +cudaLaunchCooperativeKernelMultiDevice, and 0 otherwise.

    • +
    • sharedMemPerBlockOptin is the per device maximum shared +memory per block usable by special opt in

    • +
    • pageableMemoryAccessUsesHostPageTables is 1 if the device +accesses pageable memory via the host’s page tables, and 0 otherwise.

    • +
    • directManagedMemAccessFromHost is 1 if the host can +directly access managed memory on the device without migration, and 0 +otherwise.

    • +
    • maxBlocksPerMultiProcessor is the maximum number of +thread blocks that can reside on a multiprocessor.

    • +
    • accessPolicyMaxWindowSize is the maximum value of +num_bytes.

    • +
    • reservedSharedMemPerBlock is the shared memory reserved +by CUDA driver per block in bytes

    • +
    • hostRegisterSupported is 1 if the device supports host +memory registration via cudaHostRegister, and 0 +otherwise.

    • +
    • sparseCudaArraySupported is 1 if the device supports +sparse CUDA arrays and sparse CUDA mipmapped arrays, 0 otherwise

    • +
    • hostRegisterReadOnlySupported is 1 if the device supports +using the cudaHostRegister flag cudaHostRegisterReadOnly +to register memory that must be mapped as read-only to the GPU

    • +
    • timelineSemaphoreInteropSupported is 1 if external +timeline semaphore interop is supported on the device, 0 otherwise

    • +
    • memoryPoolsSupported is 1 if the device supports using +the cudaMallocAsync and cudaMemPool family of APIs, 0 otherwise

    • +
    • gpuDirectRDMASupported is 1 if the device supports +GPUDirect RDMA APIs, 0 otherwise

    • +
    • gpuDirectRDMAFlushWritesOptions is a bitmask to be +interpreted according to the +cudaFlushGPUDirectRDMAWritesOptions enum

    • +
    • gpuDirectRDMAWritesOrdering See the +cudaGPUDirectRDMAWritesOrdering enum for numerical values

    • +
    • memoryPoolSupportedHandleTypes is a bitmask of handle +types supported with mempool-based IPC

    • +
    • deferredMappingCudaArraySupported is 1 if the device +supports deferred mapping CUDA arrays and CUDA mipmapped arrays

    • +
    • ipcEventSupported is 1 if the device supports IPC Events, +and 0 otherwise

    • +
    • unifiedFunctionPointers is 1 if the device support +unified pointers, and 0 otherwise

    • +
    +
    +
    Parameters:
    +

    device (int) – Device number to get properties for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetAttribute(attr: cudaDeviceAttr, int device)
    +

    Returns information about the device.

    +

    Returns in *value the integer value of the attribute attr on device +device. The supported attributes are:

    + +
    +
    Parameters:
    +
      +
    • attr (cudaDeviceAttr) – Device attribute to query

    • +
    • device (int) – Device number to query

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetDefaultMemPool(int device)
    +

    Returns the default mempool of a device.

    +

    The default mempool of a device contains device memory from that +device.

    +
    +
    Parameters:
    +

    device (int) – None

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceSetMemPool(int device, memPool)
    +

    Sets the current memory pool of a device.

    +

    The memory pool must be local to the specified device. Unless a mempool +is specified in the cudaMallocAsync call, +cudaMallocAsync allocates from the current mempool of the +provided stream’s device. By default, a device’s current memory pool is +its default memory pool.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue cudaErrorInvalidDevice cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    Use cudaMallocFromPoolAsync to specify asynchronous allocations from a device different than the one the stream runs on.

    +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetMemPool(int device)
    +

    Gets the current mempool for a device.

    +

    Returns the last pool provided to cudaDeviceSetMemPool for +this device or the device’s default memory pool if +cudaDeviceSetMemPool has never been called. By default the +current mempool is the default mempool for a device, otherwise the +returned pool must have been set with cuDeviceSetMemPool or +cudaDeviceSetMemPool.

    +
    +
    Parameters:
    +

    device (int) – None

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetNvSciSyncAttributes(nvSciSyncAttrList, int device, int flags)
    +

    Return NvSciSync attributes that this device can support.

    +

    Returns in nvSciSyncAttrList, the properties of NvSciSync that this +CUDA device, dev can support. The returned nvSciSyncAttrList can be +used to create an NvSciSync that matches this device’s capabilities.

    +

    If NvSciSyncAttrKey_RequiredPerm field in nvSciSyncAttrList is +already set this API will return cudaErrorInvalidValue.

    +

    The applications should set nvSciSyncAttrList to a valid +NvSciSyncAttrList failing which this API will return +cudaErrorInvalidHandle.

    +

    The flags controls how applications intends to use the NvSciSync +created from the nvSciSyncAttrList. The valid flags are:

    +
      +
    • cudaNvSciSyncAttrSignal, specifies that the applications +intends to signal an NvSciSync on this CUDA device.

    • +
    • cudaNvSciSyncAttrWait, specifies that the applications +intends to wait on an NvSciSync on this CUDA device.

    • +
    +

    At least one of these flags must be set, failing which the API returns +cudaErrorInvalidValue. Both the flags are orthogonal to one +another: a developer may set both these flags that allows to set both +wait and signal specific attributes in the same nvSciSyncAttrList.

    +

    Note that this API updates the input nvSciSyncAttrList with values +equivalent to the following public attribute key-values: +NvSciSyncAttrKey_RequiredPerm is set to

    +
      +
    • NvSciSyncAccessPerm_SignalOnly if cudaNvSciSyncAttrSignal +is set in flags.

    • +
    • NvSciSyncAccessPerm_WaitOnly if cudaNvSciSyncAttrWait is +set in flags.

    • +
    • NvSciSyncAccessPerm_WaitSignal if both +cudaNvSciSyncAttrWait and +cudaNvSciSyncAttrSignal are set in flags. +NvSciSyncAttrKey_PrimitiveInfo is set to

    • +
    • NvSciSyncAttrValPrimitiveType_SysmemSemaphore on any valid device.

    • +
    • NvSciSyncAttrValPrimitiveType_Syncpoint if device is a Tegra +device.

    • +
    • NvSciSyncAttrValPrimitiveType_SysmemSemaphorePayload64b if device +is GA10X+. NvSciSyncAttrKey_GpuId is set to the same UUID that is +returned in None from cudaDeviceGetProperties for this +device.

    • +
    +

    cudaSuccess, cudaErrorDeviceUninitialized, +cudaErrorInvalidValue, cudaErrorInvalidHandle, +cudaErrorInvalidDevice, cudaErrorNotSupported, +cudaErrorMemoryAllocation

    +
    +
    Parameters:
    +
      +
    • nvSciSyncAttrList (Any) – Return NvSciSync attributes supported.

    • +
    • device (int) – Valid Cuda Device to get NvSciSync attributes for.

    • +
    • flags (int) – flags describing NvSciSync usage.

    • +
    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetP2PAttribute(attr: cudaDeviceP2PAttr, int srcDevice, int dstDevice)
    +

    Queries attributes of the link between two devices.

    +

    Returns in *value the value of the requested attribute attrib of +the link between srcDevice and dstDevice. The supported attributes +are:

    + +

    Returns cudaErrorInvalidDevice if srcDevice or +dstDevice are not valid or if they represent the same device.

    +

    Returns cudaErrorInvalidValue if attrib is not valid or +if value is a null pointer.

    +
    +
    Parameters:
    +
      +
    • attrib (cudaDeviceP2PAttr) – The requested attribute of the link between srcDevice and +dstDevice.

    • +
    • srcDevice (int) – The source device of the target link.

    • +
    • dstDevice (int) – The destination device of the target link.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaChooseDevice(cudaDeviceProp prop: Optional[cudaDeviceProp])
    +

    Select compute-device which best matches criteria.

    +

    Returns in *device the device which has properties that best match +*prop.

    +
    +
    Parameters:
    +

    prop (cudaDeviceProp) – Desired device properties

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaInitDevice(int device, unsigned int deviceFlags, unsigned int flags)
    +

    Initialize device to be used for GPU executions.

    +

    This function will initialize the CUDA Runtime structures and primary +context on device when called, but the context will not be made +current to device.

    +

    When cudaInitDeviceFlagsAreValid is set in flags, +deviceFlags are applied to the requested device. The values of +deviceFlags match those of the flags parameters in +cudaSetDeviceFlags. The effect may be verified by +cudaGetDeviceFlags.

    +

    This function will return an error if the device is in +cudaComputeModeExclusiveProcess and is occupied by another +process or if the device is in cudaComputeModeProhibited.

    +
    +
    Parameters:
    +
      +
    • device (int) – Device on which the runtime will initialize itself.

    • +
    • deviceFlags (unsigned int) – Parameters for device operation.

    • +
    • flags (unsigned int) – Flags for controlling the device initialization.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidDevice,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaSetDevice(int device)
    +

    Set device to be used for GPU executions.

    +

    Sets device as the current device for the calling host thread. Valid +device id’s are 0 to (cudaGetDeviceCount() - 1).

    +

    Any device memory subsequently allocated from this host thread using +cudaMalloc(), cudaMallocPitch() or +cudaMallocArray() will be physically resident on device. +Any host memory allocated from this host thread using +cudaMallocHost() or cudaHostAlloc() or +cudaHostRegister() will have its lifetime associated with +device. Any streams or events created from this host thread will be +associated with device. Any kernels launched from this host thread +using the <<<>>> operator or cudaLaunchKernel() will be +executed on device.

    +

    This call may be made from any host thread, to any device, and at any +time. This function will do no synchronization with the previous or new +device, and should only take significant time when it initializes the +runtime’s context state. This call will bind the primary context of the +specified device to the calling thread and all the subsequent memory +allocations, stream and event creations, and kernel launches will be +associated with the primary context. This function will also +immediately initialize the runtime state on the primary context, and +the context will be current on device immediately. This function will +return an error if the device is in +cudaComputeModeExclusiveProcess and is occupied by another +process or if the device is in cudaComputeModeProhibited.

    +

    It is not required to call cudaInitDevice before using this +function.

    +
    +
    Parameters:
    +

    device (int) – Device on which the active host thread should execute the device +code.

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidDevice, cudaErrorDeviceUnavailable,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetDevice()
    +

    Returns which device is currently being used.

    +

    Returns in *device the current device for the calling host thread.

    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess, cudaErrorInvalidValue, cudaErrorDeviceUnavailable,

    • +
    • device (int) – Returns the device on which the active host thread executes the +device code.

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaSetDeviceFlags(unsigned int flags)
    +

    Sets flags to be used for device executions.

    +

    Records flags as the flags for the current device. If the current +device has been set and that device has already been initialized, the +previous flags are overwritten. If the current device has not been +initialized, it is initialized with the provided flags. If no device +has been made current to the calling thread, a default device is +selected and initialized with the provided flags.

    +

    The three LSBs of the flags parameter can be used to control how the +CPU thread interacts with the OS scheduler when waiting for results +from the device.

    +
      +
    • cudaDeviceScheduleAuto: The default value if the flags +parameter is zero, uses a heuristic based on the number of active +CUDA contexts in the process C and the number of logical processors +in the system P. If C > P, then CUDA will yield to other OS +threads when waiting for the device, otherwise CUDA will not yield +while waiting for results and actively spin on the processor. +Additionally, on Tegra devices, cudaDeviceScheduleAuto +uses a heuristic based on the power profile of the platform and may +choose cudaDeviceScheduleBlockingSync for low-powered +devices.

    • +
    • cudaDeviceScheduleSpin: Instruct CUDA to actively spin +when waiting for results from the device. This can decrease latency +when waiting for the device, but may lower the performance of CPU +threads if they are performing work in parallel with the CUDA thread.

    • +
    • cudaDeviceScheduleYield: Instruct CUDA to yield its +thread when waiting for results from the device. This can increase +latency when waiting for the device, but can increase the performance +of CPU threads performing work in parallel with the device.

    • +
    • cudaDeviceScheduleBlockingSync: Instruct CUDA to block +the CPU thread on a synchronization primitive when waiting for the +device to finish work.

    • +
    • cudaDeviceBlockingSync: Instruct CUDA to block the CPU +thread on a synchronization primitive when waiting for the device to +finish work. Deprecated: This flag was deprecated as of +CUDA 4.0 and replaced with +cudaDeviceScheduleBlockingSync.

    • +
    • cudaDeviceMapHost: This flag enables allocating pinned +host memory that is accessible to the device. It is implicit for the +runtime but may be absent if a context is created using the driver +API. If this flag is not set, cudaHostGetDevicePointer() +will always return a failure code.

    • +
    • cudaDeviceLmemResizeToMax: Instruct CUDA to not reduce +local memory after resizing local memory for a kernel. This can +prevent thrashing by local memory allocations when launching many +kernels with high local memory usage at the cost of potentially +increased memory usage. Deprecated: This flag is +deprecated and the behavior enabled by this flag is now the default +and cannot be disabled.

    • +
    • cudaDeviceSyncMemops: Ensures that synchronous memory +operations initiated on this context will always synchronize. See +further documentation in the section titled “API Synchronization +behavior” to learn more about cases when synchronous memory +operations can exhibit asynchronous behavior.

    • +
    +
    +
    Parameters:
    +

    flags (unsigned int) – Parameters for device operation

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetDeviceFlags()
    +

    Gets the flags for the current device.

    +

    Returns in flags the flags for the current device. If there is a +current device for the calling thread, the flags for the device are +returned. If there is no current device, the flags for the first device +are returned, which may be the default flags. Compare to the behavior +of cudaSetDeviceFlags.

    +

    Typically, the flags returned should match the behavior that will be +seen if the calling thread uses a device after this call, without any +change to the flags or current device inbetween by this or another +thread. Note that if the device is not initialized, it is possible for +another thread to change the flags for the current device before it is +initialized. Additionally, when using exclusive mode, if this thread +has not requested a specific device, it may use a device other than the +first device, contrary to the assumption made by this function.

    +

    If a context has been created via the driver API and is current to the +calling thread, the flags for that context are always returned.

    +

    Flags returned by this function may specifically include +cudaDeviceMapHost even though it is not accepted by +cudaSetDeviceFlags because it is implicit in runtime API +flags. The reason for this is that the current context may have been +created via the driver API in which case the flag is not implicit and +may be unset.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Error Handling

    +

    This section describes the error handling functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaGetLastError()
    +

    Returns the last error from a runtime call.

    +

    Returns the last error that has been produced by any of the runtime +calls in the same instance of the CUDA Runtime library in the host +thread and resets it to cudaSuccess.

    +

    Note: Multiple instances of the CUDA Runtime library can be present in +an application when using a library that statically links the CUDA +Runtime.

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorMissingConfiguration, cudaErrorMemoryAllocation, cudaErrorInitializationError, cudaErrorLaunchFailure, cudaErrorLaunchTimeout, cudaErrorLaunchOutOfResources, cudaErrorInvalidDeviceFunction, cudaErrorInvalidConfiguration, cudaErrorInvalidDevice, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidSymbol, cudaErrorUnmapBufferObjectFailed, cudaErrorInvalidDevicePointer, cudaErrorInvalidTexture, cudaErrorInvalidTextureBinding, cudaErrorInvalidChannelDescriptor, cudaErrorInvalidMemcpyDirection, cudaErrorInvalidFilterSetting, cudaErrorInvalidNormSetting, cudaErrorUnknown, cudaErrorInvalidResourceHandle, cudaErrorInsufficientDriver, cudaErrorNoDevice, cudaErrorSetOnActiveProcess, cudaErrorStartupFailure, cudaErrorInvalidPtx, cudaErrorUnsupportedPtxVersion, cudaErrorNoKernelImageForDevice, cudaErrorJitCompilerNotFound, cudaErrorJitCompilationDisabled

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaPeekAtLastError()
    +

    Returns the last error from a runtime call.

    +

    Returns the last error that has been produced by any of the runtime +calls in the same instance of the CUDA Runtime library in the host +thread. This call does not reset the error to cudaSuccess +like cudaGetLastError().

    +

    Note: Multiple instances of the CUDA Runtime library can be present in +an application when using a library that statically links the CUDA +Runtime.

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorMissingConfiguration, cudaErrorMemoryAllocation, cudaErrorInitializationError, cudaErrorLaunchFailure, cudaErrorLaunchTimeout, cudaErrorLaunchOutOfResources, cudaErrorInvalidDeviceFunction, cudaErrorInvalidConfiguration, cudaErrorInvalidDevice, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidSymbol, cudaErrorUnmapBufferObjectFailed, cudaErrorInvalidDevicePointer, cudaErrorInvalidTexture, cudaErrorInvalidTextureBinding, cudaErrorInvalidChannelDescriptor, cudaErrorInvalidMemcpyDirection, cudaErrorInvalidFilterSetting, cudaErrorInvalidNormSetting, cudaErrorUnknown, cudaErrorInvalidResourceHandle, cudaErrorInsufficientDriver, cudaErrorNoDevice, cudaErrorSetOnActiveProcess, cudaErrorStartupFailure, cudaErrorInvalidPtx, cudaErrorUnsupportedPtxVersion, cudaErrorNoKernelImageForDevice, cudaErrorJitCompilerNotFound, cudaErrorJitCompilationDisabled

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetErrorName(error: cudaError_t)
    +

    Returns the string representation of an error code enum name.

    +

    Returns a string containing the name of an error code in the enum. If +the error code is not recognized, “unrecognized error code” is +returned.

    +
    +
    Parameters:
    +

    error (cudaError_t) – Error code to convert to string

    +
    +
    Returns:
    +

      +
    • cudaError_t.cudaSuccess – cudaError_t.cudaSuccess

    • +
    • byteschar* pointer to a NULL-terminated string

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetErrorString(error: cudaError_t)
    +

    Returns the description string for an error code.

    +

    Returns the description string for an error code. If the error code is +not recognized, “unrecognized error code” is returned.

    +
    +
    Parameters:
    +

    error (cudaError_t) – Error code to convert to string

    +
    +
    Returns:
    +

      +
    • cudaError_t.cudaSuccess – cudaError_t.cudaSuccess

    • +
    • byteschar* pointer to a NULL-terminated string

    • +
    +

    +
    +
    + +
    + +
    +
    +

    Stream Management

    +

    This section describes the stream management functions of the CUDA runtime application programming interface.

    +
    +
    +class cuda.bindings.runtime.cudaStreamCallback_t(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamCreate()
    +

    Create an asynchronous stream.

    +

    Creates a new asynchronous stream on the context that is current to the +calling host thread. If no context is current to the calling host +thread, then the primary context for a device is selected, made current +to the calling thread, and initialized before creating a stream on it.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamCreateWithFlags(unsigned int flags)
    +

    Create an asynchronous stream.

    +

    Creates a new asynchronous stream on the context that is current to the +calling host thread. If no context is current to the calling host +thread, then the primary context for a device is selected, made current +to the calling thread, and initialized before creating a stream on it. +The flags argument determines the behaviors of the stream. Valid +values for flags are

    +
      +
    • cudaStreamDefault: Default stream creation flag.

    • +
    • cudaStreamNonBlocking: Specifies that work running in the +created stream may run concurrently with work in stream 0 (the NULL +stream), and that the created stream should perform no implicit +synchronization with stream 0.

    • +
    +
    +
    Parameters:
    +

    flags (unsigned int) – Parameters for stream creation

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamCreateWithPriority(unsigned int flags, int priority)
    +

    Create an asynchronous stream with the specified priority.

    +

    Creates a stream with the specified priority and returns a handle in +pStream. The stream is created on the context that is current to the +calling host thread. If no context is current to the calling host +thread, then the primary context for a device is selected, made current +to the calling thread, and initialized before creating a stream on it. +This affects the scheduling priority of work in the stream. Priorities +provide a hint to preferentially run work with higher priority when +possible, but do not preempt already-running work or provide any other +functional guarantee on execution order.

    +

    priority follows a convention where lower numbers represent higher +priorities. ‘0’ represents default priority. The range of meaningful +numerical priorities can be queried using +cudaDeviceGetStreamPriorityRange. If the specified priority +is outside the numerical range returned by +cudaDeviceGetStreamPriorityRange, it will automatically be +clamped to the lowest or the highest number in the range.

    +
    +
    Parameters:
    +
      +
    • flags (unsigned int) – Flags for stream creation. See +cudaStreamCreateWithFlags for a list of valid flags +that can be passed

    • +
    • priority (int) – Priority of the stream. Lower numbers represent higher priorities. +See cudaDeviceGetStreamPriorityRange for more +information about the meaningful stream priorities that can be +passed.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Stream priorities are supported only on GPUs with compute capability 3.5 or higher.

    +

    In the current implementation, only compute kernels launched in priority streams are affected by the stream’s priority. Stream priorities have no effect on host-to-device and device-to-host memory operations.

    +
    + +
    +
    +cuda.bindings.runtime.cudaStreamGetPriority(hStream)
    +

    Query the priority of a stream.

    +

    Query the priority of a stream. The priority is returned in in +priority. Note that if the stream was created with a priority outside +the meaningful numerical range returned by +cudaDeviceGetStreamPriorityRange, this function returns the +clamped priority. See cudaStreamCreateWithPriority for +details about priority clamping.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamGetFlags(hStream)
    +

    Query the flags of a stream.

    +

    Query the flags of a stream. The flags are returned in flags. See +cudaStreamCreateWithFlags for a list of valid flags.

    +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamGetId(hStream)
    +

    Query the Id of a stream.

    +

    Query the Id of a stream. The Id is returned in streamId. The Id is +unique for the life of the program.

    +

    The stream handle hStream can refer to any of the following:

    + +
    +
    Parameters:
    +

    hStream (CUstream or cudaStream_t) – Handle to the stream to be queried

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaCtxResetPersistingL2Cache()
    +

    Resets all persisting lines in cache to normal status.

    +

    Resets all persisting lines in cache to normal status. Takes effect on +function return.

    +
    +
    Returns:
    +

    cudaSuccess,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamCopyAttributes(dst, src)
    +

    Copies attributes from source stream to destination stream.

    +

    Copies attributes from source stream src to destination stream dst. +Both streams must have the same context.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamGetAttribute(hStream, attr: cudaStreamAttrID)
    +

    Queries stream attribute.

    +

    Queries attribute attr from hStream and stores it in corresponding +member of value_out.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamSetAttribute(hStream, attr: cudaStreamAttrID, cudaStreamAttrValue value: Optional[cudaStreamAttrValue])
    +

    Sets stream attribute.

    +

    Sets attribute attr on hStream from corresponding attribute of +value. The updated attribute will be applied to subsequent work +submitted to the stream. It will not affect previously submitted work.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamDestroy(stream)
    +

    Destroys and cleans up an asynchronous stream.

    +

    Destroys and cleans up the asynchronous stream specified by stream.

    +

    In case the device is still doing work in the stream stream when +cudaStreamDestroy() is called, the function will return +immediately and the resources associated with stream will be released +automatically once the device has completed all work in stream.

    +
    +
    Parameters:
    +

    stream (CUstream or cudaStream_t) – Stream identifier

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamWaitEvent(stream, event, unsigned int flags)
    +

    Make a compute stream wait on an event.

    +

    Makes all future work submitted to stream wait for all work captured +in event. See cudaEventRecord() for details on what is +captured by an event. The synchronization will be performed efficiently +on the device when applicable. event may be from a different device +than stream.

    +

    flags include:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamAddCallback(stream, callback, userData, unsigned int flags)
    +

    Add a callback to a compute stream.

    +

    Adds a callback to be called on the host after all currently enqueued +items in the stream have completed. For each cudaStreamAddCallback +call, a callback will be executed exactly once. The callback will block +later work in the stream until it is finished.

    +

    The callback may be passed cudaSuccess or an error code. In +the event of a device error, all subsequently executed callbacks will +receive an appropriate cudaError_t.

    +

    Callbacks must not make any CUDA API calls. Attempting to use CUDA APIs +may result in cudaErrorNotPermitted. Callbacks must not +perform any synchronization that may depend on outstanding device work +or other callbacks that are not mandated to run earlier. Callbacks +without a mandated order (in independent streams) execute in undefined +order and may be serialized.

    +

    For the purposes of Unified Memory, callback execution makes a number +of guarantees:

    +
      +
    • The callback stream is considered idle for the duration of the +callback. Thus, for example, a callback may always use memory +attached to the callback stream.

    • +
    • The start of execution of a callback has the same effect as +synchronizing an event recorded in the same stream immediately prior +to the callback. It thus synchronizes streams which have been +“joined” prior to the callback.

    • +
    • Adding device work to any stream does not have the effect of making +the stream active until all preceding callbacks have executed. Thus, +for example, a callback might use global attached memory even if work +has been added to another stream, if it has been properly ordered +with an event.

    • +
    • Completion of a callback does not cause a stream to become active +except as described above. The callback stream will remain idle if no +device work follows the callback, and will remain idle across +consecutive callbacks without device work in between. Thus, for +example, stream synchronization can be done by signaling from a +callback at the end of the stream.

    • +
    +
    +
    Parameters:
    +
      +
    • stream (CUstream or cudaStream_t) – Stream to add callback to

    • +
    • callback (cudaStreamCallback_t) – The function to call once preceding stream operations are complete

    • +
    • userData (Any) – User specified data to be passed to the callback function

    • +
    • flags (unsigned int) – Reserved for future use, must be 0

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle, cudaErrorInvalidValue, cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    This function is slated for eventual deprecation and removal. If you do not require the callback to execute in case of a device error, consider using cudaLaunchHostFunc. Additionally, this function is not supported with cudaStreamBeginCapture and cudaStreamEndCapture, unlike cudaLaunchHostFunc.

    +
    + +
    +
    +cuda.bindings.runtime.cudaStreamSynchronize(stream)
    +

    Waits for stream tasks to complete.

    +

    Blocks until stream has completed all operations. If the +cudaDeviceScheduleBlockingSync flag was set for this +device, the host thread will block until the stream is finished with +all of its tasks.

    +
    +
    Parameters:
    +

    stream (CUstream or cudaStream_t) – Stream identifier

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamQuery(stream)
    +

    Queries an asynchronous stream for completion status.

    +

    Returns cudaSuccess if all operations in stream have +completed, or cudaErrorNotReady if not.

    +

    For the purposes of Unified Memory, a return value of +cudaSuccess is equivalent to having called +cudaStreamSynchronize().

    +
    +
    Parameters:
    +

    stream (CUstream or cudaStream_t) – Stream identifier

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorNotReady, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamAttachMemAsync(stream, devPtr, size_t length, unsigned int flags)
    +

    Attach memory to a stream asynchronously.

    +

    Enqueues an operation in stream to specify stream association of +length bytes of memory starting from devPtr. This function is a +stream-ordered operation, meaning that it is dependent on, and will +only take effect when, previous work in stream has completed. Any +previous association is automatically replaced.

    +

    devPtr must point to an one of the following types of memories:

    +
      +
    • managed memory declared using the managed keyword or allocated with +cudaMallocManaged.

    • +
    • a valid host-accessible region of system-allocated pageable memory. +This type of memory may only be specified if the device associated +with the stream reports a non-zero value for the device attribute +cudaDevAttrPageableMemoryAccess.

    • +
    +

    For managed allocations, length must be either zero or the entire +allocation’s size. Both indicate that the entire allocation’s stream +association is being changed. Currently, it is not possible to change +stream association for a portion of a managed allocation.

    +

    For pageable allocations, length must be non-zero.

    +

    The stream association is specified using flags which must be one of +cudaMemAttachGlobal, cudaMemAttachHost or +cudaMemAttachSingle. The default value for flags is +cudaMemAttachSingle If the cudaMemAttachGlobal +flag is specified, the memory can be accessed by any stream on any +device. If the cudaMemAttachHost flag is specified, the +program makes a guarantee that it won’t access the memory on the device +from any stream on a device that has a zero value for the device +attribute cudaDevAttrConcurrentManagedAccess. If the +cudaMemAttachSingle flag is specified and stream is +associated with a device that has a zero value for the device attribute +cudaDevAttrConcurrentManagedAccess, the program makes a +guarantee that it will only access the memory on the device from +stream. It is illegal to attach singly to the NULL stream, because +the NULL stream is a virtual global stream and not a specific stream. +An error will be returned in this case.

    +

    When memory is associated with a single stream, the Unified Memory +system will allow CPU access to this memory region so long as all +operations in stream have completed, regardless of whether other +streams are active. In effect, this constrains exclusive ownership of +the managed memory region by an active GPU to per-stream activity +instead of whole-GPU activity.

    +

    Accessing memory on the device from streams that are not associated +with it will produce undefined results. No error checking is performed +by the Unified Memory system to ensure that kernels launched into other +streams do not access this region.

    +

    It is a program’s responsibility to order calls to +cudaStreamAttachMemAsync via events, synchronization or +other means to ensure legal access to memory at all times. Data +visibility and coherency will be changed appropriately for all kernels +which follow a stream-association change.

    +

    If stream is destroyed while data is associated with it, the +association is removed and the association reverts to the default +visibility of the allocation as specified at +cudaMallocManaged. For managed variables, the default +association is always cudaMemAttachGlobal. Note that +destroying a stream is an asynchronous operation, and as a result, the +change to default association won’t happen until all work in the stream +has completed.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorNotReady, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamBeginCapture(stream, mode: cudaStreamCaptureMode)
    +

    Begins graph capture on a stream.

    +

    Begin graph capture on stream. When a stream is in capture mode, all +operations pushed into the stream will not be executed, but will +instead be captured into a graph, which will be returned via +cudaStreamEndCapture. Capture may not be initiated if +stream is cudaStreamLegacy. Capture must be ended on the +same stream in which it was initiated, and it may only be initiated if +the stream is not already in capture mode. The capture mode may be +queried via cudaStreamIsCapturing. A unique id representing +the capture sequence may be queried via +cudaStreamGetCaptureInfo.

    +

    If mode is not cudaStreamCaptureModeRelaxed, +cudaStreamEndCapture must be called on this stream from the +same thread.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.

    +
    + +
    +
    +cuda.bindings.runtime.cudaStreamBeginCaptureToGraph(stream, graph, dependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], dependencyData: Optional[Tuple[cudaGraphEdgeData] | List[cudaGraphEdgeData]], size_t numDependencies, mode: cudaStreamCaptureMode)
    +

    Begins graph capture on a stream to an existing graph.

    +

    Begin graph capture on stream. When a stream is in capture mode, all +operations pushed into the stream will not be executed, but will +instead be captured into graph, which will be returned via +cudaStreamEndCapture.

    +

    Capture may not be initiated if stream is +cudaStreamLegacy. Capture must be ended on the same stream +in which it was initiated, and it may only be initiated if the stream +is not already in capture mode. The capture mode may be queried via +cudaStreamIsCapturing. A unique id representing the capture +sequence may be queried via cudaStreamGetCaptureInfo.

    +

    If mode is not cudaStreamCaptureModeRelaxed, +cudaStreamEndCapture must be called on this stream from the +same thread.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    Kernels captured using this API must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.

    +
    + +
    +
    +cuda.bindings.runtime.cudaThreadExchangeStreamCaptureMode(mode: cudaStreamCaptureMode)
    +

    Swaps the stream capture interaction mode for a thread.

    +

    Sets the calling thread’s stream capture interaction mode to the value +contained in *mode, and overwrites *mode with the previous mode for +the thread. To facilitate deterministic behavior across function or +module boundaries, callers are encouraged to use this API in a push-pop +fashion:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    During stream capture (see cudaStreamBeginCapture), some +actions, such as a call to cudaMalloc, may be unsafe. In +the case of cudaMalloc, the operation is not enqueued +asynchronously to a stream, and is not observed by stream capture. +Therefore, if the sequence of operations captured via +cudaStreamBeginCapture depended on the allocation being +replayed whenever the graph is launched, the captured graph would be +invalid.

    +

    Therefore, stream capture places restrictions on API calls that can be +made within or concurrently to a +cudaStreamBeginCapture-cudaStreamEndCapture +sequence. This behavior can be controlled via this API and flags to +cudaStreamBeginCapture.

    +

    A thread’s mode is one of the following:

    +
      +
    • cudaStreamCaptureModeGlobal: This is the default mode. If the local +thread has an ongoing capture sequence that was not initiated with +cudaStreamCaptureModeRelaxed at cuStreamBeginCapture, or if any +other thread has a concurrent capture sequence initiated with +cudaStreamCaptureModeGlobal, this thread is prohibited from +potentially unsafe API calls.

    • +
    • cudaStreamCaptureModeThreadLocal: If the local thread has an +ongoing capture sequence not initiated with +cudaStreamCaptureModeRelaxed, it is prohibited from potentially +unsafe API calls. Concurrent capture sequences in other threads are +ignored.

    • +
    • cudaStreamCaptureModeRelaxed: The local thread is not prohibited +from potentially unsafe API calls. Note that the thread is still +prohibited from API calls which necessarily conflict with stream +capture, for example, attempting cudaEventQuery on an +event that was last recorded inside a capture sequence.

    • +
    +
    +
    Parameters:
    +

    mode (cudaStreamCaptureMode) – Pointer to mode value to swap with the current mode

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamEndCapture(stream)
    +

    Ends capture on a stream, returning the captured graph.

    +

    End capture on stream, returning the captured graph via pGraph. +Capture must have been initiated on stream via a call to +cudaStreamBeginCapture. If capture was invalidated, due to +a violation of the rules of stream capture, then a NULL graph will be +returned.

    +

    If the mode argument to cudaStreamBeginCapture was not +cudaStreamCaptureModeRelaxed, this call must be from the +same thread as cudaStreamBeginCapture.

    +
    +
    Parameters:
    +

    stream (CUstream or cudaStream_t) – Stream to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamIsCapturing(stream)
    +

    Returns a stream’s capture status.

    +

    Return the capture status of stream via pCaptureStatus. After a +successful call, *pCaptureStatus will contain one of the following:

    + +

    Note that, if this is called on cudaStreamLegacy (the “null +stream”) while a blocking stream on the same device is capturing, it +will return cudaErrorStreamCaptureImplicit and +*pCaptureStatus is unspecified after the call. The blocking stream +capture is not invalidated.

    +

    When a blocking stream is capturing, the legacy stream is in an +unusable state until the blocking stream capture is terminated. The +legacy stream is not supported for stream capture, but attempted use +would have an implicit dependency on the capturing stream(s).

    +
    +
    Parameters:
    +

    stream (CUstream or cudaStream_t) – Stream to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamGetCaptureInfo(stream)
    +

    Query a stream’s capture state.

    +

    Query stream state related to stream capture.

    +

    If called on cudaStreamLegacy (the “null stream”) while a +stream not created with cudaStreamNonBlocking is capturing, +returns cudaErrorStreamCaptureImplicit.

    +

    Valid data (other than capture status) is returned only if both of the +following are true:

    + +
    +
    Parameters:
    +

    stream (CUstream or cudaStream_t) – The stream to query

    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess, cudaErrorInvalidValue, cudaErrorStreamCaptureImplicit

    • +
    • captureStatus_out (cudaStreamCaptureStatus) – Location to return the capture status of the stream; required

    • +
    • id_out (unsigned long long) – Optional location to return an id for the capture sequence, which +is unique over the lifetime of the process

    • +
    • graph_out (cudaGraph_t) – Optional location to return the graph being captured into. All +operations other than destroy and node removal are permitted on the +graph while the capture sequence is in progress. This API does not +transfer ownership of the graph, which is transferred or destroyed +at cudaStreamEndCapture. Note that the graph handle may +be invalidated before end of capture for certain errors. Nodes that +are or become unreachable from the original stream at +cudaStreamEndCapture due to direct actions on the graph +do not trigger cudaErrorStreamCaptureUnjoined.

    • +
    • dependencies_out (List[cudaGraphNode_t]) – Optional location to store a pointer to an array of nodes. The next +node to be captured in the stream will depend on this set of nodes, +absent operations such as event wait which modify this set. The +array pointer is valid until the next API call which operates on +the stream or until the capture is terminated. The node handles may +be copied out and are valid until they or the graph is destroyed. +The driver-owned array may also be passed directly to APIs that +operate on the graph (not the stream) without copying.

    • +
    • numDependencies_out (int) – Optional location to store the size of the array returned in +dependencies_out.

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamGetCaptureInfo_v3(stream)
    +

    Query a stream’s capture state (12.3+)

    +

    Query stream state related to stream capture.

    +

    If called on cudaStreamLegacy (the “null stream”) while a +stream not created with cudaStreamNonBlocking is capturing, +returns cudaErrorStreamCaptureImplicit.

    +

    Valid data (other than capture status) is returned only if both of the +following are true:

    + +

    If edgeData_out is non-NULL then dependencies_out must be as well. +If dependencies_out is non-NULL and edgeData_out is NULL, but there +is non-zero edge data for one or more of the current stream +dependencies, the call will return cudaErrorLossyQuery.

    +
    +
    Parameters:
    +

    stream (CUstream or cudaStream_t) – The stream to query

    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess, cudaErrorInvalidValue, cudaErrorStreamCaptureImplicit, cudaErrorLossyQuery

    • +
    • captureStatus_out (cudaStreamCaptureStatus) – Location to return the capture status of the stream; required

    • +
    • id_out (unsigned long long) – Optional location to return an id for the capture sequence, which +is unique over the lifetime of the process

    • +
    • graph_out (cudaGraph_t) – Optional location to return the graph being captured into. All +operations other than destroy and node removal are permitted on the +graph while the capture sequence is in progress. This API does not +transfer ownership of the graph, which is transferred or destroyed +at cudaStreamEndCapture. Note that the graph handle may +be invalidated before end of capture for certain errors. Nodes that +are or become unreachable from the original stream at +cudaStreamEndCapture due to direct actions on the graph +do not trigger cudaErrorStreamCaptureUnjoined.

    • +
    • dependencies_out (List[cudaGraphNode_t]) – Optional location to store a pointer to an array of nodes. The next +node to be captured in the stream will depend on this set of nodes, +absent operations such as event wait which modify this set. The +array pointer is valid until the next API call which operates on +the stream or until the capture is terminated. The node handles may +be copied out and are valid until they or the graph is destroyed. +The driver-owned array may also be passed directly to APIs that +operate on the graph (not the stream) without copying.

    • +
    • edgeData_out (List[cudaGraphEdgeData]) – Optional location to store a pointer to an array of graph edge +data. This array parallels dependencies_out; the next node to be +added has an edge to dependencies_out`[i] with annotation +`edgeData_out`[i] for each `i. The array pointer is valid until +the next API call which operates on the stream or until the capture +is terminated.

    • +
    • numDependencies_out (int) – Optional location to store the size of the array returned in +dependencies_out.

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamUpdateCaptureDependencies(stream, dependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, unsigned int flags)
    +

    Update the set of dependencies in a capturing stream (11.3+)

    +

    Modifies the dependency set of a capturing stream. The dependency set +is the set of nodes that the next captured node in the stream will +depend on.

    +

    Valid flags are cudaStreamAddCaptureDependencies and +cudaStreamSetCaptureDependencies. These control whether the +set passed to the API is added to the existing set or replaces it. A +flags value of 0 defaults to +cudaStreamAddCaptureDependencies.

    +

    Nodes that are removed from the dependency set via this API do not +result in cudaErrorStreamCaptureUnjoined if they are +unreachable from the stream at cudaStreamEndCapture.

    +

    Returns cudaErrorIllegalState if the stream is not +capturing.

    +

    This API is new in CUDA 11.3. Developers requiring compatibility across +minor versions of the CUDA driver to 11.0 should not use this API or +provide a fallback.

    +
    +
    Parameters:
    +
      +
    • stream (CUstream or cudaStream_t) – The stream to update

    • +
    • dependencies (List[cudaGraphNode_t]) – The set of dependencies to add

    • +
    • numDependencies (size_t) – The size of the dependencies array

    • +
    • flags (unsigned int) – See above

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorIllegalState

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaStreamUpdateCaptureDependencies_v2(stream, dependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], dependencyData: Optional[Tuple[cudaGraphEdgeData] | List[cudaGraphEdgeData]], size_t numDependencies, unsigned int flags)
    +

    Update the set of dependencies in a capturing stream (12.3+)

    +

    Modifies the dependency set of a capturing stream. The dependency set +is the set of nodes that the next captured node in the stream will +depend on.

    +

    Valid flags are cudaStreamAddCaptureDependencies and +cudaStreamSetCaptureDependencies. These control whether the +set passed to the API is added to the existing set or replaces it. A +flags value of 0 defaults to +cudaStreamAddCaptureDependencies.

    +

    Nodes that are removed from the dependency set via this API do not +result in cudaErrorStreamCaptureUnjoined if they are +unreachable from the stream at cudaStreamEndCapture.

    +

    Returns cudaErrorIllegalState if the stream is not +capturing.

    +
    +
    Parameters:
    +
      +
    • stream (CUstream or cudaStream_t) – The stream to update

    • +
    • dependencies (List[cudaGraphNode_t]) – The set of dependencies to add

    • +
    • dependencyData (List[cudaGraphEdgeData]) – Optional array of data associated with each dependency.

    • +
    • numDependencies (size_t) – The size of the dependencies array

    • +
    • flags (unsigned int) – See above

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorIllegalState

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +

    Event Management

    +

    This section describes the event management functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaEventCreate()
    +

    Creates an event object.

    +

    Creates an event object for the current device using +cudaEventDefault.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEventCreateWithFlags(unsigned int flags)
    +

    Creates an event object with the specified flags.

    +

    Creates an event object for the current device with the specified +flags. Valid flags include:

    + +
    +
    Parameters:
    +

    flags (unsigned int) – Flags for new event

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEventRecord(event, stream)
    +

    Records an event.

    +

    Captures in event the contents of stream at the time of this call. +event and stream must be on the same CUDA context. Calls such as +cudaEventQuery() or cudaStreamWaitEvent() will +then examine or wait for completion of the work that was captured. Uses +of stream after this call do not modify event. See note on default +stream behavior for what is captured in the default case.

    +

    cudaEventRecord() can be called multiple times on the same +event and will overwrite the previously captured state. Other APIs such +as cudaStreamWaitEvent() use the most recently captured +state at the time of the API call, and are not affected by later calls +to cudaEventRecord(). Before the first call to +cudaEventRecord(), an event represents an empty set of +work, so for example cudaEventQuery() would return +cudaSuccess.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorLaunchFailure

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEventRecordWithFlags(event, stream, unsigned int flags)
    +

    Records an event.

    +

    Captures in event the contents of stream at the time of this call. +event and stream must be on the same CUDA context. Calls such as +cudaEventQuery() or cudaStreamWaitEvent() will +then examine or wait for completion of the work that was captured. Uses +of stream after this call do not modify event. See note on default +stream behavior for what is captured in the default case.

    +

    cudaEventRecordWithFlags() can be called multiple times on +the same event and will overwrite the previously captured state. Other +APIs such as cudaStreamWaitEvent() use the most recently +captured state at the time of the API call, and are not affected by +later calls to cudaEventRecordWithFlags(). Before the first +call to cudaEventRecordWithFlags(), an event represents an +empty set of work, so for example cudaEventQuery() would +return cudaSuccess.

    +

    flags include:

    + +
    +
    Parameters:
    +
      +
    • event (CUevent or cudaEvent_t) – Event to record

    • +
    • stream (CUstream or cudaStream_t) – Stream in which to record event

    • +
    • flags (unsigned int) – Parameters for the operation(See above)

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorLaunchFailure

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEventQuery(event)
    +

    Queries an event’s status.

    +

    Queries the status of all work currently captured by event. See +cudaEventRecord() for details on what is captured by an +event.

    +

    Returns cudaSuccess if all captured work has been +completed, or cudaErrorNotReady if any captured work is +incomplete.

    +

    For the purposes of Unified Memory, a return value of +cudaSuccess is equivalent to having called +cudaEventSynchronize().

    +
    +
    Parameters:
    +

    event (CUevent or cudaEvent_t) – Event to query

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorNotReady, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorLaunchFailure

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEventSynchronize(event)
    +

    Waits for an event to complete.

    +

    Waits until the completion of all work currently captured in event. +See cudaEventRecord() for details on what is captured by an +event.

    +

    Waiting for an event that was created with the +cudaEventBlockingSync flag will cause the calling CPU +thread to block until the event has been completed by the device. If +the cudaEventBlockingSync flag has not been set, then the +CPU thread will busy-wait until the event has been completed by the +device.

    +
    +
    Parameters:
    +

    event (CUevent or cudaEvent_t) – Event to wait for

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorLaunchFailure

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEventDestroy(event)
    +

    Destroys an event object.

    +

    Destroys the event specified by event.

    +

    An event may be destroyed before it is complete (i.e., while +cudaEventQuery() would return +cudaErrorNotReady). In this case, the call does not block +on completion of the event, and any associated resources will +automatically be released asynchronously at completion.

    +
    +
    Parameters:
    +

    event (CUevent or cudaEvent_t) – Event to destroy

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorLaunchFailure

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEventElapsedTime(start, end)
    +

    Computes the elapsed time between events.

    +

    Computes the elapsed time between two events (in milliseconds with a +resolution of around 0.5 microseconds).

    +

    If either event was last recorded in a non-NULL stream, the resulting +time may be greater than expected (even if both used the same stream +handle). This happens because the cudaEventRecord() +operation takes place asynchronously and there is no guarantee that the +measured latency is actually just between the two events. Any number of +other different stream operations could execute in between the two +measured events, thus altering the timing in a significant way.

    +

    If cudaEventRecord() has not been called on either event, +then cudaErrorInvalidResourceHandle is returned. If +cudaEventRecord() has been called on both events but one or +both of them has not yet been completed (that is, +cudaEventQuery() would return cudaErrorNotReady +on at least one of the events), cudaErrorNotReady is +returned. If either event was created with the +cudaEventDisableTiming flag, then this function will return +cudaErrorInvalidResourceHandle.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    External Resource Interoperability

    +

    This section describes the external resource interoperability functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaImportExternalMemory(cudaExternalMemoryHandleDesc memHandleDesc: Optional[cudaExternalMemoryHandleDesc])
    +

    Imports an external memory object.

    +

    Imports an externally allocated memory object and returns a handle to +that in extMem_out.

    +

    The properties of the handle being imported must be described in +memHandleDesc. The cudaExternalMemoryHandleDesc structure +is defined as follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where type specifies the type +of handle being imported. cudaExternalMemoryHandleType is +defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If type is +cudaExternalMemoryHandleTypeOpaqueFd, then +cudaExternalMemoryHandleDesc::handle::fd must be a valid +file descriptor referencing a memory object. Ownership of the file +descriptor is transferred to the CUDA driver when the handle is +imported successfully. Performing any operations on the file descriptor +after it is imported results in undefined behavior.

    +

    If type is +cudaExternalMemoryHandleTypeOpaqueWin32, then exactly one +of cudaExternalMemoryHandleDesc::handle::win32::handle and +cudaExternalMemoryHandleDesc::handle::win32::name must not +be NULL. If +cudaExternalMemoryHandleDesc::handle::win32::handle is not +NULL, then it must represent a valid shared NT handle that references a +memory object. Ownership of this handle is not transferred to CUDA +after the import operation, so the application must release the handle +using the appropriate system call. If +cudaExternalMemoryHandleDesc::handle::win32::name is not +NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a memory object.

    +

    If type is +cudaExternalMemoryHandleTypeOpaqueWin32Kmt, then +cudaExternalMemoryHandleDesc::handle::win32::handle must be +non-NULL and +cudaExternalMemoryHandleDesc::handle::win32::name must be +NULL. The handle specified must be a globally shared KMT handle. This +handle does not hold a reference to the underlying object, and thus +will be invalid when all references to the memory object are destroyed.

    +

    If type is +cudaExternalMemoryHandleTypeD3D12Heap, then exactly one of +cudaExternalMemoryHandleDesc::handle::win32::handle and +cudaExternalMemoryHandleDesc::handle::win32::name must not +be NULL. If +cudaExternalMemoryHandleDesc::handle::win32::handle is not +NULL, then it must represent a valid shared NT handle that is returned +by ID3D12Device::CreateSharedHandle when referring to a ID3D12Heap +object. This handle holds a reference to the underlying object. If +cudaExternalMemoryHandleDesc::handle::win32::name is not +NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a ID3D12Heap object.

    +

    If type is +cudaExternalMemoryHandleTypeD3D12Resource, then exactly one +of cudaExternalMemoryHandleDesc::handle::win32::handle and +cudaExternalMemoryHandleDesc::handle::win32::name must not +be NULL. If +cudaExternalMemoryHandleDesc::handle::win32::handle is not +NULL, then it must represent a valid shared NT handle that is returned +by ID3D12Device::CreateSharedHandle when referring to a ID3D12Resource +object. This handle holds a reference to the underlying object. If +cudaExternalMemoryHandleDesc::handle::win32::name is not +NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a ID3D12Resource object.

    +

    If type is +cudaExternalMemoryHandleTypeD3D11Resource,then exactly one +of cudaExternalMemoryHandleDesc::handle::win32::handle and +cudaExternalMemoryHandleDesc::handle::win32::name must not +be NULL. If +cudaExternalMemoryHandleDesc::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that is +returned by IDXGIResource1::CreateSharedHandle when referring to a +ID3D11Resource object. If +cudaExternalMemoryHandleDesc::handle::win32::name is not +NULL, then it must point to a NULL-terminated array of UTF-16 +characters that refers to a ID3D11Resource object.

    +

    If type is +cudaExternalMemoryHandleTypeD3D11ResourceKmt, then +cudaExternalMemoryHandleDesc::handle::win32::handle must be +non-NULL and +cudaExternalMemoryHandleDesc::handle::win32::name must be +NULL. The handle specified must be a valid shared KMT handle that is +returned by IDXGIResource::GetSharedHandle when referring to a +ID3D11Resource object.

    +

    If type is +cudaExternalMemoryHandleTypeNvSciBuf, then +cudaExternalMemoryHandleDesc::handle::nvSciBufObject must +be NON-NULL and reference a valid NvSciBuf object. If the NvSciBuf +object imported into CUDA is also mapped by other drivers, then the +application must use cudaWaitExternalSemaphoresAsync or +cudaSignalExternalSemaphoresAsync as approprriate barriers +to maintain coherence between CUDA and the other drivers. See +cudaExternalSemaphoreWaitSkipNvSciBufMemSync and +cudaExternalSemaphoreSignalSkipNvSciBufMemSync for memory +synchronization.

    +

    The size of the memory object must be specified in +size.

    +

    Specifying the flag cudaExternalMemoryDedicated in +flags indicates that the +resource is a dedicated resource. The definition of what a dedicated +resource is outside the scope of this extension. This flag must be set +if type is one of the +following: cudaExternalMemoryHandleTypeD3D12Resource +cudaExternalMemoryHandleTypeD3D11Resource +cudaExternalMemoryHandleTypeD3D11ResourceKmt

    +
    +
    Parameters:
    +

    memHandleDesc (cudaExternalMemoryHandleDesc) – Memory import handle descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    If the Vulkan memory imported into CUDA is mapped on the CPU then the application must use vkInvalidateMappedMemoryRanges/vkFlushMappedMemoryRanges as well as appropriate Vulkan pipeline barriers to maintain coherence between CPU and GPU. For more information on these APIs, please refer to “Synchronization +and Cache Control” chapter from Vulkan specification.

    +
    + +
    +
    +cuda.bindings.runtime.cudaExternalMemoryGetMappedBuffer(extMem, cudaExternalMemoryBufferDesc bufferDesc: Optional[cudaExternalMemoryBufferDesc])
    +

    Maps a buffer onto an imported memory object.

    +

    Maps a buffer onto an imported memory object and returns a device +pointer in devPtr.

    +

    The properties of the buffer being mapped must be described in +bufferDesc. The cudaExternalMemoryBufferDesc structure is +defined as follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where offset is the offset in +the memory object where the buffer’s base address is. +size is the size of the +buffer. flags must be zero.

    +

    The offset and size have to be suitably aligned to match the +requirements of the external API. Mapping two buffers whose ranges +overlap may or may not result in the same virtual address being +returned for the overlapped portion. In such cases, the application +must ensure that all accesses to that region from the GPU are volatile. +Otherwise writes made via one address are not guaranteed to be visible +via the other address, even if they’re issued by the same thread. It is +recommended that applications map the combined range instead of mapping +separate buffers and then apply the appropriate offsets to the returned +pointer to derive the individual buffers.

    +

    The returned pointer devPtr must be freed using cudaFree.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaExternalMemoryGetMappedMipmappedArray(extMem, cudaExternalMemoryMipmappedArrayDesc mipmapDesc: Optional[cudaExternalMemoryMipmappedArrayDesc])
    +

    Maps a CUDA mipmapped array onto an external memory object.

    +

    Maps a CUDA mipmapped array onto an external object and returns a +handle to it in mipmap.

    +

    The properties of the CUDA mipmapped array being mapped must be +described in mipmapDesc. The structure +cudaExternalMemoryMipmappedArrayDesc is defined as follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where offset is the +offset in the memory object where the base level of the mipmap chain +is. formatDesc +describes the format of the data. +extent specifies the +dimensions of the base level of the mipmap chain. +flags are flags +associated with CUDA mipmapped arrays. For further details, please +refer to the documentation for cudaMalloc3DArray. Note that +if the mipmapped array is bound as a color target in the graphics API, +then the flag cudaArrayColorAttachment must be specified in +flags. +numLevels specifies +the total number of levels in the mipmap chain.

    +

    The returned CUDA mipmapped array must be freed using +cudaFreeMipmappedArray.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    If type is cudaExternalMemoryHandleTypeNvSciBuf, then numLevels must not be greater than 1.

    +
    + +
    +
    +cuda.bindings.runtime.cudaDestroyExternalMemory(extMem)
    +

    Destroys an external memory object.

    +

    Destroys the specified external memory object. Any existing buffers and +CUDA mipmapped arrays mapped onto this object must no longer be used +and must be explicitly freed using cudaFree and +cudaFreeMipmappedArray respectively.

    +
    +
    Parameters:
    +

    extMem (cudaExternalMemory_t) – External memory object to be destroyed

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaImportExternalSemaphore(cudaExternalSemaphoreHandleDesc semHandleDesc: Optional[cudaExternalSemaphoreHandleDesc])
    +

    Imports an external semaphore.

    +

    Imports an externally allocated synchronization object and returns a +handle to that in extSem_out.

    +

    The properties of the handle being imported must be described in +semHandleDesc. The cudaExternalSemaphoreHandleDesc is +defined as follows:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where type specifies the +type of handle being imported. +cudaExternalSemaphoreHandleType is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    If type is +cudaExternalSemaphoreHandleTypeOpaqueFd, then +cudaExternalSemaphoreHandleDesc::handle::fd must be a valid +file descriptor referencing a synchronization object. Ownership of the +file descriptor is transferred to the CUDA driver when the handle is +imported successfully. Performing any operations on the file descriptor +after it is imported results in undefined behavior.

    +

    If type is +cudaExternalSemaphoreHandleTypeOpaqueWin32, then exactly +one of +cudaExternalSemaphoreHandleDesc::handle::win32::handle and +cudaExternalSemaphoreHandleDesc::handle::win32::name must +not be NULL. If +cudaExternalSemaphoreHandleDesc::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that +references a synchronization object. Ownership of this handle is not +transferred to CUDA after the import operation, so the application must +release the handle using the appropriate system call. If +cudaExternalSemaphoreHandleDesc::handle::win32::name is not +NULL, then it must name a valid synchronization object.

    +

    If type is +cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt, then +cudaExternalSemaphoreHandleDesc::handle::win32::handle must +be non-NULL and +cudaExternalSemaphoreHandleDesc::handle::win32::name must +be NULL. The handle specified must be a globally shared KMT handle. +This handle does not hold a reference to the underlying object, and +thus will be invalid when all references to the synchronization object +are destroyed.

    +

    If type is +cudaExternalSemaphoreHandleTypeD3D12Fence, then exactly one +of cudaExternalSemaphoreHandleDesc::handle::win32::handle +and cudaExternalSemaphoreHandleDesc::handle::win32::name +must not be NULL. If +cudaExternalSemaphoreHandleDesc::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that is +returned by ID3D12Device::CreateSharedHandle when referring to a +ID3D12Fence object. This handle holds a reference to the underlying +object. If +cudaExternalSemaphoreHandleDesc::handle::win32::name is not +NULL, then it must name a valid synchronization object that refers to a +valid ID3D12Fence object.

    +

    If type is +cudaExternalSemaphoreHandleTypeD3D11Fence, then exactly one +of cudaExternalSemaphoreHandleDesc::handle::win32::handle +and cudaExternalSemaphoreHandleDesc::handle::win32::name +must not be NULL. If +cudaExternalSemaphoreHandleDesc::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that is +returned by ID3D11Fence::CreateSharedHandle. If +cudaExternalSemaphoreHandleDesc::handle::win32::name is not +NULL, then it must name a valid synchronization object that refers to a +valid ID3D11Fence object.

    +

    If type is +cudaExternalSemaphoreHandleTypeNvSciSync, then +cudaExternalSemaphoreHandleDesc::handle::nvSciSyncObj +represents a valid NvSciSyncObj.

    +

    cudaExternalSemaphoreHandleTypeKeyedMutex, then exactly one +of cudaExternalSemaphoreHandleDesc::handle::win32::handle +and cudaExternalSemaphoreHandleDesc::handle::win32::name +must not be NULL. If +cudaExternalSemaphoreHandleDesc::handle::win32::handle is +not NULL, then it represent a valid shared NT handle that is returned +by IDXGIResource1::CreateSharedHandle when referring to a +IDXGIKeyedMutex object.

    +

    If type is +cudaExternalSemaphoreHandleTypeKeyedMutexKmt, then +cudaExternalSemaphoreHandleDesc::handle::win32::handle must +be non-NULL and +cudaExternalSemaphoreHandleDesc::handle::win32::name must +be NULL. The handle specified must represent a valid KMT handle that is +returned by IDXGIResource::GetSharedHandle when referring to a +IDXGIKeyedMutex object.

    +

    If type is +cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, then +cudaExternalSemaphoreHandleDesc::handle::fd must be a valid +file descriptor referencing a synchronization object. Ownership of the +file descriptor is transferred to the CUDA driver when the handle is +imported successfully. Performing any operations on the file descriptor +after it is imported results in undefined behavior.

    +

    If type is +cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32, then +exactly one of +cudaExternalSemaphoreHandleDesc::handle::win32::handle and +cudaExternalSemaphoreHandleDesc::handle::win32::name must +not be NULL. If +cudaExternalSemaphoreHandleDesc::handle::win32::handle is +not NULL, then it must represent a valid shared NT handle that +references a synchronization object. Ownership of this handle is not +transferred to CUDA after the import operation, so the application must +release the handle using the appropriate system call. If +cudaExternalSemaphoreHandleDesc::handle::win32::name is not +NULL, then it must name a valid synchronization object.

    +
    +
    Parameters:
    +

    semHandleDesc (cudaExternalSemaphoreHandleDesc) – Semaphore import handle descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaSignalExternalSemaphoresAsync(extSemArray: Optional[Tuple[cudaExternalSemaphore_t] | List[cudaExternalSemaphore_t]], paramsArray: Optional[Tuple[cudaExternalSemaphoreSignalParams] | List[cudaExternalSemaphoreSignalParams]], unsigned int numExtSems, stream)
    +

    Signals a set of external semaphore objects.

    +

    Enqueues a signal operation on a set of externally allocated semaphore +object in the specified stream. The operations will be executed when +all prior operations in the stream complete.

    +

    The exact semantics of signaling a semaphore depends on the type of the +object.

    +

    If the semaphore object is any one of the following types: +cudaExternalSemaphoreHandleTypeOpaqueFd, +cudaExternalSemaphoreHandleTypeOpaqueWin32, +cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt then +signaling the semaphore will set it to the signaled state.

    +

    If the semaphore object is any one of the following types: +cudaExternalSemaphoreHandleTypeD3D12Fence, +cudaExternalSemaphoreHandleTypeD3D11Fence, +cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, +cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 then +the semaphore will be set to the value specified in +cudaExternalSemaphoreSignalParams::params::fence::value.

    +

    If the semaphore object is of the type +cudaExternalSemaphoreHandleTypeNvSciSync this API sets +cudaExternalSemaphoreSignalParams::params::nvSciSync::fence +to a value that can be used by subsequent waiters of the same NvSciSync +object to order operations with those currently submitted in stream. +Such an update will overwrite previous contents of +cudaExternalSemaphoreSignalParams::params::nvSciSync::fence. +By default, signaling such an external semaphore object causes +appropriate memory synchronization operations to be performed over all +the external memory objects that are imported as +cudaExternalMemoryHandleTypeNvSciBuf. This ensures that any +subsequent accesses made by other importers of the same set of NvSciBuf +memory object(s) are coherent. These operations can be skipped by +specifying the flag +cudaExternalSemaphoreSignalSkipNvSciBufMemSync, which can +be used as a performance optimization when data coherency is not +required. But specifying this flag in scenarios where data coherency is +required results in undefined behavior. Also, for semaphore object of +the type cudaExternalSemaphoreHandleTypeNvSciSync, if the +NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags +in cudaDeviceGetNvSciSyncAttributes to +cudaNvSciSyncAttrSignal, this API will return cudaErrorNotSupported.

    +

    cudaExternalSemaphoreSignalParams::params::nvSciSync::fence +associated with semaphore object of the type +cudaExternalSemaphoreHandleTypeNvSciSync can be +deterministic. For this the NvSciSyncAttrList used to create the +semaphore object must have value of +NvSciSyncAttrKey_RequireDeterministicFences key set to true. +Deterministic fences allow users to enqueue a wait over the semaphore +object even before corresponding signal is enqueued. For such a +semaphore object, CUDA guarantees that each signal operation will +increment the fence value by ‘1’. Users are expected to track count of +signals enqueued on the semaphore object and insert waits accordingly. +When such a semaphore object is signaled from multiple streams, due to +concurrent stream execution, it is possible that the order in which the +semaphore gets signaled is indeterministic. This could lead to waiters +of the semaphore getting unblocked incorrectly. Users are expected to +handle such situations, either by not using the same semaphore object +with deterministic fence support enabled in different streams or by +adding explicit dependency amongst such streams so that the semaphore +is signaled in order.

    +

    If the semaphore object is any one of the following types: +cudaExternalSemaphoreHandleTypeKeyedMutex, +cudaExternalSemaphoreHandleTypeKeyedMutexKmt, then the +keyed mutex will be released with the key specified in +cudaExternalSemaphoreSignalParams::params::keyedmutex::key.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaWaitExternalSemaphoresAsync(extSemArray: Optional[Tuple[cudaExternalSemaphore_t] | List[cudaExternalSemaphore_t]], paramsArray: Optional[Tuple[cudaExternalSemaphoreWaitParams] | List[cudaExternalSemaphoreWaitParams]], unsigned int numExtSems, stream)
    +

    Waits on a set of external semaphore objects.

    +

    Enqueues a wait operation on a set of externally allocated semaphore +object in the specified stream. The operations will be executed when +all prior operations in the stream complete.

    +

    The exact semantics of waiting on a semaphore depends on the type of +the object.

    +

    If the semaphore object is any one of the following types: +cudaExternalSemaphoreHandleTypeOpaqueFd, +cudaExternalSemaphoreHandleTypeOpaqueWin32, +cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt then waiting +on the semaphore will wait until the semaphore reaches the signaled +state. The semaphore will then be reset to the unsignaled state. +Therefore for every signal operation, there can only be one wait +operation.

    +

    If the semaphore object is any one of the following types: +cudaExternalSemaphoreHandleTypeD3D12Fence, +cudaExternalSemaphoreHandleTypeD3D11Fence, +cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd, +cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 then +waiting on the semaphore will wait until the value of the semaphore is +greater than or equal to +cudaExternalSemaphoreWaitParams::params::fence::value.

    +

    If the semaphore object is of the type +cudaExternalSemaphoreHandleTypeNvSciSync then, waiting on +the semaphore will wait until the +cudaExternalSemaphoreSignalParams::params::nvSciSync::fence +is signaled by the signaler of the NvSciSyncObj that was associated +with this semaphore object. By default, waiting on such an external +semaphore object causes appropriate memory synchronization operations +to be performed over all external memory objects that are imported as +cudaExternalMemoryHandleTypeNvSciBuf. This ensures that any +subsequent accesses made by other importers of the same set of NvSciBuf +memory object(s) are coherent. These operations can be skipped by +specifying the flag +cudaExternalSemaphoreWaitSkipNvSciBufMemSync, which can be +used as a performance optimization when data coherency is not required. +But specifying this flag in scenarios where data coherency is required +results in undefined behavior. Also, for semaphore object of the type +cudaExternalSemaphoreHandleTypeNvSciSync, if the +NvSciSyncAttrList used to create the NvSciSyncObj had not set the flags +in cudaDeviceGetNvSciSyncAttributes to +cudaNvSciSyncAttrWait, this API will return cudaErrorNotSupported.

    +

    If the semaphore object is any one of the following types: +cudaExternalSemaphoreHandleTypeKeyedMutex, +cudaExternalSemaphoreHandleTypeKeyedMutexKmt, then the +keyed mutex will be acquired when it is released with the key specified +in +cudaExternalSemaphoreSignalParams::params::keyedmutex::key +or until the timeout specified by +cudaExternalSemaphoreSignalParams::params::keyedmutex::timeoutMs +has lapsed. The timeout interval can either be a finite value specified +in milliseconds or an infinite value. In case an infinite value is +specified the timeout never elapses. The windows INFINITE macro must be +used to specify infinite timeout

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle cudaErrorTimeout

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDestroyExternalSemaphore(extSem)
    +

    Destroys an external semaphore.

    +

    Destroys an external semaphore object and releases any references to +the underlying resource. Any outstanding signals or waits must have +completed before the semaphore is destroyed.

    +
    +
    Parameters:
    +

    extSem (cudaExternalSemaphore_t) – External semaphore to be destroyed

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +

    Execution Control

    +

    This section describes the execution control functions of the CUDA runtime application programming interface.

    +

    Some functions have overloaded C++ API template versions documented separately in the C++ API Routines module.

    +
    +
    +cuda.bindings.runtime.cudaFuncSetCacheConfig(func, cacheConfig: cudaFuncCache)
    +

    Sets the preferred cache configuration for a device function.

    +

    On devices where the L1 cache and shared memory use the same hardware +resources, this sets through cacheConfig the preferred cache +configuration for the function specified via func. This is only a +preference. The runtime will use the requested configuration if +possible, but it is free to choose a different configuration if +required to execute func.

    +

    func is a device function symbol and must be declared as a None +function. If the specified function does not exist, then +cudaErrorInvalidDeviceFunction is returned. For templated +functions, pass the function symbol as follows: +func_name<template_arg_0,…,template_arg_N>

    +

    This setting does nothing on devices where the size of the L1 cache and +shared memory are fixed.

    +

    Launching a kernel with a different preference than the most recent +preference setting may insert a device-side synchronization point.

    +

    The supported cache configurations are:

    + +
    +
    Parameters:
    +
      +
    • func (Any) – Device function symbol

    • +
    • cacheConfig (cudaFuncCache) – Requested cache configuration

    • +
    +
    +
    Returns:
    +

    cudaSuccess, :py:obj:`~.cudaErrorInvalidDeviceFunction`2

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaFuncSetCacheConfig (C++ API), cudaFuncGetAttributes (C API), cudaLaunchKernel (C API), cuFuncSetCacheConfig

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaFuncGetAttributes(func)
    +

    Find out attributes for a given function.

    +

    This function obtains the attributes of a function specified via +func. func is a device function symbol and must be declared as a +None function. The fetched attributes are placed in attr. If the +specified function does not exist, then +cudaErrorInvalidDeviceFunction is returned. For templated +functions, pass the function symbol as follows: +func_name<template_arg_0,…,template_arg_N>

    +

    Note that some function attributes such as +maxThreadsPerBlock may vary based on the device that is +currently being used.

    +
    +
    Parameters:
    +

    func (Any) – Device function symbol

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaFuncSetCacheConfig (C API), cudaFuncGetAttributes (C++ API), cudaLaunchKernel (C API), cuFuncGetAttribute

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaFuncSetAttribute(func, attr: cudaFuncAttribute, int value)
    +

    Set attributes for a given function.

    +

    This function sets the attributes of a function specified via func. +The parameter func must be a pointer to a function that executes on +the device. The parameter specified by func must be declared as a +None function. The enumeration defined by attr is set to the value +defined by value. If the specified function does not exist, then +cudaErrorInvalidDeviceFunction is returned. If the +specified attribute cannot be written, or if the value is incorrect, +then cudaErrorInvalidValue is returned.

    +

    Valid values for attr are:

    +
      +
    • cudaFuncAttributeMaxDynamicSharedMemorySize - The +requested maximum size in bytes of dynamically-allocated shared +memory. The sum of this value and the function attribute +sharedSizeBytes cannot exceed the device attribute +cudaDevAttrMaxSharedMemoryPerBlockOptin. The maximal size +of requestable dynamic shared memory may differ by GPU architecture.

    • +
    • cudaFuncAttributePreferredSharedMemoryCarveout - 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. See +cudaDevAttrMaxSharedMemoryPerMultiprocessor. This is only +a hint, and the driver can choose a different ratio if required to +execute the function.

    • +
    • cudaFuncAttributeRequiredClusterWidth: The required +cluster width in blocks. The width, height, and depth values must +either all be 0 or all be positive. The validity of the cluster +dimensions is checked at launch time. If the value is set during +compile time, it cannot be set at runtime. Setting it at runtime will +return cudaErrorNotPermitted.

    • +
    • cudaFuncAttributeRequiredClusterHeight: The required +cluster height in blocks. The width, height, and depth values must +either all be 0 or all be positive. The validity of the cluster +dimensions is checked at launch time. If the value is set during +compile time, it cannot be set at runtime. Setting it at runtime will +return cudaErrorNotPermitted.

    • +
    • cudaFuncAttributeRequiredClusterDepth: The required +cluster depth in blocks. The width, height, and depth values must +either all be 0 or all be positive. The validity of the cluster +dimensions is checked at launch time. If the value is set during +compile time, it cannot be set at runtime. Setting it at runtime will +return cudaErrorNotPermitted.

    • +
    • cudaFuncAttributeNonPortableClusterSizeAllowed: Indicates +whether the function can be launched with non-portable cluster size. +1 is allowed, 0 is disallowed.

    • +
    • cudaFuncAttributeClusterSchedulingPolicyPreference: The +block scheduling policy of a function. The value type is +cudaClusterSchedulingPolicy.

    • +
    +

    cudaLaunchKernel (C++ API), cudaFuncSetCacheConfig (C++ API), +cudaFuncGetAttributes (C API),

    +
    +
    Parameters:
    +
      +
    • func (Any) – Function to get attributes of

    • +
    • attr (cudaFuncAttribute) – Attribute to set

    • +
    • value (int) – Value to set

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidDeviceFunction, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaLaunchHostFunc(stream, fn, userData)
    +

    Enqueues a host function call in a stream.

    +

    Enqueues a host function to run in a stream. The function will be +called after currently enqueued work and will block work added after +it.

    +

    The host function must not make any CUDA API calls. Attempting to use a +CUDA API may result in cudaErrorNotPermitted, but this is +not required. The host function must not perform any synchronization +that may depend on outstanding CUDA work not mandated to run earlier. +Host functions without a mandated order (such as in independent +streams) execute in undefined order and may be serialized.

    +

    For the purposes of Unified Memory, execution makes a number of +guarantees:

    +
      +
    • The stream is considered idle for the duration of the function’s +execution. Thus, for example, the function may always use memory +attached to the stream it was enqueued in.

    • +
    • The start of execution of the function has the same effect as +synchronizing an event recorded in the same stream immediately prior +to the function. It thus synchronizes streams which have been +“joined” prior to the function.

    • +
    • Adding device work to any stream does not have the effect of making +the stream active until all preceding host functions and stream +callbacks have executed. Thus, for example, a function might use +global attached memory even if work has been added to another stream, +if the work has been ordered behind the function call with an event.

    • +
    • Completion of the function does not cause a stream to become active +except as described above. The stream will remain idle if no device +work follows the function, and will remain idle across consecutive +host functions or stream callbacks without device work in between. +Thus, for example, stream synchronization can be done by signaling +from a host function at the end of the stream.

    • +
    +

    Note that, in constrast to cuStreamAddCallback, the +function will not be called in the event of an error in the CUDA +context.

    +
    +
    Parameters:
    +
      +
    • hStream (CUstream or cudaStream_t) – Stream to enqueue function call in

    • +
    • fn (cudaHostFn_t) – The function to call once preceding stream operations are complete

    • +
    • userData (Any) – User-specified data to be passed to the function

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle, cudaErrorInvalidValue, cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +

    Occupancy

    +

    This section describes the occupancy calculation functions of the CUDA runtime application programming interface.

    +

    Besides the occupancy calculator functions (cudaOccupancyMaxActiveBlocksPerMultiprocessor and cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags), there are also C++ only occupancy-based launch configuration functions documented in C++ API Routines module.

    +

    See cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSize (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API), cudaOccupancyMaxPotentialBlockSizeVariableSMem (C++ API) cudaOccupancyAvailableDynamicSMemPerBlock (C++ API),

    +
    +
    +cuda.bindings.runtime.cudaOccupancyMaxActiveBlocksPerMultiprocessor(func, int blockSize, size_t dynamicSMemSize)
    +

    Returns occupancy for a device function.

    +

    Returns in *numBlocks the maximum number of active blocks per +streaming multiprocessor for the device function.

    +
    +
    Parameters:
    +
      +
    • func (Any) – Kernel function for which occupancy is calculated

    • +
    • blockSize (int) – Block size the kernel is intended to be launched with

    • +
    • dynamicSMemSize (size_t) – Per-block dynamic shared memory usage intended, in bytes

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, cudaOccupancyMaxPotentialBlockSize, cudaOccupancyMaxPotentialBlockSizeWithFlags, cudaOccupancyMaxPotentialBlockSizeVariableSMem, cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags, cudaOccupancyAvailableDynamicSMemPerBlock, cuOccupancyMaxActiveBlocksPerMultiprocessor

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaOccupancyAvailableDynamicSMemPerBlock(func, int numBlocks, int blockSize)
    +

    Returns dynamic shared memory available per block when launching numBlocks blocks on SM.

    +

    Returns in *dynamicSmemSize the maximum size of dynamic shared memory +to allow numBlocks blocks per SM.

    +
    +
    Parameters:
    +
      +
    • func (Any) – Kernel function for which occupancy is calculated

    • +
    • numBlocks (int) – Number of blocks to fit on SM

    • +
    • blockSize (int) – Size of the block

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags, cudaOccupancyMaxPotentialBlockSize, cudaOccupancyMaxPotentialBlockSizeWithFlags, cudaOccupancyMaxPotentialBlockSizeVariableSMem, cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags, cudaOccupancyAvailableDynamicSMemPerBlock

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags(func, int blockSize, size_t dynamicSMemSize, unsigned int flags)
    +

    Returns occupancy for a device function with the specified flags.

    +

    Returns in *numBlocks the maximum number of active blocks per +streaming multiprocessor for the device function.

    +

    The flags parameter controls how special cases are handled. Valid +flags include:

    +
      +
    • cudaOccupancyDefault: keeps the default behavior as +cudaOccupancyMaxActiveBlocksPerMultiprocessor

    • +
    • cudaOccupancyDisableCachingOverride: This flag suppresses +the default behavior on platform where global caching affects +occupancy. On such platforms, if caching is enabled, but per-block SM +resource usage would result in zero occupancy, the occupancy +calculator will calculate the occupancy as if caching is disabled. +Setting this flag makes the occupancy calculator to return 0 in such +cases. More information can be found about this feature in the +“Unified L1/Texture Cache” section of the Maxwell tuning guide.

    • +
    +
    +
    Parameters:
    +
      +
    • func (Any) – Kernel function for which occupancy is calculated

    • +
    • blockSize (int) – Block size the kernel is intended to be launched with

    • +
    • dynamicSMemSize (size_t) – Per-block dynamic shared memory usage intended, in bytes

    • +
    • flags (unsigned int) – Requested behavior for the occupancy calculator

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaOccupancyMaxActiveBlocksPerMultiprocessor, cudaOccupancyMaxPotentialBlockSize, cudaOccupancyMaxPotentialBlockSizeWithFlags, cudaOccupancyMaxPotentialBlockSizeVariableSMem, cudaOccupancyMaxPotentialBlockSizeVariableSMemWithFlags, cudaOccupancyAvailableDynamicSMemPerBlock, cuOccupancyMaxActiveBlocksPerMultiprocessorWithFlags

    +
    +
    + +
    +
    +

    Memory Management

    +

    This section describes the memory management functions of the CUDA runtime application programming interface.

    +

    Some functions have overloaded C++ API template versions documented separately in the C++ API Routines module.

    +
    +
    +cuda.bindings.runtime.cudaMallocManaged(size_t size, unsigned int flags)
    +

    Allocates memory that will be automatically managed by the Unified Memory system.

    +

    Allocates size bytes of managed memory on the device and returns in +*devPtr a pointer to the allocated memory. If the device doesn’t +support allocating managed memory, cudaErrorNotSupported is +returned. Support for managed memory can be queried using the device +attribute cudaDevAttrManagedMemory. The allocated memory is +suitably aligned for any kind of variable. The memory is not cleared. +If size is 0, cudaMallocManaged returns +cudaErrorInvalidValue. The pointer is valid on the CPU and +on all GPUs in the system that support managed memory. All accesses to +this pointer must obey the Unified Memory programming model.

    +

    flags specifies the default stream association for this allocation. +flags must be one of cudaMemAttachGlobal or +cudaMemAttachHost. The default value for flags is +cudaMemAttachGlobal. If cudaMemAttachGlobal is +specified, then this memory is accessible from any stream on any +device. If cudaMemAttachHost is specified, then the +allocation should not be accessed from devices that have a zero value +for the device attribute +cudaDevAttrConcurrentManagedAccess; an explicit call to +cudaStreamAttachMemAsync will be required to enable access +on such devices.

    +

    If the association is later changed via +cudaStreamAttachMemAsync to a single stream, the default +association, as specifed during cudaMallocManaged, is +restored when that stream is destroyed. For managed variables, the +default association is always cudaMemAttachGlobal. Note +that destroying a stream is an asynchronous operation, and as a result, +the change to default association won’t happen until all work in the +stream has completed.

    +

    Memory allocated with cudaMallocManaged should be released +with cudaFree.

    +

    Device memory oversubscription is possible for GPUs that have a non- +zero value for the device attribute +cudaDevAttrConcurrentManagedAccess. Managed memory on such +GPUs may be evicted from device memory to host memory at any time by +the Unified Memory driver in order to make room for other allocations.

    +

    In a system where all GPUs have a non-zero value for the device +attribute cudaDevAttrConcurrentManagedAccess, managed +memory may not be populated when this API returns and instead may be +populated on access. In such systems, managed memory can migrate to any +processor’s memory at any time. The Unified Memory driver will employ +heuristics to maintain data locality and prevent excessive page faults +to the extent possible. The application can also guide the driver about +memory usage patterns via cudaMemAdvise. The application +can also explicitly migrate memory to a desired processor’s memory via +cudaMemPrefetchAsync.

    +

    In a multi-GPU system where all of the GPUs have a zero value for the +device attribute cudaDevAttrConcurrentManagedAccess and all +the GPUs have peer-to-peer support with each other, the physical +storage for managed memory is created on the GPU which is active at the +time cudaMallocManaged is called. All other GPUs will +reference the data at reduced bandwidth via peer mappings over the PCIe +bus. The Unified Memory driver does not migrate memory among such GPUs.

    +

    In a multi-GPU system where not all GPUs have peer-to-peer support with +each other and where the value of the device attribute +cudaDevAttrConcurrentManagedAccess is zero for at least one +of those GPUs, the location chosen for physical storage of managed +memory is system-dependent.

    +
      +
    • On Linux, the location chosen will be device memory as long as the +current set of active contexts are on devices that either have peer- +to-peer support with each other or have a non-zero value for the +device attribute cudaDevAttrConcurrentManagedAccess. If +there is an active context on a GPU that does not have a non-zero +value for that device attribute and it does not have peer-to-peer +support with the other devices that have active contexts on them, +then the location for physical storage will be ‘zero-copy’ or host +memory. Note that this means that managed memory that is located in +device memory is migrated to host memory if a new context is created +on a GPU that doesn’t have a non-zero value for the device attribute +and does not support peer-to-peer with at least one of the other +devices that has an active context. This in turn implies that context +creation may fail if there is insufficient host memory to migrate all +managed allocations.

    • +
    • On Windows, the physical storage is always created in ‘zero-copy’ or +host memory. All GPUs will reference the data at reduced bandwidth +over the PCIe bus. In these circumstances, use of the environment +variable CUDA_VISIBLE_DEVICES is recommended to restrict CUDA to only +use those GPUs that have peer-to-peer support. Alternatively, users +can also set CUDA_MANAGED_FORCE_DEVICE_ALLOC to a non-zero value to +force the driver to always use device memory for physical storage. +When this environment variable is set to a non-zero value, all +devices used in that process that support managed memory have to be +peer-to-peer compatible with each other. The error +cudaErrorInvalidDevice will be returned if a device that +supports managed memory is used and it is not peer-to-peer compatible +with any of the other managed memory supporting devices that were +previously used in that process, even if cudaDeviceReset +has been called on those devices. These environment variables are +described in the CUDA programming guide under the “CUDA environment +variables” section.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMalloc(size_t size)
    +

    Allocate memory on the device.

    +

    Allocates size bytes of linear memory on the device and returns in +*devPtr a pointer to the allocated memory. The allocated memory is +suitably aligned for any kind of variable. The memory is not cleared. +cudaMalloc() returns cudaErrorMemoryAllocation +in case of failure.

    +

    The device version of cudaFree cannot be used with a +*devPtr allocated using the host API, and vice versa.

    +
    +
    Parameters:
    +

    size (size_t) – Requested allocation size in bytes

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMallocHost(size_t size)
    +

    Allocates page-locked memory on the host.

    +

    Allocates size bytes of host memory that is page-locked and +accessible to the device. The driver tracks the virtual memory ranges +allocated with this function and automatically accelerates calls to +functions such as malloc().

    +

    On systems where pageableMemoryAccessUsesHostPageTables is +true, cudaMallocHost may not page-lock the allocated +memory.

    +

    Page-locking excessive amounts of memory with +cudaMallocHost() may degrade system performance, since it +reduces the amount of memory available to the system for paging. As a +result, this function is best used sparingly to allocate staging areas +for data exchange between host and device.

    +
    +
    Parameters:
    +

    size (size_t) – Requested allocation size in bytes

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMallocPitch(size_t width, size_t height)
    +

    Allocates pitched memory on the device.

    +

    Allocates at least width (in bytes) * height bytes of linear memory +on the device and returns in *devPtr a pointer to the allocated +memory. The function may pad the allocation to ensure that +corresponding pointers in any given row will continue to meet the +alignment requirements for coalescing as the address is updated from +row to row. The pitch returned in *pitch by +cudaMallocPitch() is the width in bytes of the allocation. +The intended usage of pitch is as a separate parameter of the +allocation, used to compute addresses within the 2D array. Given the +row and column of an array element of type T, the address is computed +as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For allocations of 2D arrays, it is recommended that programmers +consider performing pitch allocations using +cudaMallocPitch(). Due to pitch alignment restrictions in +the hardware, this is especially true if the application will be +performing 2D memory copies between different regions of device memory +(whether linear memory or CUDA arrays).

    +
    +
    Parameters:
    +
      +
    • width (size_t) – Requested pitched allocation width (in bytes)

    • +
    • height (size_t) – Requested pitched allocation height

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMallocArray(cudaChannelFormatDesc desc: Optional[cudaChannelFormatDesc], size_t width, size_t height, unsigned int flags)
    +

    Allocate an array on the device.

    +

    Allocates a CUDA array according to the +cudaChannelFormatDesc structure desc and returns a handle +to the new CUDA array in *array.

    +

    The cudaChannelFormatDesc is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where cudaChannelFormatKind is one of +cudaChannelFormatKindSigned, +cudaChannelFormatKindUnsigned, or +cudaChannelFormatKindFloat.

    +

    The flags parameter enables different options to be specified that +affect the allocation, as follows.

    +
      +
    • cudaArrayDefault: This flag’s value is defined to be 0 +and provides default array allocation

    • +
    • cudaArraySurfaceLoadStore: Allocates an array that can be +read from or written to using a surface reference

    • +
    • cudaArrayTextureGather: This flag indicates that texture +gather operations will be performed on the array.

    • +
    • cudaArraySparse: Allocates a CUDA array without physical +backing memory. The subregions within this sparse array can later be +mapped onto a physical memory allocation by calling +cuMemMapArrayAsync. The physical backing memory must be +allocated via cuMemCreate.

    • +
    • cudaArrayDeferredMapping: Allocates a CUDA array without +physical backing memory. The entire array can later be mapped onto a +physical memory allocation by calling cuMemMapArrayAsync. +The physical backing memory must be allocated via +cuMemCreate.

    • +
    +

    width and height must meet certain size requirements. See +cudaMalloc3DArray() for more details.

    +
    +
    Parameters:
    +
      +
    • desc (cudaChannelFormatDesc) – Requested channel format

    • +
    • width (size_t) – Requested array allocation width

    • +
    • height (size_t) – Requested array allocation height

    • +
    • flags (unsigned int) – Requested properties of allocated array

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaFree(devPtr)
    +

    Frees memory on the device.

    +

    Frees the memory space pointed to by devPtr, which must have been +returned by a previous call to one of the following memory allocation +APIs - cudaMalloc(), cudaMallocPitch(), +cudaMallocManaged(), cudaMallocAsync(), +cudaMallocFromPoolAsync().

    +

    Note - This API will not perform any implicit synchronization when the +pointer was allocated with cudaMallocAsync or +cudaMallocFromPoolAsync. Callers must ensure that all +accesses to these pointer have completed before invoking +cudaFree. For best performance and memory reuse, users +should use cudaFreeAsync to free memory allocated via the +stream ordered memory allocator. For all other pointers, this API may +perform implicit synchronization.

    +

    If cudaFree`(`devPtr) has already been called before, an +error is returned. If devPtr is 0, no operation is performed. +cudaFree() returns cudaErrorValue in case of +failure.

    +

    The device version of cudaFree cannot be used with a +*devPtr allocated using the host API, and vice versa.

    +
    +
    Parameters:
    +

    devPtr (Any) – Device pointer to memory to free

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaFreeHost(ptr)
    +

    Frees page-locked memory.

    +

    Frees the memory space pointed to by hostPtr, which must have been +returned by a previous call to cudaMallocHost() or +cudaHostAlloc().

    +
    +
    Parameters:
    +

    ptr (Any) – Pointer to memory to free

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaFreeArray(array)
    +

    Frees an array on the device.

    +

    Frees the CUDA array array, which must have been returned by a +previous call to cudaMallocArray(). If devPtr is 0, no +operation is performed.

    +
    +
    Parameters:
    +

    array (cudaArray_t) – Pointer to array to free

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaFreeMipmappedArray(mipmappedArray)
    +

    Frees a mipmapped array on the device.

    +

    Frees the CUDA mipmapped array mipmappedArray, which must have been +returned by a previous call to cudaMallocMipmappedArray(). +If devPtr is 0, no operation is performed.

    +
    +
    Parameters:
    +

    mipmappedArray (cudaMipmappedArray_t) – Pointer to mipmapped array to free

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaHostAlloc(size_t size, unsigned int flags)
    +

    Allocates page-locked memory on the host.

    +

    Allocates size bytes of host memory that is page-locked and +accessible to the device. The driver tracks the virtual memory ranges +allocated with this function and automatically accelerates calls to +functions such as cudaMemcpy(). Since the memory can be +accessed directly by the device, it can be read or written with much +higher bandwidth than pageable memory obtained with functions such as +malloc(). Allocating excessive amounts of pinned memory may +degrade system performance, since it reduces the amount of memory +available to the system for paging. As a result, this function is best +used sparingly to allocate staging areas for data exchange between host +and device.

    +

    The flags parameter enables different options to be specified that +affect the allocation, as follows.

    +
      +
    • cudaHostAllocDefault: This flag’s value is defined to be +0 and causes cudaHostAlloc() to emulate +cudaMallocHost().

    • +
    • cudaHostAllocPortable: The memory returned by this call +will be considered as pinned memory by all CUDA contexts, not just +the one that performed the allocation.

    • +
    • cudaHostAllocMapped: Maps the allocation into the CUDA +address space. The device pointer to the memory may be obtained by +calling cudaHostGetDevicePointer().

    • +
    • cudaHostAllocWriteCombined: Allocates the memory as +write-combined (WC). WC memory can be transferred across the PCI +Express bus more quickly on some system configurations, but cannot be +read efficiently by most CPUs. WC memory is a good option for buffers +that will be written by the CPU and read by the device via mapped +pinned memory or host->device transfers.

    • +
    +

    All of these flags are orthogonal to one another: a developer may +allocate memory that is portable, mapped and/or write-combined with no +restrictions.

    +

    In order for the cudaHostAllocMapped flag to have any +effect, the CUDA context must support the cudaDeviceMapHost +flag, which can be checked via cudaGetDeviceFlags(). The +cudaDeviceMapHost flag is implicitly set for contexts +created via the runtime API.

    +

    The cudaHostAllocMapped flag may be specified on CUDA +contexts for devices that do not support mapped pinned memory. The +failure is deferred to cudaHostGetDevicePointer() because +the memory may be mapped into other CUDA contexts via the +cudaHostAllocPortable flag.

    +

    Memory allocated by this function must be freed with +cudaFreeHost().

    +
    +
    Parameters:
    +
      +
    • size (size_t) – Requested allocation size in bytes

    • +
    • flags (unsigned int) – Requested properties of allocated memory

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaSetDeviceFlags, cudaMallocHost (C API), cudaFreeHost, cudaGetDeviceFlags, cuMemHostAlloc

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaHostRegister(ptr, size_t size, unsigned int flags)
    +

    Registers an existing host memory range for use by CUDA.

    +

    Page-locks the memory range specified by ptr and size and maps it +for the device(s) as specified by flags. This memory range also is +added to the same tracking mechanism as cudaHostAlloc() to +automatically accelerate calls to functions such as +cudaMemcpy(). Since the memory can be accessed directly by +the device, it can be read or written with much higher bandwidth than +pageable memory that has not been registered. Page-locking excessive +amounts of memory may degrade system performance, since it reduces the +amount of memory available to the system for paging. As a result, this +function is best used sparingly to register staging areas for data +exchange between host and device.

    +

    On systems where pageableMemoryAccessUsesHostPageTables is +true, cudaHostRegister will not page-lock the memory range +specified by ptr but only populate unpopulated pages.

    +

    cudaHostRegister is supported only on I/O coherent devices +that have a non-zero value for the device attribute +cudaDevAttrHostRegisterSupported.

    +

    The flags parameter enables different options to be specified that +affect the allocation, as follows.

    +
      +
    • cudaHostRegisterDefault: On a system with unified virtual +addressing, the memory will be both mapped and portable. On a system +with no unified virtual addressing, the memory will be neither mapped +nor portable.

    • +
    • cudaHostRegisterPortable: The memory returned by this +call will be considered as pinned memory by all CUDA contexts, not +just the one that performed the allocation.

    • +
    • cudaHostRegisterMapped: Maps the allocation into the CUDA +address space. The device pointer to the memory may be obtained by +calling cudaHostGetDevicePointer().

    • +
    • cudaHostRegisterIoMemory: The passed memory pointer is +treated as pointing to some memory-mapped I/O space, e.g. belonging +to a third-party PCIe device, and it will marked as non cache- +coherent and contiguous.

    • +
    • cudaHostRegisterReadOnly: The passed memory pointer is +treated as pointing to memory that is considered read-only by the +device. On platforms without +cudaDevAttrPageableMemoryAccessUsesHostPageTables, this +flag is required in order to register memory mapped to the CPU as +read-only. Support for the use of this flag can be queried from the +device attribute cudaDeviceAttrReadOnlyHostRegisterSupported. Using +this flag with a current context associated with a device that does +not have this attribute set will cause cudaHostRegister +to error with cudaErrorNotSupported.

    • +
    +

    All of these flags are orthogonal to one another: a developer may page- +lock memory that is portable or mapped with no restrictions.

    +

    The CUDA context must have been created with the +cudaMapHost flag in order for the +cudaHostRegisterMapped flag to have any effect.

    +

    The cudaHostRegisterMapped flag may be specified on CUDA +contexts for devices that do not support mapped pinned memory. The +failure is deferred to cudaHostGetDevicePointer() because +the memory may be mapped into other CUDA contexts via the +cudaHostRegisterPortable flag.

    +

    For devices that have a non-zero value for the device attribute +cudaDevAttrCanUseHostPointerForRegisteredMem, the memory +can also be accessed from the device using the host pointer ptr. The +device pointer returned by cudaHostGetDevicePointer() may +or may not match the original host pointer ptr and depends on the +devices visible to the application. If all devices visible to the +application have a non-zero value for the device attribute, the device +pointer returned by cudaHostGetDevicePointer() will match +the original pointer ptr. If any device visible to the application +has a zero value for the device attribute, the device pointer returned +by cudaHostGetDevicePointer() will not match the original +host pointer ptr, but it will be suitable for use on all devices +provided Unified Virtual Addressing is enabled. In such systems, it is +valid to access the memory using either pointer on devices that have a +non-zero value for the device attribute. Note however that such devices +should access the memory using only of the two pointers and not both.

    +

    The memory page-locked by this function must be unregistered with +cudaHostUnregister().

    +
    +
    Parameters:
    +
      +
    • ptr (Any) – Host pointer to memory to page-lock

    • +
    • size (size_t) – Size in bytes of the address range to page-lock in bytes

    • +
    • flags (unsigned int) – Flags for allocation request

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorMemoryAllocation, cudaErrorHostMemoryAlreadyRegistered, cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaHostUnregister(ptr)
    +

    Unregisters a memory range that was registered with cudaHostRegister.

    +

    Unmaps the memory range whose base address is specified by ptr, and +makes it pageable again.

    +

    The base address must be the same one specified to +cudaHostRegister().

    +
    +
    Parameters:
    +

    ptr (Any) – Host pointer to memory to unregister

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorHostMemoryNotRegistered

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaHostGetDevicePointer(pHost, unsigned int flags)
    +

    Passes back device pointer of mapped host memory allocated by cudaHostAlloc or registered by cudaHostRegister.

    +

    Passes back the device pointer corresponding to the mapped, pinned host +buffer allocated by cudaHostAlloc() or registered by +cudaHostRegister().

    +

    cudaHostGetDevicePointer() will fail if the +cudaDeviceMapHost flag was not specified before deferred +context creation occurred, or if called on a device that does not +support mapped, pinned memory.

    +

    For devices that have a non-zero value for the device attribute +cudaDevAttrCanUseHostPointerForRegisteredMem, the memory +can also be accessed from the device using the host pointer pHost. +The device pointer returned by cudaHostGetDevicePointer() +may or may not match the original host pointer pHost and depends on +the devices visible to the application. If all devices visible to the +application have a non-zero value for the device attribute, the device +pointer returned by cudaHostGetDevicePointer() will match +the original pointer pHost. If any device visible to the application +has a zero value for the device attribute, the device pointer returned +by cudaHostGetDevicePointer() will not match the original +host pointer pHost, but it will be suitable for use on all devices +provided Unified Virtual Addressing is enabled. In such systems, it is +valid to access the memory using either pointer on devices that have a +non-zero value for the device attribute. Note however that such devices +should access the memory using only of the two pointers and not both.

    +

    flags provides for future releases. For now, it must be set to 0.

    +
    +
    Parameters:
    +
      +
    • pHost (Any) – Requested host pointer mapping

    • +
    • flags (unsigned int) – Flags for extensions (must be 0 for now)

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaHostGetFlags(pHost)
    +

    Passes back flags used to allocate pinned host memory allocated by cudaHostAlloc.

    +

    cudaHostGetFlags() will fail if the input pointer does not +reside in an address range allocated by cudaHostAlloc().

    +
    +
    Parameters:
    +

    pHost (Any) – Host pointer

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMalloc3D(cudaExtent extent: cudaExtent)
    +

    Allocates logical 1D, 2D, or 3D memory objects on the device.

    +

    Allocates at least width * height * depth bytes of linear memory +on the device and returns a cudaPitchedPtr in which ptr +is a pointer to the allocated memory. The function may pad the +allocation to ensure hardware alignment requirements are met. The pitch +returned in the pitch field of pitchedDevPtr is the width in bytes +of the allocation.

    +

    The returned cudaPitchedPtr contains additional fields +xsize and ysize, the logical width and height of the allocation, +which are equivalent to the width and height extent parameters +provided by the programmer during allocation.

    +

    For allocations of 2D and 3D objects, it is highly recommended that +programmers perform allocations using cudaMalloc3D() or +cudaMallocPitch(). Due to alignment restrictions in the +hardware, this is especially true if the application will be performing +memory copies involving 2D or 3D objects (whether linear memory or CUDA +arrays).

    +
    +
    Parameters:
    +

    extent (cudaExtent) – Requested allocation size (width field in bytes)

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMalloc3DArray(cudaChannelFormatDesc desc: Optional[cudaChannelFormatDesc], cudaExtent extent: cudaExtent, unsigned int flags)
    +

    Allocate an array on the device.

    +

    Allocates a CUDA array according to the +cudaChannelFormatDesc structure desc and returns a handle +to the new CUDA array in *array.

    +

    The cudaChannelFormatDesc is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where cudaChannelFormatKind is one of +cudaChannelFormatKindSigned, +cudaChannelFormatKindUnsigned, or +cudaChannelFormatKindFloat.

    +

    cudaMalloc3DArray() can allocate the following:

    +
      +
    • A 1D array is allocated if the height and depth extents are both +zero.

    • +
    • A 2D array is allocated if only the depth extent is zero.

    • +
    • A 3D array is allocated if all three extents are non-zero.

    • +
    • A 1D layered CUDA array is allocated if only the height extent is +zero and the cudaArrayLayered flag is set. Each layer is a 1D array. +The number of layers is determined by the depth extent.

    • +
    • A 2D layered CUDA array is allocated if all three extents are non- +zero and the cudaArrayLayered flag is set. Each layer is a 2D array. +The number of layers is determined by the depth extent.

    • +
    • A cubemap CUDA array is allocated if all three extents are non-zero +and the cudaArrayCubemap flag is set. Width must be equal to height, +and depth must be six. A cubemap is a special type of 2D layered CUDA +array, where the six layers represent the six faces of a cube. The +order of the six layers in memory is the same as that listed in +cudaGraphicsCubeFace.

    • +
    • A cubemap layered CUDA array is allocated if all three extents are +non-zero, and both, cudaArrayCubemap and cudaArrayLayered flags are +set. Width must be equal to height, and depth must be a multiple of +six. A cubemap layered CUDA array is a special type of 2D layered +CUDA array that consists of a collection of cubemaps. The first six +layers represent the first cubemap, the next six layers form the +second cubemap, and so on.

    • +
    +

    The flags parameter enables different options to be specified that +affect the allocation, as follows.

    +
      +
    • cudaArrayDefault: This flag’s value is defined to be 0 +and provides default array allocation

    • +
    • cudaArrayLayered: Allocates a layered CUDA array, with +the depth extent indicating the number of layers

    • +
    • cudaArrayCubemap: Allocates a cubemap CUDA array. Width +must be equal to height, and depth must be six. If the +cudaArrayLayered flag is also set, depth must be a multiple of six.

    • +
    • cudaArraySurfaceLoadStore: Allocates a CUDA array that +could be read from or written to using a surface reference.

    • +
    • cudaArrayTextureGather: This flag indicates that texture +gather operations will be performed on the CUDA array. Texture gather +can only be performed on 2D CUDA arrays.

    • +
    • cudaArraySparse: Allocates a CUDA array without physical +backing memory. The subregions within this sparse array can later be +mapped onto a physical memory allocation by calling +cuMemMapArrayAsync. This flag can only be used for +creating 2D, 3D or 2D layered sparse CUDA arrays. The physical +backing memory must be allocated via cuMemCreate.

    • +
    • cudaArrayDeferredMapping: Allocates a CUDA array without +physical backing memory. The entire array can later be mapped onto a +physical memory allocation by calling cuMemMapArrayAsync. +The physical backing memory must be allocated via +cuMemCreate.

    • +
    +

    The width, height and depth extents must meet certain size requirements +as listed in the following table. All values are specified in elements.

    +

    Note that 2D CUDA arrays have different size requirements if the +cudaArrayTextureGather flag is set. In that case, the valid +range for (width, height, depth) is ((1,maxTexture2DGather[0]), +(1,maxTexture2DGather[1]), 0).

    +

    View CUDA Toolkit Documentation for a table example

    +
    +
    Parameters:
    +
      +
    • desc (cudaChannelFormatDesc) – Requested channel format

    • +
    • extent (cudaExtent) – Requested allocation size (width field in elements)

    • +
    • flags (unsigned int) – Flags for extensions

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMallocMipmappedArray(cudaChannelFormatDesc desc: Optional[cudaChannelFormatDesc], cudaExtent extent: cudaExtent, unsigned int numLevels, unsigned int flags)
    +

    Allocate a mipmapped array on the device.

    +

    Allocates a CUDA mipmapped array according to the +cudaChannelFormatDesc structure desc and returns a handle +to the new CUDA mipmapped array in *mipmappedArray. numLevels +specifies the number of mipmap levels to be allocated. This value is +clamped to the range [1, 1 + floor(log2(max(width, height, depth)))].

    +

    The cudaChannelFormatDesc is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where cudaChannelFormatKind is one of +cudaChannelFormatKindSigned, +cudaChannelFormatKindUnsigned, or +cudaChannelFormatKindFloat.

    +

    cudaMallocMipmappedArray() can allocate the following:

    +
      +
    • A 1D mipmapped array is allocated if the height and depth extents are +both zero.

    • +
    • A 2D mipmapped array is allocated if only the depth extent is zero.

    • +
    • A 3D mipmapped array is allocated if all three extents are non-zero.

    • +
    • A 1D layered CUDA mipmapped array is allocated if only the height +extent is zero and the cudaArrayLayered flag is set. Each layer is a +1D mipmapped array. The number of layers is determined by the depth +extent.

    • +
    • A 2D layered CUDA mipmapped array is allocated if all three extents +are non-zero and the cudaArrayLayered flag is set. Each layer is a 2D +mipmapped array. The number of layers is determined by the depth +extent.

    • +
    • A cubemap CUDA mipmapped array is allocated if all three extents are +non-zero and the cudaArrayCubemap flag is set. Width must be equal to +height, and depth must be six. The order of the six layers in memory +is the same as that listed in cudaGraphicsCubeFace.

    • +
    • A cubemap layered CUDA mipmapped array is allocated if all three +extents are non-zero, and both, cudaArrayCubemap and cudaArrayLayered +flags are set. Width must be equal to height, and depth must be a +multiple of six. A cubemap layered CUDA mipmapped array is a special +type of 2D layered CUDA mipmapped array that consists of a collection +of cubemap mipmapped arrays. The first six layers represent the first +cubemap mipmapped array, the next six layers form the second cubemap +mipmapped array, and so on.

    • +
    +

    The flags parameter enables different options to be specified that +affect the allocation, as follows.

    +
      +
    • cudaArrayDefault: This flag’s value is defined to be 0 +and provides default mipmapped array allocation

    • +
    • cudaArrayLayered: Allocates a layered CUDA mipmapped +array, with the depth extent indicating the number of layers

    • +
    • cudaArrayCubemap: Allocates a cubemap CUDA mipmapped +array. Width must be equal to height, and depth must be six. If the +cudaArrayLayered flag is also set, depth must be a multiple of six.

    • +
    • cudaArraySurfaceLoadStore: This flag indicates that +individual mipmap levels of the CUDA mipmapped array will be read +from or written to using a surface reference.

    • +
    • cudaArrayTextureGather: This flag indicates that texture +gather operations will be performed on the CUDA array. Texture gather +can only be performed on 2D CUDA mipmapped arrays, and the gather +operations are performed only on the most detailed mipmap level.

    • +
    • cudaArraySparse: Allocates a CUDA mipmapped array without +physical backing memory. The subregions within this sparse array can +later be mapped onto a physical memory allocation by calling +cuMemMapArrayAsync. This flag can only be used for +creating 2D, 3D or 2D layered sparse CUDA mipmapped arrays. The +physical backing memory must be allocated via +cuMemCreate.

    • +
    • cudaArrayDeferredMapping: Allocates a CUDA mipmapped +array without physical backing memory. The entire array can later be +mapped onto a physical memory allocation by calling +cuMemMapArrayAsync. The physical backing memory must be +allocated via cuMemCreate.

    • +
    +

    The width, height and depth extents must meet certain size requirements +as listed in the following table. All values are specified in elements.

    +

    View CUDA Toolkit Documentation for a table example

    +
    +
    Parameters:
    +
      +
    • desc (cudaChannelFormatDesc) – Requested channel format

    • +
    • extent (cudaExtent) – Requested allocation size (width field in elements)

    • +
    • numLevels (unsigned int) – Number of mipmap levels to allocate

    • +
    • flags (unsigned int) – Flags for extensions

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetMipmappedArrayLevel(mipmappedArray, unsigned int level)
    +

    Gets a mipmap level of a CUDA mipmapped array.

    +

    Returns in *levelArray a CUDA array that represents a single mipmap +level of the CUDA mipmapped array mipmappedArray.

    +

    If level is greater than the maximum number of levels in this +mipmapped array, cudaErrorInvalidValue is returned.

    +

    If mipmappedArray is NULL, cudaErrorInvalidResourceHandle +is returned.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy3D(cudaMemcpy3DParms p: Optional[cudaMemcpy3DParms])
    +

    Copies data between 3D objects.

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    cudaMemcpy3D() copies data betwen two 3D objects. The +source and destination objects may be in either host memory, device +memory, or a CUDA array. The source, destination, extent, and kind of +copy performed is specified by the cudaMemcpy3DParms struct +which should be initialized to zero before use:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    The struct passed to cudaMemcpy3D() must specify one of +srcArray or srcPtr and one of dstArray or dstPtr. Passing more +than one non-zero source or destination will cause +cudaMemcpy3D() to return an error.

    +

    The srcPos and dstPos fields are optional offsets into the source +and destination objects and are defined in units of each object’s +elements. The element for a host or device pointer is assumed to be +unsigned char.

    +

    The extent field defines the dimensions of the transferred area in +elements. If a CUDA array is participating in the copy, the extent is +defined in terms of that array’s elements. If no CUDA array is +participating in the copy then the extents are defined in elements of +unsigned char.

    +

    The kind field defines the direction of the copy. It must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. For cudaMemcpyHostToHost or +cudaMemcpyHostToDevice or +cudaMemcpyDeviceToHost passed as kind and cudaArray type +passed as source or destination, if the kind implies cudaArray type to +be present on the host, cudaMemcpy3D() will disregard that +implication and silently correct the kind based on the fact that +cudaArray type can only be present on the device.

    +

    If the source and destination are both arrays, +cudaMemcpy3D() will return an error if they do not have the +same element size.

    +

    The source and destination object may not overlap. If overlapping +source and destination objects are specified, undefined behavior will +result.

    +

    The source object must entirely contain the region defined by srcPos +and extent. The destination object must entirely contain the region +defined by dstPos and extent.

    +

    cudaMemcpy3D() returns an error if the pitch of srcPtr or +dstPtr exceeds the maximum allowed. The pitch of a +cudaPitchedPtr allocated with cudaMalloc3D() +will always be valid.

    +
    +
    Parameters:
    +

    p (cudaMemcpy3DParms) – 3D memory copy parameters

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy3DPeer(cudaMemcpy3DPeerParms p: Optional[cudaMemcpy3DPeerParms])
    +

    Copies memory between devices.

    +

    Perform a 3D memory copy according to the parameters specified in p. +See the definition of the cudaMemcpy3DPeerParms structure +for documentation of its parameters.

    +

    Note that this function is synchronous with respect to the host only if +the source or destination of the transfer is host memory. Note also +that this copy is serialized with respect to all pending and future +asynchronous work in to the current device, the copy’s source device, +and the copy’s destination device (use +cudaMemcpy3DPeerAsync to avoid this synchronization).

    +
    +
    Parameters:
    +

    p (cudaMemcpy3DPeerParms) – Parameters for the memory copy

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice, cudaErrorInvalidPitchValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy3DAsync(cudaMemcpy3DParms p: Optional[cudaMemcpy3DParms], stream)
    +

    Copies data between 3D objects.

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    cudaMemcpy3DAsync() copies data betwen two 3D objects. The +source and destination objects may be in either host memory, device +memory, or a CUDA array. The source, destination, extent, and kind of +copy performed is specified by the cudaMemcpy3DParms struct +which should be initialized to zero before use:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    The struct passed to cudaMemcpy3DAsync() must specify one +of srcArray or srcPtr and one of dstArray or dstPtr. Passing +more than one non-zero source or destination will cause +cudaMemcpy3DAsync() to return an error.

    +

    The srcPos and dstPos fields are optional offsets into the source +and destination objects and are defined in units of each object’s +elements. The element for a host or device pointer is assumed to be +unsigned char. For CUDA arrays, positions must be in the range [0, +2048) for any dimension.

    +

    The extent field defines the dimensions of the transferred area in +elements. If a CUDA array is participating in the copy, the extent is +defined in terms of that array’s elements. If no CUDA array is +participating in the copy then the extents are defined in elements of +unsigned char.

    +

    The kind field defines the direction of the copy. It must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. For cudaMemcpyHostToHost or +cudaMemcpyHostToDevice or +cudaMemcpyDeviceToHost passed as kind and cudaArray type +passed as source or destination, if the kind implies cudaArray type to +be present on the host, cudaMemcpy3DAsync() will disregard +that implication and silently correct the kind based on the fact that +cudaArray type can only be present on the device.

    +

    If the source and destination are both arrays, +cudaMemcpy3DAsync() will return an error if they do not +have the same element size.

    +

    The source and destination object may not overlap. If overlapping +source and destination objects are specified, undefined behavior will +result.

    +

    The source object must lie entirely within the region defined by +srcPos and extent. The destination object must lie entirely within +the region defined by dstPos and extent.

    +

    cudaMemcpy3DAsync() returns an error if the pitch of +srcPtr or dstPtr exceeds the maximum allowed. The pitch of a +cudaPitchedPtr allocated with cudaMalloc3D() +will always be valid.

    +

    cudaMemcpy3DAsync() is asynchronous with respect to the +host, so the call may return before the copy is complete. The copy can +optionally be associated to a stream by passing a non-zero stream +argument. If kind is cudaMemcpyHostToDevice or +cudaMemcpyDeviceToHost and stream is non-zero, the copy +may overlap with operations in other streams.

    +

    The device version of this function only handles device to device +copies and cannot be given local or shared pointers.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy3DPeerAsync(cudaMemcpy3DPeerParms p: Optional[cudaMemcpy3DPeerParms], stream)
    +

    Copies memory between devices asynchronously.

    +

    Perform a 3D memory copy according to the parameters specified in p. +See the definition of the cudaMemcpy3DPeerParms structure +for documentation of its parameters.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice, cudaErrorInvalidPitchValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemGetInfo()
    +

    Gets free and total device memory.

    +

    Returns in *total the total amount of memory available to the the +current context. Returns in *free the amount of memory on the device +that is free according to the OS. CUDA is not guaranteed to be able to +allocate all of the memory that the OS reports as free. In a multi- +tenet situation, free estimate returned is prone to race condition +where a new allocation/free done by a different process or a different +thread in the same process between the time when free memory was +estimated and reported, will result in deviation in free value reported +and actual free memory.

    +

    The integrated GPU on Tegra shares memory with CPU and other component +of the SoC. The free and total values returned by the API excludes the +SWAP memory space maintained by the OS on some platforms. The OS may +move some of the memory pages into swap area as the GPU or CPU allocate +or access memory. See Tegra app note on how to calculate total and free +memory on Tegra.

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuMemGetInfo

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaArrayGetInfo(array)
    +

    Gets info about the specified cudaArray.

    +

    Returns in *desc, *extent and *flags respectively, the type, +shape and flags of array.

    +

    Any of *desc, *extent and *flags may be specified as NULL.

    +
    +
    Parameters:
    +

    array (cudaArray_t) – The cudaArray to get info for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaArrayGetPlane(hArray, unsigned int planeIdx)
    +

    Gets a CUDA array plane from a CUDA array.

    +

    Returns in pPlaneArray a CUDA array that represents a single format +plane of the CUDA array hArray.

    +

    If planeIdx is greater than the maximum number of planes in this +array or if the array does not have a multi-planar format e.g: +cudaChannelFormatKindNV12, then +cudaErrorInvalidValue is returned.

    +

    Note that if the hArray has format +cudaChannelFormatKindNV12, then passing in 0 for planeIdx +returns a CUDA array of the same size as hArray but with one 8-bit +channel and cudaChannelFormatKindUnsigned as its format +kind. If 1 is passed for planeIdx, then the returned CUDA array has +half the height and width of hArray with two 8-bit channels and +cudaChannelFormatKindUnsigned as its format kind.

    +
    +
    Parameters:
    +
      +
    • hArray (cudaArray_t) – CUDA array

    • +
    • planeIdx (unsigned int) – Plane index

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuArrayGetPlane

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaArrayGetMemoryRequirements(array, int device)
    +

    Returns the memory requirements of a CUDA array.

    +

    Returns the memory requirements of a CUDA array in memoryRequirements +If the CUDA array is not allocated with flag +cudaArrayDeferredMapping cudaErrorInvalidValue +will be returned.

    +

    The returned value in size +represents the total size of the CUDA array. The returned value in +alignment represents the +alignment necessary for mapping the CUDA array.

    +
    +
    Parameters:
    +
      +
    • array (cudaArray_t) – CUDA array to get the memory requirements of

    • +
    • device (int) – Device to get the memory requirements for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMipmappedArrayGetMemoryRequirements(mipmap, int device)
    +

    Returns the memory requirements of a CUDA mipmapped array.

    +

    Returns the memory requirements of a CUDA mipmapped array in +memoryRequirements If the CUDA mipmapped array is not allocated with +flag cudaArrayDeferredMapping +cudaErrorInvalidValue will be returned.

    +

    The returned value in size +represents the total size of the CUDA mipmapped array. The returned +value in alignment represents +the alignment necessary for mapping the CUDA mipmapped array.

    +
    +
    Parameters:
    +
      +
    • mipmap (cudaMipmappedArray_t) – CUDA mipmapped array to get the memory requirements of

    • +
    • device (int) – Device to get the memory requirements for

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaArrayGetSparseProperties(array)
    +

    Returns the layout properties of a sparse CUDA array.

    +

    Returns the layout properties of a sparse CUDA array in +sparseProperties. If the CUDA array is not allocated with flag +cudaArraySparse cudaErrorInvalidValue will be +returned.

    +

    If the returned value in flags +contains cudaArraySparsePropertiesSingleMipTail, then +miptailSize represents the total +size of the array. Otherwise, it will be zero. Also, the returned value +in miptailFirstLevel is always +zero. Note that the array must have been allocated using +cudaMallocArray or cudaMalloc3DArray. For CUDA +arrays obtained using cudaMipmappedArrayGetLevel, +cudaErrorInvalidValue will be returned. Instead, +cudaMipmappedArrayGetSparseProperties must be used to +obtain the sparse properties of the entire CUDA mipmapped array to +which array belongs to.

    +
    +
    Parameters:
    +

    array (cudaArray_t) – The CUDA array to get the sparse properties of

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMipmappedArrayGetSparseProperties(mipmap)
    +

    Returns the layout properties of a sparse CUDA mipmapped array.

    +

    Returns the sparse array layout properties in sparseProperties. If +the CUDA mipmapped array is not allocated with flag +cudaArraySparse cudaErrorInvalidValue will be +returned.

    +

    For non-layered CUDA mipmapped arrays, +miptailSize returns the size of +the mip tail region. The mip tail region includes all mip levels whose +width, height or depth is less than that of the tile. For layered CUDA +mipmapped arrays, if flags +contains cudaArraySparsePropertiesSingleMipTail, then +miptailSize specifies the size of +the mip tail of all layers combined. Otherwise, +miptailSize specifies mip tail +size per layer. The returned value of +miptailFirstLevel is valid only +if miptailSize is non-zero.

    +
    +
    Parameters:
    +

    mipmap (cudaMipmappedArray_t) – The CUDA mipmapped array to get the sparse properties of

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy(dst, src, size_t count, kind: cudaMemcpyKind)
    +

    Copies data between host and device.

    +
    +

    Copies count bytes from the memory area pointed to by src to the +memory area pointed to by dst, where kind specifies the direction +of the copy, and must be one of cudaMemcpyHostToHost, +cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. Calling cudaMemcpy() with dst +and src pointers that do not match the direction of the copy results in +an undefined behavior.

    +
    +

    ote_sync

    +
    +
    +
    dstAny

    Destination memory address

    +
    +
    srcAny

    Source memory address

    +
    +
    countsize_t

    Size in bytes to copy

    +
    +
    kindcudaMemcpyKind

    Type of transfer

    +
    +
    +
    +
    cudaError_t

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidMemcpyDirection

    +
    +
    +

    cudaMemcpy2D, cudaMemcpy2DToArray, cudaMemcpy2DFromArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpy2DToArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, cuMemcpyDtoH, cuMemcpyHtoD, cuMemcpyDtoD, cuMemcpy

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpyPeer(dst, int dstDevice, src, int srcDevice, size_t count)
    +

    Copies memory between two devices.

    +

    Copies memory from one device to memory on another device. dst is the +base device pointer of the destination memory and dstDevice is the +destination device. src is the base device pointer of the source +memory and srcDevice is the source device. count specifies the +number of bytes to copy.

    +

    Note that this function is asynchronous with respect to the host, but +serialized with respect all pending and future asynchronous work in to +the current device, srcDevice, and dstDevice (use +cudaMemcpyPeerAsync to avoid this synchronization).

    +
    +
    Parameters:
    +
      +
    • dst (Any) – Destination device pointer

    • +
    • dstDevice (int) – Destination device

    • +
    • src (Any) – Source device pointer

    • +
    • srcDevice (int) – Source device

    • +
    • count (size_t) – Size of memory copy in bytes

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy2D(dst, size_t dpitch, src, size_t spitch, size_t width, size_t height, kind: cudaMemcpyKind)
    +

    Copies data between host and device.

    +

    Copies a matrix (height rows of width bytes each) from the memory +area pointed to by src to the memory area pointed to by dst, where +kind specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. dpitch and spitch are the widths in +memory in bytes of the 2D arrays pointed to by dst and src, +including any padding added to the end of each row. The memory areas +may not overlap. width must not exceed either dpitch or spitch. +Calling cudaMemcpy2D() with dst and src pointers that +do not match the direction of the copy results in an undefined +behavior. cudaMemcpy2D() returns an error if dpitch or +spitch exceeds the maximum allowed.

    +
    +
    Parameters:
    +
      +
    • dst (Any) – Destination memory address

    • +
    • dpitch (size_t) – Pitch of destination memory

    • +
    • src (Any) – Source memory address

    • +
    • spitch (size_t) – Pitch of source memory

    • +
    • width (size_t) – Width of matrix transfer (columns in bytes)

    • +
    • height (size_t) – Height of matrix transfer (rows)

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaMemcpy, cudaMemcpy2DToArray, cudaMemcpy2DFromArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpy2DToArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, cuMemcpy2D, cuMemcpy2DUnaligned

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy2DToArray(dst, size_t wOffset, size_t hOffset, src, size_t spitch, size_t width, size_t height, kind: cudaMemcpyKind)
    +

    Copies data between host and device.

    +

    Copies a matrix (height rows of width bytes each) from the memory +area pointed to by src to the CUDA array dst starting at hOffset +rows and wOffset bytes from the upper left corner, where kind +specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. spitch is the width in memory in bytes of +the 2D array pointed to by src, including any padding added to the +end of each row. wOffset + width must not exceed the width of the +CUDA array dst. width must not exceed spitch. +cudaMemcpy2DToArray() returns an error if spitch exceeds +the maximum allowed.

    +
    +
    Parameters:
    +
      +
    • dst (cudaArray_t) – Destination memory address

    • +
    • wOffset (size_t) – Destination starting X offset (columns in bytes)

    • +
    • hOffset (size_t) – Destination starting Y offset (rows)

    • +
    • src (Any) – Source memory address

    • +
    • spitch (size_t) – Pitch of source memory

    • +
    • width (size_t) – Width of matrix transfer (columns in bytes)

    • +
    • height (size_t) – Height of matrix transfer (rows)

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaMemcpy, cudaMemcpy2D, cudaMemcpy2DFromArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpy2DToArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, cuMemcpy2D, cuMemcpy2DUnaligned

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy2DFromArray(dst, size_t dpitch, src, size_t wOffset, size_t hOffset, size_t width, size_t height, kind: cudaMemcpyKind)
    +

    Copies data between host and device.

    +

    Copies a matrix (height rows of width bytes each) from the CUDA +array src starting at hOffset rows and wOffset bytes from the +upper left corner to the memory area pointed to by dst, where kind +specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. dpitch is the width in memory in bytes of +the 2D array pointed to by dst, including any padding added to the +end of each row. wOffset + width must not exceed the width of the +CUDA array src. width must not exceed dpitch. +cudaMemcpy2DFromArray() returns an error if dpitch +exceeds the maximum allowed.

    +
    +
    Parameters:
    +
      +
    • dst (Any) – Destination memory address

    • +
    • dpitch (size_t) – Pitch of destination memory

    • +
    • src (cudaArray_const_t) – Source memory address

    • +
    • wOffset (size_t) – Source starting X offset (columns in bytes)

    • +
    • hOffset (size_t) – Source starting Y offset (rows)

    • +
    • width (size_t) – Width of matrix transfer (columns in bytes)

    • +
    • height (size_t) – Height of matrix transfer (rows)

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaMemcpy, cudaMemcpy2D, cudaMemcpy2DToArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpy2DToArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, cuMemcpy2D, cuMemcpy2DUnaligned

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy2DArrayToArray(dst, size_t wOffsetDst, size_t hOffsetDst, src, size_t wOffsetSrc, size_t hOffsetSrc, size_t width, size_t height, kind: cudaMemcpyKind)
    +

    Copies data between host and device.

    +

    Copies a matrix (height rows of width bytes each) from the CUDA +array src starting at hOffsetSrc rows and wOffsetSrc bytes from +the upper left corner to the CUDA array dst starting at hOffsetDst +rows and wOffsetDst bytes from the upper left corner, where kind +specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. wOffsetDst + width must not exceed the +width of the CUDA array dst. wOffsetSrc + width must not exceed +the width of the CUDA array src.

    +
    +
    Parameters:
    +
      +
    • dst (cudaArray_t) – Destination memory address

    • +
    • wOffsetDst (size_t) – Destination starting X offset (columns in bytes)

    • +
    • hOffsetDst (size_t) – Destination starting Y offset (rows)

    • +
    • src (cudaArray_const_t) – Source memory address

    • +
    • wOffsetSrc (size_t) – Source starting X offset (columns in bytes)

    • +
    • hOffsetSrc (size_t) – Source starting Y offset (rows)

    • +
    • width (size_t) – Width of matrix transfer (columns in bytes)

    • +
    • height (size_t) – Height of matrix transfer (rows)

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaMemcpy, cudaMemcpy2D, cudaMemcpy2DToArray, cudaMemcpy2DFromArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DAsync, cudaMemcpy2DToArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, cuMemcpy2D, cuMemcpy2DUnaligned

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpyAsync(dst, src, size_t count, kind: cudaMemcpyKind, stream)
    +

    Copies data between host and device.

    +

    Copies count bytes from the memory area pointed to by src to the +memory area pointed to by dst, where kind specifies the direction +of the copy, and must be one of cudaMemcpyHostToHost, +cudaMemcpyHostToDevice, cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing.

    +

    The memory areas may not overlap. Calling cudaMemcpyAsync() +with dst and src pointers that do not match the direction of the +copy results in an undefined behavior.

    +

    cudaMemcpyAsync() is asynchronous with respect to the host, +so the call may return before the copy is complete. The copy can +optionally be associated to a stream by passing a non-zero stream +argument. If kind is cudaMemcpyHostToDevice or +cudaMemcpyDeviceToHost and the stream is non-zero, the +copy may overlap with operations in other streams.

    +

    The device version of this function only handles device to device +copies and cannot be given local or shared pointers.

    +
    +
    Parameters:
    +
      +
    • dst (Any) – Destination memory address

    • +
    • src (Any) – Source memory address

    • +
    • count (size_t) – Size in bytes to copy

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpyPeerAsync(dst, int dstDevice, src, int srcDevice, size_t count, stream)
    +

    Copies memory between two devices asynchronously.

    +

    Copies memory from one device to memory on another device. dst is the +base device pointer of the destination memory and dstDevice is the +destination device. src is the base device pointer of the source +memory and srcDevice is the source device. count specifies the +number of bytes to copy.

    +

    Note that this function is asynchronous with respect to the host and +all work on other devices.

    +
    +
    Parameters:
    +
      +
    • dst (Any) – Destination device pointer

    • +
    • dstDevice (int) – Destination device

    • +
    • src (Any) – Source device pointer

    • +
    • srcDevice (int) – Source device

    • +
    • count (size_t) – Size of memory copy in bytes

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy2DAsync(dst, size_t dpitch, src, size_t spitch, size_t width, size_t height, kind: cudaMemcpyKind, stream)
    +

    Copies data between host and device.

    +

    Copies a matrix (height rows of width bytes each) from the memory +area pointed to by src to the memory area pointed to by dst, where +kind specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. dpitch and spitch are the widths in +memory in bytes of the 2D arrays pointed to by dst and src, +including any padding added to the end of each row. The memory areas +may not overlap. width must not exceed either dpitch or spitch.

    +

    Calling cudaMemcpy2DAsync() with dst and src pointers +that do not match the direction of the copy results in an undefined +behavior. cudaMemcpy2DAsync() returns an error if dpitch +or spitch is greater than the maximum allowed.

    +

    cudaMemcpy2DAsync() is asynchronous with respect to the +host, so the call may return before the copy is complete. The copy can +optionally be associated to a stream by passing a non-zero stream +argument. If kind is cudaMemcpyHostToDevice or +cudaMemcpyDeviceToHost and stream is non-zero, the copy +may overlap with operations in other streams.

    +

    The device version of this function only handles device to device +copies and cannot be given local or shared pointers.

    +
    +
    Parameters:
    +
      +
    • dst (Any) – Destination memory address

    • +
    • dpitch (size_t) – Pitch of destination memory

    • +
    • src (Any) – Source memory address

    • +
    • spitch (size_t) – Pitch of source memory

    • +
    • width (size_t) – Width of matrix transfer (columns in bytes)

    • +
    • height (size_t) – Height of matrix transfer (rows)

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaMemcpy, cudaMemcpy2D, cudaMemcpy2DToArray, cudaMemcpy2DFromArray, cudaMemcpy2DArrayToArray, cudaMemcpyToSymbol, cudaMemcpyFromSymbol, cudaMemcpyAsync, cudaMemcpy2DToArrayAsync, cudaMemcpy2DFromArrayAsync, cudaMemcpyToSymbolAsync, cudaMemcpyFromSymbolAsync, cuMemcpy2DAsync

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy2DToArrayAsync(dst, size_t wOffset, size_t hOffset, src, size_t spitch, size_t width, size_t height, kind: cudaMemcpyKind, stream)
    +

    Copies data between host and device.

    +

    Copies a matrix (height rows of width bytes each) from the memory +area pointed to by src to the CUDA array dst starting at hOffset +rows and wOffset bytes from the upper left corner, where kind +specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. spitch is the width in memory in bytes of +the 2D array pointed to by src, including any padding added to the +end of each row. wOffset + width must not exceed the width of the +CUDA array dst. width must not exceed spitch. +cudaMemcpy2DToArrayAsync() returns an error if spitch +exceeds the maximum allowed.

    +

    cudaMemcpy2DToArrayAsync() is asynchronous with respect to +the host, so the call may return before the copy is complete. The copy +can optionally be associated to a stream by passing a non-zero stream +argument. If kind is cudaMemcpyHostToDevice or +cudaMemcpyDeviceToHost and stream is non-zero, the copy +may overlap with operations in other streams.

    +

    cudaMemcpy2DFromArrayAsync, +cudaMemcpyToSymbolAsync, +cudaMemcpyFromSymbolAsync, cuMemcpy2DAsync

    +
    +
    Parameters:
    +
      +
    • dst (cudaArray_t) – Destination memory address

    • +
    • wOffset (size_t) – Destination starting X offset (columns in bytes)

    • +
    • hOffset (size_t) – Destination starting Y offset (rows)

    • +
    • src (Any) – Source memory address

    • +
    • spitch (size_t) – Pitch of source memory

    • +
    • width (size_t) – Width of matrix transfer (columns in bytes)

    • +
    • height (size_t) – Height of matrix transfer (rows)

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemcpy2DFromArrayAsync(dst, size_t dpitch, src, size_t wOffset, size_t hOffset, size_t width, size_t height, kind: cudaMemcpyKind, stream)
    +

    Copies data between host and device.

    +

    Copies a matrix (height rows of width bytes each) from the CUDA +array src starting at hOffset rows and wOffset bytes from the +upper left corner to the memory area pointed to by dst, where kind +specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. dpitch is the width in memory in bytes of +the 2D array pointed to by dst, including any padding added to the +end of each row. wOffset + width must not exceed the width of the +CUDA array src. width must not exceed dpitch. +cudaMemcpy2DFromArrayAsync() returns an error if dpitch +exceeds the maximum allowed.

    +

    cudaMemcpy2DFromArrayAsync() is asynchronous with respect +to the host, so the call may return before the copy is complete. The +copy can optionally be associated to a stream by passing a non-zero +stream argument. If kind is cudaMemcpyHostToDevice or +cudaMemcpyDeviceToHost and stream is non-zero, the copy +may overlap with operations in other streams.

    +

    cudaMemcpyToSymbolAsync, +cudaMemcpyFromSymbolAsync, cuMemcpy2DAsync

    +
    +
    Parameters:
    +
      +
    • dst (Any) – Destination memory address

    • +
    • dpitch (size_t) – Pitch of destination memory

    • +
    • src (cudaArray_const_t) – Source memory address

    • +
    • wOffset (size_t) – Source starting X offset (columns in bytes)

    • +
    • hOffset (size_t) – Source starting Y offset (rows)

    • +
    • width (size_t) – Width of matrix transfer (columns in bytes)

    • +
    • height (size_t) – Height of matrix transfer (rows)

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidPitchValue, cudaErrorInvalidMemcpyDirection

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemset(devPtr, int value, size_t count)
    +

    Initializes or sets device memory to a value.

    +

    Fills the first count bytes of the memory area pointed to by devPtr +with the constant byte value value.

    +

    Note that this function is asynchronous with respect to the host unless +devPtr refers to pinned host memory.

    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to device memory

    • +
    • value (int) – Value to set for each byte of specified memory

    • +
    • count (size_t) – Size in bytes to set

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemset2D(devPtr, size_t pitch, int value, size_t width, size_t height)
    +

    Initializes or sets device memory to a value.

    +

    Sets to the specified value value a matrix (height rows of width +bytes each) pointed to by dstPtr. pitch is the width in bytes of +the 2D array pointed to by dstPtr, including any padding added to the +end of each row. This function performs fastest when the pitch is one +that has been passed back by cudaMallocPitch().

    +

    Note that this function is asynchronous with respect to the host unless +devPtr refers to pinned host memory.

    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to 2D device memory

    • +
    • pitch (size_t) – Pitch in bytes of 2D device memory(Unused if height is 1)

    • +
    • value (int) – Value to set for each byte of specified memory

    • +
    • width (size_t) – Width of matrix set (columns in bytes)

    • +
    • height (size_t) – Height of matrix set (rows)

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemset3D(cudaPitchedPtr pitchedDevPtr: cudaPitchedPtr, int value, cudaExtent extent: cudaExtent)
    +

    Initializes or sets device memory to a value.

    +

    Initializes each element of a 3D array to the specified value value. +The object to initialize is defined by pitchedDevPtr. The pitch +field of pitchedDevPtr is the width in memory in bytes of the 3D +array pointed to by pitchedDevPtr, including any padding added to the +end of each row. The xsize field specifies the logical width of each +row in bytes, while the ysize field specifies the height of each 2D +slice in rows. The pitch field of pitchedDevPtr is ignored when +height and depth are both equal to 1.

    +

    The extents of the initialized region are specified as a width in +bytes, a height in rows, and a depth in slices.

    +

    Extents with width greater than or equal to the xsize of +pitchedDevPtr may perform significantly faster than extents narrower +than the xsize. Secondarily, extents with height equal to the +ysize of pitchedDevPtr will perform faster than when the height +is shorter than the ysize.

    +

    This function performs fastest when the pitchedDevPtr has been +allocated by cudaMalloc3D().

    +

    Note that this function is asynchronous with respect to the host unless +pitchedDevPtr refers to pinned host memory.

    +
    +
    Parameters:
    +
      +
    • pitchedDevPtr (cudaPitchedPtr) – Pointer to pitched device memory

    • +
    • value (int) – Value to set for each byte of specified memory

    • +
    • extent (cudaExtent) – Size parameters for where to set device memory (width field in +bytes)

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemsetAsync(devPtr, int value, size_t count, stream)
    +

    Initializes or sets device memory to a value.

    +

    Fills the first count bytes of the memory area pointed to by devPtr +with the constant byte value value.

    +

    cudaMemsetAsync() is asynchronous with respect to the host, +so the call may return before the memset is complete. The operation can +optionally be associated to a stream by passing a non-zero stream +argument. If stream is non-zero, the operation may overlap with +operations in other streams.

    +

    The device version of this function only handles device to device +copies and cannot be given local or shared pointers.

    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to device memory

    • +
    • value (int) – Value to set for each byte of specified memory

    • +
    • count (size_t) – Size in bytes to set

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemset2DAsync(devPtr, size_t pitch, int value, size_t width, size_t height, stream)
    +

    Initializes or sets device memory to a value.

    +

    Sets to the specified value value a matrix (height rows of width +bytes each) pointed to by dstPtr. pitch is the width in bytes of +the 2D array pointed to by dstPtr, including any padding added to the +end of each row. This function performs fastest when the pitch is one +that has been passed back by cudaMallocPitch().

    +

    cudaMemset2DAsync() is asynchronous with respect to the +host, so the call may return before the memset is complete. The +operation can optionally be associated to a stream by passing a non- +zero stream argument. If stream is non-zero, the operation may +overlap with operations in other streams.

    +

    The device version of this function only handles device to device +copies and cannot be given local or shared pointers.

    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to 2D device memory

    • +
    • pitch (size_t) – Pitch in bytes of 2D device memory(Unused if height is 1)

    • +
    • value (int) – Value to set for each byte of specified memory

    • +
    • width (size_t) – Width of matrix set (columns in bytes)

    • +
    • height (size_t) – Height of matrix set (rows)

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemset3DAsync(cudaPitchedPtr pitchedDevPtr: cudaPitchedPtr, int value, cudaExtent extent: cudaExtent, stream)
    +

    Initializes or sets device memory to a value.

    +

    Initializes each element of a 3D array to the specified value value. +The object to initialize is defined by pitchedDevPtr. The pitch +field of pitchedDevPtr is the width in memory in bytes of the 3D +array pointed to by pitchedDevPtr, including any padding added to the +end of each row. The xsize field specifies the logical width of each +row in bytes, while the ysize field specifies the height of each 2D +slice in rows. The pitch field of pitchedDevPtr is ignored when +height and depth are both equal to 1.

    +

    The extents of the initialized region are specified as a width in +bytes, a height in rows, and a depth in slices.

    +

    Extents with width greater than or equal to the xsize of +pitchedDevPtr may perform significantly faster than extents narrower +than the xsize. Secondarily, extents with height equal to the +ysize of pitchedDevPtr will perform faster than when the height +is shorter than the ysize.

    +

    This function performs fastest when the pitchedDevPtr has been +allocated by cudaMalloc3D().

    +

    cudaMemset3DAsync() is asynchronous with respect to the +host, so the call may return before the memset is complete. The +operation can optionally be associated to a stream by passing a non- +zero stream argument. If stream is non-zero, the operation may +overlap with operations in other streams.

    +

    The device version of this function only handles device to device +copies and cannot be given local or shared pointers.

    +
    +
    Parameters:
    +
      +
    • pitchedDevPtr (cudaPitchedPtr) – Pointer to pitched device memory

    • +
    • value (int) – Value to set for each byte of specified memory

    • +
    • extent (cudaExtent) – Size parameters for where to set device memory (width field in +bytes)

    • +
    • stream (CUstream or cudaStream_t) – Stream identifier

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemPrefetchAsync(devPtr, size_t count, int dstDevice, stream)
    +

    Prefetches memory to the specified destination device.

    +

    Prefetches memory to the specified destination device. devPtr is the +base device pointer of the memory to be prefetched and dstDevice is +the destination device. count specifies the number of bytes to copy. +stream is the stream in which the operation is enqueued. The memory +range must refer to managed memory allocated via +cudaMallocManaged or declared via managed variables, or it +may also refer to system-allocated memory on systems with non-zero +cudaDevAttrPageableMemoryAccess.

    +

    Passing in cudaCpuDeviceId for dstDevice will prefetch the data to +host memory. If dstDevice is a GPU, then the device attribute +cudaDevAttrConcurrentManagedAccess must be non-zero. +Additionally, stream must be associated with a device that has a non- +zero value for the device attribute +cudaDevAttrConcurrentManagedAccess.

    +

    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 +the prefetch operation is enqueued in the stream.

    +

    If no physical memory has been allocated for this region, then this +memory region will be populated and mapped on the destination device. +If there’s insufficient memory to prefetch the desired region, the +Unified Memory driver may evict pages from other +cudaMallocManaged allocations to host memory in order to +make room. Device memory allocated using cudaMalloc or +cudaMallocArray will not be evicted.

    +

    By default, any mappings to the previous location of the migrated pages +are removed and mappings for the new location are only setup on +dstDevice. The exact behavior however also depends on the settings +applied to this memory range via cudaMemAdvise as described +below:

    +

    If cudaMemAdviseSetReadMostly was set on any subset of this +memory range, then that subset will create a read-only copy of the +pages on dstDevice.

    +

    If cudaMemAdviseSetPreferredLocation was called on any +subset of this memory range, then the pages will be migrated to +dstDevice even if dstDevice is not the preferred location of any +pages in the memory range.

    +

    If cudaMemAdviseSetAccessedBy was called on any subset of +this memory range, then mappings to those pages from all the +appropriate processors are updated to refer to the new location if +establishing such a mapping is possible. Otherwise, those mappings are +cleared.

    +

    Note that this API is not required for functionality and only serves to +improve performance by allowing the application to migrate data to a +suitable location before it is accessed. Memory accesses to this range +are always coherent and are allowed even when the data is actively +being migrated.

    +

    Note that this function is asynchronous with respect to the host and +all work on other devices.

    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to be prefetched

    • +
    • count (size_t) – Size in bytes

    • +
    • dstDevice (int) – Destination device to prefetch to

    • +
    • stream (CUstream or cudaStream_t) – Stream to enqueue prefetch operation

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemPrefetchAsync_v2(devPtr, size_t count, cudaMemLocation location: cudaMemLocation, unsigned int flags, stream)
    +

    Prefetches memory to the specified destination location.

    +

    Prefetches memory to the specified destination location. devPtr is +the base device pointer of the memory to be prefetched and location +specifies the destination location. count specifies the number of +bytes to copy. stream is the stream in which the operation is +enqueued. The memory range must refer to managed memory allocated via +cudaMallocManaged or declared via managed variables, or it +may also refer to system-allocated memory on systems with non-zero +cudaDevAttrPageableMemoryAccess.

    +

    Specifying cudaMemLocationTypeDevice for +type will prefetch memory to GPU specified +by device ordinal id which must have non- +zero value for the device attribute +concurrentManagedAccess. Additionally, stream must be +associated with a device that has a non-zero value for the device +attribute concurrentManagedAccess. Specifying +cudaMemLocationTypeHost as type +will prefetch data to host memory. Applications can request prefetching +memory to a specific host NUMA node by specifying +cudaMemLocationTypeHostNuma for +type and a valid host NUMA node id in +id Users can also request prefetching +memory to the host NUMA node closest to the current thread’s CPU by +specifying cudaMemLocationTypeHostNumaCurrent for +type. Note when +type is etiher +cudaMemLocationTypeHost OR +cudaMemLocationTypeHostNumaCurrent, +id will be ignored.

    +

    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 +the prefetch operation is enqueued in the stream.

    +

    If no physical memory has been allocated for this region, then this +memory region will be populated and mapped on the destination device. +If there’s insufficient memory to prefetch the desired region, the +Unified Memory driver may evict pages from other +cudaMallocManaged allocations to host memory in order to +make room. Device memory allocated using cudaMalloc or +cudaMallocArray will not be evicted.

    +

    By default, any mappings to the previous location of the migrated pages +are removed and mappings for the new location are only setup on the +destination location. The exact behavior however also depends on the +settings applied to this memory range via cuMemAdvise as +described below:

    +

    If cudaMemAdviseSetReadMostly was set on any subset of this +memory range, then that subset will create a read-only copy of the +pages on destination location. If however the destination location is a +host NUMA node, then any pages of that subset that are already in +another host NUMA node will be transferred to the destination.

    +

    If cudaMemAdviseSetPreferredLocation was called on any +subset of this memory range, then the pages will be migrated to +location even if location is not the preferred location of any +pages in the memory range.

    +

    If cudaMemAdviseSetAccessedBy was called on any subset of +this memory range, then mappings to those pages from all the +appropriate processors are updated to refer to the new location if +establishing such a mapping is possible. Otherwise, those mappings are +cleared.

    +

    Note that this API is not required for functionality and only serves to +improve performance by allowing the application to migrate data to a +suitable location before it is accessed. Memory accesses to this range +are always coherent and are allowed even when the data is actively +being migrated.

    +

    Note that this function is asynchronous with respect to the host and +all work on other devices.

    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to be prefetched

    • +
    • count (size_t) – Size in bytes

    • +
    • location (cudaMemLocation) – location to prefetch to

    • +
    • flags (unsigned int) – flags for future use, must be zero now.

    • +
    • stream (CUstream or cudaStream_t) – Stream to enqueue prefetch operation

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemAdvise(devPtr, size_t count, advice: cudaMemoryAdvise, int device)
    +

    Advise about the usage of a given memory range.

    +

    Advise the Unified Memory subsystem about the usage pattern for the +memory range starting at devPtr with a size of count bytes. 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 the +advice is applied. The memory range must refer to managed memory +allocated via cudaMallocManaged or declared via managed +variables. The memory range could also refer to system-allocated +pageable memory provided it represents a valid, host-accessible region +of memory and all additional constraints imposed by advice as +outlined below are also satisfied. Specifying an invalid system- +allocated pageable memory range results in an error being returned.

    +

    The advice parameter can take the following values:

    +
      +
    • cudaMemAdviseSetReadMostly: This implies that the data is +mostly going to be read from and only occasionally written to. Any +read accesses from any processor to this region will create a read- +only copy of at least the accessed pages in that processor’s memory. +Additionally, if cudaMemPrefetchAsync is called on this +region, it will create a read-only copy of the data on the +destination processor. If any processor writes to this region, all +copies of the corresponding page will be invalidated except for the +one where the write occurred. The device argument is ignored for +this advice. Note that for a page to be read-duplicated, the +accessing processor must either be the CPU or a GPU that has a non- +zero value for the device attribute +cudaDevAttrConcurrentManagedAccess. Also, if a context is +created on a device that does not have the device attribute +cudaDevAttrConcurrentManagedAccess set, then read- +duplication will not occur until all such contexts are destroyed. If +the memory region refers to valid system-allocated pageable memory, +then the accessing device must have a non-zero value for the device +attribute cudaDevAttrPageableMemoryAccess for a read-only +copy to be created on that device. Note however that if the accessing +device also has a non-zero value for the device attribute +cudaDevAttrPageableMemoryAccessUsesHostPageTables, then +setting this advice will not create a read-only copy when that device +accesses this memory region.

    • +
    • cudaMemAdviceUnsetReadMostly: Undoes the effect of +cudaMemAdviceReadMostly and also prevents the Unified +Memory driver from attempting heuristic read-duplication on the +memory range. Any read-duplicated copies of the data will be +collapsed into a single copy. The location for the collapsed copy +will be the preferred location if the page has a preferred location +and one of the read-duplicated copies was resident at that location. +Otherwise, the location chosen is arbitrary.

    • +
    • cudaMemAdviseSetPreferredLocation: This advice sets the +preferred location for the data to be the memory belonging to +device. Passing in cudaCpuDeviceId for device sets the preferred +location as host memory. If device is a GPU, then it must have a +non-zero value for the device attribute +cudaDevAttrConcurrentManagedAccess. 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 +cudaMemPrefetchAsync. 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 +cudaMemAdviseSetReadMostly 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 +accesses from device will not result in a read-only copy being +created on that device as outlined in description for the advice +cudaMemAdviseSetReadMostly. If the memory region refers +to valid system-allocated pageable memory, then device must have a +non-zero value for the device attribute +cudaDevAttrPageableMemoryAccess.

    • +
    • cudaMemAdviseUnsetPreferredLocation: Undoes the effect of +cudaMemAdviseSetPreferredLocation and changes the +preferred location to none.

    • +
    • cudaMemAdviseSetAccessedBy: This advice implies that the +data will be accessed by device. Passing in +cudaCpuDeviceId for device will set the advice for the +CPU. If device is a GPU, then the device attribute +cudaDevAttrConcurrentManagedAccess must be non-zero. This +advice does not cause data migration and has no impact on the +location of the data per se. Instead, it causes the data to always be +mapped in the specified processor’s page tables, as long as the +location of the data permits a mapping to be established. If the data +gets migrated for any reason, the mappings are updated accordingly. +This advice is recommended in scenarios where data locality is not +important, but avoiding faults is. Consider for example a system +containing multiple GPUs with peer-to-peer access enabled, where the +data located on one GPU is occasionally accessed by peer GPUs. In +such scenarios, migrating data over to the other GPUs is not as +important because the accesses are infrequent and the overhead of +migration may be too high. But preventing faults can still help +improve performance, and so having a mapping set up in advance is +useful. Note that on CPU access of this data, the data may be +migrated to host memory because the CPU typically cannot access +device memory directly. Any GPU that had the +cudaMemAdviceSetAccessedBy flag set for this data will +now have its mapping updated to point to the page in host memory. If +cudaMemAdviseSetReadMostly 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. Additionally, if +the preferred location of this memory region or any subset of it is +also device, then the policies associated with +cudaMemAdviseSetPreferredLocation will override the +policies of this advice. If the memory region refers to valid system- +allocated pageable memory, then device must have a non-zero value +for the device attribute cudaDevAttrPageableMemoryAccess. +Additionally, if device has a non-zero value for the device +attribute +cudaDevAttrPageableMemoryAccessUsesHostPageTables, then +this call has no effect.

    • +
    • cudaMemAdviseUnsetAccessedBy: Undoes the effect of +cudaMemAdviseSetAccessedBy. Any mappings to the data from +device may be removed at any time causing accesses to result in +non-fatal page faults. If the memory region refers to valid system- +allocated pageable memory, then device must have a non-zero value +for the device attribute cudaDevAttrPageableMemoryAccess. +Additionally, if device has a non-zero value for the device +attribute +cudaDevAttrPageableMemoryAccessUsesHostPageTables, then +this call has no effect.

    • +
    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to memory to set the advice for

    • +
    • count (size_t) – Size in bytes of the memory range

    • +
    • advice (cudaMemoryAdvise) – Advice to be applied for the specified memory range

    • +
    • device (int) – Device to apply the advice for

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemAdvise_v2(devPtr, size_t count, advice: cudaMemoryAdvise, cudaMemLocation location: cudaMemLocation)
    +

    Advise about the usage of a given memory range.

    +

    Advise the Unified Memory subsystem about the usage pattern for the +memory range starting at devPtr with a size of count bytes. 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 the +advice is applied. The memory range must refer to managed memory +allocated via cudaMallocManaged or declared via managed +variables. The memory range could also refer to system-allocated +pageable memory provided it represents a valid, host-accessible region +of memory and all additional constraints imposed by advice as +outlined below are also satisfied. Specifying an invalid system- +allocated pageable memory range results in an error being returned.

    +

    The advice parameter can take the following values:

    +
      +
    • cudaMemAdviseSetReadMostly: This implies that the data is +mostly going to be read from and only occasionally written to. Any +read accesses from any processor to this region will create a read- +only copy of at least the accessed pages in that processor’s memory. +Additionally, if cudaMemPrefetchAsync or +cudaMemPrefetchAsync_v2 is called on this region, it will +create a read-only copy of the data on the destination processor. If +the target location for cudaMemPrefetchAsync_v2 is a host +NUMA node and a read-only copy already exists on another host NUMA +node, that copy will be migrated to the targeted host NUMA node. If +any processor writes to this region, all copies of the corresponding +page will be invalidated except for the one where the write occurred. +If the writing processor is the CPU and the preferred location of the +page is a host NUMA node, then the page will also be migrated to that +host NUMA node. The location argument is ignored for this advice. +Note that for a page to be read-duplicated, the accessing processor +must either be the CPU or a GPU that has a non-zero value for the +device attribute cudaDevAttrConcurrentManagedAccess. +Also, if a context is created on a device that does not have the +device attribute cudaDevAttrConcurrentManagedAccess set, +then read-duplication will not occur until all such contexts are +destroyed. If the memory region refers to valid system-allocated +pageable memory, then the accessing device must have a non-zero value +for the device attribute cudaDevAttrPageableMemoryAccess +for a read-only copy to be created on that device. Note however that +if the accessing device also has a non-zero value for the device +attribute +cudaDevAttrPageableMemoryAccessUsesHostPageTables, then +setting this advice will not create a read-only copy when that device +accesses this memory region.

    • +
    • cudaMemAdviceUnsetReadMostly: Undoes the effect of +cudaMemAdviseSetReadMostly and also prevents the Unified +Memory driver from attempting heuristic read-duplication on the +memory range. Any read-duplicated copies of the data will be +collapsed into a single copy. The location for the collapsed copy +will be the preferred location if the page has a preferred location +and one of the read-duplicated copies was resident at that location. +Otherwise, the location chosen is arbitrary. Note: The location +argument is ignored for this advice.

    • +
    • cudaMemAdviseSetPreferredLocation: This advice sets the +preferred location for the data to be the memory belonging to +location. When type is +cudaMemLocationTypeHost, id +is ignored and the preferred location is set to be host memory. To +set the preferred location to a specific host NUMA node, applications +must set type to +cudaMemLocationTypeHostNuma and +id must specify the NUMA ID of the host +NUMA node. If type is set to +cudaMemLocationTypeHostNumaCurrent, +id will be ignored and the host NUMA node +closest to the calling thread’s CPU will be used as the preferred +location. If type is a +cudaMemLocationTypeDevice, then +id must be a valid device ordinal and the +device must have a non-zero value for the device attribute +cudaDevAttrConcurrentManagedAccess. 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 +cudaMemPrefetchAsync. 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 +cudaMemAdviseSetReadMostly 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 +accesses from location will not result in a read-only copy being +created on that procesor as outlined in description for the advice +cudaMemAdviseSetReadMostly. If the memory region refers +to valid system-allocated pageable memory, and +type is +cudaMemLocationTypeDevice then +id must be a valid device that has a non- +zero alue for the device attribute +cudaDevAttrPageableMemoryAccess.

    • +
    • cudaMemAdviseUnsetPreferredLocation: Undoes the effect of +cudaMemAdviseSetPreferredLocation and changes the +preferred location to none. The location argument is ignored for +this advice.

    • +
    • cudaMemAdviseSetAccessedBy: This advice implies that the +data will be accessed by processor location. The +type must be either +cudaMemLocationTypeDevice with +id representing a valid device ordinal or +cudaMemLocationTypeHost and +id will be ignored. All other location +types are invalid. If id is a GPU, then +the device attribute cudaDevAttrConcurrentManagedAccess +must be non-zero. This advice does not cause data migration and has +no impact on the location of the data per se. Instead, it causes the +data to always be mapped in the specified processor’s page tables, as +long as the location of the data permits a mapping to be established. +If the data gets migrated for any reason, the mappings are updated +accordingly. This advice is recommended in scenarios where data +locality is not important, but avoiding faults is. Consider for +example a system containing multiple GPUs with peer-to-peer access +enabled, where the data located on one GPU is occasionally accessed +by peer GPUs. In such scenarios, migrating data over to the other +GPUs is not as important because the accesses are infrequent and the +overhead of migration may be too high. But preventing faults can +still help improve performance, and so having a mapping set up in +advance is useful. Note that on CPU access of this data, the data may +be migrated to host memory because the CPU typically cannot access +device memory directly. Any GPU that had the +cudaMemAdviseSetAccessedBy flag set for this data will +now have its mapping updated to point to the page in host memory. If +cudaMemAdviseSetReadMostly 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. Additionally, if +the preferred location of this memory region or any subset of it is +also location, then the policies associated with +CU_MEM_ADVISE_SET_PREFERRED_LOCATION will override the +policies of this advice. If the memory region refers to valid system- +allocated pageable memory, and type is +cudaMemLocationTypeDevice then device in +id must have a non-zero value for the +device attribute cudaDevAttrPageableMemoryAccess. +Additionally, if id has a non-zero value +for the device attribute +cudaDevAttrPageableMemoryAccessUsesHostPageTables, then +this call has no effect.

    • +
    • CU_MEM_ADVISE_UNSET_ACCESSED_BY: Undoes the effect of +cudaMemAdviseSetAccessedBy. Any mappings to the data from +location may be removed at any time causing accesses to result in +non-fatal page faults. If the memory region refers to valid system- +allocated pageable memory, and type is +cudaMemLocationTypeDevice then device in +id must have a non-zero value for the +device attribute cudaDevAttrPageableMemoryAccess. +Additionally, if id has a non-zero value +for the device attribute +cudaDevAttrPageableMemoryAccessUsesHostPageTables, then +this call has no effect.

    • +
    +
    +
    Parameters:
    +
      +
    • devPtr (Any) – Pointer to memory to set the advice for

    • +
    • count (size_t) – Size in bytes of the memory range

    • +
    • advice (cudaMemoryAdvise) – Advice to be applied for the specified memory range

    • +
    • location (cudaMemLocation) – location to apply the advice for

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemRangeGetAttribute(size_t dataSize, attribute: cudaMemRangeAttribute, devPtr, size_t count)
    +

    Query an attribute of a given memory range.

    +

    Query an attribute about the memory range starting at devPtr with a +size of count bytes. The memory range must refer to managed memory +allocated via cudaMallocManaged or declared via managed +variables.

    +

    The attribute parameter can take the following values:

    +
      +
    • cudaMemRangeAttributeReadMostly: If this attribute is +specified, data will be interpreted as a 32-bit integer, and +dataSize must be 4. The result returned will be 1 if all pages in +the given memory range have read-duplication enabled, or 0 otherwise.

    • +
    • cudaMemRangeAttributePreferredLocation: If this attribute +is specified, data will be interpreted as a 32-bit integer, and +dataSize must be 4. The result returned will be a GPU device id if +all pages in the memory range have that GPU as their preferred +location, or it will be cudaCpuDeviceId if all pages in the memory +range have the CPU as their preferred location, or it will be +cudaInvalidDeviceId if either all the pages don’t have the same +preferred location or some of the pages don’t have a preferred +location at all. Note that the actual location of the pages in the +memory range at the time of the query may be different from the +preferred location.

    • +
    • cudaMemRangeAttributeAccessedBy: If this attribute is +specified, data will be interpreted as an array of 32-bit integers, +and dataSize must be a non-zero multiple of 4. The result returned +will be a list of device ids that had +cudaMemAdviceSetAccessedBy set for that entire memory +range. If any device does not have that advice set for the entire +memory range, that device will not be included. If data is larger +than the number of devices that have that advice set for that memory +range, cudaInvalidDeviceId will be returned in all the extra space +provided. For ex., if dataSize is 12 (i.e. data has 3 elements) +and only device 0 has the advice set, then the result returned will +be { 0, cudaInvalidDeviceId, cudaInvalidDeviceId }. If data is +smaller than the number of devices that have that advice set, then +only as many devices will be returned as can fit in the array. There +is no guarantee on which specific devices will be returned, however.

    • +
    • cudaMemRangeAttributeLastPrefetchLocation: If this +attribute is specified, data will be interpreted as a 32-bit +integer, and dataSize must be 4. The result returned will be the +last location to which all pages in the memory range were prefetched +explicitly via cudaMemPrefetchAsync. This will either be +a GPU id or cudaCpuDeviceId depending on whether the last location +for prefetch was a GPU or the CPU respectively. If any page in the +memory range was never explicitly prefetched or if all pages were not +prefetched to the same location, cudaInvalidDeviceId will be +returned. Note that this simply returns the last location that the +applicaton requested to prefetch the memory range to. It gives no +indication as to whether the prefetch operation to that location has +completed or even begun.

      + +
    • +
    • cudaMemRangeAttributePreferredLocationId: If this

    • +
    +

    attribute is specified, data will be interpreted as a 32-bit integer, +and dataSize must be 4. If the +cudaMemRangeAttributePreferredLocationType query for the +same address range returns cudaMemLocationTypeDevice, it +will be a valid device ordinal or if it returns +cudaMemLocationTypeHostNuma, it will be a valid host NUMA +node ID or if it returns any other location type, the id should be +ignored.

    +
    +
    +
    + +

    attribute is specified, data will be interpreted as a 32-bit integer, +and dataSize must be 4. If the +cudaMemRangeAttributeLastPrefetchLocationType query for the +same address range returns cudaMemLocationTypeDevice, it +will be a valid device ordinal or if it returns +cudaMemLocationTypeHostNuma, it will be a valid host NUMA +node ID or if it returns any other location type, the id should be +ignored.

    +
    +
    Parameters:
    +
      +
    • dataSize (size_t) – Array containing the size of data

    • +
    • attribute (cudaMemRangeAttribute) – The attribute to query

    • +
    • devPtr (Any) – Start of the range to query

    • +
    • count (size_t) – Size of the range to query

    • +
    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess, cudaErrorInvalidValue

    • +
    • data (Any) – A pointers to a memory location where the result of each attribute +query will be written to.

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemRangeGetAttributes(dataSizes: Tuple[int] | List[int], attributes: Optional[Tuple[cudaMemRangeAttribute] | List[cudaMemRangeAttribute]], size_t numAttributes, devPtr, size_t count)
    +

    Query attributes of a given memory range.

    +

    Query attributes of the memory range starting at devPtr with a size +of count bytes. The memory range must refer to managed memory +allocated via cudaMallocManaged or declared via managed +variables. The attributes array will be interpreted to have +numAttributes entries. The dataSizes array will also be interpreted +to have numAttributes entries. The results of the query will be +stored in data.

    +

    The list of supported attributes are given below. Please refer to +cudaMemRangeGetAttribute for attribute descriptions and +restrictions.

    + +
    +
    Parameters:
    +
      +
    • dataSizes (List[int]) – Array containing the sizes of each result

    • +
    • attributes (List[cudaMemRangeAttribute]) – An array of attributes to query (numAttributes and the number of +attributes in this array should match)

    • +
    • numAttributes (size_t) – Number of attributes to query

    • +
    • devPtr (Any) – Start of the range to query

    • +
    • count (size_t) – Size of the range to query

    • +
    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess, cudaErrorInvalidValue

    • +
    • data (List[Any]) – A two-dimensional array containing pointers to memory locations +where the result of each attribute query will be written to.

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.make_cudaPitchedPtr(d, size_t p, size_t xsz, size_t ysz)
    +

    Returns a cudaPitchedPtr based on input parameters.

    +

    Returns a cudaPitchedPtr based on the specified input +parameters d, p, xsz, and ysz.

    +
    +
    Parameters:
    +
      +
    • d (Any) – Pointer to allocated memory

    • +
    • p (size_t) – Pitch of allocated memory in bytes

    • +
    • xsz (size_t) – Logical width of allocation in elements

    • +
    • ysz (size_t) – Logical height of allocation in elements

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.make_cudaPos(size_t x, size_t y, size_t z)
    +

    Returns a cudaPos based on input parameters.

    +

    Returns a cudaPos based on the specified input parameters +x, y, and z.

    +
    +
    Parameters:
    +
      +
    • x (size_t) – X position

    • +
    • y (size_t) – Y position

    • +
    • z (size_t) – Z position

    • +
    +
    +
    Returns:
    +

      +
    • cudaError_t.cudaSuccess – cudaError_t.cudaSuccess

    • +
    • cudaPoscudaPos specified by x, y, and z

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.make_cudaExtent(size_t w, size_t h, size_t d)
    +

    Returns a cudaExtent based on input parameters.

    +

    Returns a cudaExtent based on the specified input +parameters w, h, and d.

    +
    +
    Parameters:
    +
      +
    • w (size_t) – Width in elements when referring to array memory, in bytes when +referring to linear memory

    • +
    • h (size_t) – Height in elements

    • +
    • d (size_t) – Depth in elements

    • +
    +
    +
    Returns:
    +

      +
    • cudaError_t.cudaSuccess – cudaError_t.cudaSuccess

    • +
    • cudaExtentcudaExtent specified by w, h, and d

    • +
    +

    +
    +
    + +
    + +
    +
    +

    Stream Ordered Memory Allocator

    +

    overview

    +

    The asynchronous allocator allows the user to allocate and free in stream order. All asynchronous accesses of the allocation must happen between the stream executions of the allocation and the free. If the memory is accessed outside of the promised stream order, a use before allocation / use after free error will cause undefined behavior.

    +

    The allocator is free to reallocate the memory as long as it can guarantee that compliant memory accesses will not overlap temporally. The allocator may refer to internal stream ordering as well as inter-stream dependencies (such as CUDA events and null stream dependencies) when establishing the temporal guarantee. The allocator may also insert inter-stream dependencies to establish the temporal guarantee.

    +

    Supported Platforms

    +

    Whether or not a device supports the integrated stream ordered memory allocator may be queried by calling cudaDeviceGetAttribute() with the device attribute cudaDevAttrMemoryPoolsSupported.

    +
    +
    +cuda.bindings.runtime.cudaMallocAsync(size_t size, hStream)
    +

    Allocates memory with stream ordered semantics.

    +

    Inserts an allocation operation into hStream. 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 memory pool associated with the stream’s +device.

    +
    +
    Parameters:
    +
      +
    • size (size_t) – Number of bytes to allocate

    • +
    • hStream (CUstream or cudaStream_t) – The stream establishing the stream ordering contract and the memory +pool to allocate from

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    The default memory pool of a device contains device memory from that device.

    +

    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.

    +
    + +
    +
    +cuda.bindings.runtime.cudaFreeAsync(devPtr, hStream)
    +

    Frees memory with stream ordered semantics.

    +

    Inserts a free operation into hStream. The allocation must not be +accessed after stream execution reaches the free. After this API +returns, accessing the memory from any subsequent work launched on the +GPU or querying its pointer attributes results in undefined behavior.

    +
    +
    Parameters:
    +
      +
    • dptr (Any) – memory to free

    • +
    • hStream (CUstream or cudaStream_t) – The stream establishing the stream ordering promise

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    During stream capture, this function results in the creation of a free node and must therefore be passed the address of a graph allocation.

    +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolTrimTo(memPool, size_t minBytesToKeep)
    +

    Tries to release memory back to the OS.

    +

    Releases memory back to the OS until the pool contains fewer than +minBytesToKeep reserved bytes, or there is no more memory that the +allocator can safely release. The allocator cannot release OS +allocations that back outstanding asynchronous allocations. The OS +allocations may happen at different granularity from the user +allocations.

    +
    +
    Parameters:
    +
      +
    • pool (CUmemoryPool or cudaMemPool_t) – The memory pool to trim

    • +
    • minBytesToKeep (size_t) – If the pool has less than minBytesToKeep reserved, the TrimTo +operation is a no-op. Otherwise the pool will be guaranteed to have +at least minBytesToKeep bytes reserved after the operation.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    : Allocations that have not been freed count as outstanding.

    +

    : Allocations that have been asynchronously freed but whose completion has not been observed on the host (eg. by a synchronize) can count as outstanding.

    +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolSetAttribute(memPool, attr: cudaMemPoolAttr, value)
    +

    Sets attributes of a memory pool.

    +

    Supported attributes are:

    +
      +
    • cudaMemPoolAttrReleaseThreshold: (value type = +cuuint64_t) Amount of reserved memory in bytes to hold onto before +trying to release memory back to the OS. When more than the release +threshold bytes of memory are held by the memory pool, the allocator +will try to release memory back to the OS on the next call to stream, +event or context synchronize. (default 0)

    • +
    • cudaMemPoolReuseFollowEventDependencies: (value type = +int) Allow cudaMallocAsync to use memory asynchronously +freed in another stream as long as a stream ordering dependency of +the allocating stream on the free action exists. Cuda events and null +stream interactions can create the required stream ordered +dependencies. (default enabled)

    • +
    • cudaMemPoolReuseAllowOpportunistic: (value type = int) +Allow reuse of already completed frees when there is no dependency +between the free and allocation. (default enabled)

    • +
    • cudaMemPoolReuseAllowInternalDependencies: (value type = +int) Allow cudaMallocAsync to insert new stream +dependencies in order to establish the stream ordering required to +reuse a piece of memory released by cudaFreeAsync +(default enabled).

    • +
    • cudaMemPoolAttrReservedMemHigh: (value type = cuuint64_t) +Reset the high watermark that tracks the amount of backing memory +that was allocated for the memory pool. It is illegal to set this +attribute to a non-zero value.

    • +
    • cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t) +Reset the high watermark that tracks the amount of used memory that +was allocated for the memory pool. It is illegal to set this +attribute to a non-zero value.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolGetAttribute(memPool, attr: cudaMemPoolAttr)
    +

    Gets attributes of a memory pool.

    +

    Supported attributes are:

    +
      +
    • cudaMemPoolAttrReleaseThreshold: (value type = +cuuint64_t) Amount of reserved memory in bytes to hold onto before +trying to release memory back to the OS. When more than the release +threshold bytes of memory are held by the memory pool, the allocator +will try to release memory back to the OS on the next call to stream, +event or context synchronize. (default 0)

    • +
    • cudaMemPoolReuseFollowEventDependencies: (value type = +int) Allow cudaMallocAsync to use memory asynchronously +freed in another stream as long as a stream ordering dependency of +the allocating stream on the free action exists. Cuda events and null +stream interactions can create the required stream ordered +dependencies. (default enabled)

    • +
    • cudaMemPoolReuseAllowOpportunistic: (value type = int) +Allow reuse of already completed frees when there is no dependency +between the free and allocation. (default enabled)

    • +
    • cudaMemPoolReuseAllowInternalDependencies: (value type = +int) Allow cudaMallocAsync to insert new stream +dependencies in order to establish the stream ordering required to +reuse a piece of memory released by cudaFreeAsync +(default enabled).

    • +
    • cudaMemPoolAttrReservedMemCurrent: (value type = +cuuint64_t) Amount of backing memory currently allocated for the +mempool.

    • +
    • cudaMemPoolAttrReservedMemHigh: (value type = cuuint64_t) +High watermark of backing memory allocated for the mempool since the +last time it was reset.

    • +
    • cudaMemPoolAttrUsedMemCurrent: (value type = cuuint64_t) +Amount of memory from the pool that is currently in use by the +application.

    • +
    • cudaMemPoolAttrUsedMemHigh: (value type = cuuint64_t) +High watermark of the amount of memory from the pool that was in use +by the application since the last time it was reset.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolSetAccess(memPool, descList: Optional[Tuple[cudaMemAccessDesc] | List[cudaMemAccessDesc]], size_t count)
    +

    Controls visibility of pools between devices.

    +
    +
    Parameters:
    +
      +
    • pool (CUmemoryPool or cudaMemPool_t) – The pool being modified

    • +
    • map (List[cudaMemAccessDesc]) – Array of access descriptors. Each descriptor instructs the access +to enable for a single gpu

    • +
    • count (size_t) – Number of descriptors in the map array.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolGetAccess(memPool, cudaMemLocation location: Optional[cudaMemLocation])
    +

    Returns the accessibility of a pool from a device.

    +

    Returns the accessibility of the pool’s memory from the specified +location.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

      +
    • cudaError_t

    • +
    • flags (cudaMemAccessFlags) – the accessibility of the pool from the specified location

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolCreate(cudaMemPoolProps poolProps: Optional[cudaMemPoolProps])
    +

    Creates a memory pool.

    +

    Creates a CUDA memory pool and returns the handle in pool. The +poolProps determines the properties of the pool such as the backing +device and IPC capabilities.

    +

    To create a memory pool targeting a specific host NUMA node, +applications must set +cudaMemPoolProps::cudaMemLocation::type to +cudaMemLocationTypeHostNuma and +cudaMemPoolProps::cudaMemLocation::id must specify the NUMA +ID of the host memory node. Specifying +cudaMemLocationTypeHostNumaCurrent or +cudaMemLocationTypeHost as the +cudaMemPoolProps::cudaMemLocation::type will result in +cudaErrorInvalidValue. By default, the pool’s memory will +be accessible from the device it is allocated on. In the case of pools +created with cudaMemLocationTypeHostNuma, 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 +maxSize. If set to 0, the maximum size of +the pool will default to a system dependent value.

    +

    Applications can set handleTypes to +cudaMemHandleTypeFabric in order to create +cudaMemPool_t suitable for sharing within an IMEX domain. +An IMEX domain is either an OS instance or a group of securely +connected OS instances using the NVIDIA IMEX daemon. An IMEX channel is +a global resource within the IMEX domain that represents a logical +entity that aims to provide fine grained accessibility control for the +participating processes. When exporter and importer CUDA processes have +been granted access to the same IMEX channel, they can securely share +memory. If the allocating process does not have access setup for an +IMEX channel, attempting to export a CUmemoryPool with +cudaMemHandleTypeFabric will result in +cudaErrorNotPermitted. The nvidia-modprobe CLI provides +more information regarding setting up of IMEX channels.

    +
    +
    Parameters:
    +

    poolProps (cudaMemPoolProps) – None

    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Specifying cudaMemHandleTypeNone creates a memory pool that will not support IPC.

    +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolDestroy(memPool)
    +

    Destroys the specified memory pool.

    +

    If any pointers obtained from this pool haven’t been freed or the pool +has free operations that haven’t completed when +cudaMemPoolDestroy is invoked, the function will return +immediately and the resources associated with the pool will be released +automatically once there are no more outstanding allocations.

    +

    Destroying the current mempool of a device sets the default mempool of +that device as the current mempool for that device.

    +
    +
    Parameters:
    +

    memPool (CUmemoryPool or cudaMemPool_t) – None

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    A device’s default memory pool cannot be destroyed.

    +
    + +
    +
    +cuda.bindings.runtime.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 +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.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    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.

    +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolExportToShareableHandle(memPool, handleType: cudaMemAllocationHandleType, unsigned int flags)
    +

    Exports a memory pool to the requested handle type.

    +

    Given an IPC capable mempool, create an OS handle to share the pool +with another process. A recipient process can convert the shareable +handle into a mempool with +cudaMemPoolImportFromShareableHandle. Individual pointers +can then be shared with the cudaMemPoolExportPointer and +cudaMemPoolImportPointer APIs. The implementation of what +the shareable handle is and how it can be transferred is defined by the +requested handle type.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess, cudaErrorInvalidValue, cudaErrorOutOfMemory

    • +
    • handle_out (Any) – pointer to the location in which to store the requested handle

    • +
    +

    +
    +
    + +

    Notes

    +

    : To create an IPC capable mempool, create a mempool with a CUmemAllocationHandleType other than cudaMemHandleTypeNone.

    +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolImportFromShareableHandle(shareableHandle, handleType: cudaMemAllocationHandleType, unsigned int flags)
    +

    imports a memory pool from a shared handle.

    +

    Specific allocations can be imported from the imported pool with +cudaMemPoolImportPointer.

    +
    +
    Parameters:
    +
      +
    • handle (Any) – OS handle of the pool to open

    • +
    • handleType (cudaMemAllocationHandleType) – The type of handle being imported

    • +
    • flags (unsigned int) – must be 0

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Imported memory pools do not support creating new allocations. As such imported memory pools may not be used in cudaDeviceSetMemPool or cudaMallocFromPoolAsync calls.

    +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolExportPointer(ptr)
    +

    Export data to share a memory pool allocation between processes.

    +

    Constructs shareData_out for sharing a specific allocation from an +already shared memory pool. The recipient process can import the +allocation with the cudaMemPoolImportPointer api. The data +is not a handle and may be shared through any IPC mechanism.

    +
    +
    Parameters:
    +

    ptr (Any) – pointer to memory being exported

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaMemPoolImportPointer(memPool, cudaMemPoolPtrExportData exportData: Optional[cudaMemPoolPtrExportData])
    +

    Import a memory pool allocation from another process.

    +

    Returns in ptr_out a pointer to the imported memory. The imported +memory must not be accessed before the allocation operation completes +in the exporting process. The imported memory must be freed from all +importing processes before being freed in the exporting process. The +pointer may be freed with cudaFree or cudaFreeAsync. If +cudaFreeAsync is used, the free must be completed on the +importing process before the free operation on the exporting process.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    The cudaFreeAsync api may be used in the exporting process before the cudaFreeAsync operation completes in its stream as long as the cudaFreeAsync in the exporting process specifies a stream with a stream dependency on the importing process’s cudaFreeAsync.

    +
    + +
    +
    +

    Unified Addressing

    +

    This section describes the unified addressing functions of the CUDA runtime application programming interface.

    +

    Overview

    +

    CUDA devices can share a unified address space with the host.

    +
    +

    For these devices there is no distinction between a device pointer and a host pointer – the same pointer value may be used to access memory from the host program and from a kernel running on the device (with exceptions enumerated below).

    +
    +

    Supported Platforms

    +

    Whether or not a device supports unified addressing may be queried by calling cudaGetDeviceProperties() with the device property cudaDeviceProp::unifiedAddressing.

    +

    Unified addressing is automatically enabled in 64-bit processes .

    +

    Looking Up Information from Pointer Values

    +

    It is possible to look up information about the memory which backs a pointer value. For instance, one may want to know if a pointer points to host or device memory. As another example, in the case of device memory, one may want to know on which CUDA device the memory resides. These properties may be queried using the function cudaPointerGetAttributes()

    +

    Since pointers are unique, it is not necessary to specify information about the pointers specified to cudaMemcpy() and other copy functions.

    +
    +

    The copy direction cudaMemcpyDefault may be used to specify that the CUDA runtime should infer the location of the pointer from its value.

    +
    +

    Automatic Mapping of Host Allocated Host Memory

    +

    All host memory allocated through all devices using cudaMallocHost() and cudaHostAlloc() is always directly accessible from all devices that support unified addressing. This is the case regardless of whether or not the flags cudaHostAllocPortable and cudaHostAllocMapped are specified.

    +

    The pointer value through which allocated host memory may be accessed in kernels on all devices that support unified addressing is the same as the pointer value through which that memory is accessed on the host. It is not necessary to call cudaHostGetDevicePointer() to get the device pointer for these allocations.

    +

    Note that this is not the case for memory allocated using the flag cudaHostAllocWriteCombined, as discussed below.

    +

    Direct Access of Peer Memory

    +

    Upon enabling direct access from a device that supports unified addressing to another peer device that supports unified addressing using cudaDeviceEnablePeerAccess() all memory allocated in the peer device using cudaMalloc() and cudaMallocPitch() will immediately be accessible by the current device. The device pointer value through which any peer’s memory may be accessed in the current device is the same pointer value through which that memory may be accessed from the peer device.

    +

    Exceptions, Disjoint Addressing

    +

    Not all memory may be accessed on devices through the same pointer value through which they are accessed on the host. These exceptions are host memory registered using cudaHostRegister() and host memory allocated using the flag cudaHostAllocWriteCombined. For these exceptions, there exists a distinct host and device address for the memory. The device address is guaranteed to not overlap any valid host pointer range and is guaranteed to have the same value across all devices that support unified addressing.

    +

    This device address may be queried using cudaHostGetDevicePointer() when a device using unified addressing is current. Either the host or the unified device pointer value may be used to refer to this memory in cudaMemcpy() and similar functions using the cudaMemcpyDefault memory direction.

    +
    +
    +cuda.bindings.runtime.cudaPointerGetAttributes(ptr)
    +

    Returns attributes about a specified pointer.

    +

    Returns in *attributes the attributes of the pointer ptr. If +pointer was not allocated in, mapped by or registered with context +supporting unified addressing cudaErrorInvalidValue is +returned.

    +

    The cudaPointerAttributes structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    In this structure, the individual fields mean

    +
      +
    • type identifies type of memory. It +can be cudaMemoryTypeUnregistered for unregistered host +memory, cudaMemoryTypeHost for registered host memory, +cudaMemoryTypeDevice for device memory or +cudaMemoryTypeManaged for managed memory.

    • +
    • device is the device against which ptr was allocated. +If ptr has memory type cudaMemoryTypeDevice then this +identifies the device on which the memory referred to by ptr +physically resides. If ptr has memory type +cudaMemoryTypeHost then this identifies the device which +was current when the allocation was made (and if that device is +deinitialized then this allocation will vanish with that device’s +state).

    • +
    • devicePointer is the device pointer alias through which +the memory referred to by ptr may be accessed on the current +device. If the memory referred to by ptr cannot be accessed +directly by the current device then this is NULL.

    • +
    • hostPointer is the host pointer alias through which the +memory referred to by ptr may be accessed on the host. If the +memory referred to by ptr cannot be accessed directly by the host +then this is NULL.

    • +
    +
    +
    Parameters:
    +

    ptr (Any) – Pointer to get attributes for

    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    In CUDA 11.0 forward passing host pointer will return cudaMemoryTypeUnregistered in type and call will return cudaSuccess.

    +
    + +
    +
    +

    Peer Device Memory Access

    +

    This section describes the peer device memory access functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaDeviceCanAccessPeer(int device, int peerDevice)
    +

    Queries if a device may directly access a peer device’s memory.

    +

    Returns in *canAccessPeer a value of 1 if device device is capable +of directly accessing memory from peerDevice and 0 otherwise. If +direct access of peerDevice from device is possible, then access +may be enabled by calling cudaDeviceEnablePeerAccess().

    +
    +
    Parameters:
    +
      +
    • device (int) – Device from which allocations on peerDevice are to be directly +accessed.

    • +
    • peerDevice (int) – Device on which the allocations to be directly accessed by device +reside.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceEnablePeerAccess(int peerDevice, unsigned int flags)
    +

    Enables direct access to memory allocations on a peer device.

    +

    On success, all allocations from peerDevice will immediately be +accessible by the current device. They will remain accessible until +access is explicitly disabled using +cudaDeviceDisablePeerAccess() or either device is reset +using cudaDeviceReset().

    +

    Note that access granted by this call is unidirectional and that in +order to access memory on the current device from peerDevice, a +separate symmetric call to cudaDeviceEnablePeerAccess() is +required.

    +

    Note that there are both device-wide and system-wide limitations per +system configuration, as noted in the CUDA Programming Guide under the +section “Peer-to-Peer Memory Access”.

    +

    Returns cudaErrorInvalidDevice if +cudaDeviceCanAccessPeer() indicates that the current device +cannot directly access memory from peerDevice.

    +

    Returns cudaErrorPeerAccessAlreadyEnabled if direct access +of peerDevice from the current device has already been enabled.

    +

    Returns cudaErrorInvalidValue if flags is not 0.

    +
    +
    Parameters:
    +
      +
    • peerDevice (int) – Peer device to enable direct access to from the current device

    • +
    • flags (unsigned int) – Reserved for future use and must be set to 0

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidDevice, cudaErrorPeerAccessAlreadyEnabled, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceDisablePeerAccess(int peerDevice)
    +

    Disables direct access to memory allocations on a peer device.

    +

    Returns cudaErrorPeerAccessNotEnabled if direct access to +memory on peerDevice has not yet been enabled from the current +device.

    +
    +
    Parameters:
    +

    peerDevice (int) – Peer device to disable direct access to

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorPeerAccessNotEnabled, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +

    OpenGL Interoperability

    +

    impl_private

    +

    This section describes the OpenGL interoperability functions of the CUDA runtime application programming interface. Note that mapping of OpenGL resources is performed with the graphics API agnostic, resource mapping interface described in Graphics Interopability.

    +
    +
    +class cuda.bindings.runtime.cudaGLDeviceList(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA devices corresponding to the current OpenGL context

    +
    +
    +cudaGLDeviceListAll = 1
    +

    The CUDA devices for all GPUs used by the current OpenGL context

    +
    + +
    +
    +cudaGLDeviceListCurrentFrame = 2
    +

    The CUDA devices for the GPUs used by the current OpenGL context in its currently rendering frame

    +
    + +
    +
    +cudaGLDeviceListNextFrame = 3
    +

    The CUDA devices for the GPUs to be used by the current OpenGL context in the next frame

    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGLGetDevices(unsigned int cudaDeviceCount, deviceList: cudaGLDeviceList)
    +

    Gets the CUDA devices associated with the current OpenGL context.

    +

    Returns in *pCudaDeviceCount the number of CUDA-compatible devices +corresponding to the current OpenGL context. Also returns in +*pCudaDevices at most cudaDeviceCount of the CUDA-compatible +devices corresponding to the current OpenGL context. If any of the GPUs +being used by the current OpenGL context are not CUDA capable then the +call will return cudaErrorNoDevice.

    +
    +
    Parameters:
    +
      +
    • cudaDeviceCount (unsigned int) – The size of the output device array pCudaDevices

    • +
    • deviceList (cudaGLDeviceList) – The set of devices to return. This set may be cudaGLDeviceListAll +for all devices, cudaGLDeviceListCurrentFrame for the devices used +to render the current frame (in SLI), or cudaGLDeviceListNextFrame +for the devices used to render the next frame (in SLI).

    • +
    +
    +
    Returns:
    +

      +
    • cudaError_t – cudaSuccess +cudaErrorNoDevice +cudaErrorInvalidGraphicsContext +cudaErrorUnknown

    • +
    • pCudaDeviceCount (unsigned int) – Returned number of CUDA devices corresponding to the current OpenGL +context

    • +
    • pCudaDevices (List[int]) – Returned CUDA devices corresponding to the current OpenGL context

    • +
    +

    +
    +
    + +

    Notes

    +

    This function is not supported on Mac OS X.

    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsGLRegisterImage(image, target, unsigned int flags)
    +

    Register an OpenGL texture or renderbuffer object.

    +

    Registers the texture or renderbuffer object specified by image for +access by CUDA. A handle to the registered object is returned as +resource.

    +

    target must match the type of the object, and must be one of +GL_TEXTURE_2D, GL_TEXTURE_RECTANGLE, +GL_TEXTURE_CUBE_MAP, GL_TEXTURE_3D, +GL_TEXTURE_2D_ARRAY, or GL_RENDERBUFFER.

    +

    The register flags flags specify the intended usage, as follows:

    + +

    The following image formats are supported. For brevity’s sake, the list +is abbreviated. For ex., {GL_R, GL_RG} X {8, 16} would expand to the +following 4 formats {GL_R8, GL_R16, GL_RG8, GL_RG16} :

    +
      +
    • GL_RED, GL_RG, GL_RGBA, GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, +GL_INTENSITY

    • +
    • {GL_R, GL_RG, GL_RGBA} X {8, 16, 16F, 32F, 8UI, 16UI, 32UI, 8I, 16I, +32I}

    • +
    • {GL_LUMINANCE, GL_ALPHA, GL_LUMINANCE_ALPHA, GL_INTENSITY} X {8, 16, +16F_ARB, 32F_ARB, 8UI_EXT, 16UI_EXT, 32UI_EXT, 8I_EXT, 16I_EXT, +32I_EXT}

    • +
    +

    The following image classes are currently disallowed:

    +
      +
    • Textures with borders

    • +
    • Multisampled renderbuffers

    • +
    +
    +
    Parameters:
    +
      +
    • image (GLuint) – name of texture or renderbuffer object to be registered

    • +
    • target (GLenum) – Identifies the type of object specified by image

    • +
    • flags (unsigned int) – Register flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsGLRegisterBuffer(buffer, unsigned int flags)
    +

    Registers an OpenGL buffer object.

    +

    Registers the buffer object specified by buffer for access by CUDA. A +handle to the registered object is returned as resource. The register +flags flags specify the intended usage, as follows:

    +
      +
    • cudaGraphicsRegisterFlagsNone: Specifies no hints about +how this resource will be used. It is therefore assumed that this +resource will be read from and written to by CUDA. This is the +default value.

    • +
    • cudaGraphicsRegisterFlagsReadOnly: Specifies that CUDA +will not write to this resource.

    • +
    • cudaGraphicsRegisterFlagsWriteDiscard: Specifies that +CUDA will not read from this resource and will write over the entire +contents of the resource, so none of the data previously stored in +the resource will be preserved.

    • +
    +
    +
    Parameters:
    +
      +
    • buffer (GLuint) – name of buffer object to be registered

    • +
    • flags (unsigned int) – Register flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Direct3D 9 Interoperability

    +
    +
    +

    Direct3D 10 Interoperability

    +
    +
    +

    Direct3D 11 Interoperability

    +
    +
    +

    VDPAU Interoperability

    +

    This section describes the VDPAU interoperability functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaVDPAUGetDevice(vdpDevice, vdpGetProcAddress)
    +

    Gets the CUDA device associated with a VdpDevice.

    +

    Returns the CUDA device associated with a VdpDevice, if applicable.

    +
    +
    Parameters:
    +
      +
    • vdpDevice (VdpDevice) – A VdpDevice handle

    • +
    • vdpGetProcAddress (VdpGetProcAddress) – VDPAU’s VdpGetProcAddress function pointer

    • +
    +
    +
    Returns:
    +

      +
    • cudaError_tcudaSuccess

    • +
    • device (int) – Returns the device associated with vdpDevice, or -1 if the device +associated with vdpDevice is not a compute device.

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaVDPAUSetVDPAUDevice(int device, vdpDevice, vdpGetProcAddress)
    +

    Sets a CUDA device to use VDPAU interoperability.

    +

    Records vdpDevice as the VdpDevice for VDPAU interoperability with +the CUDA device device and sets device as the current device for +the calling host thread.

    +

    This function will immediately initialize the primary context on +device if needed.

    +

    If device has already been initialized then this call will fail with +the error cudaErrorSetOnActiveProcess. In this case it is +necessary to reset device using cudaDeviceReset() before +VDPAU interoperability on device may be enabled.

    +
    +
    Parameters:
    +
      +
    • device (int) – Device to use for VDPAU interoperability

    • +
    • vdpDevice (VdpDevice) – The VdpDevice to interoperate with

    • +
    • vdpGetProcAddress (VdpGetProcAddress) – VDPAU’s VdpGetProcAddress function pointer

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidDevice, cudaErrorSetOnActiveProcess

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsVDPAURegisterVideoSurface(vdpSurface, unsigned int flags)
    +

    Register a VdpVideoSurface object.

    +

    Registers the VdpVideoSurface specified by vdpSurface for access by +CUDA. A handle to the registered object is returned as resource. The +surface’s intended usage is specified using flags, as follows:

    +
      +
    • cudaGraphicsMapFlagsNone: Specifies no hints about how +this resource will be used. It is therefore assumed that this +resource will be read from and written to by CUDA. This is the +default value.

    • +
    • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will +not write to this resource.

    • +
    • cudaGraphicsMapFlagsWriteDiscard: Specifies that CUDA +will not read from this resource and will write over the entire +contents of the resource, so none of the data previously stored in +the resource will be preserved.

    • +
    +
    +
    Parameters:
    +
      +
    • vdpSurface (VdpVideoSurface) – VDPAU object to be registered

    • +
    • flags (unsigned int) – Map flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsVDPAURegisterOutputSurface(vdpSurface, unsigned int flags)
    +

    Register a VdpOutputSurface object.

    +

    Registers the VdpOutputSurface specified by vdpSurface for access by +CUDA. A handle to the registered object is returned as resource. The +surface’s intended usage is specified using flags, as follows:

    +
      +
    • cudaGraphicsMapFlagsNone: Specifies no hints about how +this resource will be used. It is therefore assumed that this +resource will be read from and written to by CUDA. This is the +default value.

    • +
    • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will +not write to this resource.

    • +
    • cudaGraphicsMapFlagsWriteDiscard: Specifies that CUDA +will not read from this resource and will write over the entire +contents of the resource, so none of the data previously stored in +the resource will be preserved.

    • +
    +
    +
    Parameters:
    +
      +
    • vdpSurface (VdpOutputSurface) – VDPAU object to be registered

    • +
    • flags (unsigned int) – Map flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    EGL Interoperability

    +

    This section describes the EGL interoperability functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaGraphicsEGLRegisterImage(image, unsigned int flags)
    +

    Registers an EGL image.

    +

    Registers the EGLImageKHR specified by image for access by CUDA. A +handle to the registered object is returned as pCudaResource. +Additional Mapping/Unmapping is not required for the registered +resource and cudaGraphicsResourceGetMappedEglFrame can be +directly called on the pCudaResource.

    +

    The application will be responsible for synchronizing access to shared +objects. The application must ensure that any pending operation which +access the objects have completed before passing control to CUDA. This +may be accomplished by issuing and waiting for glFinish command on all +GLcontexts (for OpenGL and likewise for other APIs). The application +will be also responsible for ensuring that any pending operation on the +registered CUDA resource has completed prior to executing subsequent +commands in other APIs accesing the same memory objects. This can be +accomplished by calling cuCtxSynchronize or cuEventSynchronize +(preferably).

    +

    The surface’s intended usage is specified using flags, as follows:

    +
      +
    • cudaGraphicsRegisterFlagsNone: Specifies no hints about +how this resource will be used. It is therefore assumed that this +resource will be read from and written to by CUDA. This is the +default value.

    • +
    • cudaGraphicsRegisterFlagsReadOnly: Specifies that CUDA +will not write to this resource.

    • +
    • cudaGraphicsRegisterFlagsWriteDiscard: Specifies that +CUDA will not read from this resource and will write over the entire +contents of the resource, so none of the data previously stored in +the resource will be preserved.

    • +
    +

    The EGLImageKHR is an object which can be used to create EGLImage +target resource. It is defined as a void pointer. typedef void* +EGLImageKHR

    +
    +
    Parameters:
    +
      +
    • image (EGLImageKHR) – An EGLImageKHR image which can be used to create target resource.

    • +
    • flags (unsigned int) – Map flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamConsumerConnect(eglStream)
    +

    Connect CUDA to EGLStream as a consumer.

    +

    Connect CUDA as a consumer to EGLStreamKHR specified by eglStream.

    +

    The EGLStreamKHR is an EGL object that transfers a sequence of image +frames from one API to another.

    +
    +
    Parameters:
    +

    eglStream (EGLStreamKHR) – EGLStreamKHR handle

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamConsumerConnectWithFlags(eglStream, unsigned int flags)
    +

    Connect CUDA to EGLStream as a consumer with given flags.

    +

    Connect CUDA as a consumer to EGLStreamKHR specified by stream with +specified flags defined by cudaEglResourceLocationFlags.

    +

    The flags specify whether the consumer wants to access frames from +system memory or video memory. Default is +cudaEglResourceLocationVidmem.

    +
    +
    Parameters:
    +
      +
    • eglStream (EGLStreamKHR) – EGLStreamKHR handle

    • +
    • flags (unsigned int) – Flags denote intended location - system or video.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamConsumerDisconnect(conn)
    +

    Disconnect CUDA as a consumer to EGLStream .

    +

    Disconnect CUDA as a consumer to EGLStreamKHR.

    +
    +
    Parameters:
    +

    conn (cudaEglStreamConnection) – Conection to disconnect.

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamConsumerAcquireFrame(conn, pCudaResource, pStream, unsigned int timeout)
    +

    Acquire an image frame from the EGLStream with CUDA as a consumer.

    +

    Acquire an image frame from EGLStreamKHR. +cudaGraphicsResourceGetMappedEglFrame can be called on +pCudaResource to get cudaEglFrame.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorUnknown, cudaErrorLaunchTimeout

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamConsumerReleaseFrame(conn, pCudaResource, pStream)
    +

    Releases the last frame acquired from the EGLStream.

    +

    Release the acquired image frame specified by pCudaResource to +EGLStreamKHR.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamProducerConnect(eglStream, width, height)
    +

    Connect CUDA to EGLStream as a producer.

    +

    Connect CUDA as a producer to EGLStreamKHR specified by stream.

    +

    The EGLStreamKHR is an EGL object that transfers a sequence of image +frames from one API to another.

    +
    +
    Parameters:
    +
      +
    • eglStream (EGLStreamKHR) – EGLStreamKHR handle

    • +
    • width (EGLint) – width of the image to be submitted to the stream

    • +
    • height (EGLint) – height of the image to be submitted to the stream

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamProducerDisconnect(conn)
    +

    Disconnect CUDA as a producer to EGLStream .

    +

    Disconnect CUDA as a producer to EGLStreamKHR.

    +
    +
    Parameters:
    +

    conn (cudaEglStreamConnection) – Conection to disconnect.

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamProducerPresentFrame(conn, cudaEglFrame eglframe: cudaEglFrame, pStream)
    +

    Present a CUDA eglFrame to the EGLStream with CUDA as a producer.

    +

    The cudaEglFrame is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    For cudaEglFrame of type cudaEglFrameTypePitch, +the application may present sub-region of a memory allocation. In that +case, ptr will specify the start address of +the sub-region in the allocation and cudaEglPlaneDesc will +specify the dimensions of the sub-region.

    +
    +
    Parameters:
    +
      +
    • conn (cudaEglStreamConnection) – Connection on which to present the CUDA array

    • +
    • eglframe (cudaEglFrame) – CUDA Eglstream Proucer Frame handle to be sent to the consumer over +EglStream.

    • +
    • pStream (cudaStream_t) – CUDA stream on which to present the frame.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaEGLStreamProducerReturnFrame(conn, cudaEglFrame eglframe: Optional[cudaEglFrame], pStream)
    +

    Return the CUDA eglFrame to the EGLStream last released by the consumer.

    +

    This API can potentially return cudaErrorLaunchTimeout if the consumer +has not returned a frame to EGL stream. If timeout is returned the +application can retry.

    +
    +
    Parameters:
    +
      +
    • conn (cudaEglStreamConnection) – Connection on which to present the CUDA array

    • +
    • eglframe (cudaEglFrame) – CUDA Eglstream Proucer Frame handle returned from the consumer over +EglStream.

    • +
    • pStream (cudaStream_t) – CUDA stream on which to return the frame.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorLaunchTimeout, cudaErrorInvalidValue, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsResourceGetMappedEglFrame(resource, unsigned int index, unsigned int mipLevel)
    +

    Get an eglFrame through which to access a registered EGL graphics resource.

    +

    Returns in *eglFrame an eglFrame pointer through which the registered +graphics resource resource may be accessed. This API can only be +called for EGL graphics resources.

    +

    The cudaEglFrame is defined as

    +

    View CUDA Toolkit Documentation for a C++ code example

    +
    +
    Parameters:
    +
      +
    • resource (cudaGraphicsResource_t) – Registered resource to access.

    • +
    • index (unsigned int) – Index for cubemap surfaces.

    • +
    • mipLevel (unsigned int) – Mipmap level for the subresource to access.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Note that in case of multiplanar *eglFrame, pitch of only first plane (unsigned int pitch) is to be considered by the application.

    +
    + +
    +
    +cuda.bindings.runtime.cudaEventCreateFromEGLSync(eglSync, unsigned int flags)
    +

    Creates an event from EGLSync object.

    +

    Creates an event *phEvent from an EGLSyncKHR eglSync with the flages +specified via flags. Valid flags include:

    + +

    cudaEventRecord and TimingData are not supported for events +created from EGLSync.

    +

    The EGLSyncKHR is an opaque handle to an EGL sync object. typedef void* +EGLSyncKHR

    +
    +
    Parameters:
    +
      +
    • eglSync (EGLSyncKHR) – Opaque handle to EGLSync object

    • +
    • flags (unsigned int) – Event creation flags

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Graphics Interoperability

    +

    This section describes the graphics interoperability functions of the CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaGraphicsUnregisterResource(resource)
    +

    Unregisters a graphics resource for access by CUDA.

    +

    Unregisters the graphics resource resource so it is not accessible by +CUDA unless registered again.

    +

    If resource is invalid then +cudaErrorInvalidResourceHandle is returned.

    +
    +
    Parameters:
    +

    resource (cudaGraphicsResource_t) – Resource to unregister

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaGraphicsD3D9RegisterResource, cudaGraphicsD3D10RegisterResource, cudaGraphicsD3D11RegisterResource, cudaGraphicsGLRegisterBuffer, cudaGraphicsGLRegisterImage, cuGraphicsUnregisterResource

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsResourceSetMapFlags(resource, unsigned int flags)
    +

    Set usage flags for mapping a graphics resource.

    +

    Set flags for mapping the graphics resource resource.

    +

    Changes to flags will take effect the next time resource is mapped. +The flags argument may be any of the following:

    +
      +
    • cudaGraphicsMapFlagsNone: Specifies no hints about how +resource will be used. It is therefore assumed that CUDA may read +from or write to resource.

    • +
    • cudaGraphicsMapFlagsReadOnly: Specifies that CUDA will +not write to resource.

    • +
    • cudaGraphicsMapFlagsWriteDiscard: Specifies CUDA will not +read from resource and will write over the entire contents of +resource, so none of the data previously stored in resource will +be preserved.

    • +
    +

    If resource is presently mapped for access by CUDA then +cudaErrorUnknown is returned. If flags is not one of the +above values then cudaErrorInvalidValue is returned.

    +
    +
    Parameters:
    +
      +
    • resource (cudaGraphicsResource_t) – Registered resource to set flags for

    • +
    • flags (unsigned int) – Parameters for resource mapping

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorUnknown,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsMapResources(int count, resources, stream)
    +

    Map graphics resources for access by CUDA.

    +

    Maps the count graphics resources in resources for access by CUDA.

    +

    The resources in resources may be accessed by CUDA until they are +unmapped. The graphics API from which resources were registered +should not access any resources while they are mapped by CUDA. If an +application does so, the results are undefined.

    +

    This function provides the synchronization guarantee that any graphics +calls issued before cudaGraphicsMapResources() will +complete before any subsequent CUDA work issued in stream begins.

    +

    If resources contains any duplicate entries then +cudaErrorInvalidResourceHandle is returned. If any of +resources are presently mapped for access by CUDA then +cudaErrorUnknown is returned.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsUnmapResources(int count, resources, stream)
    +

    Unmap graphics resources.

    +

    Unmaps the count graphics resources in resources.

    +

    Once unmapped, the resources in resources may not be accessed by CUDA +until they are mapped again.

    +

    This function provides the synchronization guarantee that any CUDA work +issued in stream before cudaGraphicsUnmapResources() will +complete before any subsequently issued graphics work begins.

    +

    If resources contains any duplicate entries then +cudaErrorInvalidResourceHandle is returned. If any of +resources are not presently mapped for access by CUDA then +cudaErrorUnknown is returned.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidResourceHandle, cudaErrorUnknown

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsResourceGetMappedPointer(resource)
    +

    Get an device pointer through which to access a mapped graphics resource.

    +

    Returns in *devPtr a pointer through which the mapped graphics +resource resource may be accessed. Returns in *size the size of the +memory in bytes which may be accessed from that pointer. The value set +in devPtr may change every time that resource is mapped.

    +

    If resource is not a buffer then it cannot be accessed via a pointer +and cudaErrorUnknown is returned. If resource is not +mapped then cudaErrorUnknown is returned.

    +
    +
    Parameters:
    +

    resource (cudaGraphicsResource_t) – None

    +
    +
    Returns:
    +

      +
    • cudaError_t

    • +
    • devPtr (Any) – None

    • +
    • size (int) – None

    • +
    +

    +
    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsSubResourceGetMappedArray(resource, unsigned int arrayIndex, unsigned int mipLevel)
    +

    Get an array through which to access a subresource of a mapped graphics resource.

    +

    Returns in *array an array through which the subresource of the +mapped graphics resource resource which corresponds to array index +arrayIndex and mipmap level mipLevel may be accessed. The value set +in array may change every time that resource is mapped.

    +

    If resource is not a texture then it cannot be accessed via an array +and cudaErrorUnknown is returned. If arrayIndex is not a +valid array index for resource then cudaErrorInvalidValue +is returned. If mipLevel is not a valid mipmap level for resource +then cudaErrorInvalidValue is returned. If resource is +not mapped then cudaErrorUnknown is returned.

    +
    +
    Parameters:
    +
      +
    • resource (cudaGraphicsResource_t) – Mapped resource to access

    • +
    • arrayIndex (unsigned int) – Array index for array textures or cubemap face index as defined by +cudaGraphicsCubeFace for cubemap textures for the +subresource to access

    • +
    • mipLevel (unsigned int) – Mipmap level for the subresource to access

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphicsResourceGetMappedMipmappedArray(resource)
    +

    Get a mipmapped array through which to access a mapped graphics resource.

    +

    Returns in *mipmappedArray a mipmapped array through which the mapped +graphics resource resource may be accessed. The value set in +mipmappedArray may change every time that resource is mapped.

    +

    If resource is not a texture then it cannot be accessed via an array +and cudaErrorUnknown is returned. If resource is not +mapped then cudaErrorUnknown is returned.

    +
    +
    Parameters:
    +

    resource (cudaGraphicsResource_t) – Mapped resource to access

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Texture Object Management

    +

    This section describes the low level texture object management functions of the CUDA runtime application programming interface. The texture object API is only supported on devices of compute capability 3.0 or higher.

    +
    +
    +cuda.bindings.runtime.cudaGetChannelDesc(array)
    +

    Get the channel descriptor of an array.

    +

    Returns in *desc the channel descriptor of the CUDA array array.

    +
    +
    Parameters:
    +

    array (cudaArray_const_t) – Memory array on device

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaCreateChannelDesc (C API), cudaCreateTextureObject, cudaCreateSurfaceObject

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaCreateChannelDesc(int x, int y, int z, int w, f: cudaChannelFormatKind)
    +

    Returns a channel descriptor using the specified format.

    +

    Returns a channel descriptor with format f and number of bits of each +component x, y, z, and w. The cudaChannelFormatDesc +is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where cudaChannelFormatKind is one of +cudaChannelFormatKindSigned, +cudaChannelFormatKindUnsigned, or +cudaChannelFormatKindFloat.

    +
    +
    Parameters:
    +
      +
    • x (int) – X component

    • +
    • y (int) – Y component

    • +
    • z (int) – Z component

    • +
    • w (int) – W component

    • +
    • f (cudaChannelFormatKind) – Channel format

    • +
    +
    +
    Returns:
    +

      +
    • cudaError_t.cudaSuccess – cudaError_t.cudaSuccess

    • +
    • cudaChannelFormatDesc – Channel descriptor with format f

    • +
    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaCreateTextureObject(cudaResourceDesc pResDesc: Optional[cudaResourceDesc], cudaTextureDesc pTexDesc: Optional[cudaTextureDesc], cudaResourceViewDesc pResViewDesc: Optional[cudaResourceViewDesc])
    +

    Creates a texture object.

    +

    Creates a texture object and returns it in pTexObject. pResDesc +describes the data to texture from. pTexDesc describes how the data +should be sampled. pResViewDesc is an optional argument that +specifies an alternate format for the data described by pResDesc, and +also describes the subresource region to restrict access to when +texturing. pResViewDesc can only be specified if the type of resource +is a CUDA array or a CUDA mipmapped array not in a block compressed +format.

    +

    Texture objects are only supported on devices of compute capability 3.0 +or higher. Additionally, a texture object is an opaque value, and, as +such, should only be accessed through CUDA API calls.

    +

    The cudaResourceDesc structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • resType specifies the type of resource +to texture from. CUresourceType is defined as:

    • +
    • View CUDA Toolkit Documentation for a C++ code example

    • +
    +

    If resType is set to +cudaResourceTypeArray, +cudaResourceDesc::res::array::array must be set to a valid +CUDA array handle.

    +

    If resType is set to +cudaResourceTypeMipmappedArray, +cudaResourceDesc::res::mipmap::mipmap must be set to a +valid CUDA mipmapped array handle and +normalizedCoords must be set to true.

    +

    If resType is set to +cudaResourceTypeLinear, +cudaResourceDesc::res::linear::devPtr must be set to a +valid device pointer, that is aligned to +textureAlignment. +cudaResourceDesc::res::linear::desc describes the format +and the number of components per array element. +cudaResourceDesc::res::linear::sizeInBytes specifies the +size of the array in bytes. The total number of elements in the linear +address range cannot exceed +maxTexture1DLinear. The number of elements +is computed as (sizeInBytes / sizeof(desc)).

    +

    If resType is set to +cudaResourceTypePitch2D, +cudaResourceDesc::res::pitch2D::devPtr must be set to a +valid device pointer, that is aligned to +textureAlignment. +cudaResourceDesc::res::pitch2D::desc describes the format +and the number of components per array element. +cudaResourceDesc::res::pitch2D::width and +cudaResourceDesc::res::pitch2D::height specify the width +and height of the array in elements, and cannot exceed +cudaResourceDesc::res::pitch2D::pitchInBytes specifies the +pitch between two rows in bytes and has to be aligned to +texturePitchAlignment. Pitch cannot exceed +:py:obj:`~.cudaDeviceProp.maxTexture2DLinear`[2].

    +

    The cudaTextureDesc struct is defined as

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where

    + +

    The cudaResourceViewDesc struct is defined as

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    where:

    +
      +
    • format specifies how the data +contained in the CUDA array or CUDA mipmapped array should be +interpreted. Note that this can incur a change in size of the texture +data. If the resource view format is a block compressed format, then +the underlying CUDA array or CUDA mipmapped array has to have a +32-bit unsigned integer format with 2 or 4 channels, depending on the +block compressed format. For ex., BC1 and BC4 require the underlying +CUDA array to have a 32-bit unsigned int with 2 channels. The other +BC formats require the underlying resource to have the same 32-bit +unsigned int format but with 4 channels.

    • +
    • width specifies the new width of the +texture data. If the resource view format is a block compressed +format, this value has to be 4 times the original width of the +resource. For non block compressed formats, this value has to be +equal to that of the original resource.

    • +
    • height specifies the new height of +the texture data. If the resource view format is a block compressed +format, this value has to be 4 times the original height of the +resource. For non block compressed formats, this value has to be +equal to that of the original resource.

    • +
    • depth specifies the new depth of the +texture data. This value has to be equal to that of the original +resource.

    • +
    • firstMipmapLevel specifies the most +detailed mipmap level. This will be the new mipmap level zero. For +non-mipmapped resources, this value has to be +zero.:py:obj:~.cudaTextureDesc.minMipmapLevelClamp and +maxMipmapLevelClamp will be relative to +this value. For ex., if the firstMipmapLevel is set to 2, and a +minMipmapLevelClamp of 1.2 is specified, then the actual minimum +mipmap level clamp will be 3.2.

    • +
    • lastMipmapLevel specifies the least +detailed mipmap level. For non-mipmapped resources, this value has to +be zero.

    • +
    • firstLayer specifies the first layer +index for layered textures. This will be the new layer zero. For non- +layered resources, this value has to be zero.

    • +
    • lastLayer specifies the last layer +index for layered textures. For non-layered resources, this value has +to be zero.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDestroyTextureObject(texObject)
    +

    Destroys a texture object.

    +

    Destroys the texture object specified by texObject.

    +
    +
    Parameters:
    +

    texObject (cudaTextureObject_t) – Texture object to destroy

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetTextureObjectResourceDesc(texObject)
    +

    Returns a texture object’s resource descriptor.

    +

    Returns the resource descriptor for the texture object specified by +texObject.

    +
    +
    Parameters:
    +

    texObject (cudaTextureObject_t) – Texture object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetTextureObjectTextureDesc(texObject)
    +

    Returns a texture object’s texture descriptor.

    +

    Returns the texture descriptor for the texture object specified by +texObject.

    +
    +
    Parameters:
    +

    texObject (cudaTextureObject_t) – Texture object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetTextureObjectResourceViewDesc(texObject)
    +

    Returns a texture object’s resource view descriptor.

    +

    Returns the resource view descriptor for the texture object specified +by texObject. If no resource view was specified, +cudaErrorInvalidValue is returned.

    +
    +
    Parameters:
    +

    texObject (cudaTextureObject_t) – Texture object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Surface Object Management

    +

    This section describes the low level texture object management functions of the CUDA runtime application programming interface. The surface object API is only supported on devices of compute capability 3.0 or higher.

    +
    +
    +cuda.bindings.runtime.cudaCreateSurfaceObject(cudaResourceDesc pResDesc: Optional[cudaResourceDesc])
    +

    Creates a surface object.

    +

    Creates a surface object and returns it in pSurfObject. pResDesc +describes the data to perform surface load/stores on. +resType must be +cudaResourceTypeArray and +cudaResourceDesc::res::array::array must be set to a valid +CUDA array handle.

    +

    Surface objects are only supported on devices of compute capability 3.0 +or higher. Additionally, a surface object is an opaque value, and, as +such, should only be accessed through CUDA API calls.

    +
    +
    Parameters:
    +

    pResDesc (cudaResourceDesc) – Resource descriptor

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDestroySurfaceObject(surfObject)
    +

    Destroys a surface object.

    +

    Destroys the surface object specified by surfObject.

    +
    +
    Parameters:
    +

    surfObject (cudaSurfaceObject_t) – Surface object to destroy

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGetSurfaceObjectResourceDesc(surfObject)
    +

    Returns a surface object’s resource descriptor Returns the resource descriptor for the surface object specified by surfObject.

    +
    +
    Parameters:
    +

    surfObject (cudaSurfaceObject_t) – Surface object

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Version Management

    +
    +
    +cuda.bindings.runtime.cudaDriverGetVersion()
    +

    Returns the latest version of CUDA supported by the driver.

    +

    Returns in *driverVersion the latest version of CUDA supported by the +driver. The version is returned as (1000 * major + 10 * minor). For +example, CUDA 9.2 would be represented by 9020. If no driver is +installed, then 0 is returned as the driver version.

    +

    This function automatically returns cudaErrorInvalidValue +if driverVersion is NULL.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaRuntimeGetVersion()
    +

    Returns the CUDA Runtime version.

    +

    Returns in *runtimeVersion the version number of the current CUDA +Runtime instance. The version is returned as (1000 * major + 10 * +minor). For example, CUDA 9.2 would be represented by 9020.

    +

    As of CUDA 12.0, this function no longer initializes CUDA. The purpose +of this API is solely to return a compile-time constant stating the +CUDA Toolkit version in the above format.

    +

    This function automatically returns cudaErrorInvalidValue +if the runtimeVersion argument is NULL.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.getLocalRuntimeVersion()
    +

    Returns the CUDA Runtime version of local shared library.

    +

    Returns in *runtimeVersion the version number of the current CUDA +Runtime instance. The version is returned as (1000 * major + 10 * +minor). For example, CUDA 9.2 would be represented by 9020.

    +

    As of CUDA 12.0, this function no longer initializes CUDA. The purpose +of this API is solely to return a compile-time constant stating the +CUDA Toolkit version in the above format.

    +

    This function automatically returns cudaErrorInvalidValue +if the runtimeVersion argument is NULL.

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +

    Graph Management

    +

    This section describes the graph management functions of CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaGraphCreate(unsigned int flags)
    +

    Creates a graph.

    +

    Creates an empty graph, which is returned via pGraph.

    +
    +
    Parameters:
    +

    flags (unsigned int) – Graph creation flags, must be 0

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddKernelNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaKernelNodeParams pNodeParams: Optional[cudaKernelNodeParams])
    +

    Creates a kernel execution node and adds it to a graph.

    +

    Creates a new kernel execution node and adds it to graph with +numDependencies dependencies specified via pDependencies and +arguments specified in pNodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. pDependencies may not have any duplicate entries. +A handle to the new node will be returned in pGraphNode.

    +

    The cudaKernelNodeParams structure is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    When the graph is launched, the node will invoke kernel func on a +(gridDim.x x gridDim.y x gridDim.z) grid of blocks. Each block +contains (blockDim.x x blockDim.y x blockDim.z) threads.

    +

    sharedMem sets the amount of dynamic shared memory that will be +available to each thread block.

    +

    Kernel parameters to func can be specified in one of two ways:

    +

    1) Kernel parameters can be specified via kernelParams. If the kernel +has N parameters, then kernelParams needs to be an array of N +pointers. Each pointer, from `kernelParams`[0] to `kernelParams`[N-1], +points to the region of memory from which the actual parameter will be +copied. The number of kernel parameters and their offsets and sizes do +not need to be specified as that information is retrieved directly from +the kernel’s image.

    +

    2) Kernel parameters can also be packaged by the application into a +single buffer that is passed in via extra. This places the burden on +the application of knowing each kernel parameter’s size and +alignment/padding within the buffer. The extra parameter exists to +allow this function to take additional less commonly used arguments. +extra specifies a list of names of extra settings and their +corresponding values. Each extra setting name is immediately followed +by the corresponding value. The list must be terminated with either +NULL or CU_LAUNCH_PARAM_END.

    + +

    The error cudaErrorInvalidValue will be returned if kernel +parameters are specified with both kernelParams and extra (i.e. +both kernelParams and extra are non-NULL).

    +

    The kernelParams or extra array, as well as the argument values it +points to, are copied during this call.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • pNodeParams (cudaKernelNodeParams) – Parameters for the GPU execution node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Kernels launched using graphs must not use texture and surface references. Reading or writing through any texture or surface reference is undefined behavior. This restriction does not apply to texture and surface objects.

    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphKernelNodeGetParams(node)
    +

    Returns a kernel node’s parameters.

    +

    Returns the parameters of kernel node node in pNodeParams. The +kernelParams or extra array returned in pNodeParams, as well as +the argument values it points to, are owned by the node. This memory +remains valid until the node is destroyed or its parameters are +modified, and should not be modified directly. Use +cudaGraphKernelNodeSetParams to update the parameters of +this node.

    +

    The params will contain either kernelParams or extra, according to +which of these was most recently set on the node.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaLaunchKernel, cudaGraphAddKernelNode, cudaGraphKernelNodeSetParams

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphKernelNodeSetParams(node, cudaKernelNodeParams pNodeParams: Optional[cudaKernelNodeParams])
    +

    Sets a kernel node’s parameters.

    +

    Sets the parameters of kernel node node to pNodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle, cudaErrorMemoryAllocation

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphKernelNodeCopyAttributes(hSrc, hDst)
    +

    Copies attributes from source node to destination node.

    +

    Copies attributes from source node src to destination node dst. +Both node must have the same context.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidContext

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphKernelNodeGetAttribute(hNode, attr: cudaKernelNodeAttrID)
    +

    Queries node attribute.

    +

    Queries attribute attr from node hNode and stores it in +corresponding member of value_out.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphKernelNodeSetAttribute(hNode, attr: cudaKernelNodeAttrID, cudaKernelNodeAttrValue value: Optional[cudaKernelNodeAttrValue])
    +

    Sets node attribute.

    +

    Sets attribute attr on node hNode from corresponding attribute of +value.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidResourceHandle

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddMemcpyNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaMemcpy3DParms pCopyParams: Optional[cudaMemcpy3DParms])
    +

    Creates a memcpy node and adds it to a graph.

    +

    Creates a new memcpy node and adds it to graph with numDependencies +dependencies specified via pDependencies. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. pDependencies may not have any duplicate entries. +A handle to the new node will be returned in pGraphNode.

    +

    When the graph is launched, the node will perform the memcpy described +by pCopyParams. See cudaMemcpy3D() for a description of +the structure and its restrictions.

    +

    Memcpy nodes have some additional restrictions with regards to managed +memory, if the system contains at least one device which has a zero +value for the device attribute +cudaDevAttrConcurrentManagedAccess.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • pCopyParams (cudaMemcpy3DParms) – Parameters for the memory copy

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddMemcpyNode1D(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, dst, src, size_t count, kind: cudaMemcpyKind)
    +

    Creates a 1D memcpy node and adds it to a graph.

    +

    Creates a new 1D memcpy node and adds it to graph with +numDependencies dependencies specified via pDependencies. It is +possible for numDependencies to be 0, in which case the node will be +placed at the root of the graph. pDependencies may not have any +duplicate entries. A handle to the new node will be returned in +pGraphNode.

    +

    When the graph is launched, the node will copy count bytes from the +memory area pointed to by src to the memory area pointed to by dst, +where kind specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. Launching a memcpy node with dst and src +pointers that do not match the direction of the copy results in an +undefined behavior.

    +

    Memcpy nodes have some additional restrictions with regards to managed +memory, if the system contains at least one device which has a zero +value for the device attribute +cudaDevAttrConcurrentManagedAccess.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • dst (Any) – Destination memory address

    • +
    • src (Any) – Source memory address

    • +
    • count (size_t) – Size in bytes to copy

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphMemcpyNodeGetParams(node)
    +

    Returns a memcpy node’s parameters.

    +

    Returns the parameters of memcpy node node in pNodeParams.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphMemcpyNodeSetParams(node, cudaMemcpy3DParms pNodeParams: Optional[cudaMemcpy3DParms])
    +

    Sets a memcpy node’s parameters.

    +

    Sets the parameters of memcpy node node to pNodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaGraphNodeSetParams, cudaMemcpy3D, cudaGraphMemcpyNodeSetParamsToSymbol, cudaGraphMemcpyNodeSetParamsFromSymbol, cudaGraphMemcpyNodeSetParams1D, cudaGraphAddMemcpyNode, cudaGraphMemcpyNodeGetParams

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphMemcpyNodeSetParams1D(node, dst, src, size_t count, kind: cudaMemcpyKind)
    +

    Sets a memcpy node’s parameters to perform a 1-dimensional copy.

    +

    Sets the parameters of memcpy node node to the copy described by the +provided parameters.

    +

    When the graph is launched, the node will copy count bytes from the +memory area pointed to by src to the memory area pointed to by dst, +where kind specifies the direction of the copy, and must be one of +cudaMemcpyHostToHost, cudaMemcpyHostToDevice, +cudaMemcpyDeviceToHost, +cudaMemcpyDeviceToDevice, or cudaMemcpyDefault. +Passing cudaMemcpyDefault is recommended, in which case the +type of transfer is inferred from the pointer values. However, +cudaMemcpyDefault is only allowed on systems that support +unified virtual addressing. Launching a memcpy node with dst and src +pointers that do not match the direction of the copy results in an +undefined behavior.

    +
    +
    Parameters:
    +
      +
    • node (CUgraphNode or cudaGraphNode_t) – Node to set the parameters for

    • +
    • dst (Any) – Destination memory address

    • +
    • src (Any) – Source memory address

    • +
    • count (size_t) – Size in bytes to copy

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddMemsetNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaMemsetParams pMemsetParams: Optional[cudaMemsetParams])
    +

    Creates a memset node and adds it to a graph.

    +

    Creates a new memset node and adds it to graph with numDependencies +dependencies specified via pDependencies. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. pDependencies may not have any duplicate entries. +A handle to the new node will be returned in pGraphNode.

    +

    The element size must be 1, 2, or 4 bytes. When the graph is launched, +the node will perform the memset described by pMemsetParams.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • pMemsetParams (cudaMemsetParams) – Parameters for the memory set

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphMemsetNodeGetParams(node)
    +

    Returns a memset node’s parameters.

    +

    Returns the parameters of memset node node in pNodeParams.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphMemsetNodeSetParams(node, cudaMemsetParams pNodeParams: Optional[cudaMemsetParams])
    +

    Sets a memset node’s parameters.

    +

    Sets the parameters of memset node node to pNodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddHostNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaHostNodeParams pNodeParams: Optional[cudaHostNodeParams])
    +

    Creates a host execution node and adds it to a graph.

    +

    Creates a new CPU execution node and adds it to graph with +numDependencies dependencies specified via pDependencies and +arguments specified in pNodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. pDependencies may not have any duplicate entries. +A handle to the new node will be returned in pGraphNode.

    +

    When the graph is launched, the node will invoke the specified CPU +function. Host nodes are not supported under MPS with pre-Volta GPUs.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • pNodeParams (cudaHostNodeParams) – Parameters for the host node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphHostNodeGetParams(node)
    +

    Returns a host node’s parameters.

    +

    Returns the parameters of host node node in pNodeParams.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphHostNodeSetParams(node, cudaHostNodeParams pNodeParams: Optional[cudaHostNodeParams])
    +

    Sets a host node’s parameters.

    +

    Sets the parameters of host node node to nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddChildGraphNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, childGraph)
    +

    Creates a child graph node and adds it to a graph.

    +

    Creates a new node which executes an embedded graph, and adds it to +graph with numDependencies dependencies specified via +pDependencies. It is possible for numDependencies to be 0, in which +case the node will be placed at the root of the graph. pDependencies +may not have any duplicate entries. A handle to the new node will be +returned in pGraphNode.

    +

    If hGraph contains allocation or free nodes, this call will return an +error.

    +

    The node executes an embedded child graph. The child graph is cloned in +this call.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • childGraph (CUgraph or cudaGraph_t) – The graph to clone into this node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphChildGraphNodeGetGraph(node)
    +

    Gets a handle to the embedded graph of a child graph node.

    +

    Gets a handle to the embedded graph in a child graph node. This call +does not clone the graph. Changes to the graph will be reflected in the +node, and the node retains ownership of the graph.

    +

    Allocation and free nodes cannot be added to the returned graph. +Attempting to do so will return an error.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to get the embedded graph for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddEmptyNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies)
    +

    Creates an empty node and adds it to a graph.

    +

    Creates a new node which performs no operation, and adds it to graph +with numDependencies dependencies specified via pDependencies. It +is possible for numDependencies to be 0, in which case the node will +be placed at the root of the graph. pDependencies may not have any +duplicate entries. A handle to the new node will be returned in +pGraphNode.

    +

    An empty node performs no operation during execution, but can be used +for transitive ordering. For example, a phased execution graph with 2 +groups of n nodes with a barrier between them can be represented using +an empty node and 2*n dependency edges, rather than no empty node and +n^2 dependency edges.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddEventRecordNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, event)
    +

    Creates an event record node and adds it to a graph.

    +

    Creates a new event record node and adds it to hGraph with +numDependencies dependencies specified via dependencies and event +specified in event. It is possible for numDependencies to be 0, in +which case the node will be placed at the root of the graph. +dependencies may not have any duplicate entries. A handle to the new +node will be returned in phGraphNode.

    +

    Each launch of the graph will record event to capture execution of +the node’s dependencies.

    +

    These nodes may not be used in loops or conditionals.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphEventRecordNodeGetEvent(node)
    +

    Returns the event associated with an event record node.

    +

    Returns the event of event record node hNode in event_out.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the event for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphEventRecordNodeSetEvent(node, event)
    +

    Sets an event record node’s event.

    +

    Sets the event of event record node hNode to event.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddEventWaitNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, event)
    +

    Creates an event wait node and adds it to a graph.

    +

    Creates a new event wait node and adds it to hGraph with +numDependencies dependencies specified via dependencies and event +specified in event. It is possible for numDependencies to be 0, in +which case the node will be placed at the root of the graph. +dependencies may not have any duplicate entries. A handle to the new +node will be returned in phGraphNode.

    +

    The graph node will wait for all work captured in event. See +cuEventRecord() for details on what is captured by an +event. The synchronization will be performed efficiently on the device +when applicable. event may be from a different context or device than +the launch stream.

    +

    These nodes may not be used in loops or conditionals.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphEventWaitNodeGetEvent(node)
    +

    Returns the event associated with an event wait node.

    +

    Returns the event of event wait node hNode in event_out.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the event for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphEventWaitNodeSetEvent(node, event)
    +

    Sets an event wait node’s event.

    +

    Sets the event of event wait node hNode to event.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddExternalSemaphoresSignalNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaExternalSemaphoreSignalNodeParams nodeParams: Optional[cudaExternalSemaphoreSignalNodeParams])
    +

    Creates an external semaphore signal node and adds it to a graph.

    +

    Creates a new external semaphore signal node and adds it to graph +with numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in pGraphNode.

    +

    Performs a signal operation on a set of externally allocated semaphore +objects when the node is launched. The operation(s) will occur after +all of the node’s dependencies have completed.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExternalSemaphoresSignalNodeGetParams(hNode)
    +

    Returns an external semaphore signal node’s parameters.

    +

    Returns the parameters of an external semaphore signal node hNode in +params_out. The extSemArray and paramsArray returned in +params_out, are owned by the node. This memory remains valid until +the node is destroyed or its parameters are modified, and should not be +modified directly. Use +cudaGraphExternalSemaphoresSignalNodeSetParams to update +the parameters of this node.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExternalSemaphoresSignalNodeSetParams(hNode, cudaExternalSemaphoreSignalNodeParams nodeParams: Optional[cudaExternalSemaphoreSignalNodeParams])
    +

    Sets an external semaphore signal node’s parameters.

    +

    Sets the parameters of an external semaphore signal node hNode to +nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddExternalSemaphoresWaitNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaExternalSemaphoreWaitNodeParams nodeParams: Optional[cudaExternalSemaphoreWaitNodeParams])
    +

    Creates an external semaphore wait node and adds it to a graph.

    +

    Creates a new external semaphore wait node and adds it to graph with +numDependencies dependencies specified via dependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. dependencies may not have any duplicate entries. A +handle to the new node will be returned in pGraphNode.

    +

    Performs a wait operation on a set of externally allocated semaphore +objects when the node is launched. The node’s dependencies will not be +launched until the wait operation has completed.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExternalSemaphoresWaitNodeGetParams(hNode)
    +

    Returns an external semaphore wait node’s parameters.

    +

    Returns the parameters of an external semaphore wait node hNode in +params_out. The extSemArray and paramsArray returned in +params_out, are owned by the node. This memory remains valid until +the node is destroyed or its parameters are modified, and should not be +modified directly. Use +cudaGraphExternalSemaphoresSignalNodeSetParams to update +the parameters of this node.

    +
    +
    Parameters:
    +

    hNode (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExternalSemaphoresWaitNodeSetParams(hNode, cudaExternalSemaphoreWaitNodeParams nodeParams: Optional[cudaExternalSemaphoreWaitNodeParams])
    +

    Sets an external semaphore wait node’s parameters.

    +

    Sets the parameters of an external semaphore wait node hNode to +nodeParams.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddMemAllocNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaMemAllocNodeParams nodeParams: Optional[cudaMemAllocNodeParams])
    +

    Creates an allocation node and adds it to a graph.

    +

    Creates a new allocation node and adds it to graph with +numDependencies dependencies specified via pDependencies and +arguments specified in nodeParams. It is possible for +numDependencies to be 0, in which case the node will be placed at the +root of the graph. pDependencies may not have any duplicate entries. +A handle to the new node will be returned in pGraphNode.

    +

    When cudaGraphAddMemAllocNode creates an allocation node, +it returns the address of the allocation in nodeParams.dptr. The +allocation’s address remains fixed across instantiations and launches.

    +

    If the allocation is freed in the same graph, by creating a free node +using cudaGraphAddMemFreeNode, the allocation can be +accessed by nodes ordered after the allocation node but before the free +node. These allocations cannot be freed outside the owning graph, and +they can only be freed once in the owning graph.

    +

    If the allocation is not freed in the same graph, then it can be +accessed not only by nodes in the graph which are ordered after the +allocation node, but also by stream operations ordered after the +graph’s execution but before the allocation is freed.

    +

    Allocations which are not freed in the same graph can be freed by:

    +
      +
    • passing the allocation to cudaMemFreeAsync or +cudaMemFree;

    • +
    • launching a graph with a free node for that allocation; or

    • +
    • specifying cudaGraphInstantiateFlagAutoFreeOnLaunch +during instantiation, which makes each launch behave as though it +called cudaMemFreeAsync for every unfreed allocation.

    • +
    +

    It is not possible to free an allocation in both the owning graph and +another graph. If the allocation is freed in the same graph, a free +node cannot be added to another graph. If the allocation is freed in +another graph, a free node can no longer be added to the owning graph.

    +

    The following restrictions apply to graphs which contain allocation +and/or memory free nodes:

    +
      +
    • Nodes and edges of the graph cannot be deleted.

    • +
    • The graph cannot be used in a child node.

    • +
    • Only one instantiation of the graph may exist at any point in time.

    • +
    • The graph cannot be cloned.

    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphMemAllocNodeGetParams(node)
    +

    Returns a memory alloc node’s parameters.

    +

    Returns the parameters of a memory alloc node hNode in params_out. +The poolProps and accessDescs returned in params_out, are owned +by the node. This memory remains valid until the node is destroyed. The +returned parameters must not be modified.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddMemFreeNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, dptr)
    +

    Creates a memory free node and adds it to a graph.

    +

    Creates a new memory free node and adds it to graph with +numDependencies dependencies specified via pDependencies and +address specified in dptr. It is possible for numDependencies to be +0, in which case the node will be placed at the root of the graph. +pDependencies may not have any duplicate entries. A handle to the new +node will be returned in pGraphNode.

    +

    cudaGraphAddMemFreeNode will return +cudaErrorInvalidValue if the user attempts to free:

    +
      +
    • an allocation twice in the same graph.

    • +
    • an address that was not returned by an allocation node.

    • +
    • an invalid address.

    • +
    +

    The following restrictions apply to graphs which contain allocation +and/or memory free nodes:

    +
      +
    • Nodes and edges of the graph cannot be deleted.

    • +
    • The graph cannot be used in a child node.

    • +
    • Only one instantiation of the graph may exist at any point in time.

    • +
    • The graph cannot be cloned.

    • +
    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • numDependencies (size_t) – Number of dependencies

    • +
    • dptr (Any) – Address of memory to free

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphMemFreeNodeGetParams(node)
    +

    Returns a memory free node’s parameters.

    +

    Returns the address of a memory free node hNode in dptr_out.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to get the parameters for

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGraphMemTrim(int device)
    +

    Free unused memory that was cached on the specified device for use with graphs back to the OS.

    +

    Blocks which are not in use by a graph that is either currently +executing or scheduled to execute are freed back to the operating +system.

    +
    +
    Parameters:
    +

    device (int) – The device for which cached memory should be freed.

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceGetGraphMemAttribute(int device, attr: cudaGraphMemAttributeType)
    +

    Query asynchronous allocation attributes related to graphs.

    +

    Valid attributes are:

    + +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaDeviceSetGraphMemAttribute(int device, attr: cudaGraphMemAttributeType, value)
    +

    Set asynchronous allocation attributes related to graphs.

    +

    Valid attributes are:

    +
      +
    • cudaGraphMemAttrUsedMemHigh: High watermark of memory, in +bytes, associated with graphs since the last time it was reset. High +watermark can only be reset to zero.

    • +
    • cudaGraphMemAttrReservedMemHigh: High watermark of +memory, in bytes, currently allocated for use by the CUDA graphs +asynchronous allocator.

    • +
    +
    +
    Parameters:
    +
      +
    • device (int) – Specifies the scope of the query

    • +
    • attr (cudaGraphMemAttributeType) – attribute to get

    • +
    • value (Any) – pointer to value to set

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidDevice

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphClone(originalGraph)
    +

    Clones a graph.

    +

    This function creates a copy of originalGraph and returns it in +pGraphClone. All parameters are copied into the cloned graph. The +original graph may be modified after this call without affecting the +clone.

    +

    Child graph nodes in the original graph are recursively copied into the +clone.

    +
    +
    Parameters:
    +

    originalGraph (CUgraph or cudaGraph_t) – Graph to clone

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeFindInClone(originalNode, clonedGraph)
    +

    Finds a cloned version of a node.

    +

    This function returns the node in clonedGraph corresponding to +originalNode in the original graph.

    +

    clonedGraph must have been cloned from originalGraph via +cudaGraphClone. originalNode must have been in +originalGraph at the time of the call to cudaGraphClone, +and the corresponding cloned node in clonedGraph must not have been +removed. The cloned node is then returned via pClonedNode.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaGraphClone

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeGetType(node)
    +

    Returns a node’s type.

    +

    Returns the node type of node in pType.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphGetNodes(graph, size_t numNodes=0)
    +

    Returns a graph’s nodes.

    +

    Returns a list of graph’s nodes. nodes may be NULL, in which case +this function will return the number of nodes in numNodes. Otherwise, +numNodes entries will be filled in. If numNodes is higher than the +actual number of nodes, the remaining entries in nodes will be set to +NULL, and the number of nodes actually obtained will be returned in +numNodes.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphGetRootNodes(graph, size_t pNumRootNodes=0)
    +

    Returns a graph’s root nodes.

    +

    Returns a list of graph’s root nodes. pRootNodes may be NULL, in +which case this function will return the number of root nodes in +pNumRootNodes. Otherwise, pNumRootNodes entries will be filled in. +If pNumRootNodes is higher than the actual number of root nodes, the +remaining entries in pRootNodes will be set to NULL, and the number +of nodes actually obtained will be returned in pNumRootNodes.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to query

    • +
    • pNumRootNodes (int) – See description

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphGetEdges(graph, size_t numEdges=0)
    +

    Returns a graph’s dependency edges.

    +

    Returns a list of graph’s dependency edges. Edges are returned via +corresponding indices in from and to; that is, the node in to`[i] +has a dependency on the node in `from`[i]. `from and to may both be +NULL, in which case this function only returns the number of edges in +numEdges. Otherwise, numEdges entries will be filled in. If +numEdges is higher than the actual number of edges, the remaining +entries in from and to will be set to NULL, and the number of edges +actually returned will be written to numEdges.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to get the edges from

    • +
    • numEdges (int) – See description

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphGetEdges_v2(graph, size_t numEdges=0)
    +

    Returns a graph’s dependency edges (12.3+)

    +

    Returns a list of graph’s dependency edges. Edges are returned via +corresponding indices in from, to and edgeData; that is, the node +in to`[i] has a dependency on the node in `from`[i] with data +`edgeData`[i]. `from and to may both be NULL, in which case this +function only returns the number of edges in numEdges. Otherwise, +numEdges entries will be filled in. If numEdges is higher than the +actual number of edges, the remaining entries in from and to will +be set to NULL, and the number of edges actually returned will be +written to numEdges. edgeData may alone be NULL, in which case the +edges must all have default (zeroed) edge data. Attempting a losst +query via NULL edgeData will result in +cudaErrorLossyQuery. If edgeData is non-NULL then from +and to must be as well.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to get the edges from

    • +
    • numEdges (int) – See description

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeGetDependencies(node, size_t pNumDependencies=0)
    +

    Returns a node’s dependencies.

    +

    Returns a list of node’s dependencies. pDependencies may be NULL, +in which case this function will return the number of dependencies in +pNumDependencies. Otherwise, pNumDependencies entries will be +filled in. If pNumDependencies is higher than the actual number of +dependencies, the remaining entries in pDependencies will be set to +NULL, and the number of nodes actually obtained will be returned in +pNumDependencies.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeGetDependencies_v2(node, size_t pNumDependencies=0)
    +

    Returns a node’s dependencies (12.3+)

    +

    Returns a list of node’s dependencies. pDependencies may be NULL, +in which case this function will return the number of dependencies in +pNumDependencies. Otherwise, pNumDependencies entries will be +filled in. If pNumDependencies is higher than the actual number of +dependencies, the remaining entries in pDependencies will be set to +NULL, and the number of nodes actually obtained will be returned in +pNumDependencies.

    +

    Note that if an edge has non-zero (non-default) edge data and +edgeData is NULL, this API will return +cudaErrorLossyQuery. If edgeData is non-NULL, then +pDependencies must be as well.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeGetDependentNodes(node, size_t pNumDependentNodes=0)
    +

    Returns a node’s dependent nodes.

    +

    Returns a list of node’s dependent nodes. pDependentNodes may be +NULL, in which case this function will return the number of dependent +nodes in pNumDependentNodes. Otherwise, pNumDependentNodes entries +will be filled in. If pNumDependentNodes is higher than the actual +number of dependent nodes, the remaining entries in pDependentNodes +will be set to NULL, and the number of nodes actually obtained will be +returned in pNumDependentNodes.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeGetDependentNodes_v2(node, size_t pNumDependentNodes=0)
    +

    Returns a node’s dependent nodes (12.3+)

    +

    Returns a list of node’s dependent nodes. pDependentNodes may be +NULL, in which case this function will return the number of dependent +nodes in pNumDependentNodes. Otherwise, pNumDependentNodes entries +will be filled in. If pNumDependentNodes is higher than the actual +number of dependent nodes, the remaining entries in pDependentNodes +will be set to NULL, and the number of nodes actually obtained will be +returned in pNumDependentNodes.

    +

    Note that if an edge has non-zero (non-default) edge data and +edgeData is NULL, this API will return +cudaErrorLossyQuery. If edgeData is non-NULL, then +pDependentNodes must be as well.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddDependencies(graph, from_: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], to: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies)
    +

    Adds dependency edges to a graph.

    +

    The number of dependencies to be added is defined by numDependencies +Elements in pFrom and pTo at corresponding indices define a +dependency. Each node in pFrom and pTo must belong to graph.

    +

    If numDependencies is 0, elements in pFrom and pTo will be +ignored. Specifying an existing dependency will return an error.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which dependencies are added

    • +
    • from (List[cudaGraphNode_t]) – Array of nodes that provide the dependencies

    • +
    • to (List[cudaGraphNode_t]) – Array of dependent nodes

    • +
    • numDependencies (size_t) – Number of dependencies to be added

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddDependencies_v2(graph, from_: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], to: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], edgeData: Optional[Tuple[cudaGraphEdgeData] | List[cudaGraphEdgeData]], size_t numDependencies)
    +

    Adds dependency edges to a graph. (12.3+)

    +

    The number of dependencies to be added is defined by numDependencies +Elements in pFrom and pTo at corresponding indices define a +dependency. Each node in pFrom and pTo must belong to graph.

    +

    If numDependencies is 0, elements in pFrom and pTo will be +ignored. Specifying an existing dependency will return an error.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which dependencies are added

    • +
    • from (List[cudaGraphNode_t]) – Array of nodes that provide the dependencies

    • +
    • to (List[cudaGraphNode_t]) – Array of dependent nodes

    • +
    • edgeData (List[cudaGraphEdgeData]) – Optional array of edge data. If NULL, default (zeroed) edge data is +assumed.

    • +
    • numDependencies (size_t) – Number of dependencies to be added

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphRemoveDependencies(graph, from_: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], to: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies)
    +

    Removes dependency edges from a graph.

    +

    The number of pDependencies to be removed is defined by +numDependencies. Elements in pFrom and pTo at corresponding +indices define a dependency. Each node in pFrom and pTo must belong +to graph.

    +

    If numDependencies is 0, elements in pFrom and pTo will be +ignored. Specifying a non-existing dependency will return an error.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph from which to remove dependencies

    • +
    • from (List[cudaGraphNode_t]) – Array of nodes that provide the dependencies

    • +
    • to (List[cudaGraphNode_t]) – Array of dependent nodes

    • +
    • numDependencies (size_t) – Number of dependencies to be removed

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphRemoveDependencies_v2(graph, from_: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], to: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], edgeData: Optional[Tuple[cudaGraphEdgeData] | List[cudaGraphEdgeData]], size_t numDependencies)
    +

    Removes dependency edges from a graph. (12.3+)

    +

    The number of pDependencies to be removed is defined by +numDependencies. Elements in pFrom and pTo at corresponding +indices define a dependency. Each node in pFrom and pTo must belong +to graph.

    +

    If numDependencies is 0, elements in pFrom and pTo will be +ignored. Specifying an edge that does not exist in the graph, with data +matching edgeData, results in an error. edgeData is nullable, which +is equivalent to passing default (zeroed) data for each edge.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph from which to remove dependencies

    • +
    • from (List[cudaGraphNode_t]) – Array of nodes that provide the dependencies

    • +
    • to (List[cudaGraphNode_t]) – Array of dependent nodes

    • +
    • edgeData (List[cudaGraphEdgeData]) – Optional array of edge data. If NULL, edge data is assumed to be +default (zeroed).

    • +
    • numDependencies (size_t) – Number of dependencies to be removed

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphDestroyNode(node)
    +

    Remove a node from the graph.

    +

    Removes node from its graph. This operation also severs any +dependencies of other nodes on node and vice versa.

    +

    Dependencies cannot be removed from graphs which contain allocation or +free nodes. Any attempt to do so will return an error.

    +
    +
    Parameters:
    +

    node (CUgraphNode or cudaGraphNode_t) – Node to remove

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphInstantiate(graph, unsigned long long flags)
    +

    Creates an executable graph from a graph.

    +

    Instantiates graph as an executable graph. The graph is validated for +any structural constraints or intra-node constraints which were not +previously validated. If instantiation is successful, a handle to the +instantiated graph is returned in pGraphExec.

    +

    The flags parameter controls the behavior of instantiation and +subsequent graph launches. Valid flags are:

    +
      +
    • cudaGraphInstantiateFlagAutoFreeOnLaunch, which +configures a graph containing memory allocation nodes to +automatically free any unfreed memory allocations before the graph is +relaunched.

    • +
    • cudaGraphInstantiateFlagDeviceLaunch, which configures +the graph for launch from the device. If this flag is passed, the +executable graph handle returned can be used to launch the graph from +both the host and device. This flag cannot be used in conjunction +with cudaGraphInstantiateFlagAutoFreeOnLaunch.

    • +
    • cudaGraphInstantiateFlagUseNodePriority, which causes the +graph to use the priorities from the per-node attributes rather than +the priority of the launch stream during execution. Note that +priorities are only available on kernel nodes, and are copied from +stream priority during stream capture.

    • +
    +

    If graph contains any allocation or free nodes, there can be at most +one executable graph in existence for that graph at a time. An attempt +to instantiate a second executable graph before destroying the first +with cudaGraphExecDestroy will result in an error. The same +also applies if graph contains any device-updatable kernel nodes.

    +

    Graphs instantiated for launch on the device have additional +restrictions which do not apply to host graphs:

    +
      +
    • The graph’s nodes must reside on a single device.

    • +
    • The graph can only contain kernel nodes, memcpy nodes, memset nodes, +and child graph nodes.

    • +
    • The graph cannot be empty and must contain at least one kernel, +memcpy, or memset node. Operation-specific restrictions are outlined +below.

    • +
    • Kernel nodes:

      +
        +
      • Use of CUDA Dynamic Parallelism is not permitted.

      • +
      • Cooperative launches are permitted as long as MPS is not in use.

      • +
      +
    • +
    • Memcpy nodes:

      +
        +
      • Only copies involving device memory and/or pinned device-mapped +host memory are permitted.

      • +
      • Copies involving CUDA arrays are not permitted.

      • +
      • Both operands must be accessible from the current device, and the +current device must match the device of other nodes in the graph.

      • +
      +
    • +
    +

    If graph is not instantiated for launch on the device but contains +kernels which call device-side cudaGraphLaunch() from +multiple devices, this will result in an error.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphInstantiateWithFlags(graph, unsigned long long flags)
    +

    Creates an executable graph from a graph.

    +

    Instantiates graph as an executable graph. The graph is validated for +any structural constraints or intra-node constraints which were not +previously validated. If instantiation is successful, a handle to the +instantiated graph is returned in pGraphExec.

    +

    The flags parameter controls the behavior of instantiation and +subsequent graph launches. Valid flags are:

    +
      +
    • cudaGraphInstantiateFlagAutoFreeOnLaunch, which +configures a graph containing memory allocation nodes to +automatically free any unfreed memory allocations before the graph is +relaunched.

    • +
    • cudaGraphInstantiateFlagDeviceLaunch, which configures +the graph for launch from the device. If this flag is passed, the +executable graph handle returned can be used to launch the graph from +both the host and device. This flag can only be used on platforms +which support unified addressing. This flag cannot be used in +conjunction with +cudaGraphInstantiateFlagAutoFreeOnLaunch.

    • +
    • cudaGraphInstantiateFlagUseNodePriority, which causes the +graph to use the priorities from the per-node attributes rather than +the priority of the launch stream during execution. Note that +priorities are only available on kernel nodes, and are copied from +stream priority during stream capture.

    • +
    +

    If graph contains any allocation or free nodes, there can be at most +one executable graph in existence for that graph at a time. An attempt +to instantiate a second executable graph before destroying the first +with cudaGraphExecDestroy will result in an error. The same +also applies if graph contains any device-updatable kernel nodes.

    +

    If graph contains kernels which call device-side +cudaGraphLaunch() from multiple devices, this will result +in an error.

    +

    Graphs instantiated for launch on the device have additional +restrictions which do not apply to host graphs:

    +
      +
    • The graph’s nodes must reside on a single device.

    • +
    • The graph can only contain kernel nodes, memcpy nodes, memset nodes, +and child graph nodes.

    • +
    • The graph cannot be empty and must contain at least one kernel, +memcpy, or memset node. Operation-specific restrictions are outlined +below.

    • +
    • Kernel nodes:

      +
        +
      • Use of CUDA Dynamic Parallelism is not permitted.

      • +
      • Cooperative launches are permitted as long as MPS is not in use.

      • +
      +
    • +
    • Memcpy nodes:

      +
        +
      • Only copies involving device memory and/or pinned device-mapped +host memory are permitted.

      • +
      • Copies involving CUDA arrays are not permitted.

      • +
      • Both operands must be accessible from the current device, and the +current device must match the device of other nodes in the graph.

      • +
      +
    • +
    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphInstantiateWithParams(graph, cudaGraphInstantiateParams instantiateParams: Optional[cudaGraphInstantiateParams])
    +

    Creates an executable graph from a graph.

    +

    Instantiates graph as an executable graph according to the +instantiateParams structure. The graph is validated for any +structural constraints or intra-node constraints which were not +previously validated. If instantiation is successful, a handle to the +instantiated graph is returned in pGraphExec.

    +

    instantiateParams controls the behavior of instantiation and +subsequent graph launches, as well as returning more detailed +information in the event of an error. +cudaGraphInstantiateParams is defined as:

    +

    View CUDA Toolkit Documentation for a C++ code example

    +

    The flags field controls the behavior of instantiation and subsequent +graph launches. Valid flags are:

    +
      +
    • cudaGraphInstantiateFlagAutoFreeOnLaunch, which +configures a graph containing memory allocation nodes to +automatically free any unfreed memory allocations before the graph is +relaunched.

    • +
    • cudaGraphInstantiateFlagUpload, which will perform an +upload of the graph into uploadStream once the graph has been +instantiated.

    • +
    • cudaGraphInstantiateFlagDeviceLaunch, which configures +the graph for launch from the device. If this flag is passed, the +executable graph handle returned can be used to launch the graph from +both the host and device. This flag can only be used on platforms +which support unified addressing. This flag cannot be used in +conjunction with +cudaGraphInstantiateFlagAutoFreeOnLaunch.

    • +
    • cudaGraphInstantiateFlagUseNodePriority, which causes the +graph to use the priorities from the per-node attributes rather than +the priority of the launch stream during execution. Note that +priorities are only available on kernel nodes, and are copied from +stream priority during stream capture.

    • +
    +

    If graph contains any allocation or free nodes, there can be at most +one executable graph in existence for that graph at a time. An attempt +to instantiate a second executable graph before destroying the first +with cudaGraphExecDestroy will result in an error. The same +also applies if graph contains any device-updatable kernel nodes.

    +

    If graph contains kernels which call device-side +cudaGraphLaunch() from multiple devices, this will result +in an error.

    +

    Graphs instantiated for launch on the device have additional +restrictions which do not apply to host graphs:

    +
      +
    • The graph’s nodes must reside on a single device.

    • +
    • The graph can only contain kernel nodes, memcpy nodes, memset nodes, +and child graph nodes.

    • +
    • The graph cannot be empty and must contain at least one kernel, +memcpy, or memset node. Operation-specific restrictions are outlined +below.

    • +
    • Kernel nodes:

      +
        +
      • Use of CUDA Dynamic Parallelism is not permitted.

      • +
      • Cooperative launches are permitted as long as MPS is not in use.

      • +
      +
    • +
    • Memcpy nodes:

      +
        +
      • Only copies involving device memory and/or pinned device-mapped +host memory are permitted.

      • +
      • Copies involving CUDA arrays are not permitted.

      • +
      • Both operands must be accessible from the current device, and the +current device must match the device of other nodes in the graph.

      • +
      +
    • +
    +

    In the event of an error, the result_out and errNode_out fields +will contain more information about the nature of the error. Possible +error reporting includes:

    +
      +
    • cudaGraphInstantiateError, if passed an invalid value or +if an unexpected error occurred which is described by the return +value of the function. errNode_out will be set to NULL.

    • +
    • cudaGraphInstantiateInvalidStructure, if the graph +structure is invalid. errNode_out will be set to one of the +offending nodes.

    • +
    • cudaGraphInstantiateNodeOperationNotSupported, if the +graph is instantiated for device launch but contains a node of an +unsupported node type, or a node which performs unsupported +operations, such as use of CUDA dynamic parallelism within a kernel +node. errNode_out will be set to this node.

    • +
    • cudaGraphInstantiateMultipleDevicesNotSupported, if the +graph is instantiated for device launch but a node’s device differs +from that of another node. This error can also be returned if a graph +is not instantiated for device launch and it contains kernels which +call device-side cudaGraphLaunch() from multiple devices. +errNode_out will be set to this node.

    • +
    +

    If instantiation is successful, result_out will be set to +cudaGraphInstantiateSuccess, and hErrNode_out will be set +to NULL.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecGetFlags(graphExec)
    +

    Query the instantiation flags of an executable graph.

    +

    Returns the flags that were passed to instantiation for the given +executable graph. cudaGraphInstantiateFlagUpload will not +be returned by this API as it does not affect the resulting executable +graph.

    +
    +
    Parameters:
    +

    graphExec (CUgraphExec or cudaGraphExec_t) – The executable graph to query

    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecKernelNodeSetParams(hGraphExec, node, cudaKernelNodeParams pNodeParams: Optional[cudaKernelNodeParams])
    +

    Sets the parameters for a kernel node in the given graphExec.

    +

    Sets the parameters of a kernel node in an executable graph +hGraphExec. The node is identified by the corresponding node node +in the non-executable graph, from which the executable graph was +instantiated.

    +

    node must not have been removed from the original graph. All +nodeParams fields may change, but the following restrictions apply to +func updates:

    +
      +
    • The owning device of the function cannot change.

    • +
    • A node whose function originally did not use CUDA dynamic parallelism +cannot be updated to a function which uses CDP

    • +
    • A node whose function originally did not make device-side update +calls cannot be updated to a function which makes device-side update +calls.

    • +
    • If hGraphExec was not instantiated for device launch, a node whose +function originally did not use device-side +cudaGraphLaunch() cannot be updated to a function which +uses device-side cudaGraphLaunch() unless the node +resides on the same device as nodes which contained such calls at +instantiate-time. If no such calls were present at instantiation, +these updates cannot be performed at all.

    • +
    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. node is also not modified by this call.

    +

    If node is a device-updatable kernel node, the next upload/launch of +hGraphExec will overwrite any previous device-side updates. +Additionally, applying host updates to a device-updatable kernel node +while it is being updated from the device will result in undefined +behavior.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecMemcpyNodeSetParams(hGraphExec, node, cudaMemcpy3DParms pNodeParams: Optional[cudaMemcpy3DParms])
    +

    Sets the parameters for a memcpy node in the given graphExec.

    +

    Updates the work represented by node in hGraphExec as though node +had contained pNodeParams at instantiation. node must remain in the +graph which was used to instantiate hGraphExec. Changed edges to and +from node are ignored.

    +

    The source and destination memory in pNodeParams must be allocated +from the same contexts as the original source and destination memory. +Both the instantiation-time memory operands and the memory operands in +pNodeParams must be 1-dimensional. Zero-length operations are not +supported.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. node is also not modified by this call.

    +

    Returns cudaErrorInvalidValue if the memory operands’ +mappings changed or either the original or new memory operands are +multidimensional.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecMemcpyNodeSetParams1D(hGraphExec, node, dst, src, size_t count, kind: cudaMemcpyKind)
    +

    Sets the parameters for a memcpy node in the given graphExec to perform a 1-dimensional copy.

    +

    Updates the work represented by node in hGraphExec as though node +had contained the given params at instantiation. node must remain in +the graph which was used to instantiate hGraphExec. Changed edges to +and from node are ignored.

    +

    src and dst must be allocated from the same contexts as the +original source and destination memory. The instantiation-time memory +operands must be 1-dimensional. Zero-length operations are not +supported.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. node is also not modified by this call.

    +

    Returns cudaErrorInvalidValue if the memory operands’ +mappings changed or the original memory operands are multidimensional.

    +
    +
    Parameters:
    +
      +
    • hGraphExec (CUgraphExec or cudaGraphExec_t) – The executable graph in which to set the specified node

    • +
    • node (CUgraphNode or cudaGraphNode_t) – Memcpy node from the graph which was used to instantiate graphExec

    • +
    • dst (Any) – Destination memory address

    • +
    • src (Any) – Source memory address

    • +
    • count (size_t) – Size in bytes to copy

    • +
    • kind (cudaMemcpyKind) – Type of transfer

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecMemsetNodeSetParams(hGraphExec, node, cudaMemsetParams pNodeParams: Optional[cudaMemsetParams])
    +

    Sets the parameters for a memset node in the given graphExec.

    +

    Updates the work represented by node in hGraphExec as though node +had contained pNodeParams at instantiation. node must remain in the +graph which was used to instantiate hGraphExec. Changed edges to and +from node are ignored.

    +

    Zero sized operations are not supported.

    +

    The new destination pointer in pNodeParams must be to the same kind +of allocation as the original destination pointer and have the same +context association and device mapping as the original destination +pointer.

    +

    Both the value and pointer address may be updated. Changing other +aspects of the memset (width, height, element size or pitch) may cause +the update to be rejected. Specifically, for 2d memsets, all dimension +changes are rejected. For 1d memsets, changes in height are explicitly +rejected and other changes are oportunistically allowed if the +resulting work maps onto the work resources already allocated for the +node.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. node is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecHostNodeSetParams(hGraphExec, node, cudaHostNodeParams pNodeParams: Optional[cudaHostNodeParams])
    +

    Sets the parameters for a host node in the given graphExec.

    +

    Updates the work represented by node in hGraphExec as though node +had contained pNodeParams at instantiation. node must remain in the +graph which was used to instantiate hGraphExec. Changed edges to and +from node are ignored.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. node is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecChildGraphNodeSetParams(hGraphExec, node, childGraph)
    +

    Updates node parameters in the child graph node in the given graphExec.

    +

    Updates the work represented by node in hGraphExec as though the +nodes contained in node’s graph had the parameters contained in +childGraph’s nodes at instantiation. node must remain in the graph +which was used to instantiate hGraphExec. Changed edges to and from +node are ignored.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. node is also not modified by this call.

    +

    The topology of childGraph, as well as the node insertion order, must +match that of the graph contained in node. See +cudaGraphExecUpdate() for a list of restrictions on what +can be updated in an instantiated graph. The update is recursive, so +child graph nodes contained within the top level child graph will also +be updated.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecEventRecordNodeSetEvent(hGraphExec, hNode, event)
    +

    Sets the event for an event record node in the given graphExec.

    +

    Sets the event of an event record node in an executable graph +hGraphExec. The node is identified by the corresponding node hNode +in the non-executable graph, from which the executable graph was +instantiated.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecEventWaitNodeSetEvent(hGraphExec, hNode, event)
    +

    Sets the event for an event wait node in the given graphExec.

    +

    Sets the event of an event wait node in an executable graph +hGraphExec. The node is identified by the corresponding node hNode +in the non-executable graph, from which the executable graph was +instantiated.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecExternalSemaphoresSignalNodeSetParams(hGraphExec, hNode, cudaExternalSemaphoreSignalNodeParams nodeParams: Optional[cudaExternalSemaphoreSignalNodeParams])
    +

    Sets the parameters for an external semaphore signal node in the given graphExec.

    +

    Sets the parameters of an external semaphore signal node in an +executable graph hGraphExec. The node is identified by the +corresponding node hNode in the non-executable graph, from which the +executable graph was instantiated.

    +

    hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    Changing nodeParams->numExtSems is not supported.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecExternalSemaphoresWaitNodeSetParams(hGraphExec, hNode, cudaExternalSemaphoreWaitNodeParams nodeParams: Optional[cudaExternalSemaphoreWaitNodeParams])
    +

    Sets the parameters for an external semaphore wait node in the given graphExec.

    +

    Sets the parameters of an external semaphore wait node in an executable +graph hGraphExec. The node is identified by the corresponding node +hNode in the non-executable graph, from which the executable graph +was instantiated.

    +

    hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +

    Changing nodeParams->numExtSems is not supported.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeSetEnabled(hGraphExec, hNode, unsigned int isEnabled)
    +

    Enables or disables the specified node in the given graphExec.

    +

    Sets hNode to be either enabled or disabled. Disabled nodes are +functionally equivalent to empty nodes until they are reenabled. +Existing node parameters are not affected by disabling/enabling the +node.

    +

    The node is identified by the corresponding node hNode in the non- +executable graph, from which the executable graph was instantiated.

    +

    hNode must not have been removed from the original graph.

    +

    The modifications only affect future launches of hGraphExec. Already +enqueued or running launches of hGraphExec are not affected by this +call. hNode is also not modified by this call.

    +
    +
    Parameters:
    +
      +
    • hGraphExec (CUgraphExec or cudaGraphExec_t) – The executable graph in which to set the specified node

    • +
    • hNode (CUgraphNode or cudaGraphNode_t) – Node from the graph from which graphExec was instantiated

    • +
    • isEnabled (unsigned int) – Node is enabled if != 0, otherwise the node is disabled

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +

    Notes

    +

    Currently only kernel, memset and memcpy nodes are supported.

    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeGetEnabled(hGraphExec, hNode)
    +

    Query whether a node in the given graphExec is enabled.

    +

    Sets isEnabled to 1 if hNode is enabled, or 0 if hNode is disabled.

    +

    The node is identified by the corresponding node hNode in the non- +executable graph, from which the executable graph was instantiated.

    +

    hNode must not have been removed from the original graph.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +

    Notes

    +

    Currently only kernel, memset and memcpy nodes are supported.

    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecUpdate(hGraphExec, hGraph)
    +

    Check whether an executable graph can be updated with a graph and perform the update if possible.

    +

    Updates the node parameters in the instantiated graph specified by +hGraphExec with the node parameters in a topologically identical +graph specified by hGraph.

    +

    Limitations:

    +
      +
    • Kernel nodes:

      +
        +
      • The owning context of the function cannot change.

      • +
      • A node whose function originally did not use CUDA dynamic +parallelism cannot be updated to a function which uses CDP.

      • +
      • A node whose function originally did not make device-side update +calls cannot be updated to a function which makes device-side +update calls.

      • +
      • A cooperative node cannot be updated to a non-cooperative node, and +vice-versa.

      • +
      • If the graph was instantiated with +cudaGraphInstantiateFlagUseNodePriority, the priority attribute +cannot change. Equality is checked on the originally requested +priority values, before they are clamped to the device’s supported +range.

      • +
      • If hGraphExec was not instantiated for device launch, a node +whose function originally did not use device-side +cudaGraphLaunch() cannot be updated to a function which +uses device-side cudaGraphLaunch() unless the node +resides on the same device as nodes which contained such calls at +instantiate-time. If no such calls were present at instantiation, +these updates cannot be performed at all.

      • +
      • Neither hGraph nor hGraphExec may contain device-updatable +kernel nodes.

      • +
      +
    • +
    • Memset and memcpy nodes:

      +
        +
      • The CUDA device(s) to which the operand(s) was allocated/mapped +cannot change.

      • +
      • The source/destination memory must be allocated from the same +contexts as the original source/destination memory.

      • +
      • For 2d memsets, only address and assinged value may be updated.

      • +
      • For 1d memsets, updating dimensions is also allowed, but may fail +if the resulting operation doesn’t map onto the work resources +already allocated for the node.

      • +
      +
    • +
    • Additional memcpy node restrictions:

      +
        +
      • Changing either the source or destination memory type(i.e. +CU_MEMORYTYPE_DEVICE, CU_MEMORYTYPE_ARRAY, etc.) is not supported.

      • +
      +
    • +
    • Conditional nodes:

      +
        +
      • Changing node parameters is not supported.

      • +
      • Changeing parameters of nodes within the conditional body graph is +subject to the rules above.

      • +
      • Conditional handle flags and default values are updated as part of +the graph update.

      • +
      +
    • +
    +

    Note: The API may add further restrictions in future releases. The +return code should always be checked.

    +

    cudaGraphExecUpdate sets the result member of resultInfo to +cudaGraphExecUpdateErrorTopologyChanged under the following conditions:

    +
      +
    • The count of nodes directly in hGraphExec and hGraph differ, in +which case resultInfo->errorNode is set to NULL.

    • +
    • hGraph has more exit nodes than hGraph, in which case +resultInfo->errorNode is set to one of the exit nodes in hGraph.

    • +
    • A node in hGraph has a different number of dependencies than the +node from hGraphExec it is paired with, in which case +resultInfo->errorNode is set to the node from hGraph.

    • +
    • A node in hGraph has a dependency that does not match with the +corresponding dependency of the paired node from hGraphExec. +resultInfo->errorNode will be set to the node from hGraph. +resultInfo->errorFromNode will be set to the mismatched dependency. +The dependencies are paired based on edge order and a dependency does +not match when the nodes are already paired based on other edges +examined in the graph.

    • +
    +

    cudaGraphExecUpdate sets the result member of resultInfo to:

    +
      +
    • cudaGraphExecUpdateError if passed an invalid value.

    • +
    • cudaGraphExecUpdateErrorTopologyChanged if the graph topology changed

    • +
    • cudaGraphExecUpdateErrorNodeTypeChanged if the type of a node +changed, in which case hErrorNode_out is set to the node from +hGraph.

    • +
    • cudaGraphExecUpdateErrorFunctionChanged if the function of a kernel +node changed (CUDA driver < 11.2)

    • +
    • cudaGraphExecUpdateErrorUnsupportedFunctionChange if the func field +of a kernel changed in an unsupported way(see note above), in which +case hErrorNode_out is set to the node from hGraph

    • +
    • cudaGraphExecUpdateErrorParametersChanged if any parameters to a node +changed in a way that is not supported, in which case +hErrorNode_out is set to the node from hGraph

    • +
    • cudaGraphExecUpdateErrorAttributesChanged if any attributes of a node +changed in a way that is not supported, in which case +hErrorNode_out is set to the node from hGraph

    • +
    • cudaGraphExecUpdateErrorNotSupported if something about a node is +unsupported, like the node’s type or configuration, in which case +hErrorNode_out is set to the node from hGraph

    • +
    +

    If the update fails for a reason not listed above, the result member of +resultInfo will be set to cudaGraphExecUpdateError. If the update +succeeds, the result member will be set to cudaGraphExecUpdateSuccess.

    +

    cudaGraphExecUpdate returns cudaSuccess when the updated was performed +successfully. It returns cudaErrorGraphExecUpdateFailure if the graph +update was not performed because it included changes which violated +constraints specific to instantiated graph update.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaGraphInstantiate

    +
    +
    + +
    +
    +cuda.bindings.runtime.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 +allocations owned by graphExec.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue,

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphLaunch(graphExec, stream)
    +

    Launches an executable graph in a stream.

    +

    Executes graphExec in stream. Only one instance of graphExec may +be executing at a time. Each launch is ordered behind both any previous +work in stream and any previous launches of graphExec. To execute a +graph concurrently, it must be instantiated multiple times into +multiple executable graphs.

    +

    If any allocations created by graphExec remain unfreed (from a +previous launch) and graphExec was not instantiated with +cudaGraphInstantiateFlagAutoFreeOnLaunch, the launch will +fail with cudaErrorInvalidValue.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecDestroy(graphExec)
    +

    Destroys an executable graph.

    +

    Destroys the executable graph specified by graphExec.

    +
    +
    Parameters:
    +

    graphExec (CUgraphExec or cudaGraphExec_t) – Executable graph to destroy

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphDestroy(graph)
    +

    Destroys a graph.

    +

    Destroys the graph specified by graph, as well as all of its nodes.

    +
    +
    Parameters:
    +

    graph (CUgraph or cudaGraph_t) – Graph to destroy

    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +

    cudaGraphCreate

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphDebugDotPrint(graph, char *path, unsigned int flags)
    +

    Write a DOT file describing graph structure.

    +

    Using the provided graph, write to path a DOT formatted description +of the graph. By default this includes the graph topology, node types, +node id, kernel names and memcpy direction. flags can be specified to +write more detailed information about each node type such as parameter +values, kernel attributes, node and function handles.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – The graph to create a DOT file from

    • +
    • path (bytes) – The path to write the DOT file to

    • +
    • flags (unsigned int) – Flags from cudaGraphDebugDotFlags for specifying which additional +node information to write

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorOperatingSystem

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaUserObjectCreate(ptr, destroy, unsigned int initialRefcount, unsigned int flags)
    +

    Create a user object.

    +

    Create a user object with the specified destructor callback and initial +reference count. The initial references are owned by the caller.

    +

    Destructor callbacks cannot make CUDA API calls and should avoid +blocking behavior, as they are executed by a shared internal thread. +Another thread may be signaled to perform such actions, if it does not +block forward progress of tasks scheduled through CUDA.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • ptr (Any) – The pointer to pass to the destroy function

    • +
    • destroy (cudaHostFn_t) – Callback to free the user object when it is no longer in use

    • +
    • initialRefcount (unsigned int) – The initial refcount to create the object with, typically 1. The +initial references are owned by the calling thread.

    • +
    • flags (unsigned int) – Currently it is required to pass +cudaUserObjectNoDestructorSync, which is the only +defined flag. This indicates that the destroy callback cannot be +waited on by any CUDA API. Users requiring synchronization of the +callback should signal its completion manually.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaUserObjectRetain(object, unsigned int count)
    +

    Retain a reference to a user object.

    +

    Retains new references to a user object. The new references are owned +by the caller.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • object (cudaUserObject_t) – The object to retain

    • +
    • count (unsigned int) – The number of references to retain, typically 1. Must be nonzero +and not larger than INT_MAX.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaUserObjectRelease(object, unsigned int count)
    +

    Release a reference to a user object.

    +

    Releases user object references owned by the caller. The object’s +destructor is invoked if the reference count reaches zero.

    +

    It is undefined behavior to release references not owned by the caller, +or to use a user object handle after all references are released.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • object (cudaUserObject_t) – The object to release

    • +
    • count (unsigned int) – The number of references to release, typically 1. Must be nonzero +and not larger than INT_MAX.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphRetainUserObject(graph, object, unsigned int count, unsigned int flags)
    +

    Retain a reference to a user object from a graph.

    +

    Creates or moves user object references that will be owned by a CUDA +graph.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – The graph to associate the reference with

    • +
    • object (cudaUserObject_t) – The user object to retain a reference for

    • +
    • count (unsigned int) – The number of references to add to the graph, typically 1. Must be +nonzero and not larger than INT_MAX.

    • +
    • flags (unsigned int) – The optional flag cudaGraphUserObjectMove transfers +references from the calling thread, rather than create new +references. Pass 0 to create new references.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +
    +
    cudaUserObjectCreate

    py:obj:~.cudaUserObjectRetain, cudaUserObjectRelease, cudaGraphReleaseUserObject, cudaGraphCreate

    +
    +
    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphReleaseUserObject(graph, object, unsigned int count)
    +

    Release a user object reference from a graph.

    +

    Releases user object references owned by a graph.

    +

    See CUDA User Objects in the CUDA C++ Programming Guide for more +information on user objects.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – The graph that will release the reference

    • +
    • object (cudaUserObject_t) – The user object to release a reference for

    • +
    • count (unsigned int) – The number of references to release, typically 1. Must be nonzero +and not larger than INT_MAX.

    • +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    +
    +

    See also

    +
    +
    cudaUserObjectCreate

    py:obj:~.cudaUserObjectRetain, cudaUserObjectRelease, cudaGraphRetainUserObject, cudaGraphCreate

    +
    +
    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddNode(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], size_t numDependencies, cudaGraphNodeParams nodeParams: Optional[cudaGraphNodeParams])
    +

    Adds a node of arbitrary type to a graph.

    +

    Creates a new node in graph described by nodeParams with +numDependencies dependencies specified via pDependencies. +numDependencies may be 0. pDependencies may be null if +numDependencies is 0. pDependencies 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.

    +

    A handle to the new node will be returned in phGraphNode.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphAddNode_v2(graph, pDependencies: Optional[Tuple[cudaGraphNode_t] | List[cudaGraphNode_t]], dependencyData: Optional[Tuple[cudaGraphEdgeData] | List[cudaGraphEdgeData]], size_t numDependencies, cudaGraphNodeParams nodeParams: Optional[cudaGraphNodeParams])
    +

    Adds a node of arbitrary type to a graph (12.3+)

    +

    Creates a new node in graph described by nodeParams with +numDependencies dependencies specified via pDependencies. +numDependencies may be 0. pDependencies may be null if +numDependencies is 0. pDependencies 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.

    +

    A handle to the new node will be returned in phGraphNode.

    +
    +
    Parameters:
    +
      +
    • graph (CUgraph or cudaGraph_t) – Graph to which to add the node

    • +
    • pDependencies (List[cudaGraphNode_t]) – Dependencies of the node

    • +
    • dependencyData (List[cudaGraphEdgeData]) – 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 (cudaGraphNodeParams) – Specification of the node

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphNodeSetParams(node, cudaGraphNodeParams nodeParams: Optional[cudaGraphNodeParams])
    +

    Update’s a graph node’s parameters.

    +

    Sets the parameters of graph node node to nodeParams. The node type +specified by nodeParams->type must match the type of node. +nodeParams must be fully initialized and all unused bytes (reserved, +padding) zeroed.

    +

    Modifying parameters is not supported for node types +cudaGraphNodeTypeMemAlloc and cudaGraphNodeTypeMemFree.

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDeviceFunction, cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphExecNodeSetParams(graphExec, node, cudaGraphNodeParams nodeParams: Optional[cudaGraphNodeParams])
    +

    Update’s a graph node’s parameters in an instantiated graph.

    +

    Sets the parameters of a node in an executable graph graphExec. The +node is identified by the corresponding node node in the non- +executable graph from which the executable graph was instantiated. +node must not have been removed from the original graph.

    +

    The modifications only affect future launches of graphExec. Already +enqueued or running launches of graphExec are not affected by this +call. node is also not modified by this call.

    +

    Allowed changes to parameters on executable graphs are as follows:

    +

    View CUDA Toolkit Documentation for a table example

    +
    +
    Parameters:
    +
    +
    +
    Returns:
    +

    cudaSuccess, cudaErrorInvalidValue, cudaErrorInvalidDeviceFunction, cudaErrorNotSupported

    +
    +
    Return type:
    +

    cudaError_t

    +
    +
    + +
    + +
    +
    +cuda.bindings.runtime.cudaGraphConditionalHandleCreate(graph, unsigned int defaultLaunchValue, unsigned int flags)
    +

    Create a conditional handle.

    +

    Creates a conditional handle associated with hGraph.

    +

    The conditional handle must be associated with a conditional node in +this graph or one of its children.

    +

    Handles not associated with a conditional node may cause graph +instantiation to fail.

    +
    +
    Parameters:
    +
      +
    • hGraph (CUgraph or cudaGraph_t) – Graph which will contain the conditional node using this handle.

    • +
    • defaultLaunchValue (unsigned int) – Optional initial value for the conditional variable.

    • +
    • flags (unsigned int) – Currently must be cudaGraphCondAssignDefault or 0.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuGraphAddNode

    +
    +
    + +
    +
    +

    Driver Entry Point Access

    +

    This section describes the driver entry point access functions of CUDA runtime application programming interface.

    +
    +
    +cuda.bindings.runtime.cudaGetDriverEntryPoint(char *symbol, unsigned long long flags)
    +

    Returns the requested driver API function pointer.

    +

    Returns in **funcPtr the address of the CUDA driver function for the +requested flags.

    +

    For a requested driver symbol, if the CUDA version in which the driver +symbol was introduced is less than or equal to the CUDA runtime +version, the API will return the function pointer to the corresponding +versioned driver function.

    +

    The pointer returned by the API should be cast to a function pointer +matching the requested driver function’s definition in the API header +file. The function pointer typedef can be picked up from the +corresponding typedefs header file. For example, cudaTypedefs.h +consists of function pointer typedefs for driver APIs defined in +cuda.h.

    +

    The API will return cudaSuccess and set the returned +funcPtr if the requested driver function is valid and supported on +the platform.

    +

    The API will return cudaSuccess and set the returned +funcPtr to NULL if the requested driver function is not supported on +the platform, no ABI compatible driver function exists for the CUDA +runtime version or if the driver symbol is invalid.

    +

    It will also set the optional driverStatus to one of the values in +cudaDriverEntryPointQueryResult with the following +meanings:

    + +

    The requested flags can be:

    +
      +
    • cudaEnableDefault: This is the default mode. This is +equivalent to cudaEnablePerThreadDefaultStream if the +code is compiled with –default-stream per-thread compilation flag or +the macro CUDA_API_PER_THREAD_DEFAULT_STREAM is defined; +cudaEnableLegacyStream otherwise.

    • +
    • cudaEnableLegacyStream: This will enable the search for +all driver symbols that match the requested driver symbol name except +the corresponding per-thread versions.

    • +
    • cudaEnablePerThreadDefaultStream: This will enable the +search for all driver symbols that match the requested driver symbol +name including the per-thread versions. If a per-thread version is +not found, the API will return the legacy version of the driver +function.

    • +
    +
    +
    Parameters:
    +
      +
    • symbol (bytes) – The base name of the driver API function to look for. As an +example, for the driver API cuMemAlloc_v2, symbol +would be cuMemAlloc. Note that the API will use the CUDA runtime +version to return the address to the most recent ABI compatible +driver symbol, cuMemAlloc or cuMemAlloc_v2.

    • +
    • flags (unsigned long long) – Flags to specify search options.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuGetProcAddress

    +
    +
    + +
    +
    +cuda.bindings.runtime.cudaGetDriverEntryPointByVersion(char *symbol, unsigned int cudaVersion, unsigned long long flags)
    +

    Returns the requested driver API function pointer by CUDA version.

    +

    Returns in **funcPtr the address of the CUDA driver function for the +requested flags and CUDA driver version.

    +

    The CUDA version is specified as (1000 * major + 10 * minor), so CUDA +11.2 should be specified as 11020. For a requested driver symbol, if +the specified CUDA version is greater than or equal to the CUDA version +in which the driver symbol was introduced, this API will return the +function pointer to the corresponding versioned function.

    +

    The pointer returned by the API should be cast to a function pointer +matching the requested driver function’s definition in the API header +file. The function pointer typedef can be picked up from the +corresponding typedefs header file. For example, cudaTypedefs.h +consists of function pointer typedefs for driver APIs defined in +cuda.h.

    +

    For the case where the CUDA version requested is greater than the CUDA +Toolkit installed, there may not be an appropriate function pointer +typedef in the corresponding header file and may need a custom typedef +to match the driver function signature returned. This can be done by +getting the typedefs from a later toolkit or creating appropriately +matching custom function typedefs.

    +

    The API will return cudaSuccess and set the returned +funcPtr if the requested driver function is valid and supported on +the platform.

    +

    The API will return cudaSuccess and set the returned +funcPtr to NULL if the requested driver function is not supported on +the platform, no ABI compatible driver function exists for the +requested version or if the driver symbol is invalid.

    +

    It will also set the optional driverStatus to one of the values in +cudaDriverEntryPointQueryResult with the following +meanings:

    + +

    The requested flags can be:

    +
      +
    • cudaEnableDefault: This is the default mode. This is +equivalent to cudaEnablePerThreadDefaultStream if the +code is compiled with –default-stream per-thread compilation flag or +the macro CUDA_API_PER_THREAD_DEFAULT_STREAM is defined; +cudaEnableLegacyStream otherwise.

    • +
    • cudaEnableLegacyStream: This will enable the search for +all driver symbols that match the requested driver symbol name except +the corresponding per-thread versions.

    • +
    • cudaEnablePerThreadDefaultStream: This will enable the +search for all driver symbols that match the requested driver symbol +name including the per-thread versions. If a per-thread version is +not found, the API will return the legacy version of the driver +function.

    • +
    +
    +
    Parameters:
    +
      +
    • symbol (bytes) – The base name of the driver API function to look for. As an +example, for the driver API cuMemAlloc_v2, symbol +would be cuMemAlloc.

    • +
    • cudaVersion (unsigned int) – The CUDA version to look for the requested driver symbol

    • +
    • flags (unsigned long long) – Flags to specify search options.

    • +
    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cuGetProcAddress

    +
    +
    + +
    +
    +

    C++ API Routines

    +

    C++-style interface built on top of CUDA runtime API. +impl_private

    +

    This section describes the C++ high level API functions of the CUDA runtime application programming interface. To use these functions, your application needs to be compiled with the nvcc compiler.

    +
    +
    +

    Interactions with the CUDA Driver API

    +

    This section describes the interactions between the CUDA Driver API and the CUDA Runtime API

    +

    Primary Contexts

    +

    There exists a one to one relationship between CUDA devices in the CUDA Runtime API and ::CUcontext s in the CUDA Driver API within a process. The specific context which the CUDA Runtime API uses for a device is called the device’s primary context. From the perspective of the CUDA Runtime API, a device and its primary context are synonymous.

    +

    Initialization and Tear-Down

    +

    CUDA Runtime API calls operate on the CUDA Driver API ::CUcontext which is current to to the calling host thread.

    +

    The function cudaInitDevice() ensures that the primary context is initialized for the requested device but does not make it current to the calling thread.

    +

    The function cudaSetDevice() initializes the primary context for the specified device and makes it current to the calling thread by calling ::cuCtxSetCurrent().

    +

    The CUDA Runtime API will automatically initialize the primary context for a device at the first CUDA Runtime API call which requires an active context. If no ::CUcontext is current to the calling thread when a CUDA Runtime API call which requires an active context is made, then the primary context for a device will be selected, made current to the calling thread, and initialized.

    +

    The context which the CUDA Runtime API initializes will be initialized using the parameters specified by the CUDA Runtime API functions cudaSetDeviceFlags(), ::cudaD3D9SetDirect3DDevice(), ::cudaD3D10SetDirect3DDevice(), ::cudaD3D11SetDirect3DDevice(), cudaGLSetGLDevice(), and cudaVDPAUSetVDPAUDevice(). Note that these functions will fail with cudaErrorSetOnActiveProcess if they are called when the primary context for the specified device has already been initialized. (or if the current device has already been initialized, in the case of cudaSetDeviceFlags()).

    +

    Primary contexts will remain active until they are explicitly deinitialized using cudaDeviceReset(). The function cudaDeviceReset() will deinitialize the primary context for the calling thread’s current device immediately. The context will remain current to all of the threads that it was current to. The next CUDA Runtime API call on any thread which requires an active context will trigger the reinitialization of that device’s primary context.

    +

    Note that primary contexts are shared resources. It is recommended that the primary context not be reset except just before exit or to recover from an unspecified launch failure.

    +

    Context Interoperability

    +

    Note that the use of multiple ::CUcontext s per device within a single process will substantially degrade performance and is strongly discouraged. Instead, it is highly recommended that the implicit one-to-one device-to-context mapping for the process provided by the CUDA Runtime API be used.

    +

    If a non-primary ::CUcontext created by the CUDA Driver API is current to a thread then the CUDA Runtime API calls to that thread will operate on that ::CUcontext, with some exceptions listed below. Interoperability between data types is discussed in the following sections.

    +

    The function cudaPointerGetAttributes() will return the error cudaErrorIncompatibleDriverContext if the pointer being queried was allocated by a non-primary context. The function cudaDeviceEnablePeerAccess() and the rest of the peer access API may not be called when a non-primary ::CUcontext is current.

    +
    +

    To use the pointer query and peer access APIs with a context created using the CUDA Driver API, it is necessary that the CUDA Driver API be used to access these features.

    +
    +

    All CUDA Runtime API state (e.g, global variables’ addresses and values) travels with its underlying ::CUcontext. In particular, if a ::CUcontext is moved from one thread to another then all CUDA Runtime API state will move to that thread as well.

    +

    Please note that attaching to legacy contexts (those with a version of 3010 as returned by ::cuCtxGetApiVersion()) is not possible. The CUDA Runtime will return cudaErrorIncompatibleDriverContext in such cases.

    +

    Interactions between CUstream and cudaStream_t

    +

    The types ::CUstream and cudaStream_t are identical and may be used interchangeably.

    +

    Interactions between CUevent and cudaEvent_t

    +

    The types ::CUevent and cudaEvent_t are identical and may be used interchangeably.

    +

    Interactions between CUarray and cudaArray_t

    +

    The types ::CUarray and struct ::cudaArray * represent the same data type and may be used interchangeably by casting the two types between each other.

    +

    In order to use a ::CUarray in a CUDA Runtime API function which takes a struct ::cudaArray *, it is necessary to explicitly cast the ::CUarray to a struct ::cudaArray *.

    +

    In order to use a struct ::cudaArray * in a CUDA Driver API function which takes a ::CUarray, it is necessary to explicitly cast the struct ::cudaArray * to a ::CUarray .

    +

    Interactions between CUgraphicsResource and cudaGraphicsResource_t

    +

    The types ::CUgraphicsResource and cudaGraphicsResource_t represent the same data type and may be used interchangeably by casting the two types between each other.

    +

    In order to use a ::CUgraphicsResource in a CUDA Runtime API function which takes a cudaGraphicsResource_t, it is necessary to explicitly cast the ::CUgraphicsResource to a cudaGraphicsResource_t.

    +

    In order to use a cudaGraphicsResource_t in a CUDA Driver API function which takes a ::CUgraphicsResource, it is necessary to explicitly cast the cudaGraphicsResource_t to a ::CUgraphicsResource.

    +

    Interactions between CUtexObject and cudaTextureObject_t

    +

    The types ::CUtexObject and cudaTextureObject_t represent the same data type and may be used interchangeably by casting the two types between each other.

    +

    In order to use a ::CUtexObject in a CUDA Runtime API function which takes a cudaTextureObject_t, it is necessary to explicitly cast the ::CUtexObject to a cudaTextureObject_t.

    +

    In order to use a cudaTextureObject_t in a CUDA Driver API function which takes a ::CUtexObject, it is necessary to explicitly cast the cudaTextureObject_t to a ::CUtexObject.

    +

    Interactions between CUsurfObject and cudaSurfaceObject_t

    +

    The types ::CUsurfObject and cudaSurfaceObject_t represent the same data type and may be used interchangeably by casting the two types between each other.

    +

    In order to use a ::CUsurfObject in a CUDA Runtime API function which takes a cudaSurfaceObject_t, it is necessary to explicitly cast the ::CUsurfObject to a cudaSurfaceObject_t.

    +

    In order to use a cudaSurfaceObject_t in a CUDA Driver API function which takes a ::CUsurfObject, it is necessary to explicitly cast the cudaSurfaceObject_t to a ::CUsurfObject.

    +

    Interactions between CUfunction and cudaFunction_t

    +

    The types ::CUfunction and cudaFunction_t represent the same data type and may be used interchangeably by casting the two types between each other.

    +

    In order to use a cudaFunction_t in a CUDA Driver API function which takes a ::CUfunction, it is necessary to explicitly cast the cudaFunction_t to a ::CUfunction.

    +
    +
    +cuda.bindings.runtime.cudaGetKernel(entryFuncAddr)
    +

    Get pointer to device kernel that matches entry function entryFuncAddr.

    +

    Returns in kernelPtr the device kernel corresponding to the entry +function entryFuncAddr.

    +
    +
    Parameters:
    +

    entryFuncAddr (Any) – Address of device entry function to search kernel for

    +
    +
    Returns:
    +

    +

    +
    +
    +
    +

    See also

    +

    cudaGetKernel

    +
    +
    + +
    +
    +

    Data types used by CUDA Runtime

    +
    +
    +class cuda.bindings.runtime.cudaEglPlaneDesc_st(void_ptr _ptr=0)
    +

    CUDA EGL Plane Descriptor - structure defining each plane of a CUDA +EGLFrame

    +
    +
    +width
    +

    Width of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +height
    +

    Height of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +numChannels
    +

    Number of channels for the plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +channelDesc
    +

    Channel Format Descriptor

    +
    +
    Type:
    +

    cudaChannelFormatDesc

    +
    +
    +
    + +
    +
    +reserved
    +

    Reserved for future use

    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEglFrame_st(void_ptr _ptr=0)
    +

    CUDA EGLFrame Descriptor - structure defining one frame of EGL. +Each frame may contain one or more planes depending on whether the +surface is Multiplanar or not. Each plane of EGLFrame is +represented by cudaEglPlaneDesc which is defined as: +typedefstructcudaEglPlaneDesc_st unsignedintwidth; +unsignedintheight; unsignedintdepth; unsignedintpitch; +unsignedintnumChannels; structcudaChannelFormatDescchannelDesc; +unsignedintreserved[4]; cudaEglPlaneDesc;

    +
    +
    +frame
    +
    +
    Type:
    +

    anon_union10

    +
    +
    +
    + +
    +
    +planeDesc
    +

    CUDA EGL Plane Descriptor cudaEglPlaneDesc

    +
    +
    Type:
    +

    List[cudaEglPlaneDesc]

    +
    +
    +
    + +
    +
    +planeCount
    +

    Number of planes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +frameType
    +

    Array or Pitch

    +
    +
    Type:
    +

    cudaEglFrameType

    +
    +
    +
    + +
    +
    +eglColorFormat
    +

    CUDA EGL Color Format

    +
    +
    Type:
    +

    cudaEglColorFormat

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaChannelFormatDesc(void_ptr _ptr=0)
    +

    CUDA Channel format descriptor

    +
    +
    +x
    +

    x

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +y
    +

    y

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +z
    +

    z

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +w
    +

    w

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +f
    +

    Channel format kind

    +
    +
    Type:
    +

    cudaChannelFormatKind

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaArraySparseProperties(void_ptr _ptr=0)
    +

    Sparse CUDA array and CUDA mipmapped array properties

    +
    +
    +tileExtent
    +
    +
    Type:
    +

    anon_struct0

    +
    +
    +
    + +
    +
    +miptailFirstLevel
    +

    First mip level at which the mip tail begins

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +miptailSize
    +

    Total size of the mip tail.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags will either be zero or cudaArraySparsePropertiesSingleMipTail

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaArrayMemoryRequirements(void_ptr _ptr=0)
    +

    CUDA array and CUDA mipmapped array memory requirements

    +
    +
    +size
    +

    Total size of the array.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +alignment
    +

    Alignment necessary for mapping the array.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaPitchedPtr(void_ptr _ptr=0)
    +

    CUDA Pitched memory pointer ::make_cudaPitchedPtr

    +
    +
    +ptr
    +

    Pointer to allocated memory

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of allocated memory in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +xsize
    +

    Logical width of allocation in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +ysize
    +

    Logical height of allocation in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExtent(void_ptr _ptr=0)
    +

    CUDA extent ::make_cudaExtent

    +
    +
    +width
    +

    Width in elements when referring to array memory, in bytes when +referring to linear memory

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Height in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +depth
    +

    Depth in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaPos(void_ptr _ptr=0)
    +

    CUDA 3D position ::make_cudaPos

    +
    +
    +x
    +

    x

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +y
    +

    y

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +z
    +

    z

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemcpy3DParms(void_ptr _ptr=0)
    +

    CUDA 3D memory copying parameters

    +
    +
    +srcArray
    +

    Source memory address

    +
    +
    Type:
    +

    cudaArray_t

    +
    +
    +
    + +
    +
    +srcPos
    +

    Source position offset

    +
    +
    Type:
    +

    cudaPos

    +
    +
    +
    + +
    +
    +srcPtr
    +

    Pitched source memory address

    +
    +
    Type:
    +

    cudaPitchedPtr

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination memory address

    +
    +
    Type:
    +

    cudaArray_t

    +
    +
    +
    + +
    +
    +dstPos
    +

    Destination position offset

    +
    +
    Type:
    +

    cudaPos

    +
    +
    +
    + +
    +
    +dstPtr
    +

    Pitched destination memory address

    +
    +
    Type:
    +

    cudaPitchedPtr

    +
    +
    +
    + +
    +
    +extent
    +

    Requested memory copy size

    +
    +
    Type:
    +

    cudaExtent

    +
    +
    +
    + +
    +
    +kind
    +

    Type of transfer

    +
    +
    Type:
    +

    cudaMemcpyKind

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemcpyNodeParams(void_ptr _ptr=0)
    +

    Memcpy node parameters

    +
    +
    +flags
    +

    Must be zero

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +reserved
    +

    Must be zero

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +copyParams
    +

    Parameters for the memory copy

    +
    +
    Type:
    +

    cudaMemcpy3DParms

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemcpy3DPeerParms(void_ptr _ptr=0)
    +

    CUDA 3D cross-device memory copying parameters

    +
    +
    +srcArray
    +

    Source memory address

    +
    +
    Type:
    +

    cudaArray_t

    +
    +
    +
    + +
    +
    +srcPos
    +

    Source position offset

    +
    +
    Type:
    +

    cudaPos

    +
    +
    +
    + +
    +
    +srcPtr
    +

    Pitched source memory address

    +
    +
    Type:
    +

    cudaPitchedPtr

    +
    +
    +
    + +
    +
    +srcDevice
    +

    Source device

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +dstArray
    +

    Destination memory address

    +
    +
    Type:
    +

    cudaArray_t

    +
    +
    +
    + +
    +
    +dstPos
    +

    Destination position offset

    +
    +
    Type:
    +

    cudaPos

    +
    +
    +
    + +
    +
    +dstPtr
    +

    Pitched destination memory address

    +
    +
    Type:
    +

    cudaPitchedPtr

    +
    +
    +
    + +
    +
    +dstDevice
    +

    Destination device

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +extent
    +

    Requested memory copy size

    +
    +
    Type:
    +

    cudaExtent

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemsetParams(void_ptr _ptr=0)
    +

    CUDA Memset node parameters

    +
    +
    +dst
    +

    Destination device pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of destination device pointer. Unused if height is 1

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +value
    +

    Value to be set

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +elementSize
    +

    Size of each element in bytes. Must be 1, 2, or 4.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +width
    +

    Width of the row in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Number of rows

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemsetParamsV2(void_ptr _ptr=0)
    +

    CUDA Memset node parameters

    +
    +
    +dst
    +

    Destination device pointer

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of destination device pointer. Unused if height is 1

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +value
    +

    Value to be set

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +elementSize
    +

    Size of each element in bytes. Must be 1, 2, or 4.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +width
    +

    Width of the row in elements

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Number of rows

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaAccessPolicyWindow(void_ptr _ptr=0)
    +

    Specifies an access policy for a window, a contiguous extent of +memory beginning at base_ptr and ending at base_ptr + num_bytes. +Partition into many segments and assign segments such that. sum of +“hit segments” / window == approx. ratio. sum of “miss segments” / +window == approx 1-ratio. Segments and ratio specifications are +fitted to the capabilities of the architecture. Accesses in a hit +segment apply the hitProp access policy. Accesses in a miss segment +apply the missProp access policy.

    +
    +
    +base_ptr
    +

    Starting address of the access policy window. CUDA driver may align +it.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +num_bytes
    +

    Size in bytes of the window policy. CUDA driver may restrict the +maximum size and alignment.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +hitRatio
    +

    hitRatio specifies percentage of lines assigned hitProp, rest are +assigned missProp.

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +hitProp
    +

    ::CUaccessProperty set for hit.

    +
    +
    Type:
    +

    cudaAccessProperty

    +
    +
    +
    + +
    +
    +missProp
    +

    ::CUaccessProperty set for miss. Must be either NORMAL or +STREAMING.

    +
    +
    Type:
    +

    cudaAccessProperty

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaHostNodeParams(void_ptr _ptr=0)
    +

    CUDA host node parameters

    +
    +
    +fn
    +

    The function to call when the node executes

    +
    +
    Type:
    +

    cudaHostFn_t

    +
    +
    +
    + +
    +
    +userData
    +

    Argument to pass to the function

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaHostNodeParamsV2(void_ptr _ptr=0)
    +

    CUDA host node parameters

    +
    +
    +fn
    +

    The function to call when the node executes

    +
    +
    Type:
    +

    cudaHostFn_t

    +
    +
    +
    + +
    +
    +userData
    +

    Argument to pass to the function

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaResourceDesc(void_ptr _ptr=0)
    +

    CUDA resource descriptor

    +
    +
    +resType
    +

    Resource type

    +
    +
    Type:
    +

    cudaResourceType

    +
    +
    +
    + +
    +
    +res
    +
    +
    Type:
    +

    anon_union0

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaResourceViewDesc(void_ptr _ptr=0)
    +

    CUDA resource view descriptor

    +
    +
    +format
    +

    Resource view format

    +
    +
    Type:
    +

    cudaResourceViewFormat

    +
    +
    +
    + +
    +
    +width
    +

    Width of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +height
    +

    Height of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of the resource view

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +firstMipmapLevel
    +

    First defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastMipmapLevel
    +

    Last defined mipmap level

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +firstLayer
    +

    First layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +lastLayer
    +

    Last layer index

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaPointerAttributes(void_ptr _ptr=0)
    +

    CUDA pointer attributes

    +
    +
    +type
    +

    The type of memory - cudaMemoryTypeUnregistered, +cudaMemoryTypeHost, cudaMemoryTypeDevice or cudaMemoryTypeManaged.

    +
    +
    Type:
    +

    cudaMemoryType

    +
    +
    +
    + +
    +
    +device
    +

    The device against which the memory was allocated or registered. If +the memory type is cudaMemoryTypeDevice then this identifies the +device on which the memory referred physically resides. If the +memory type is cudaMemoryTypeHost or::cudaMemoryTypeManaged then +this identifies the device which was current when the memory was +allocated or registered (and if that device is deinitialized then +this allocation will vanish with that device’s state).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +devicePointer
    +

    The address which may be dereferenced on the current device to +access the memory or NULL if no such address exists.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +hostPointer
    +

    The address which may be dereferenced on the host to access the +memory or NULL if no such address exists. CUDA doesn’t check if +unregistered memory is allocated so this field may contain invalid +pointer if an invalid pointer has been passed to CUDA.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaFuncAttributes(void_ptr _ptr=0)
    +

    CUDA function attributes

    +
    +
    +sharedSizeBytes
    +

    The size in bytes of statically-allocated shared memory per block +required by this function. This does not include dynamically- +allocated shared memory requested by the user at runtime.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +constSizeBytes
    +

    The size in bytes of user-allocated constant memory required by +this function.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +localSizeBytes
    +

    The size in bytes of local memory used by each thread of this +function.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +maxThreadsPerBlock
    +

    The maximum number of threads per block, beyond which a launch of +the function would fail. This number depends on both the function +and the device on which the function is currently loaded.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +numRegs
    +

    The number of registers used by each thread of this function.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +ptxVersion
    +

    The PTX virtual architecture version for which the function was +compiled. This value is the major PTX version * 10 + the minor PTX +version, so a PTX version 1.3 function would return the value 13.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +binaryVersion
    +

    The binary architecture version for which the function was +compiled. This value is the major binary version * 10 + the minor +binary version, so a binary version 1.3 function would return the +value 13.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +cacheModeCA
    +

    The attribute to indicate whether the function has been compiled +with user specified option “-Xptxas –dlcm=ca” set.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxDynamicSharedSizeBytes
    +

    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.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +preferredShmemCarveout
    +

    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 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

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +clusterDimMustBeSet
    +

    If this attribute is set, the kernel must launch with a valid +cluster dimension specified.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +requiredClusterWidth
    +

    The required cluster width/height/depth in blocks. The values must +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 +cudaFuncSetAttribute

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +requiredClusterHeight
    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +requiredClusterDepth
    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    The block scheduling policy of a function. See cudaFuncSetAttribute

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +nonPortableClusterSizeAllowed
    +

    Whether the function can be launched with non-portable cluster +size. 1 is allowed, 0 is disallowed. A non-portable cluster size +may only function on the specific SKUs the program is tested on. +The launch might fail if the program is run on a different hardware +platform. CUDA API provides cudaOccupancyMaxActiveClusters to +assist with checking whether the desired size can be launched on +the current device. Portable Cluster Size A portable cluster size +is guaranteed to be functional on all compute capabilities higher +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 +cudaFuncSetAttribute

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +reserved
    +

    Reserved for future use.

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemLocation(void_ptr _ptr=0)
    +

    Specifies a memory location. To specify a gpu, set type = +cudaMemLocationTypeDevice and set id = the gpu’s device ordinal. To +specify a cpu NUMA node, set type = cudaMemLocationTypeHostNuma and +set id = host NUMA node id.

    +
    +
    +type
    +

    Specifies the location type, which modifies the meaning of id.

    +
    +
    Type:
    +

    cudaMemLocationType

    +
    +
    +
    + +
    +
    +id
    +

    identifier for a given this location’s ::CUmemLocationType.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemAccessDesc(void_ptr _ptr=0)
    +

    Memory access descriptor

    +
    +
    +location
    +

    Location on which the request is to change it’s accessibility

    +
    +
    Type:
    +

    cudaMemLocation

    +
    +
    +
    + +
    +
    +flags
    +

    ::CUmemProt accessibility flags to set on the request

    +
    +
    Type:
    +

    cudaMemAccessFlags

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemPoolProps(void_ptr _ptr=0)
    +

    Specifies the properties of allocations made from the pool.

    +
    +
    +allocType
    +

    Allocation type. Currently must be specified as +cudaMemAllocationTypePinned

    +
    +
    Type:
    +

    cudaMemAllocationType

    +
    +
    +
    + +
    +
    +handleTypes
    +

    Handle types that will be supported by allocations from the pool.

    +
    +
    Type:
    +

    cudaMemAllocationHandleType

    +
    +
    +
    + +
    +
    +location
    +

    Location allocations should reside.

    +
    +
    Type:
    +

    cudaMemLocation

    +
    +
    +
    + +
    +
    +win32SecurityAttributes
    +

    Windows-specific LPSECURITYATTRIBUTES required when +cudaMemHandleTypeWin32 is specified. This security attribute +defines the scope of which exported allocations may be tranferred +to other processes. In all other cases, this field is required to +be zero.

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +maxSize
    +

    Maximum pool size. When set to 0, defaults to a system dependent +value.

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +usage
    +

    Bitmask indicating intended usage for the pool.

    +
    +
    Type:
    +

    unsigned short

    +
    +
    +
    + +
    +
    +reserved
    +

    reserved for future use, must be 0

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemPoolPtrExportData(void_ptr _ptr=0)
    +

    Opaque data for exporting a pool allocation

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemAllocNodeParams(void_ptr _ptr=0)
    +

    Memory allocation node parameters

    +
    +
    +poolProps
    +

    in: location where the allocation should reside (specified in +::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is +not supported. in: array of memory access descriptors. Used to +describe peer GPU access

    +
    +
    Type:
    +

    cudaMemPoolProps

    +
    +
    +
    + +
    +
    +accessDescs
    +

    in: number of memory access descriptors. Must not exceed the number +of GPUs.

    +
    +
    Type:
    +

    cudaMemAccessDesc

    +
    +
    +
    + +
    +
    +accessDescCount
    +

    in: Number of `accessDescs`s

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +bytesize
    +

    in: size in bytes of the requested allocation

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dptr
    +

    out: address of the allocation returned by CUDA

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemAllocNodeParamsV2(void_ptr _ptr=0)
    +

    Memory allocation node parameters

    +
    +
    +poolProps
    +

    in: location where the allocation should reside (specified in +::location). ::handleTypes must be cudaMemHandleTypeNone. IPC is +not supported. in: array of memory access descriptors. Used to +describe peer GPU access

    +
    +
    Type:
    +

    cudaMemPoolProps

    +
    +
    +
    + +
    +
    +accessDescs
    +

    in: number of memory access descriptors. Must not exceed the number +of GPUs.

    +
    +
    Type:
    +

    cudaMemAccessDesc

    +
    +
    +
    + +
    +
    +accessDescCount
    +

    in: Number of `accessDescs`s

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +bytesize
    +

    in: size in bytes of the requested allocation

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +dptr
    +

    out: address of the allocation returned by CUDA

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemFreeNodeParams(void_ptr _ptr=0)
    +

    Memory free node parameters

    +
    +
    +dptr
    +

    in: the pointer to free

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.CUuuid_st(void_ptr _ptr=0)
    +
    +
    +bytes
    +

    < CUDA definition of UUID

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaDeviceProp(void_ptr _ptr=0)
    +

    CUDA device properties

    +
    +
    +name
    +

    ASCII string identifying device

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +uuid
    +

    16-byte unique identifier

    +
    +
    Type:
    +

    cudaUUID_t

    +
    +
    +
    + +
    +
    +luid
    +

    8-byte locally unique identifier. Value is undefined on TCC and +non-Windows platforms

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +luidDeviceNodeMask
    +

    LUID device node mask. Value is undefined on TCC and non-Windows +platforms

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +totalGlobalMem
    +

    Global memory available on device in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +sharedMemPerBlock
    +

    Shared memory available per block in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +regsPerBlock
    +

    32-bit registers available per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +warpSize
    +

    Warp size in threads

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memPitch
    +

    Maximum pitch in bytes allowed by memory copies

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +maxThreadsPerBlock
    +

    Maximum number of threads per block

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxThreadsDim
    +

    Maximum size of each dimension of a block

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxGridSize
    +

    Maximum size of each dimension of a grid

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +clockRate
    +

    Deprecated, Clock frequency in kilohertz

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +totalConstMem
    +

    Constant memory available on device in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +major
    +

    Major compute capability

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +minor
    +

    Minor compute capability

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +textureAlignment
    +

    Alignment requirement for textures

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +texturePitchAlignment
    +

    Pitch alignment requirement for texture references bound to pitched +memory

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +deviceOverlap
    +

    Device can concurrently copy memory and execute a kernel. +Deprecated. Use instead asyncEngineCount.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +multiProcessorCount
    +

    Number of multiprocessors on device

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +kernelExecTimeoutEnabled
    +

    Deprecated, Specified whether there is a run time limit on kernels

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +integrated
    +

    Device is integrated as opposed to discrete

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +canMapHostMemory
    +

    Device can map host memory with +cudaHostAlloc/cudaHostGetDevicePointer

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +computeMode
    +

    Deprecated, Compute mode (See cudaComputeMode)

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxTexture1D
    +

    Maximum 1D texture size

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxTexture1DMipmap
    +

    Maximum 1D mipmapped texture size

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxTexture1DLinear
    +

    Deprecated, do not use. Use cudaDeviceGetTexture1DLinearMaxWidth() +or cuDeviceGetTexture1DLinearMaxWidth() instead.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxTexture2D
    +

    Maximum 2D texture dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTexture2DMipmap
    +

    Maximum 2D mipmapped texture dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTexture2DLinear
    +

    Maximum dimensions (width, height, pitch) for 2D textures bound to +pitched memory

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTexture2DGather
    +

    Maximum 2D texture dimensions if texture gather operations have to +be performed

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTexture3D
    +

    Maximum 3D texture dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTexture3DAlt
    +

    Maximum alternate 3D texture dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTextureCubemap
    +

    Maximum Cubemap texture dimensions

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxTexture1DLayered
    +

    Maximum 1D layered texture dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTexture2DLayered
    +

    Maximum 2D layered texture dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxTextureCubemapLayered
    +

    Maximum Cubemap layered texture dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxSurface1D
    +

    Maximum 1D surface size

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxSurface2D
    +

    Maximum 2D surface dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxSurface3D
    +

    Maximum 3D surface dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxSurface1DLayered
    +

    Maximum 1D layered surface dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxSurface2DLayered
    +

    Maximum 2D layered surface dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +maxSurfaceCubemap
    +

    Maximum Cubemap surface dimensions

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxSurfaceCubemapLayered
    +

    Maximum Cubemap layered surface dimensions

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +surfaceAlignment
    +

    Alignment requirements for surfaces

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +concurrentKernels
    +

    Device can possibly execute multiple kernels concurrently

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +ECCEnabled
    +

    Device has ECC support enabled

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +pciBusID
    +

    PCI bus ID of the device

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +pciDeviceID
    +

    PCI device ID of the device

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +pciDomainID
    +

    PCI domain ID of the device

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +tccDriver
    +

    1 if device is a Tesla device using TCC driver, 0 otherwise

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +asyncEngineCount
    +

    Number of asynchronous engines

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +unifiedAddressing
    +

    Device shares a unified address space with the host

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memoryClockRate
    +

    Deprecated, Peak memory clock frequency in kilohertz

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memoryBusWidth
    +

    Global memory bus width in bits

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +l2CacheSize
    +

    Size of L2 cache in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +persistingL2CacheMaxSize
    +

    Device’s maximum l2 persisting lines capacity setting in bytes

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxThreadsPerMultiProcessor
    +

    Maximum resident threads per multiprocessor

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +streamPrioritiesSupported
    +

    Device supports stream priorities

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +globalL1CacheSupported
    +

    Device supports caching globals in L1

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +localL1CacheSupported
    +

    Device supports caching locals in L1

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +sharedMemPerMultiprocessor
    +

    Shared memory available per multiprocessor in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +regsPerMultiprocessor
    +

    32-bit registers available per multiprocessor

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +managedMemory
    +

    Device supports allocating managed memory on this system

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +isMultiGpuBoard
    +

    Device is on a multi-GPU board

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +multiGpuBoardGroupID
    +

    Unique identifier for a group of devices on the same multi-GPU +board

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +hostNativeAtomicSupported
    +

    Link between the device and the host supports native atomic +operations

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +singleToDoublePrecisionPerfRatio
    +

    Deprecated, Ratio of single precision performance (in floating- +point operations per second) to double precision performance

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +pageableMemoryAccess
    +

    Device supports coherently accessing pageable memory without +calling cudaHostRegister on it

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +concurrentManagedAccess
    +

    Device can coherently access managed memory concurrently with the +CPU

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +computePreemptionSupported
    +

    Device supports Compute Preemption

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +canUseHostPointerForRegisteredMem
    +

    Device can access host registered memory at the same virtual +address as the CPU

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +cooperativeLaunch
    +

    Device supports launching cooperative kernels via +cudaLaunchCooperativeKernel

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +cooperativeMultiDeviceLaunch
    +

    Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +sharedMemPerBlockOptin
    +

    Per device maximum shared memory per block usable by special opt in

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +pageableMemoryAccessUsesHostPageTables
    +

    Device accesses pageable memory via the host’s page tables

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +directManagedMemAccessFromHost
    +

    Host can directly access managed memory on the device without +migration.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxBlocksPerMultiProcessor
    +

    Maximum number of resident blocks per multiprocessor

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +accessPolicyMaxWindowSize
    +

    The maximum value of cudaAccessPolicyWindow::num_bytes.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +reservedSharedMemPerBlock
    +

    Shared memory reserved by CUDA driver per block in bytes

    +
    +
    Type:
    +

    size_t

    +
    +
    +
    + +
    +
    +hostRegisterSupported
    +

    Device supports host memory registration via cudaHostRegister.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +sparseCudaArraySupported
    +

    1 if the device supports sparse CUDA arrays and sparse CUDA +mipmapped arrays, 0 otherwise

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +hostRegisterReadOnlySupported
    +

    Device supports using the cudaHostRegister flag +cudaHostRegisterReadOnly to register memory that must be mapped as +read-only to the GPU

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +timelineSemaphoreInteropSupported
    +

    External timeline semaphore interop is supported on the device

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memoryPoolsSupported
    +

    1 if the device supports using the cudaMallocAsync and cudaMemPool +family of APIs, 0 otherwise

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +gpuDirectRDMASupported
    +

    1 if the device supports GPUDirect RDMA APIs, 0 otherwise

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +gpuDirectRDMAFlushWritesOptions
    +

    Bitmask to be interpreted according to the +cudaFlushGPUDirectRDMAWritesOptions enum

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +gpuDirectRDMAWritesOrdering
    +

    See the cudaGPUDirectRDMAWritesOrdering enum for numerical values

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memoryPoolSupportedHandleTypes
    +

    Bitmask of handle types supported with mempool-based IPC

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +deferredMappingCudaArraySupported
    +

    1 if the device supports deferred mapping CUDA arrays and CUDA +mipmapped arrays

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +ipcEventSupported
    +

    Device supports IPC Events.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +clusterLaunch
    +

    Indicates device supports cluster launch

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +unifiedFunctionPointers
    +

    Indicates device supports unified pointers

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +reserved2
    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +reserved1
    +

    Reserved for future use

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +reserved
    +

    Reserved for future use

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaIpcEventHandle_st(void_ptr _ptr=0)
    +

    CUDA IPC event handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaIpcMemHandle_st(void_ptr _ptr=0)
    +

    CUDA IPC memory handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemFabricHandle_st(void_ptr _ptr=0)
    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalMemoryHandleDesc(void_ptr _ptr=0)
    +

    External memory handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    cudaExternalMemoryHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union1

    +
    +
    +
    + +
    +
    +size
    +

    Size of the memory allocation

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags must either be zero or cudaExternalMemoryDedicated

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalMemoryBufferDesc(void_ptr _ptr=0)
    +

    External memory buffer descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the buffer’s base is

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +size
    +

    Size of the buffer

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for future use. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalMemoryMipmappedArrayDesc(void_ptr _ptr=0)
    +

    External memory mipmap descriptor

    +
    +
    +offset
    +

    Offset into the memory object where the base level of the mipmap +chain is.

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +formatDesc
    +

    Format of base level of the mipmap chain

    +
    +
    Type:
    +

    cudaChannelFormatDesc

    +
    +
    +
    + +
    +
    +extent
    +

    Dimensions of base level of the mipmap chain

    +
    +
    Type:
    +

    cudaExtent

    +
    +
    +
    + +
    +
    +flags
    +

    Flags associated with CUDA mipmapped arrays. See +cudaMallocMipmappedArray

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +numLevels
    +

    Total number of levels in the mipmap chain

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreHandleDesc(void_ptr _ptr=0)
    +

    External semaphore handle descriptor

    +
    +
    +type
    +

    Type of the handle

    +
    +
    Type:
    +

    cudaExternalSemaphoreHandleType

    +
    +
    +
    + +
    +
    +handle
    +
    +
    Type:
    +

    anon_union2

    +
    +
    +
    + +
    +
    +flags
    +

    Flags reserved for the future. Must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreSignalParams(void_ptr _ptr=0)
    +

    External semaphore signal parameters, compatible with driver type

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct15

    +
    +
    +
    + +
    +
    +flags
    +

    Only when cudaExternalSemaphoreSignalParams is used to signal a +cudaExternalSemaphore_t of type +cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is +cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates +that while signaling the cudaExternalSemaphore_t, no memory +synchronization operations should be performed for any external +memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For +all other types of cudaExternalSemaphore_t, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreWaitParams(void_ptr _ptr=0)
    +

    External semaphore wait parameters, compatible with driver type

    +
    +
    +params
    +
    +
    Type:
    +

    anon_struct18

    +
    +
    +
    + +
    +
    +flags
    +

    Only when cudaExternalSemaphoreSignalParams is used to signal a +cudaExternalSemaphore_t of type +cudaExternalSemaphoreHandleTypeNvSciSync, the valid flag is +cudaExternalSemaphoreSignalSkipNvSciBufMemSync: which indicates +that while waiting for the cudaExternalSemaphore_t, no memory +synchronization operations should be performed for any external +memory object imported as cudaExternalMemoryHandleTypeNvSciBuf. For +all other types of cudaExternalSemaphore_t, flags must be zero.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +reserved
    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaKernelNodeParams(void_ptr _ptr=0)
    +

    CUDA GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +gridDim
    +

    Grid dimensions

    +
    +
    Type:
    +

    dim3

    +
    +
    +
    + +
    +
    +blockDim
    +

    Block dimensions

    +
    +
    Type:
    +

    dim3

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to individual kernel arguments

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Pointer to kernel arguments in the “extra” format

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaKernelNodeParamsV2(void_ptr _ptr=0)
    +

    CUDA GPU kernel node parameters

    +
    +
    +func
    +

    Kernel to launch

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +gridDim
    +

    Grid dimensions

    +
    +
    Type:
    +

    dim3

    +
    +
    +
    + +
    +
    +blockDim
    +

    Block dimensions

    +
    +
    Type:
    +

    dim3

    +
    +
    +
    + +
    +
    +sharedMemBytes
    +

    Dynamic shared-memory size per thread block in bytes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +kernelParams
    +

    Array of pointers to individual kernel arguments

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +extra
    +

    Pointer to kernel arguments in the “extra” format

    +
    +
    Type:
    +

    Any

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreSignalNodeParams(void_ptr _ptr=0)
    +

    External semaphore signal node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    cudaExternalSemaphore_t

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore signal parameters.

    +
    +
    Type:
    +

    cudaExternalSemaphoreSignalParams

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreSignalNodeParamsV2(void_ptr _ptr=0)
    +

    External semaphore signal node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    cudaExternalSemaphore_t

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore signal parameters.

    +
    +
    Type:
    +

    cudaExternalSemaphoreSignalParams

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreWaitNodeParams(void_ptr _ptr=0)
    +

    External semaphore wait node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    cudaExternalSemaphore_t

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore wait parameters.

    +
    +
    Type:
    +

    cudaExternalSemaphoreWaitParams

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreWaitNodeParamsV2(void_ptr _ptr=0)
    +

    External semaphore wait node parameters

    +
    +
    +extSemArray
    +

    Array of external semaphore handles.

    +
    +
    Type:
    +

    cudaExternalSemaphore_t

    +
    +
    +
    + +
    +
    +paramsArray
    +

    Array of external semaphore wait parameters.

    +
    +
    Type:
    +

    cudaExternalSemaphoreWaitParams

    +
    +
    +
    + +
    +
    +numExtSems
    +

    Number of handles and parameters supplied in extSemArray and +paramsArray.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaConditionalNodeParams(void_ptr _ptr=0)
    +

    CUDA conditional node parameters

    +
    +
    +handle
    +

    Conditional node handle. Handles must be created in advance of +creating the node using cudaGraphConditionalHandleCreate.

    +
    +
    Type:
    +

    cudaGraphConditionalHandle

    +
    +
    +
    + +
    +
    +type
    +

    Type of conditional node.

    +
    +
    Type:
    +

    cudaGraphConditionalNodeType

    +
    +
    +
    + +
    +
    +size
    +

    Size of graph output array. Must be 1.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +phGraph_out
    +

    CUDA-owned array populated with conditional node child graphs +during creation of the node. Valid for the lifetime of the +conditional node. The contents of the graph(s) are subject to the +following constraints: - Allowed node types are kernel nodes, +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. +These graphs may be populated using graph node creation APIs or +cudaStreamBeginCaptureToGraph.

    +
    +
    Type:
    +

    cudaGraph_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaChildGraphNodeParams(void_ptr _ptr=0)
    +

    Child graph node parameters

    +
    +
    +graph
    +

    The child graph to clone into the node for node creation, or a +handle to the graph owned by the node for node query

    +
    +
    Type:
    +

    cudaGraph_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEventRecordNodeParams(void_ptr _ptr=0)
    +

    Event record node parameters

    +
    +
    +event
    +

    The event to record when the node executes

    +
    +
    Type:
    +

    cudaEvent_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEventWaitNodeParams(void_ptr _ptr=0)
    +

    Event wait node parameters

    +
    +
    +event
    +

    The event to wait on from the node

    +
    +
    Type:
    +

    cudaEvent_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphNodeParams(void_ptr _ptr=0)
    +

    Graph node parameters. See cudaGraphAddNode.

    +
    +
    +type
    +

    Type of the node

    +
    +
    Type:
    +

    cudaGraphNodeType

    +
    +
    +
    + +
    +
    +reserved0
    +

    Reserved. Must be zero.

    +
    +
    Type:
    +

    List[int]

    +
    +
    +
    + +
    +
    +reserved1
    +

    Padding. Unused bytes must be zero.

    +
    +
    Type:
    +

    List[long long]

    +
    +
    +
    + +
    +
    +kernel
    +

    Kernel node parameters.

    +
    +
    Type:
    +

    cudaKernelNodeParamsV2

    +
    +
    +
    + +
    +
    +memcpy
    +

    Memcpy node parameters.

    +
    +
    Type:
    +

    cudaMemcpyNodeParams

    +
    +
    +
    + +
    +
    +memset
    +

    Memset node parameters.

    +
    +
    Type:
    +

    cudaMemsetParamsV2

    +
    +
    +
    + +
    +
    +host
    +

    Host node parameters.

    +
    +
    Type:
    +

    cudaHostNodeParamsV2

    +
    +
    +
    + +
    +
    +graph
    +

    Child graph node parameters.

    +
    +
    Type:
    +

    cudaChildGraphNodeParams

    +
    +
    +
    + +
    +
    +eventWait
    +

    Event wait node parameters.

    +
    +
    Type:
    +

    cudaEventWaitNodeParams

    +
    +
    +
    + +
    +
    +eventRecord
    +

    Event record node parameters.

    +
    +
    Type:
    +

    cudaEventRecordNodeParams

    +
    +
    +
    + +
    +
    +extSemSignal
    +

    External semaphore signal node parameters.

    +
    +
    Type:
    +

    cudaExternalSemaphoreSignalNodeParamsV2

    +
    +
    +
    + +
    +
    +extSemWait
    +

    External semaphore wait node parameters.

    +
    +
    Type:
    +

    cudaExternalSemaphoreWaitNodeParamsV2

    +
    +
    +
    + +
    +
    +alloc
    +

    Memory allocation node parameters.

    +
    +
    Type:
    +

    cudaMemAllocNodeParamsV2

    +
    +
    +
    + +
    +
    +free
    +

    Memory free node parameters.

    +
    +
    Type:
    +

    cudaMemFreeNodeParams

    +
    +
    +
    + +
    +
    +conditional
    +

    Conditional node parameters.

    +
    +
    Type:
    +

    cudaConditionalNodeParams

    +
    +
    +
    + +
    +
    +reserved2
    +

    Reserved bytes. Must be zero.

    +
    +
    Type:
    +

    long long

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphEdgeData_st(void_ptr _ptr=0)
    +

    Optional annotation for edges in a CUDA graph. Note, all edges +implicitly have annotations and default to a zero-initialized value +if not specified. A zero-initialized struct indicates a standard +full serialization of two nodes with memory visibility.

    +
    +
    +from_port
    +

    This indicates when the dependency is triggered from the upstream +node on the edge. The meaning is specfic to the node type. A value +of 0 in all cases means full completion of the upstream node, with +memory visibility to the downstream node or portion thereof +(indicated by to_port). Only kernel nodes define non-zero +ports. A kernel node can use the following output port types: +cudaGraphKernelNodePortDefault, +cudaGraphKernelNodePortProgrammatic, or +cudaGraphKernelNodePortLaunchCompletion.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +to_port
    +

    This indicates what portion of the downstream node is dependent on +the upstream node or portion thereof (indicated by from_port). +The meaning is specific to the node type. A value of 0 in all cases +means the entirety of the downstream node is dependent on the +upstream work. Currently no node types define non-zero ports. +Accordingly, this field must be set to zero.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +type
    +

    This should be populated with a value from +::cudaGraphDependencyType. (It is typed as char due to compiler- +specific layout of bitfields.) See ::cudaGraphDependencyType.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +reserved
    +

    These bytes are unused and must be zeroed. This ensures +compatibility if additional fields are added in the future.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphInstantiateParams_st(void_ptr _ptr=0)
    +

    Graph instantiation parameters

    +
    +
    +flags
    +

    Instantiation flags

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +uploadStream
    +

    Upload stream

    +
    +
    Type:
    +

    cudaStream_t

    +
    +
    +
    + +
    +
    +errNode_out
    +

    The node which caused instantiation to fail, if any

    +
    +
    Type:
    +

    cudaGraphNode_t

    +
    +
    +
    + +
    +
    +result_out
    +

    Whether instantiation was successful. If it failed, the reason why

    +
    +
    Type:
    +

    cudaGraphInstantiateResult

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphExecUpdateResultInfo_st(void_ptr _ptr=0)
    +

    Result information returned by cudaGraphExecUpdate

    +
    +
    +result
    +

    Gives more specific detail when a cuda graph update fails.

    +
    +
    Type:
    +

    cudaGraphExecUpdateResult

    +
    +
    +
    + +
    +
    +errorNode
    +

    The “to node” of the error edge when the topologies do not match. +The error node when the error is associated with a specific node. +NULL when the error is generic.

    +
    +
    Type:
    +

    cudaGraphNode_t

    +
    +
    +
    + +
    +
    +errorFromNode
    +

    The from node of error edge when the topologies do not match. +Otherwise NULL.

    +
    +
    Type:
    +

    cudaGraphNode_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphKernelNodeUpdate(void_ptr _ptr=0)
    +

    Struct to specify a single node update to pass as part of a larger +array to ::cudaGraphKernelNodeUpdatesApply

    +
    +
    +node
    +

    Node to update

    +
    +
    Type:
    +

    cudaGraphDeviceNode_t

    +
    +
    +
    + +
    +
    +field
    +

    Which type of update to apply. Determines how updateData is +interpreted

    +
    +
    Type:
    +

    cudaGraphKernelNodeField

    +
    +
    +
    + +
    +
    +updateData
    +

    Update data to apply. Which field is used depends on field’s value

    +
    +
    Type:
    +

    anon_union8

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLaunchMemSyncDomainMap_st(void_ptr _ptr=0)
    +

    Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By +default, kernels are launched in domain 0. Kernel launched with +cudaLaunchMemSyncDomainRemote will have a different domain ID. User +may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for +a specific stream / graph node / kernel launch. See +cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available +through cudaDevAttrMemSyncDomainCount.

    +
    +
    +default_
    +

    The default domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +remote
    +

    The remote domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLaunchAttributeValue(void_ptr _ptr=0)
    +

    Launch attributes union; used as value field of +::cudaLaunchAttribute

    +
    +
    +pad
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +accessPolicyWindow
    +

    Value of launch attribute cudaLaunchAttributeAccessPolicyWindow.

    +
    +
    Type:
    +

    cudaAccessPolicyWindow

    +
    +
    +
    + +
    +
    +cooperative
    +

    Value of launch attribute cudaLaunchAttributeCooperative. Nonzero +indicates a cooperative kernel (see cudaLaunchCooperativeKernel).

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +syncPolicy
    +

    Value of launch attribute cudaLaunchAttributeSynchronizationPolicy. +::cudaSynchronizationPolicy for work queued up in this stream.

    +
    +
    Type:
    +

    cudaSynchronizationPolicy

    +
    +
    +
    + +
    +
    +clusterDim
    +

    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 +cluster, in blocks. Must be a divisor of the grid X dimension. - +y - The Y dimension of the cluster, in blocks. Must be a divisor +of the grid Y dimension. - z - The Z dimension of the cluster, +in blocks. Must be a divisor of the grid Z dimension.

    +
    +
    Type:
    +

    anon_struct20

    +
    +
    +
    + +
    +
    +clusterSchedulingPolicyPreference
    +

    Value of launch attribute +cudaLaunchAttributeClusterSchedulingPolicyPreference. Cluster +scheduling policy preference for the kernel.

    +
    +
    Type:
    +

    cudaClusterSchedulingPolicy

    +
    +
    +
    + +
    +
    +programmaticStreamSerializationAllowed
    +

    Value of launch attribute +cudaLaunchAttributeProgrammaticStreamSerialization.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +programmaticEvent
    +

    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 +cudaEventRecordWithFlags. Does not accept cudaEventRecordExternal. +- int triggerAtBlockStart - If this is set to non-0, each block +launch will automatically trigger the event.

    +
    +
    Type:
    +

    anon_struct21

    +
    +
    +
    + +
    +
    +priority
    +

    Value of launch attribute cudaLaunchAttributePriority. Execution +priority of the kernel.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +memSyncDomainMap
    +

    Value of launch attribute cudaLaunchAttributeMemSyncDomainMap. See +::cudaLaunchMemSyncDomainMap.

    +
    +
    Type:
    +

    cudaLaunchMemSyncDomainMap

    +
    +
    +
    + +
    +
    +memSyncDomain
    +

    Value of launch attribute cudaLaunchAttributeMemSyncDomain. See +cudaLaunchMemSyncDomain.

    +
    +
    Type:
    +

    cudaLaunchMemSyncDomain

    +
    +
    +
    + +
    +
    +launchCompletionEvent
    +

    Value of launch attribute cudaLaunchAttributeLaunchCompletionEvent +with the following fields: - cudaEvent_t event - Event to fire +when the last block launches. - int flags - Event record +flags, see cudaEventRecordWithFlags. Does not accept +cudaEventRecordExternal.

    +
    +
    Type:
    +

    anon_struct22

    +
    +
    +
    + +
    +
    +deviceUpdatableKernelNode
    +

    Value of launch attribute +cudaLaunchAttributeDeviceUpdatableKernelNode with the following +fields: - int deviceUpdatable - Whether or not the resulting +kernel node should be device-updatable. - +cudaGraphDeviceNode_t devNode - Returns a handle to pass to the +various device-side update functions.

    +
    +
    Type:
    +

    anon_struct23

    +
    +
    +
    + +
    +
    +sharedMemCarveout
    +

    Value of launch attribute +cudaLaunchAttributePreferredSharedMemoryCarveout.

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLaunchAttribute_st(void_ptr _ptr=0)
    +

    Launch attribute

    +
    +
    +id
    +

    Attribute to set

    +
    +
    Type:
    +

    cudaLaunchAttributeID

    +
    +
    +
    + +
    +
    +val
    +

    Value of the attribute

    +
    +
    Type:
    +

    cudaLaunchAttributeValue

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaAsyncNotificationInfo(void_ptr _ptr=0)
    +

    Information describing an async notification event

    +
    +
    +type
    +
    +
    Type:
    +

    cudaAsyncNotificationType

    +
    +
    +
    + +
    +
    +info
    +
    +
    Type:
    +

    anon_union9

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaTextureDesc(void_ptr _ptr=0)
    +

    CUDA texture descriptor

    +
    +
    +addressMode
    +

    Texture address mode for up to 3 dimensions

    +
    +
    Type:
    +

    List[cudaTextureAddressMode]

    +
    +
    +
    + +
    +
    +filterMode
    +

    Texture filter mode

    +
    +
    Type:
    +

    cudaTextureFilterMode

    +
    +
    +
    + +
    +
    +readMode
    +

    Texture read mode

    +
    +
    Type:
    +

    cudaTextureReadMode

    +
    +
    +
    + +
    +
    +sRGB
    +

    Perform sRGB->linear conversion during texture read

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +borderColor
    +

    Texture Border Color

    +
    +
    Type:
    +

    List[float]

    +
    +
    +
    + +
    +
    +normalizedCoords
    +

    Indicates whether texture reads are normalized or not

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +maxAnisotropy
    +

    Limit to the anisotropy ratio

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +mipmapFilterMode
    +

    Mipmap filter mode

    +
    +
    Type:
    +

    cudaTextureFilterMode

    +
    +
    +
    + +
    +
    +mipmapLevelBias
    +

    Offset applied to the supplied mipmap level

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +minMipmapLevelClamp
    +

    Lower end of the mipmap level range to clamp access to

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +maxMipmapLevelClamp
    +

    Upper end of the mipmap level range to clamp access to

    +
    +
    Type:
    +

    float

    +
    +
    +
    + +
    +
    +disableTrilinearOptimization
    +

    Disable any trilinear filtering optimizations.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +seamlessCubemap
    +

    Enable seamless cube map filtering.

    +
    +
    Type:
    +

    int

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEglFrameType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA EglFrame type - array or pointer

    +
    +
    +cudaEglFrameTypeArray = 0
    +

    Frame type CUDA array

    +
    + +
    +
    +cudaEglFrameTypePitch = 1
    +

    Frame type CUDA pointer

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEglResourceLocationFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Resource location flags- sysmem or vidmem For CUDA context on +iGPU, since video and system memory are equivalent - these flags +will not have an effect on the execution. For CUDA context on +dGPU, applications can use the flag +cudaEglResourceLocationFlags to give a hint about the +desired location. cudaEglResourceLocationSysmem - the +frame data is made resident on the system memory to be accessed by +CUDA. cudaEglResourceLocationVidmem - the frame data +is made resident on the dedicated video memory to be accessed by +CUDA. There may be an additional latency due to new allocation and +data migration, if the frame is produced on a different memory.

    +
    +
    +cudaEglResourceLocationSysmem = 0
    +

    Resource location sysmem

    +
    + +
    +
    +cudaEglResourceLocationVidmem = 1
    +

    Resource location vidmem

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEglColorFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA EGL Color Format - The different planar and multiplanar +formats currently supported for CUDA_EGL interops.

    +
    +
    +cudaEglColorFormatYUV420Planar = 0
    +

    Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV420SemiPlanar = 1
    +

    Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV420Planar.

    +
    + +
    +
    +cudaEglColorFormatYUV422Planar = 2
    +

    Y, U, V each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV422SemiPlanar = 3
    +

    Y, UV in two surfaces with VU byte ordering, width, height ratio same as YUV422Planar.

    +
    + +
    +
    +cudaEglColorFormatARGB = 6
    +

    R/G/B/A four channels in one surface with BGRA byte ordering.

    +
    + +
    +
    +cudaEglColorFormatRGBA = 7
    +

    R/G/B/A four channels in one surface with ABGR byte ordering.

    +
    + +
    +
    +cudaEglColorFormatL = 8
    +

    single luminance channel in one surface.

    +
    + +
    +
    +cudaEglColorFormatR = 9
    +

    single color channel in one surface.

    +
    + +
    +
    +cudaEglColorFormatYUV444Planar = 10
    +

    Y, U, V in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV444SemiPlanar = 11
    +

    Y, UV in two surfaces (UV as one surface) with VU byte ordering, width, height ratio same as YUV444Planar.

    +
    + +
    +
    +cudaEglColorFormatYUYV422 = 12
    +

    Y, U, V in one surface, interleaved as UYVY in one channel.

    +
    + +
    +
    +cudaEglColorFormatUYVY422 = 13
    +

    Y, U, V in one surface, interleaved as YUYV in one channel.

    +
    + +
    +
    +cudaEglColorFormatABGR = 14
    +

    R/G/B/A four channels in one surface with RGBA byte ordering.

    +
    + +
    +
    +cudaEglColorFormatBGRA = 15
    +

    R/G/B/A four channels in one surface with ARGB byte ordering.

    +
    + +
    +
    +cudaEglColorFormatA = 16
    +

    Alpha color format - one channel in one surface.

    +
    + +
    +
    +cudaEglColorFormatRG = 17
    +

    R/G color format - two channels in one surface with GR byte ordering

    +
    + +
    +
    +cudaEglColorFormatAYUV = 18
    +

    Y, U, V, A four channels in one surface, interleaved as VUYA.

    +
    + +
    +
    +cudaEglColorFormatYVU444SemiPlanar = 19
    +

    Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU422SemiPlanar = 20
    +

    Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420SemiPlanar = 21
    +

    Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_444SemiPlanar = 22
    +

    Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_420SemiPlanar = 23
    +

    Y10, V10U10 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY12V12U12_444SemiPlanar = 24
    +

    Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY12V12U12_420SemiPlanar = 25
    +

    Y12, V12U12 in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatVYUY_ER = 26
    +

    Extended Range Y, U, V in one surface, interleaved as YVYU in one channel.

    +
    + +
    +
    +cudaEglColorFormatUYVY_ER = 27
    +

    Extended Range Y, U, V in one surface, interleaved as YUYV in one channel.

    +
    + +
    +
    +cudaEglColorFormatYUYV_ER = 28
    +

    Extended Range Y, U, V in one surface, interleaved as UYVY in one channel.

    +
    + +
    +
    +cudaEglColorFormatYVYU_ER = 29
    +

    Extended Range Y, U, V in one surface, interleaved as VYUY in one channel.

    +
    + +
    +
    +cudaEglColorFormatYUVA_ER = 31
    +

    Extended Range Y, U, V, A four channels in one surface, interleaved as AVUY.

    +
    + +
    +
    +cudaEglColorFormatAYUV_ER = 32
    +

    Extended Range Y, U, V, A four channels in one surface, interleaved as VUYA.

    +
    + +
    +
    +cudaEglColorFormatYUV444Planar_ER = 33
    +

    Extended Range Y, U, V in three surfaces, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV422Planar_ER = 34
    +

    Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV420Planar_ER = 35
    +

    Extended Range Y, U, V in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV444SemiPlanar_ER = 36
    +

    Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV422SemiPlanar_ER = 37
    +

    Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV420SemiPlanar_ER = 38
    +

    Extended Range Y, UV in two surfaces (UV as one surface) with VU byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU444Planar_ER = 39
    +

    Extended Range Y, V, U in three surfaces, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU422Planar_ER = 40
    +

    Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420Planar_ER = 41
    +

    Extended Range Y, V, U in three surfaces, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU444SemiPlanar_ER = 42
    +

    Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU422SemiPlanar_ER = 43
    +

    Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420SemiPlanar_ER = 44
    +

    Extended Range Y, VU in two surfaces (VU as one surface) with UV byte ordering, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatBayerRGGB = 45
    +

    Bayer format - one channel in one surface with interleaved RGGB ordering.

    +
    + +
    +
    +cudaEglColorFormatBayerBGGR = 46
    +

    Bayer format - one channel in one surface with interleaved BGGR ordering.

    +
    + +
    +
    +cudaEglColorFormatBayerGRBG = 47
    +

    Bayer format - one channel in one surface with interleaved GRBG ordering.

    +
    + +
    +
    +cudaEglColorFormatBayerGBRG = 48
    +

    Bayer format - one channel in one surface with interleaved GBRG ordering.

    +
    + +
    +
    +cudaEglColorFormatBayer10RGGB = 49
    +

    Bayer10 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer10BGGR = 50
    +

    Bayer10 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer10GRBG = 51
    +

    Bayer10 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer10GBRG = 52
    +

    Bayer10 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12RGGB = 53
    +

    Bayer12 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12BGGR = 54
    +

    Bayer12 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12GRBG = 55
    +

    Bayer12 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12GBRG = 56
    +

    Bayer12 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer14RGGB = 57
    +

    Bayer14 format - one channel in one surface with interleaved RGGB ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer14BGGR = 58
    +

    Bayer14 format - one channel in one surface with interleaved BGGR ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer14GRBG = 59
    +

    Bayer14 format - one channel in one surface with interleaved GRBG ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer14GBRG = 60
    +

    Bayer14 format - one channel in one surface with interleaved GBRG ordering. Out of 16 bits, 14 bits used 2 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer20RGGB = 61
    +

    Bayer20 format - one channel in one surface with interleaved RGGB ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer20BGGR = 62
    +

    Bayer20 format - one channel in one surface with interleaved BGGR ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer20GRBG = 63
    +

    Bayer20 format - one channel in one surface with interleaved GRBG ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer20GBRG = 64
    +

    Bayer20 format - one channel in one surface with interleaved GBRG ordering. Out of 32 bits, 20 bits used 12 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatYVU444Planar = 65
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU422Planar = 66
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420Planar = 67
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatBayerIspRGGB = 68
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved RGGB ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +cudaEglColorFormatBayerIspBGGR = 69
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved BGGR ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +cudaEglColorFormatBayerIspGRBG = 70
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GRBG ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +cudaEglColorFormatBayerIspGBRG = 71
    +

    Nvidia proprietary Bayer ISP format - one channel in one surface with interleaved GBRG ordering and mapped to opaque integer datatype.

    +
    + +
    +
    +cudaEglColorFormatBayerBCCR = 72
    +

    Bayer format - one channel in one surface with interleaved BCCR ordering.

    +
    + +
    +
    +cudaEglColorFormatBayerRCCB = 73
    +

    Bayer format - one channel in one surface with interleaved RCCB ordering.

    +
    + +
    +
    +cudaEglColorFormatBayerCRBC = 74
    +

    Bayer format - one channel in one surface with interleaved CRBC ordering.

    +
    + +
    +
    +cudaEglColorFormatBayerCBRC = 75
    +

    Bayer format - one channel in one surface with interleaved CBRC ordering.

    +
    + +
    +
    +cudaEglColorFormatBayer10CCCC = 76
    +

    Bayer10 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 10 bits used 6 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12BCCR = 77
    +

    Bayer12 format - one channel in one surface with interleaved BCCR ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12RCCB = 78
    +

    Bayer12 format - one channel in one surface with interleaved RCCB ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12CRBC = 79
    +

    Bayer12 format - one channel in one surface with interleaved CRBC ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12CBRC = 80
    +

    Bayer12 format - one channel in one surface with interleaved CBRC ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatBayer12CCCC = 81
    +

    Bayer12 format - one channel in one surface with interleaved CCCC ordering. Out of 16 bits, 12 bits used 4 bits No-op.

    +
    + +
    +
    +cudaEglColorFormatY = 82
    +

    Color format for single Y plane.

    +
    + +
    +
    +cudaEglColorFormatYUV420SemiPlanar_2020 = 83
    +

    Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420SemiPlanar_2020 = 84
    +

    Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV420Planar_2020 = 85
    +

    Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420Planar_2020 = 86
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV420SemiPlanar_709 = 87
    +

    Y, UV in two surfaces (UV as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420SemiPlanar_709 = 88
    +

    Y, VU in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYUV420Planar_709 = 89
    +

    Y, U, V in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatYVU420Planar_709 = 90
    +

    Y, V, U in three surfaces, each in a separate surface, U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_420SemiPlanar_709 = 91
    +

    Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_420SemiPlanar_2020 = 92
    +

    Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_422SemiPlanar_2020 = 93
    +

    Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_422SemiPlanar = 94
    +

    Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_422SemiPlanar_709 = 95
    +

    Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY_ER = 96
    +

    Extended Range Color format for single Y plane.

    +
    + +
    +
    +cudaEglColorFormatY_709_ER = 97
    +

    Extended Range Color format for single Y plane.

    +
    + +
    +
    +cudaEglColorFormatY10_ER = 98
    +

    Extended Range Color format for single Y10 plane.

    +
    + +
    +
    +cudaEglColorFormatY10_709_ER = 99
    +

    Extended Range Color format for single Y10 plane.

    +
    + +
    +
    +cudaEglColorFormatY12_ER = 100
    +

    Extended Range Color format for single Y12 plane.

    +
    + +
    +
    +cudaEglColorFormatY12_709_ER = 101
    +

    Extended Range Color format for single Y12 plane.

    +
    + +
    +
    +cudaEglColorFormatYUVA = 102
    +

    Y, U, V, A four channels in one surface, interleaved as AVUY.

    +
    + +
    +
    +cudaEglColorFormatYVYU = 104
    +

    Y, U, V in one surface, interleaved as YVYU in one channel.

    +
    + +
    +
    +cudaEglColorFormatVYUY = 105
    +

    Y, U, V in one surface, interleaved as VYUY in one channel.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_420SemiPlanar_ER = 106
    +

    Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_420SemiPlanar_709_ER = 107
    +

    Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_444SemiPlanar_ER = 108
    +

    Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY10V10U10_444SemiPlanar_709_ER = 109
    +

    Extended Range Y10, V10U10 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY12V12U12_420SemiPlanar_ER = 110
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY12V12U12_420SemiPlanar_709_ER = 111
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = 1/2 Y width, U/V height = 1/2 Y height.

    +
    + +
    +
    +cudaEglColorFormatY12V12U12_444SemiPlanar_ER = 112
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    +
    +cudaEglColorFormatY12V12U12_444SemiPlanar_709_ER = 113
    +

    Extended Range Y12, V12U12 in two surfaces (VU as one surface) U/V width = Y width, U/V height = Y height.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaError_t(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    impl_private CUDA error types

    +
    +
    +cudaSuccess = 0
    +

    The API call returned with no errors. In the case of query calls, this also means that the operation being queried is complete (see cudaEventQuery() and cudaStreamQuery()).

    +
    + +
    +
    +cudaErrorInvalidValue = 1
    +

    This indicates that one or more of the parameters passed to the API call is not within an acceptable range of values.

    +
    + +
    +
    +cudaErrorMemoryAllocation = 2
    +

    The API call failed because it was unable to allocate enough memory or other resources to perform the requested operation.

    +
    + +
    +
    +cudaErrorInitializationError = 3
    +

    The API call failed because the CUDA driver and runtime could not be initialized.

    +
    + +
    +
    +cudaErrorCudartUnloading = 4
    +

    This indicates that a CUDA Runtime API call cannot be executed because it is being called during process shut down, at a point in time after CUDA driver has been unloaded.

    +
    + +
    +
    +cudaErrorProfilerDisabled = 5
    +

    This indicates profiler is not initialized for this run. This can happen when the application is running with external profiling tools like visual profiler.

    +
    + +
    +
    +cudaErrorProfilerNotInitialized = 6
    +

    [Deprecated]

    +
    + +
    +
    +cudaErrorProfilerAlreadyStarted = 7
    +

    [Deprecated]

    +
    + +
    +
    +cudaErrorProfilerAlreadyStopped = 8
    +

    [Deprecated]

    +
    + +
    +
    +cudaErrorInvalidConfiguration = 9
    +

    This indicates that a kernel launch is requesting resources that can never be satisfied by the current device. Requesting more shared memory per block than the device supports will trigger this error, as will requesting too many threads or blocks. See cudaDeviceProp for more device limitations.

    +
    + +
    +
    +cudaErrorInvalidPitchValue = 12
    +

    This indicates that one or more of the pitch-related parameters passed to the API call is not within the acceptable range for pitch.

    +
    + +
    +
    +cudaErrorInvalidSymbol = 13
    +

    This indicates that the symbol name/identifier passed to the API call is not a valid name or identifier.

    +
    + +
    +
    +cudaErrorInvalidHostPointer = 16
    +

    This indicates that at least one host pointer passed to the API call is not a valid host pointer. [Deprecated]

    +
    + +
    +
    +cudaErrorInvalidDevicePointer = 17
    +

    This indicates that at least one device pointer passed to the API call is not a valid device pointer. [Deprecated]

    +
    + +
    +
    +cudaErrorInvalidTexture = 18
    +

    This indicates that the texture passed to the API call is not a valid texture.

    +
    + +
    +
    +cudaErrorInvalidTextureBinding = 19
    +

    This indicates that the texture binding is not valid. This occurs if you call cudaGetTextureAlignmentOffset() with an unbound texture.

    +
    + +
    +
    +cudaErrorInvalidChannelDescriptor = 20
    +

    This indicates that the channel descriptor passed to the API call is not valid. This occurs if the format is not one of the formats specified by cudaChannelFormatKind, or if one of the dimensions is invalid.

    +
    + +
    +
    +cudaErrorInvalidMemcpyDirection = 21
    +

    This indicates that the direction of the memcpy passed to the API call is not one of the types specified by cudaMemcpyKind.

    +
    + +
    +
    +cudaErrorAddressOfConstant = 22
    +

    This indicated that the user has taken the address of a constant variable, which was forbidden up until the CUDA 3.1 release. [Deprecated]

    +
    + +
    +
    +cudaErrorTextureFetchFailed = 23
    +

    This indicated that a texture fetch was not able to be performed. This was previously used for device emulation of texture operations. [Deprecated]

    +
    + +
    +
    +cudaErrorTextureNotBound = 24
    +

    This indicated that a texture was not bound for access. This was previously used for device emulation of texture operations. [Deprecated]

    +
    + +
    +
    +cudaErrorSynchronizationError = 25
    +

    This indicated that a synchronization operation had failed. This was previously used for some device emulation functions. [Deprecated]

    +
    + +
    +
    +cudaErrorInvalidFilterSetting = 26
    +

    This indicates that a non-float texture was being accessed with linear filtering. This is not supported by CUDA.

    +
    + +
    +
    +cudaErrorInvalidNormSetting = 27
    +

    This indicates that an attempt was made to read a non-float texture as a normalized float. This is not supported by CUDA.

    +
    + +
    +
    +cudaErrorMixedDeviceExecution = 28
    +

    Mixing of device and device emulation code was not allowed. [Deprecated]

    +
    + +
    +
    +cudaErrorNotYetImplemented = 31
    +

    This indicates that the API call is not yet implemented. Production releases of CUDA will never return this error. [Deprecated]

    +
    + +
    +
    +cudaErrorMemoryValueTooLarge = 32
    +

    This indicated that an emulated device pointer exceeded the 32-bit address range. [Deprecated]

    +
    + +
    +
    +cudaErrorStubLibrary = 34
    +

    This indicates that the CUDA driver that the application has loaded is a stub library. Applications that run with the stub rather than a real driver loaded will result in CUDA API returning this error.

    +
    + +
    +
    +cudaErrorInsufficientDriver = 35
    +

    This indicates that the installed NVIDIA CUDA driver is older than the CUDA runtime library. This is not a supported configuration. Users should install an updated NVIDIA display driver to allow the application to run.

    +
    + +
    +
    +cudaErrorCallRequiresNewerDriver = 36
    +

    This indicates that the API call requires a newer CUDA driver than the one currently installed. Users should install an updated NVIDIA CUDA driver to allow the API call to succeed.

    +
    + +
    +
    +cudaErrorInvalidSurface = 37
    +

    This indicates that the surface passed to the API call is not a valid surface.

    +
    + +
    +
    +cudaErrorDuplicateVariableName = 43
    +

    This indicates that multiple global or constant variables (across separate CUDA source files in the application) share the same string name.

    +
    + +
    +
    +cudaErrorDuplicateTextureName = 44
    +

    This indicates that multiple textures (across separate CUDA source files in the application) share the same string name.

    +
    + +
    +
    +cudaErrorDuplicateSurfaceName = 45
    +

    This indicates that multiple surfaces (across separate CUDA source files in the application) share the same string name.

    +
    + +
    +
    +cudaErrorDevicesUnavailable = 46
    +

    This indicates that all CUDA devices are busy or unavailable at the current time. Devices are often busy/unavailable due to use of cudaComputeModeProhibited, cudaComputeModeExclusiveProcess, or when long running CUDA kernels have filled up the GPU and are blocking new work from starting. They can also be unavailable due to memory constraints on a device that already has active CUDA work being performed.

    +
    + +
    +
    +cudaErrorIncompatibleDriverContext = 49
    +

    This indicates that the current context is not compatible with this the CUDA Runtime. This can only occur if you are using CUDA Runtime/Driver interoperability and have created an existing Driver context using the driver API. The Driver context may be incompatible either because the Driver context was created using an older version of the API, because the Runtime API call expects a primary driver context and the Driver context is not primary, or because the Driver context has been destroyed. Please see :py:obj:`~.Interactions`with the CUDA Driver API” for more information.

    +
    + +
    +
    +cudaErrorMissingConfiguration = 52
    +

    The device function being invoked (usually via cudaLaunchKernel()) was not previously configured via the cudaConfigureCall() function.

    +
    + +
    +
    +cudaErrorPriorLaunchFailure = 53
    +

    This indicated that a previous kernel launch failed. This was previously used for device emulation of kernel launches. [Deprecated]

    +
    + +
    +
    +cudaErrorLaunchMaxDepthExceeded = 65
    +

    This error indicates that a device runtime grid launch did not occur because the depth of the child grid would exceed the maximum supported number of nested grid launches.

    +
    + +
    +
    +cudaErrorLaunchFileScopedTex = 66
    +

    This error indicates that a grid launch did not occur because the kernel uses file-scoped textures which are unsupported by the device runtime. Kernels launched via the device runtime only support textures created with the Texture Object API’s.

    +
    + +
    +
    +cudaErrorLaunchFileScopedSurf = 67
    +

    This error indicates that a grid launch did not occur because the kernel uses file-scoped surfaces which are unsupported by the device runtime. Kernels launched via the device runtime only support surfaces created with the Surface Object API’s.

    +
    + +
    +
    +cudaErrorSyncDepthExceeded = 68
    +

    This error indicates that a call to cudaDeviceSynchronize made from the device runtime failed because the call was made at grid depth greater than than either the default (2 levels of grids) or user specified device limit cudaLimitDevRuntimeSyncDepth. To be able to synchronize on launched grids at a greater depth successfully, the maximum nested depth at which cudaDeviceSynchronize will be called must be specified with the cudaLimitDevRuntimeSyncDepth limit to the cudaDeviceSetLimit api before the host-side launch of a kernel using the device runtime. Keep in mind that additional levels of sync depth require the runtime to reserve large amounts of device memory that cannot be used for user allocations. Note that cudaDeviceSynchronize made from device runtime is only supported on devices of compute capability < 9.0.

    +
    + +
    +
    +cudaErrorLaunchPendingCountExceeded = 69
    +

    This error indicates that a device runtime grid launch failed because the launch would exceed the limit cudaLimitDevRuntimePendingLaunchCount. For this launch to proceed successfully, cudaDeviceSetLimit must be called to set the cudaLimitDevRuntimePendingLaunchCount to be higher than the upper bound of outstanding launches that can be issued to the device runtime. Keep in mind that raising the limit of pending device runtime launches will require the runtime to reserve device memory that cannot be used for user allocations.

    +
    + +
    +
    +cudaErrorInvalidDeviceFunction = 98
    +

    The requested device function does not exist or is not compiled for the proper device architecture.

    +
    + +
    +
    +cudaErrorNoDevice = 100
    +

    This indicates that no CUDA-capable devices were detected by the installed CUDA driver.

    +
    + +
    +
    +cudaErrorInvalidDevice = 101
    +

    This indicates that the device ordinal supplied by the user does not correspond to a valid CUDA device or that the action requested is invalid for the specified device.

    +
    + +
    +
    +cudaErrorDeviceNotLicensed = 102
    +

    This indicates that the device doesn’t have a valid Grid License.

    +
    + +
    +
    +cudaErrorSoftwareValidityNotEstablished = 103
    +

    By default, the CUDA runtime may perform a minimal set of self-tests, as well as CUDA driver tests, to establish the validity of both. Introduced in CUDA 11.2, this error return indicates that at least one of these tests has failed and the validity of either the runtime or the driver could not be established.

    +
    + +
    +
    +cudaErrorStartupFailure = 127
    +

    This indicates an internal startup failure in the CUDA runtime.

    +
    + +
    +
    +cudaErrorInvalidKernelImage = 200
    +

    This indicates that the device kernel image is invalid.

    +
    + +
    +
    +cudaErrorDeviceUninitialized = 201
    +

    This most frequently indicates that there is no context bound to the current thread. This can also be returned if the context passed to an API call is not a valid handle (such as a context that has had cuCtxDestroy() invoked on it). This can also be returned if a user mixes different API versions (i.e. 3010 context with 3020 API calls). See cuCtxGetApiVersion() for more details.

    +
    + +
    +
    +cudaErrorMapBufferObjectFailed = 205
    +

    This indicates that the buffer object could not be mapped.

    +
    + +
    +
    +cudaErrorUnmapBufferObjectFailed = 206
    +

    This indicates that the buffer object could not be unmapped.

    +
    + +
    +
    +cudaErrorArrayIsMapped = 207
    +

    This indicates that the specified array is currently mapped and thus cannot be destroyed.

    +
    + +
    +
    +cudaErrorAlreadyMapped = 208
    +

    This indicates that the resource is already mapped.

    +
    + +
    +
    +cudaErrorNoKernelImageForDevice = 209
    +

    This indicates that there is no kernel image available that is suitable for the device. This can occur when a user specifies code generation options for a particular CUDA source file that do not include the corresponding device configuration.

    +
    + +
    +
    +cudaErrorAlreadyAcquired = 210
    +

    This indicates that a resource has already been acquired.

    +
    + +
    +
    +cudaErrorNotMapped = 211
    +

    This indicates that a resource is not mapped.

    +
    + +
    +
    +cudaErrorNotMappedAsArray = 212
    +

    This indicates that a mapped resource is not available for access as an array.

    +
    + +
    +
    +cudaErrorNotMappedAsPointer = 213
    +

    This indicates that a mapped resource is not available for access as a pointer.

    +
    + +
    +
    +cudaErrorECCUncorrectable = 214
    +

    This indicates that an uncorrectable ECC error was detected during execution.

    +
    + +
    +
    +cudaErrorUnsupportedLimit = 215
    +

    This indicates that the cudaLimit passed to the API call is not supported by the active device.

    +
    + +
    +
    +cudaErrorDeviceAlreadyInUse = 216
    +

    This indicates that a call tried to access an exclusive-thread device that is already in use by a different thread.

    +
    + +
    +
    +cudaErrorPeerAccessUnsupported = 217
    +

    This error indicates that P2P access is not supported across the given devices.

    +
    + +
    +
    +cudaErrorInvalidPtx = 218
    +

    A PTX compilation failed. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device.

    +
    + +
    +
    +cudaErrorInvalidGraphicsContext = 219
    +

    This indicates an error with the OpenGL or DirectX context.

    +
    + +
    +
    +cudaErrorNvlinkUncorrectable = 220
    +

    This indicates that an uncorrectable NVLink error was detected during the execution.

    +
    + +
    +
    +cudaErrorJitCompilerNotFound = 221
    +

    This indicates that the PTX JIT compiler library was not found. The JIT Compiler library is used for PTX compilation. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device.

    +
    + +
    +
    +cudaErrorUnsupportedPtxVersion = 222
    +

    This indicates that the provided PTX was compiled with an unsupported toolchain. The most common reason for this, is the PTX was generated by a compiler newer than what is supported by the CUDA driver and PTX JIT compiler.

    +
    + +
    +
    +cudaErrorJitCompilationDisabled = 223
    +

    This indicates that the JIT compilation was disabled. The JIT compilation compiles PTX. The runtime may fall back to compiling PTX if an application does not contain a suitable binary for the current device.

    +
    + +
    +
    +cudaErrorUnsupportedExecAffinity = 224
    +

    This indicates that the provided execution affinity is not supported by the device.

    +
    + +
    +
    +cudaErrorUnsupportedDevSideSync = 225
    +

    This indicates that the code to be compiled by the PTX JIT contains unsupported call to cudaDeviceSynchronize.

    +
    + +
    +
    +cudaErrorInvalidSource = 300
    +

    This indicates that the device kernel source is invalid.

    +
    + +
    +
    +cudaErrorFileNotFound = 301
    +

    This indicates that the file specified was not found.

    +
    + +
    +
    +cudaErrorSharedObjectSymbolNotFound = 302
    +

    This indicates that a link to a shared object failed to resolve.

    +
    + +
    +
    +cudaErrorSharedObjectInitFailed = 303
    +

    This indicates that initialization of a shared object failed.

    +
    + +
    +
    +cudaErrorOperatingSystem = 304
    +

    This error indicates that an OS call failed.

    +
    + +
    +
    +cudaErrorInvalidResourceHandle = 400
    +

    This indicates that a resource handle passed to the API call was not valid. Resource handles are opaque types like cudaStream_t and cudaEvent_t.

    +
    + +
    +
    +cudaErrorIllegalState = 401
    +

    This indicates that a resource required by the API call is not in a valid state to perform the requested operation.

    +
    + +
    +
    +cudaErrorLossyQuery = 402
    +

    This indicates an attempt was made to introspect an object in a way that would discard semantically important information. This is either due to the object using funtionality newer than the API version used to introspect it or omission of optional return arguments.

    +
    + +
    +
    +cudaErrorSymbolNotFound = 500
    +

    This indicates that a named symbol was not found. Examples of symbols are global/constant variable names, driver function names, texture names, and surface names.

    +
    + +
    +
    +cudaErrorNotReady = 600
    +

    This indicates that asynchronous operations issued previously have not completed yet. This result is not actually an error, but must be indicated differently than cudaSuccess (which indicates completion). Calls that may return this value include cudaEventQuery() and cudaStreamQuery().

    +
    + +
    +
    +cudaErrorIllegalAddress = 700
    +

    The device encountered a load or store instruction on an invalid memory address. 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.

    +
    + +
    +
    +cudaErrorLaunchOutOfResources = 701
    +

    This indicates that a launch did not occur because it did not have appropriate resources. Although this error is similar to cudaErrorInvalidConfiguration, this error usually indicates that the user has attempted to pass too many arguments to the device kernel, or the kernel launch specifies too many threads for the kernel’s register count.

    +
    + +
    +
    +cudaErrorLaunchTimeout = 702
    +

    This indicates that the device kernel took too long to execute. This can only occur if timeouts are enabled - see the device property kernelExecTimeoutEnabled for more information. 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.

    +
    + +
    +
    +cudaErrorLaunchIncompatibleTexturing = 703
    +

    This error indicates a kernel launch that uses an incompatible texturing mode.

    +
    + +
    +
    +cudaErrorPeerAccessAlreadyEnabled = 704
    +

    This error indicates that a call to cudaDeviceEnablePeerAccess() is trying to re-enable peer addressing on from a context which has already had peer addressing enabled.

    +
    + +
    +
    +cudaErrorPeerAccessNotEnabled = 705
    +

    This error indicates that cudaDeviceDisablePeerAccess() is trying to disable peer addressing which has not been enabled yet via cudaDeviceEnablePeerAccess().

    +
    + +
    +
    +cudaErrorSetOnActiveProcess = 708
    +

    This indicates that the user has called cudaSetValidDevices(), cudaSetDeviceFlags(), cudaD3D9SetDirect3DDevice(), cudaD3D10SetDirect3DDevice, cudaD3D11SetDirect3DDevice(), or cudaVDPAUSetVDPAUDevice() after initializing the CUDA runtime by calling non-device management operations (allocating memory and launching kernels are examples of non-device management operations). This error can also be returned if using runtime/driver interoperability and there is an existing CUcontext active on the host thread.

    +
    + +
    +
    +cudaErrorContextIsDestroyed = 709
    +

    This error indicates that the context current to the calling thread has been destroyed using cuCtxDestroy, or is a primary context which has not yet been initialized.

    +
    + +
    +
    +cudaErrorAssert = 710
    +

    An assert triggered in device code during kernel execution. The device cannot be used again. All existing allocations are invalid. To continue using CUDA, the process must be terminated and relaunched.

    +
    + +
    +
    +cudaErrorTooManyPeers = 711
    +

    This error indicates that the hardware resources required to enable peer access have been exhausted for one or more of the devices passed to cudaEnablePeerAccess().

    +
    + +
    +
    +cudaErrorHostMemoryAlreadyRegistered = 712
    +

    This error indicates that the memory range passed to cudaHostRegister() has already been registered.

    +
    + +
    +
    +cudaErrorHostMemoryNotRegistered = 713
    +

    This error indicates that the pointer passed to cudaHostUnregister() does not correspond to any currently registered memory region.

    +
    + +
    +
    +cudaErrorHardwareStackError = 714
    +

    Device encountered an error in the call stack during kernel execution, possibly due to stack corruption or exceeding the stack size limit. 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.

    +
    + +
    +
    +cudaErrorIllegalInstruction = 715
    +

    The device encountered an illegal instruction during kernel execution 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.

    +
    + +
    +
    +cudaErrorMisalignedAddress = 716
    +

    The device encountered a load or store instruction on a memory address which is not aligned. 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.

    +
    + +
    +
    +cudaErrorInvalidAddressSpace = 717
    +

    While executing a kernel, the device encountered an instruction which can only operate on memory locations in certain address spaces (global, shared, or local), but was supplied a memory address not belonging to an allowed address space. 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.

    +
    + +
    +
    +cudaErrorInvalidPc = 718
    +

    The device encountered an invalid program counter. 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.

    +
    + +
    +
    +cudaErrorLaunchFailure = 719
    +

    An exception occurred on the device while executing a kernel. Common causes include dereferencing an invalid device pointer and accessing out of bounds shared memory. Less common cases can be system specific - more information about these cases can be found in the system specific user guide. 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.

    +
    + +
    +
    +cudaErrorCooperativeLaunchTooLarge = 720
    +

    This error indicates that the number of blocks launched per grid for a kernel that was launched via either cudaLaunchCooperativeKernel or cudaLaunchCooperativeKernelMultiDevice exceeds the maximum number of blocks as allowed by cudaOccupancyMaxActiveBlocksPerMultiprocessor or cudaOccupancyMaxActiveBlocksPerMultiprocessorWithFlags times the number of multiprocessors as specified by the device attribute cudaDevAttrMultiProcessorCount.

    +
    + +
    +
    +cudaErrorNotPermitted = 800
    +

    This error indicates the attempted operation is not permitted.

    +
    + +
    +
    +cudaErrorNotSupported = 801
    +

    This error indicates the attempted operation is not supported on the current system or device.

    +
    + +
    +
    +cudaErrorSystemNotReady = 802
    +

    This error indicates that the system is not yet ready to start any CUDA work. To continue using CUDA, verify the system configuration is in a valid state and all required driver daemons are actively running. More information about this error can be found in the system specific user guide.

    +
    + +
    +
    +cudaErrorSystemDriverMismatch = 803
    +

    This error indicates that there is a mismatch between the versions of the display driver and the CUDA driver. Refer to the compatibility documentation for supported versions.

    +
    + +
    +
    +cudaErrorCompatNotSupportedOnDevice = 804
    +

    This error indicates that the system was upgraded to run with forward compatibility but the visible hardware detected by CUDA does not support this configuration. Refer to the compatibility documentation for the supported hardware matrix or ensure that only supported hardware is visible during initialization via the CUDA_VISIBLE_DEVICES environment variable.

    +
    + +
    +
    +cudaErrorMpsConnectionFailed = 805
    +

    This error indicates that the MPS client failed to connect to the MPS control daemon or the MPS server.

    +
    + +
    +
    +cudaErrorMpsRpcFailure = 806
    +

    This error indicates that the remote procedural call between the MPS server and the MPS client failed.

    +
    + +
    +
    +cudaErrorMpsServerNotReady = 807
    +

    This error indicates that the MPS server is not ready to accept new MPS client requests. This error can be returned when the MPS server is in the process of recovering from a fatal failure.

    +
    + +
    +
    +cudaErrorMpsMaxClientsReached = 808
    +

    This error indicates that the hardware resources required to create MPS client have been exhausted.

    +
    + +
    +
    +cudaErrorMpsMaxConnectionsReached = 809
    +

    This error indicates the the hardware resources required to device connections have been exhausted.

    +
    + +
    +
    +cudaErrorMpsClientTerminated = 810
    +

    This error indicates that the MPS client has been terminated by the server. To continue using CUDA, the process must be terminated and relaunched.

    +
    + +
    +
    +cudaErrorCdpNotSupported = 811
    +

    This error indicates, that the program is using CUDA Dynamic Parallelism, but the current configuration, like MPS, does not support it.

    +
    + +
    +
    +cudaErrorCdpVersionMismatch = 812
    +

    This error indicates, that the program contains an unsupported interaction between different versions of CUDA Dynamic Parallelism.

    +
    + +
    +
    +cudaErrorStreamCaptureUnsupported = 900
    +

    The operation is not permitted when the stream is capturing.

    +
    + +
    +
    +cudaErrorStreamCaptureInvalidated = 901
    +

    The current capture sequence on the stream has been invalidated due to a previous error.

    +
    + +
    +
    +cudaErrorStreamCaptureMerge = 902
    +

    The operation would have resulted in a merge of two independent capture sequences.

    +
    + +
    +
    +cudaErrorStreamCaptureUnmatched = 903
    +

    The capture was not initiated in this stream.

    +
    + +
    +
    +cudaErrorStreamCaptureUnjoined = 904
    +

    The capture sequence contains a fork that was not joined to the primary stream.

    +
    + +
    +
    +cudaErrorStreamCaptureIsolation = 905
    +

    A dependency would have been created which crosses the capture sequence boundary. Only implicit in-stream ordering dependencies are allowed to cross the boundary.

    +
    + +
    +
    +cudaErrorStreamCaptureImplicit = 906
    +

    The operation would have resulted in a disallowed implicit dependency on a current capture sequence from cudaStreamLegacy.

    +
    + +
    +
    +cudaErrorCapturedEvent = 907
    +

    The operation is not permitted on an event which was last recorded in a capturing stream.

    +
    + +
    +
    +cudaErrorStreamCaptureWrongThread = 908
    +

    A stream capture sequence not initiated with the cudaStreamCaptureModeRelaxed argument to cudaStreamBeginCapture was passed to cudaStreamEndCapture in a different thread.

    +
    + +
    +
    +cudaErrorTimeout = 909
    +

    This indicates that the wait operation has timed out.

    +
    + +
    +
    +cudaErrorGraphExecUpdateFailure = 910
    +

    This error indicates that the graph update was not performed because it included changes which violated constraints specific to instantiated graph update.

    +
    + +
    +
    +cudaErrorExternalDevice = 911
    +

    This indicates that an async error has occurred in a device outside of CUDA. If CUDA was waiting for an external device’s signal before consuming shared data, the external device signaled an error indicating that the data is not valid for consumption. 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.

    +
    + +
    +
    +cudaErrorInvalidClusterSize = 912
    +

    This indicates that a kernel launch error has occurred due to cluster misconfiguration.

    +
    + +
    +
    +cudaErrorFunctionNotLoaded = 913
    +

    Indiciates a function handle is not loaded when calling an API that requires a loaded function.

    +
    + +
    +
    +cudaErrorInvalidResourceType = 914
    +

    This error indicates one or more resources passed in are not valid resource types for the operation.

    +
    + +
    +
    +cudaErrorInvalidResourceConfiguration = 915
    +

    This error indicates one or more resources are insufficient or non-applicable for the operation.

    +
    + +
    +
    +cudaErrorUnknown = 999
    +

    This indicates that an unknown internal error has occurred.

    +
    + +
    +
    +cudaErrorApiFailureBase = 10000
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaChannelFormatKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Channel format kind

    +
    +
    +cudaChannelFormatKindSigned = 0
    +

    Signed channel format

    +
    + +
    +
    +cudaChannelFormatKindUnsigned = 1
    +

    Unsigned channel format

    +
    + +
    +
    +cudaChannelFormatKindFloat = 2
    +

    Float channel format

    +
    + +
    +
    +cudaChannelFormatKindNone = 3
    +

    No channel format

    +
    + +
    +
    +cudaChannelFormatKindNV12 = 4
    +

    Unsigned 8-bit integers, planar 4:2:0 YUV format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedNormalized8X1 = 5
    +

    1 channel unsigned 8-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindUnsignedNormalized8X2 = 6
    +

    2 channel unsigned 8-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindUnsignedNormalized8X4 = 7
    +

    4 channel unsigned 8-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindUnsignedNormalized16X1 = 8
    +

    1 channel unsigned 16-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindUnsignedNormalized16X2 = 9
    +

    2 channel unsigned 16-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindUnsignedNormalized16X4 = 10
    +

    4 channel unsigned 16-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindSignedNormalized8X1 = 11
    +

    1 channel signed 8-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindSignedNormalized8X2 = 12
    +

    2 channel signed 8-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindSignedNormalized8X4 = 13
    +

    4 channel signed 8-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindSignedNormalized16X1 = 14
    +

    1 channel signed 16-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindSignedNormalized16X2 = 15
    +

    2 channel signed 16-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindSignedNormalized16X4 = 16
    +

    4 channel signed 16-bit normalized integer

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed1 = 17
    +

    4 channel unsigned normalized block-compressed (BC1 compression) format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed1SRGB = 18
    +

    4 channel unsigned normalized block-compressed (BC1 compression) format with sRGB encoding

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed2 = 19
    +

    4 channel unsigned normalized block-compressed (BC2 compression) format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed2SRGB = 20
    +

    4 channel unsigned normalized block-compressed (BC2 compression) format with sRGB encoding

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed3 = 21
    +

    4 channel unsigned normalized block-compressed (BC3 compression) format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed3SRGB = 22
    +

    4 channel unsigned normalized block-compressed (BC3 compression) format with sRGB encoding

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed4 = 23
    +

    1 channel unsigned normalized block-compressed (BC4 compression) format

    +
    + +
    +
    +cudaChannelFormatKindSignedBlockCompressed4 = 24
    +

    1 channel signed normalized block-compressed (BC4 compression) format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed5 = 25
    +

    2 channel unsigned normalized block-compressed (BC5 compression) format

    +
    + +
    +
    +cudaChannelFormatKindSignedBlockCompressed5 = 26
    +

    2 channel signed normalized block-compressed (BC5 compression) format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed6H = 27
    +

    3 channel unsigned half-float block-compressed (BC6H compression) format

    +
    + +
    +
    +cudaChannelFormatKindSignedBlockCompressed6H = 28
    +

    3 channel signed half-float block-compressed (BC6H compression) format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed7 = 29
    +

    4 channel unsigned normalized block-compressed (BC7 compression) format

    +
    + +
    +
    +cudaChannelFormatKindUnsignedBlockCompressed7SRGB = 30
    +

    4 channel unsigned normalized block-compressed (BC7 compression) format with sRGB encoding

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemoryType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA memory types

    +
    +
    +cudaMemoryTypeUnregistered = 0
    +

    Unregistered memory

    +
    + +
    +
    +cudaMemoryTypeHost = 1
    +

    Host memory

    +
    + +
    +
    +cudaMemoryTypeDevice = 2
    +

    Device memory

    +
    + +
    +
    +cudaMemoryTypeManaged = 3
    +

    Managed memory

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemcpyKind(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA memory copy types

    +
    +
    +cudaMemcpyHostToHost = 0
    +

    Host -> Host

    +
    + +
    +
    +cudaMemcpyHostToDevice = 1
    +

    Host -> Device

    +
    + +
    +
    +cudaMemcpyDeviceToHost = 2
    +

    Device -> Host

    +
    + +
    +
    +cudaMemcpyDeviceToDevice = 3
    +

    Device -> Device

    +
    + +
    +
    +cudaMemcpyDefault = 4
    +

    Direction of the transfer is inferred from the pointer values. Requires unified virtual addressing

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaAccessProperty(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies performance hint with cudaAccessPolicyWindow +for hitProp and missProp members.

    +
    +
    +cudaAccessPropertyNormal = 0
    +

    Normal cache persistence.

    +
    + +
    +
    +cudaAccessPropertyStreaming = 1
    +

    Streaming access is less likely to persit from cache.

    +
    + +
    +
    +cudaAccessPropertyPersisting = 2
    +

    Persisting access is more likely to persist in cache.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaStreamCaptureStatus(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Possible stream capture statuses returned by +cudaStreamIsCapturing

    +
    +
    +cudaStreamCaptureStatusNone = 0
    +

    Stream is not capturing

    +
    + +
    +
    +cudaStreamCaptureStatusActive = 1
    +

    Stream is actively capturing

    +
    + +
    +
    +cudaStreamCaptureStatusInvalidated = 2
    +

    Stream is part of a capture sequence that has been invalidated, but not terminated

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaStreamCaptureMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Possible modes for stream capture thread interactions. For more +details see cudaStreamBeginCapture and +cudaThreadExchangeStreamCaptureMode

    +
    +
    +cudaStreamCaptureModeGlobal = 0
    +
    + +
    +
    +cudaStreamCaptureModeThreadLocal = 1
    +
    + +
    +
    +cudaStreamCaptureModeRelaxed = 2
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaSynchronizationPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +cudaSyncPolicyAuto = 1
    +
    + +
    +
    +cudaSyncPolicySpin = 2
    +
    + +
    +
    +cudaSyncPolicyYield = 3
    +
    + +
    +
    +cudaSyncPolicyBlockingSync = 4
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaClusterSchedulingPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Cluster scheduling policies. These may be passed to +cudaFuncSetAttribute

    +
    +
    +cudaClusterSchedulingPolicyDefault = 0
    +

    the default policy

    +
    + +
    +
    +cudaClusterSchedulingPolicySpread = 1
    +

    spread the blocks within a cluster to the SMs

    +
    + +
    +
    +cudaClusterSchedulingPolicyLoadBalancing = 2
    +

    allow the hardware to load-balance the blocks in a cluster to the SMs

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaStreamUpdateCaptureDependenciesFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for cudaStreamUpdateCaptureDependencies

    +
    +
    +cudaStreamAddCaptureDependencies = 0
    +

    Add new nodes to the dependency set

    +
    + +
    +
    +cudaStreamSetCaptureDependencies = 1
    +

    Replace the dependency set with the new nodes

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaUserObjectFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for user objects for graphs

    +
    +
    +cudaUserObjectNoDestructorSync = 1
    +

    Indicates the destructor execution is not synchronized by any CUDA handle.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaUserObjectRetainFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for retaining user object references for graphs

    +
    +
    +cudaGraphUserObjectMove = 1
    +

    Transfer references from the caller rather than creating new references.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphicsRegisterFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA graphics interop register flags

    +
    +
    +cudaGraphicsRegisterFlagsNone = 0
    +

    Default

    +
    + +
    +
    +cudaGraphicsRegisterFlagsReadOnly = 1
    +

    CUDA will not write to this resource

    +
    + +
    +
    +cudaGraphicsRegisterFlagsWriteDiscard = 2
    +

    CUDA will only write to and will not read from this resource

    +
    + +
    +
    +cudaGraphicsRegisterFlagsSurfaceLoadStore = 4
    +

    CUDA will bind this resource to a surface reference

    +
    + +
    +
    +cudaGraphicsRegisterFlagsTextureGather = 8
    +

    CUDA will perform texture gather operations on this resource

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphicsMapFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA graphics interop map flags

    +
    +
    +cudaGraphicsMapFlagsNone = 0
    +

    Default; Assume resource can be read/written

    +
    + +
    +
    +cudaGraphicsMapFlagsReadOnly = 1
    +

    CUDA will not write to this resource

    +
    + +
    +
    +cudaGraphicsMapFlagsWriteDiscard = 2
    +

    CUDA will only write to and will not read from this resource

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphicsCubeFace(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA graphics interop array indices for cube maps

    +
    +
    +cudaGraphicsCubeFacePositiveX = 0
    +

    Positive X face of cubemap

    +
    + +
    +
    +cudaGraphicsCubeFaceNegativeX = 1
    +

    Negative X face of cubemap

    +
    + +
    +
    +cudaGraphicsCubeFacePositiveY = 2
    +

    Positive Y face of cubemap

    +
    + +
    +
    +cudaGraphicsCubeFaceNegativeY = 3
    +

    Negative Y face of cubemap

    +
    + +
    +
    +cudaGraphicsCubeFacePositiveZ = 4
    +

    Positive Z face of cubemap

    +
    + +
    +
    +cudaGraphicsCubeFaceNegativeZ = 5
    +

    Negative Z face of cubemap

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaResourceType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA resource types

    +
    +
    +cudaResourceTypeArray = 0
    +

    Array resource

    +
    + +
    +
    +cudaResourceTypeMipmappedArray = 1
    +

    Mipmapped array resource

    +
    + +
    +
    +cudaResourceTypeLinear = 2
    +

    Linear resource

    +
    + +
    +
    +cudaResourceTypePitch2D = 3
    +

    Pitch 2D resource

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaResourceViewFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA texture resource view formats

    +
    +
    +cudaResViewFormatNone = 0
    +

    No resource view format (use underlying resource format)

    +
    + +
    +
    +cudaResViewFormatUnsignedChar1 = 1
    +

    1 channel unsigned 8-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedChar2 = 2
    +

    2 channel unsigned 8-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedChar4 = 3
    +

    4 channel unsigned 8-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedChar1 = 4
    +

    1 channel signed 8-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedChar2 = 5
    +

    2 channel signed 8-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedChar4 = 6
    +

    4 channel signed 8-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedShort1 = 7
    +

    1 channel unsigned 16-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedShort2 = 8
    +

    2 channel unsigned 16-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedShort4 = 9
    +

    4 channel unsigned 16-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedShort1 = 10
    +

    1 channel signed 16-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedShort2 = 11
    +

    2 channel signed 16-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedShort4 = 12
    +

    4 channel signed 16-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedInt1 = 13
    +

    1 channel unsigned 32-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedInt2 = 14
    +

    2 channel unsigned 32-bit integers

    +
    + +
    +
    +cudaResViewFormatUnsignedInt4 = 15
    +

    4 channel unsigned 32-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedInt1 = 16
    +

    1 channel signed 32-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedInt2 = 17
    +

    2 channel signed 32-bit integers

    +
    + +
    +
    +cudaResViewFormatSignedInt4 = 18
    +

    4 channel signed 32-bit integers

    +
    + +
    +
    +cudaResViewFormatHalf1 = 19
    +

    1 channel 16-bit floating point

    +
    + +
    +
    +cudaResViewFormatHalf2 = 20
    +

    2 channel 16-bit floating point

    +
    + +
    +
    +cudaResViewFormatHalf4 = 21
    +

    4 channel 16-bit floating point

    +
    + +
    +
    +cudaResViewFormatFloat1 = 22
    +

    1 channel 32-bit floating point

    +
    + +
    +
    +cudaResViewFormatFloat2 = 23
    +

    2 channel 32-bit floating point

    +
    + +
    +
    +cudaResViewFormatFloat4 = 24
    +

    4 channel 32-bit floating point

    +
    + +
    +
    +cudaResViewFormatUnsignedBlockCompressed1 = 25
    +

    Block compressed 1

    +
    + +
    +
    +cudaResViewFormatUnsignedBlockCompressed2 = 26
    +

    Block compressed 2

    +
    + +
    +
    +cudaResViewFormatUnsignedBlockCompressed3 = 27
    +

    Block compressed 3

    +
    + +
    +
    +cudaResViewFormatUnsignedBlockCompressed4 = 28
    +

    Block compressed 4 unsigned

    +
    + +
    +
    +cudaResViewFormatSignedBlockCompressed4 = 29
    +

    Block compressed 4 signed

    +
    + +
    +
    +cudaResViewFormatUnsignedBlockCompressed5 = 30
    +

    Block compressed 5 unsigned

    +
    + +
    +
    +cudaResViewFormatSignedBlockCompressed5 = 31
    +

    Block compressed 5 signed

    +
    + +
    +
    +cudaResViewFormatUnsignedBlockCompressed6H = 32
    +

    Block compressed 6 unsigned half-float

    +
    + +
    +
    +cudaResViewFormatSignedBlockCompressed6H = 33
    +

    Block compressed 6 signed half-float

    +
    + +
    +
    +cudaResViewFormatUnsignedBlockCompressed7 = 34
    +

    Block compressed 7

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaFuncAttribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA function attributes that can be set using +cudaFuncSetAttribute

    +
    +
    +cudaFuncAttributeMaxDynamicSharedMemorySize = 8
    +

    Maximum dynamic shared memory size

    +
    + +
    +
    +cudaFuncAttributePreferredSharedMemoryCarveout = 9
    +

    Preferred shared memory-L1 cache split

    +
    + +
    +
    +cudaFuncAttributeClusterDimMustBeSet = 10
    +

    Indicator to enforce valid cluster dimension specification on kernel launch

    +
    + +
    +
    +cudaFuncAttributeRequiredClusterWidth = 11
    +

    Required cluster width

    +
    + +
    +
    +cudaFuncAttributeRequiredClusterHeight = 12
    +

    Required cluster height

    +
    + +
    +
    +cudaFuncAttributeRequiredClusterDepth = 13
    +

    Required cluster depth

    +
    + +
    +
    +cudaFuncAttributeNonPortableClusterSizeAllowed = 14
    +

    Whether non-portable cluster scheduling policy is supported

    +
    + +
    +
    +cudaFuncAttributeClusterSchedulingPolicyPreference = 15
    +

    Required cluster scheduling policy preference

    +
    + +
    +
    +cudaFuncAttributeMax = 16
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaFuncCache(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA function cache configurations

    +
    +
    +cudaFuncCachePreferNone = 0
    +

    Default function cache configuration, no preference

    +
    + +
    +
    +cudaFuncCachePreferShared = 1
    +

    Prefer larger shared memory and smaller L1 cache

    +
    + +
    +
    +cudaFuncCachePreferL1 = 2
    +

    Prefer larger L1 cache and smaller shared memory

    +
    + +
    +
    +cudaFuncCachePreferEqual = 3
    +

    Prefer equal size L1 cache and shared memory

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaSharedMemConfig(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA shared memory configuration [Deprecated]

    +
    +
    +cudaSharedMemBankSizeDefault = 0
    +
    + +
    +
    +cudaSharedMemBankSizeFourByte = 1
    +
    + +
    +
    +cudaSharedMemBankSizeEightByte = 2
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaSharedCarveout(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Shared memory carveout configurations. These may be passed to +cudaFuncSetAttribute

    +
    +
    +cudaSharedmemCarveoutDefault = -1
    +

    No preference for shared memory or L1 (default)

    +
    + +
    +
    +cudaSharedmemCarveoutMaxShared = 100
    +

    Prefer maximum available shared memory, minimum L1 cache

    +
    + +
    +
    +cudaSharedmemCarveoutMaxL1 = 0
    +

    Prefer maximum available L1 cache, minimum shared memory

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaComputeMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA device compute modes

    +
    +
    +cudaComputeModeDefault = 0
    +

    Default compute mode (Multiple threads can use cudaSetDevice() with this device)

    +
    + +
    +
    +cudaComputeModeExclusive = 1
    +

    Compute-exclusive-thread mode (Only one thread in one process will be able to use cudaSetDevice() with this device)

    +
    + +
    +
    +cudaComputeModeProhibited = 2
    +

    Compute-prohibited mode (No threads can use cudaSetDevice() with this device)

    +
    + +
    +
    +cudaComputeModeExclusiveProcess = 3
    +

    Compute-exclusive-process mode (Many threads in one process will be able to use cudaSetDevice() with this device)

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLimit(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Limits

    +
    +
    +cudaLimitStackSize = 0
    +

    GPU thread stack size

    +
    + +
    +
    +cudaLimitPrintfFifoSize = 1
    +

    GPU printf FIFO size

    +
    + +
    +
    +cudaLimitMallocHeapSize = 2
    +

    GPU malloc heap size

    +
    + +
    +
    +cudaLimitDevRuntimeSyncDepth = 3
    +

    GPU device runtime synchronize depth

    +
    + +
    +
    +cudaLimitDevRuntimePendingLaunchCount = 4
    +

    GPU device runtime pending launch count

    +
    + +
    +
    +cudaLimitMaxL2FetchGranularity = 5
    +

    A value between 0 and 128 that indicates the maximum fetch granularity of L2 (in Bytes). This is a hint

    +
    + +
    +
    +cudaLimitPersistingL2CacheSize = 6
    +

    A size in bytes for L2 persisting lines cache size

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemoryAdvise(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Memory Advise values

    +
    +
    +cudaMemAdviseSetReadMostly = 1
    +

    Data will mostly be read and only occassionally be written to

    +
    + +
    +
    +cudaMemAdviseUnsetReadMostly = 2
    +

    Undo the effect of cudaMemAdviseSetReadMostly

    +
    + +
    +
    +cudaMemAdviseSetPreferredLocation = 3
    +

    Set the preferred location for the data as the specified device

    +
    + +
    +
    +cudaMemAdviseUnsetPreferredLocation = 4
    +

    Clear the preferred location for the data

    +
    + +
    +
    +cudaMemAdviseSetAccessedBy = 5
    +

    Data will be accessed by the specified device, so prevent page faults as much as possible

    +
    + +
    +
    +cudaMemAdviseUnsetAccessedBy = 6
    +

    Let the Unified Memory subsystem decide on the page faulting policy for the specified device

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemRangeAttribute(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA range attributes

    +
    +
    +cudaMemRangeAttributeReadMostly = 1
    +

    Whether the range will mostly be read and only occassionally be written to

    +
    + +
    +
    +cudaMemRangeAttributePreferredLocation = 2
    +

    The preferred location of the range

    +
    + +
    +
    +cudaMemRangeAttributeAccessedBy = 3
    +

    Memory range has cudaMemAdviseSetAccessedBy set for specified device

    +
    + +
    +
    +cudaMemRangeAttributeLastPrefetchLocation = 4
    +

    The last location to which the range was prefetched

    +
    + +
    +
    +cudaMemRangeAttributePreferredLocationType = 5
    +

    The preferred location type of the range

    +
    + +
    +
    +cudaMemRangeAttributePreferredLocationId = 6
    +

    The preferred location id of the range

    +
    + +
    +
    +cudaMemRangeAttributeLastPrefetchLocationType = 7
    +

    The last location type to which the range was prefetched

    +
    + +
    +
    +cudaMemRangeAttributeLastPrefetchLocationId = 8
    +

    The last location id to which the range was prefetched

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesOptions(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA GPUDirect RDMA flush writes APIs supported on the device

    +
    +
    +cudaFlushGPUDirectRDMAWritesOptionHost = 1
    +

    cudaDeviceFlushGPUDirectRDMAWrites() and its CUDA Driver API counterpart are supported on the device.

    +
    + +
    +
    +cudaFlushGPUDirectRDMAWritesOptionMemOps = 2
    +

    The CU_STREAM_WAIT_VALUE_FLUSH flag and the CU_STREAM_MEM_OP_FLUSH_REMOTE_WRITES MemOp are supported on the CUDA device.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGPUDirectRDMAWritesOrdering(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA GPUDirect RDMA flush writes ordering features of the device

    +
    +
    +cudaGPUDirectRDMAWritesOrderingNone = 0
    +

    The device does not natively support ordering of GPUDirect RDMA writes. cudaFlushGPUDirectRDMAWrites() can be leveraged if supported.

    +
    + +
    +
    +cudaGPUDirectRDMAWritesOrderingOwner = 100
    +

    Natively, the device can consistently consume GPUDirect RDMA writes, although other CUDA devices may not.

    +
    + +
    +
    +cudaGPUDirectRDMAWritesOrderingAllDevices = 200
    +

    Any CUDA device in the system can consistently consume GPUDirect RDMA writes to this device.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesScope(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA GPUDirect RDMA flush writes scopes

    +
    +
    +cudaFlushGPUDirectRDMAWritesToOwner = 100
    +

    Blocks until remote writes are visible to the CUDA device context owning the data.

    +
    + +
    +
    +cudaFlushGPUDirectRDMAWritesToAllDevices = 200
    +

    Blocks until remote writes are visible to all CUDA device contexts.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaFlushGPUDirectRDMAWritesTarget(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA GPUDirect RDMA flush writes targets

    +
    +
    +cudaFlushGPUDirectRDMAWritesTargetCurrentDevice = 0
    +

    Sets the target for cudaDeviceFlushGPUDirectRDMAWrites() to the currently active CUDA device context.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaDeviceAttr(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA device attributes

    +
    +
    +cudaDevAttrMaxThreadsPerBlock = 1
    +

    Maximum number of threads per block

    +
    + +
    +
    +cudaDevAttrMaxBlockDimX = 2
    +

    Maximum block dimension X

    +
    + +
    +
    +cudaDevAttrMaxBlockDimY = 3
    +

    Maximum block dimension Y

    +
    + +
    +
    +cudaDevAttrMaxBlockDimZ = 4
    +

    Maximum block dimension Z

    +
    + +
    +
    +cudaDevAttrMaxGridDimX = 5
    +

    Maximum grid dimension X

    +
    + +
    +
    +cudaDevAttrMaxGridDimY = 6
    +

    Maximum grid dimension Y

    +
    + +
    +
    +cudaDevAttrMaxGridDimZ = 7
    +

    Maximum grid dimension Z

    +
    + +
    +
    +cudaDevAttrMaxSharedMemoryPerBlock = 8
    +

    Maximum shared memory available per block in bytes

    +
    + +
    +
    +cudaDevAttrTotalConstantMemory = 9
    +

    Memory available on device for constant variables in a CUDA C kernel in bytes

    +
    + +
    +
    +cudaDevAttrWarpSize = 10
    +

    Warp size in threads

    +
    + +
    +
    +cudaDevAttrMaxPitch = 11
    +

    Maximum pitch in bytes allowed by memory copies

    +
    + +
    +
    +cudaDevAttrMaxRegistersPerBlock = 12
    +

    Maximum number of 32-bit registers available per block

    +
    + +
    +
    +cudaDevAttrClockRate = 13
    +

    Peak clock frequency in kilohertz

    +
    + +
    +
    +cudaDevAttrTextureAlignment = 14
    +

    Alignment requirement for textures

    +
    + +
    +
    +cudaDevAttrGpuOverlap = 15
    +

    Device can possibly copy memory and execute a kernel concurrently

    +
    + +
    +
    +cudaDevAttrMultiProcessorCount = 16
    +

    Number of multiprocessors on device

    +
    + +
    +
    +cudaDevAttrKernelExecTimeout = 17
    +

    Specifies whether there is a run time limit on kernels

    +
    + +
    +
    +cudaDevAttrIntegrated = 18
    +

    Device is integrated with host memory

    +
    + +
    +
    +cudaDevAttrCanMapHostMemory = 19
    +

    Device can map host memory into CUDA address space

    +
    + +
    +
    +cudaDevAttrComputeMode = 20
    +

    Compute mode (See cudaComputeMode for details)

    +
    + +
    +
    +cudaDevAttrMaxTexture1DWidth = 21
    +

    Maximum 1D texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture2DWidth = 22
    +

    Maximum 2D texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture2DHeight = 23
    +

    Maximum 2D texture height

    +
    + +
    +
    +cudaDevAttrMaxTexture3DWidth = 24
    +

    Maximum 3D texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture3DHeight = 25
    +

    Maximum 3D texture height

    +
    + +
    +
    +cudaDevAttrMaxTexture3DDepth = 26
    +

    Maximum 3D texture depth

    +
    + +
    +
    +cudaDevAttrMaxTexture2DLayeredWidth = 27
    +

    Maximum 2D layered texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture2DLayeredHeight = 28
    +

    Maximum 2D layered texture height

    +
    + +
    +
    +cudaDevAttrMaxTexture2DLayeredLayers = 29
    +

    Maximum layers in a 2D layered texture

    +
    + +
    +
    +cudaDevAttrSurfaceAlignment = 30
    +

    Alignment requirement for surfaces

    +
    + +
    +
    +cudaDevAttrConcurrentKernels = 31
    +

    Device can possibly execute multiple kernels concurrently

    +
    + +
    +
    +cudaDevAttrEccEnabled = 32
    +

    Device has ECC support enabled

    +
    + +
    +
    +cudaDevAttrPciBusId = 33
    +

    PCI bus ID of the device

    +
    + +
    +
    +cudaDevAttrPciDeviceId = 34
    +

    PCI device ID of the device

    +
    + +
    +
    +cudaDevAttrTccDriver = 35
    +

    Device is using TCC driver model

    +
    + +
    +
    +cudaDevAttrMemoryClockRate = 36
    +

    Peak memory clock frequency in kilohertz

    +
    + +
    +
    +cudaDevAttrGlobalMemoryBusWidth = 37
    +

    Global memory bus width in bits

    +
    + +
    +
    +cudaDevAttrL2CacheSize = 38
    +

    Size of L2 cache in bytes

    +
    + +
    +
    +cudaDevAttrMaxThreadsPerMultiProcessor = 39
    +

    Maximum resident threads per multiprocessor

    +
    + +
    +
    +cudaDevAttrAsyncEngineCount = 40
    +

    Number of asynchronous engines

    +
    + +
    +
    +cudaDevAttrUnifiedAddressing = 41
    +

    Device shares a unified address space with the host

    +
    + +
    +
    +cudaDevAttrMaxTexture1DLayeredWidth = 42
    +

    Maximum 1D layered texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture1DLayeredLayers = 43
    +

    Maximum layers in a 1D layered texture

    +
    + +
    +
    +cudaDevAttrMaxTexture2DGatherWidth = 45
    +

    Maximum 2D texture width if cudaArrayTextureGather is set

    +
    + +
    +
    +cudaDevAttrMaxTexture2DGatherHeight = 46
    +

    Maximum 2D texture height if cudaArrayTextureGather is set

    +
    + +
    +
    +cudaDevAttrMaxTexture3DWidthAlt = 47
    +

    Alternate maximum 3D texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture3DHeightAlt = 48
    +

    Alternate maximum 3D texture height

    +
    + +
    +
    +cudaDevAttrMaxTexture3DDepthAlt = 49
    +

    Alternate maximum 3D texture depth

    +
    + +
    +
    +cudaDevAttrPciDomainId = 50
    +

    PCI domain ID of the device

    +
    + +
    +
    +cudaDevAttrTexturePitchAlignment = 51
    +

    Pitch alignment requirement for textures

    +
    + +
    +
    +cudaDevAttrMaxTextureCubemapWidth = 52
    +

    Maximum cubemap texture width/height

    +
    + +
    +
    +cudaDevAttrMaxTextureCubemapLayeredWidth = 53
    +

    Maximum cubemap layered texture width/height

    +
    + +
    +
    +cudaDevAttrMaxTextureCubemapLayeredLayers = 54
    +

    Maximum layers in a cubemap layered texture

    +
    + +
    +
    +cudaDevAttrMaxSurface1DWidth = 55
    +

    Maximum 1D surface width

    +
    + +
    +
    +cudaDevAttrMaxSurface2DWidth = 56
    +

    Maximum 2D surface width

    +
    + +
    +
    +cudaDevAttrMaxSurface2DHeight = 57
    +

    Maximum 2D surface height

    +
    + +
    +
    +cudaDevAttrMaxSurface3DWidth = 58
    +

    Maximum 3D surface width

    +
    + +
    +
    +cudaDevAttrMaxSurface3DHeight = 59
    +

    Maximum 3D surface height

    +
    + +
    +
    +cudaDevAttrMaxSurface3DDepth = 60
    +

    Maximum 3D surface depth

    +
    + +
    +
    +cudaDevAttrMaxSurface1DLayeredWidth = 61
    +

    Maximum 1D layered surface width

    +
    + +
    +
    +cudaDevAttrMaxSurface1DLayeredLayers = 62
    +

    Maximum layers in a 1D layered surface

    +
    + +
    +
    +cudaDevAttrMaxSurface2DLayeredWidth = 63
    +

    Maximum 2D layered surface width

    +
    + +
    +
    +cudaDevAttrMaxSurface2DLayeredHeight = 64
    +

    Maximum 2D layered surface height

    +
    + +
    +
    +cudaDevAttrMaxSurface2DLayeredLayers = 65
    +

    Maximum layers in a 2D layered surface

    +
    + +
    +
    +cudaDevAttrMaxSurfaceCubemapWidth = 66
    +

    Maximum cubemap surface width

    +
    + +
    +
    +cudaDevAttrMaxSurfaceCubemapLayeredWidth = 67
    +

    Maximum cubemap layered surface width

    +
    + +
    +
    +cudaDevAttrMaxSurfaceCubemapLayeredLayers = 68
    +

    Maximum layers in a cubemap layered surface

    +
    + +
    +
    +cudaDevAttrMaxTexture1DLinearWidth = 69
    +

    Maximum 1D linear texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture2DLinearWidth = 70
    +

    Maximum 2D linear texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture2DLinearHeight = 71
    +

    Maximum 2D linear texture height

    +
    + +
    +
    +cudaDevAttrMaxTexture2DLinearPitch = 72
    +

    Maximum 2D linear texture pitch in bytes

    +
    + +
    +
    +cudaDevAttrMaxTexture2DMipmappedWidth = 73
    +

    Maximum mipmapped 2D texture width

    +
    + +
    +
    +cudaDevAttrMaxTexture2DMipmappedHeight = 74
    +

    Maximum mipmapped 2D texture height

    +
    + +
    +
    +cudaDevAttrComputeCapabilityMajor = 75
    +

    Major compute capability version number

    +
    + +
    +
    +cudaDevAttrComputeCapabilityMinor = 76
    +

    Minor compute capability version number

    +
    + +
    +
    +cudaDevAttrMaxTexture1DMipmappedWidth = 77
    +

    Maximum mipmapped 1D texture width

    +
    + +
    +
    +cudaDevAttrStreamPrioritiesSupported = 78
    +

    Device supports stream priorities

    +
    + +
    +
    +cudaDevAttrGlobalL1CacheSupported = 79
    +

    Device supports caching globals in L1

    +
    + +
    +
    +cudaDevAttrLocalL1CacheSupported = 80
    +

    Device supports caching locals in L1

    +
    + +
    +
    +cudaDevAttrMaxSharedMemoryPerMultiprocessor = 81
    +

    Maximum shared memory available per multiprocessor in bytes

    +
    + +
    +
    +cudaDevAttrMaxRegistersPerMultiprocessor = 82
    +

    Maximum number of 32-bit registers available per multiprocessor

    +
    + +
    +
    +cudaDevAttrManagedMemory = 83
    +

    Device can allocate managed memory on this system

    +
    + +
    +
    +cudaDevAttrIsMultiGpuBoard = 84
    +

    Device is on a multi-GPU board

    +
    + +
    +
    +cudaDevAttrMultiGpuBoardGroupID = 85
    +

    Unique identifier for a group of devices on the same multi-GPU board

    +
    + +
    +
    +cudaDevAttrHostNativeAtomicSupported = 86
    +

    Link between the device and the host supports native atomic operations

    +
    + +
    +
    +cudaDevAttrSingleToDoublePrecisionPerfRatio = 87
    +

    Ratio of single precision performance (in floating-point operations per second) to double precision performance

    +
    + +
    +
    +cudaDevAttrPageableMemoryAccess = 88
    +

    Device supports coherently accessing pageable memory without calling cudaHostRegister on it

    +
    + +
    +
    +cudaDevAttrConcurrentManagedAccess = 89
    +

    Device can coherently access managed memory concurrently with the CPU

    +
    + +
    +
    +cudaDevAttrComputePreemptionSupported = 90
    +

    Device supports Compute Preemption

    +
    + +
    +
    +cudaDevAttrCanUseHostPointerForRegisteredMem = 91
    +

    Device can access host registered memory at the same virtual address as the CPU

    +
    + +
    +
    +cudaDevAttrReserved92 = 92
    +
    + +
    +
    +cudaDevAttrReserved93 = 93
    +
    + +
    +
    +cudaDevAttrReserved94 = 94
    +
    + +
    +
    +cudaDevAttrCooperativeLaunch = 95
    +

    Device supports launching cooperative kernels via cudaLaunchCooperativeKernel

    +
    + +
    +
    +cudaDevAttrCooperativeMultiDeviceLaunch = 96
    +

    Deprecated, cudaLaunchCooperativeKernelMultiDevice is deprecated.

    +
    + +
    +
    +cudaDevAttrMaxSharedMemoryPerBlockOptin = 97
    +

    The maximum optin shared memory per block. This value may vary by chip. See cudaFuncSetAttribute

    +
    + +
    +
    +cudaDevAttrCanFlushRemoteWrites = 98
    +

    Device supports flushing of outstanding remote writes.

    +
    + +
    +
    +cudaDevAttrHostRegisterSupported = 99
    +

    Device supports host memory registration via cudaHostRegister.

    +
    + +
    +
    +cudaDevAttrPageableMemoryAccessUsesHostPageTables = 100
    +

    Device accesses pageable memory via the host’s page tables.

    +
    + +
    +
    +cudaDevAttrDirectManagedMemAccessFromHost = 101
    +

    Host can directly access managed memory on the device without migration.

    +
    + +
    +
    +cudaDevAttrMaxBlocksPerMultiprocessor = 106
    +

    Maximum number of blocks per multiprocessor

    +
    + +
    +
    +cudaDevAttrMaxPersistingL2CacheSize = 108
    +

    Maximum L2 persisting lines capacity setting in bytes.

    +
    + +
    +
    +cudaDevAttrMaxAccessPolicyWindowSize = 109
    +

    Maximum value of num_bytes.

    +
    + +
    +
    +cudaDevAttrReservedSharedMemoryPerBlock = 111
    +

    Shared memory reserved by CUDA driver per block in bytes

    +
    + +
    +
    +cudaDevAttrSparseCudaArraySupported = 112
    +

    Device supports sparse CUDA arrays and sparse CUDA mipmapped arrays

    +
    + +
    +
    +cudaDevAttrHostRegisterReadOnlySupported = 113
    +

    Device supports using the cudaHostRegister flag cudaHostRegisterReadOnly to register memory that must be mapped as read-only to the GPU

    +
    + +
    +
    +cudaDevAttrTimelineSemaphoreInteropSupported = 114
    +

    External timeline semaphore interop is supported on the device

    +
    + +
    +
    +cudaDevAttrMaxTimelineSemaphoreInteropSupported = 114
    +

    Deprecated, External timeline semaphore interop is supported on the device

    +
    + +
    +
    +cudaDevAttrMemoryPoolsSupported = 115
    +

    Device supports using the cudaMallocAsync and cudaMemPool family of APIs

    +
    + +
    +
    +cudaDevAttrGPUDirectRDMASupported = 116
    +

    Device supports GPUDirect RDMA APIs, like nvidia_p2p_get_pages (see https://docs.nvidia.com/cuda/gpudirect-rdma for more information)

    +
    + +
    +
    +cudaDevAttrGPUDirectRDMAFlushWritesOptions = 117
    +

    The returned attribute shall be interpreted as a bitmask, where the individual bits are listed in the cudaFlushGPUDirectRDMAWritesOptions enum

    +
    + +
    +
    +cudaDevAttrGPUDirectRDMAWritesOrdering = 118
    +

    GPUDirect RDMA writes to the device do not need to be flushed for consumers within the scope indicated by the returned attribute. See cudaGPUDirectRDMAWritesOrdering for the numerical values returned here.

    +
    + +
    +
    +cudaDevAttrMemoryPoolSupportedHandleTypes = 119
    +

    Handle types supported with mempool based IPC

    +
    + +
    +
    +cudaDevAttrClusterLaunch = 120
    +

    Indicates device supports cluster launch

    +
    + +
    +
    +cudaDevAttrDeferredMappingCudaArraySupported = 121
    +

    Device supports deferred mapping CUDA arrays and CUDA mipmapped arrays

    +
    + +
    +
    +cudaDevAttrReserved122 = 122
    +
    + +
    +
    +cudaDevAttrReserved123 = 123
    +
    + +
    +
    +cudaDevAttrReserved124 = 124
    +
    + +
    +
    +cudaDevAttrIpcEventSupport = 125
    +

    Device supports IPC Events.

    +
    + +
    +
    +cudaDevAttrMemSyncDomainCount = 126
    +

    Number of memory synchronization domains the device supports.

    +
    + +
    +
    +cudaDevAttrReserved127 = 127
    +
    + +
    +
    +cudaDevAttrReserved128 = 128
    +
    + +
    +
    +cudaDevAttrReserved129 = 129
    +
    + +
    +
    +cudaDevAttrNumaConfig = 130
    +

    NUMA configuration of a device: value is of type cudaDeviceNumaConfig enum

    +
    + +
    +
    +cudaDevAttrNumaId = 131
    +

    NUMA node ID of the GPU memory

    +
    + +
    +
    +cudaDevAttrReserved132 = 132
    +
    + +
    +
    +cudaDevAttrMpsEnabled = 133
    +

    Contexts created on this device will be shared via MPS

    +
    + +
    +
    +cudaDevAttrHostNumaId = 134
    +

    NUMA ID of the host node closest to the device. Returns -1 when system does not support NUMA.

    +
    + +
    +
    +cudaDevAttrD3D12CigSupported = 135
    +

    Device supports CIG with D3D12.

    +
    + +
    +
    +cudaDevAttrMax = 136
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemPoolAttr(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA memory pool attributes

    +
    +
    +cudaMemPoolReuseFollowEventDependencies = 1
    +

    (value type = int) Allow cuMemAllocAsync to use memory asynchronously freed in another streams as long as a stream ordering dependency of the allocating stream on the free action exists. Cuda events and null stream interactions can create the required stream ordered dependencies. (default enabled)

    +
    + +
    +
    +cudaMemPoolReuseAllowOpportunistic = 2
    +

    (value type = int) Allow reuse of already completed frees when there is no dependency between the free and allocation. (default enabled)

    +
    + +
    +
    +cudaMemPoolReuseAllowInternalDependencies = 3
    +

    (value type = int) Allow cuMemAllocAsync to insert new stream dependencies in order to establish the stream ordering required to reuse a piece of memory released by cuFreeAsync (default enabled).

    +
    + +
    +
    +cudaMemPoolAttrReleaseThreshold = 4
    +

    (value type = cuuint64_t) Amount of reserved memory in bytes to hold onto before trying to release memory back to the OS. When more than the release threshold bytes of memory are held by the memory pool, the allocator will try to release memory back to the OS on the next call to stream, event or context synchronize. (default 0)

    +
    + +
    +
    +cudaMemPoolAttrReservedMemCurrent = 5
    +

    (value type = cuuint64_t) Amount of backing memory currently allocated for the mempool.

    +
    + +
    +
    +cudaMemPoolAttrReservedMemHigh = 6
    +

    (value type = cuuint64_t) High watermark of backing memory allocated for the mempool since the last time it was reset. High watermark can only be reset to zero.

    +
    + +
    +
    +cudaMemPoolAttrUsedMemCurrent = 7
    +

    (value type = cuuint64_t) Amount of memory from the pool that is currently in use by the application.

    +
    + +
    +
    +cudaMemPoolAttrUsedMemHigh = 8
    +

    (value type = cuuint64_t) High watermark of the amount of memory from the pool that was in use by the application since the last time it was reset. High watermark can only be reset to zero.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemLocationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies the type of location

    +
    +
    +cudaMemLocationTypeInvalid = 0
    +
    + +
    +
    +cudaMemLocationTypeDevice = 1
    +

    Location is a device location, thus id is a device ordinal

    +
    + +
    +
    +cudaMemLocationTypeHost = 2
    +

    Location is host, id is ignored

    +
    + +
    +
    +cudaMemLocationTypeHostNuma = 3
    +

    Location is a host NUMA node, thus id is a host NUMA node id

    +
    + +
    +
    +cudaMemLocationTypeHostNumaCurrent = 4
    +

    Location is the host NUMA node closest to the current thread’s CPU, id is ignored

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemAccessFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies the memory protection flags for mapping.

    +
    +
    +cudaMemAccessFlagsProtNone = 0
    +

    Default, make the address range not accessible

    +
    + +
    +
    +cudaMemAccessFlagsProtRead = 1
    +

    Make the address range read accessible

    +
    + +
    +
    +cudaMemAccessFlagsProtReadWrite = 3
    +

    Make the address range read-write accessible

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemAllocationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Defines the allocation types available

    +
    +
    +cudaMemAllocationTypeInvalid = 0
    +
    + +
    +
    +cudaMemAllocationTypePinned = 1
    +

    This allocation type is ‘pinned’, i.e. cannot migrate from its current location while the application is actively using it

    +
    + +
    +
    +cudaMemAllocationTypeMax = 2147483647
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemAllocationHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for specifying particular handle types

    +
    +
    +cudaMemHandleTypeNone = 0
    +

    Does not allow any export mechanism. >

    +
    + +
    +
    +cudaMemHandleTypePosixFileDescriptor = 1
    +

    Allows a file descriptor to be used for exporting. Permitted only on POSIX systems. (int)

    +
    + +
    +
    +cudaMemHandleTypeWin32 = 2
    +

    Allows a Win32 NT handle to be used for exporting. (HANDLE)

    +
    + +
    +
    +cudaMemHandleTypeWin32Kmt = 4
    +

    Allows a Win32 KMT handle to be used for exporting. (D3DKMT_HANDLE)

    +
    + +
    +
    +cudaMemHandleTypeFabric = 8
    +

    Allows a fabric handle to be used for exporting. (cudaMemFabricHandle_t)

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphMemAttributeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Graph memory attributes

    +
    +
    +cudaGraphMemAttrUsedMemCurrent = 0
    +

    (value type = cuuint64_t) Amount of memory, in bytes, currently associated with graphs.

    +
    + +
    +
    +cudaGraphMemAttrUsedMemHigh = 1
    +

    (value type = cuuint64_t) High watermark of memory, in bytes, associated with graphs since the last time it was reset. High watermark can only be reset to zero.

    +
    + +
    +
    +cudaGraphMemAttrReservedMemCurrent = 2
    +

    (value type = cuuint64_t) Amount of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator.

    +
    + +
    +
    +cudaGraphMemAttrReservedMemHigh = 3
    +

    (value type = cuuint64_t) High watermark of memory, in bytes, currently allocated for use by the CUDA graphs asynchronous allocator.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaDeviceP2PAttr(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA device P2P attributes

    +
    +
    +cudaDevP2PAttrPerformanceRank = 1
    +

    A relative value indicating the performance of the link between two devices

    +
    + +
    +
    +cudaDevP2PAttrAccessSupported = 2
    +

    Peer access is enabled

    +
    + +
    +
    +cudaDevP2PAttrNativeAtomicSupported = 3
    +

    Native atomic operation over the link supported

    +
    + +
    +
    +cudaDevP2PAttrCudaArrayAccessSupported = 4
    +

    Accessing CUDA arrays over the link supported

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalMemoryHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    External memory handle types

    +
    +
    +cudaExternalMemoryHandleTypeOpaqueFd = 1
    +

    Handle is an opaque file descriptor

    +
    + +
    +
    +cudaExternalMemoryHandleTypeOpaqueWin32 = 2
    +

    Handle is an opaque shared NT handle

    +
    + +
    +
    +cudaExternalMemoryHandleTypeOpaqueWin32Kmt = 3
    +

    Handle is an opaque, globally shared handle

    +
    + +
    +
    +cudaExternalMemoryHandleTypeD3D12Heap = 4
    +

    Handle is a D3D12 heap object

    +
    + +
    +
    +cudaExternalMemoryHandleTypeD3D12Resource = 5
    +

    Handle is a D3D12 committed resource

    +
    + +
    +
    +cudaExternalMemoryHandleTypeD3D11Resource = 6
    +

    Handle is a shared NT handle to a D3D11 resource

    +
    + +
    +
    +cudaExternalMemoryHandleTypeD3D11ResourceKmt = 7
    +

    Handle is a globally shared handle to a D3D11 resource

    +
    + +
    +
    +cudaExternalMemoryHandleTypeNvSciBuf = 8
    +

    Handle is an NvSciBuf object

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphoreHandleType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    External semaphore handle types

    +
    +
    +cudaExternalSemaphoreHandleTypeOpaqueFd = 1
    +

    Handle is an opaque file descriptor

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeOpaqueWin32 = 2
    +

    Handle is an opaque shared NT handle

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeOpaqueWin32Kmt = 3
    +

    Handle is an opaque, globally shared handle

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeD3D12Fence = 4
    +

    Handle is a shared NT handle referencing a D3D12 fence object

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeD3D11Fence = 5
    +

    Handle is a shared NT handle referencing a D3D11 fence object

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeNvSciSync = 6
    +

    Opaque handle to NvSciSync Object

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeKeyedMutex = 7
    +

    Handle is a shared NT handle referencing a D3D11 keyed mutex object

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeKeyedMutexKmt = 8
    +

    Handle is a shared KMT handle referencing a D3D11 keyed mutex object

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeTimelineSemaphoreFd = 9
    +

    Handle is an opaque handle file descriptor referencing a timeline semaphore

    +
    + +
    +
    +cudaExternalSemaphoreHandleTypeTimelineSemaphoreWin32 = 10
    +

    Handle is an opaque handle file descriptor referencing a timeline semaphore

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaCGScope(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA cooperative group scope

    +
    +
    +cudaCGScopeInvalid = 0
    +

    Invalid cooperative group scope

    +
    + +
    +
    +cudaCGScopeGrid = 1
    +

    Scope represented by a grid_group

    +
    + +
    +
    +cudaCGScopeMultiGrid = 2
    +

    Scope represented by a multi_grid_group

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphConditionalHandleFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +
    +
    +cudaGraphCondAssignDefault = 1
    +

    Apply default handle value when graph is launched.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphConditionalNodeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA conditional node types

    +
    +
    +cudaGraphCondTypeIf = 0
    +

    Conditional ‘if’ Node. Body executed once if condition value is non-zero.

    +
    + +
    +
    +cudaGraphCondTypeWhile = 1
    +

    Conditional ‘while’ Node. Body executed repeatedly while condition value is non-zero.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphNodeType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Graph node types

    +
    +
    +cudaGraphNodeTypeKernel = 0
    +

    GPU kernel node

    +
    + +
    +
    +cudaGraphNodeTypeMemcpy = 1
    +

    Memcpy node

    +
    + +
    +
    +cudaGraphNodeTypeMemset = 2
    +

    Memset node

    +
    + +
    +
    +cudaGraphNodeTypeHost = 3
    +

    Host (executable) node

    +
    + +
    +
    +cudaGraphNodeTypeGraph = 4
    +

    Node which executes an embedded graph

    +
    + +
    +
    +cudaGraphNodeTypeEmpty = 5
    +

    Empty (no-op) node

    +
    + +
    +
    +cudaGraphNodeTypeWaitEvent = 6
    +

    External event wait node

    +
    + +
    +
    +cudaGraphNodeTypeEventRecord = 7
    +

    External event record node

    +
    + +
    +
    +cudaGraphNodeTypeExtSemaphoreSignal = 8
    +

    External semaphore signal node

    +
    + +
    +
    +cudaGraphNodeTypeExtSemaphoreWait = 9
    +

    External semaphore wait node

    +
    + +
    +
    +cudaGraphNodeTypeMemAlloc = 10
    +

    Memory allocation node

    +
    + +
    +
    +cudaGraphNodeTypeMemFree = 11
    +

    Memory free node

    +
    + +
    +
    +cudaGraphNodeTypeConditional = 13
    +

    Conditional node May be used to implement a conditional execution path or loop

    +
    +

    inside of a graph. The graph(s) contained within the body of the conditional node

    +

    can be selectively executed or iterated upon based on the value of a conditional

    +

    variable.

    +

    Handles must be created in advance of creating the node

    +

    using cudaGraphConditionalHandleCreate.

    +

    The following restrictions apply to graphs which contain conditional nodes:

    +
    +

    The graph cannot be used in a child node.

    +

    Only one instantiation of the graph may exist at any point in time.

    +

    The graph cannot be cloned.

    +
    +

    To set the control value, supply a default value when creating the handle and/or

    +

    call cudaGraphSetConditional from device code.

    +
    +
    + +
    +
    +cudaGraphNodeTypeCount = 14
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphDependencyType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Type annotations that can be applied to graph edges as part of +cudaGraphEdgeData.

    +
    +
    +cudaGraphDependencyTypeDefault = 0
    +

    This is an ordinary dependency.

    +
    + +
    +
    +cudaGraphDependencyTypeProgrammatic = 1
    +

    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 cudaGraphKernelNodePortProgrammatic or cudaGraphKernelNodePortLaunchCompletion outgoing port.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphExecUpdateResult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Graph Update error types

    +
    +
    +cudaGraphExecUpdateSuccess = 0
    +

    The update succeeded

    +
    + +
    +
    +cudaGraphExecUpdateError = 1
    +

    The update failed for an unexpected reason which is described in the return value of the function

    +
    + +
    +
    +cudaGraphExecUpdateErrorTopologyChanged = 2
    +

    The update failed because the topology changed

    +
    + +
    +
    +cudaGraphExecUpdateErrorNodeTypeChanged = 3
    +

    The update failed because a node type changed

    +
    + +
    +
    +cudaGraphExecUpdateErrorFunctionChanged = 4
    +

    The update failed because the function of a kernel node changed (CUDA driver < 11.2)

    +
    + +
    +
    +cudaGraphExecUpdateErrorParametersChanged = 5
    +

    The update failed because the parameters changed in a way that is not supported

    +
    + +
    +
    +cudaGraphExecUpdateErrorNotSupported = 6
    +

    The update failed because something about the node is not supported

    +
    + +
    +
    +cudaGraphExecUpdateErrorUnsupportedFunctionChange = 7
    +

    The update failed because the function of a kernel node changed in an unsupported way

    +
    + +
    +
    +cudaGraphExecUpdateErrorAttributesChanged = 8
    +

    The update failed because the node attributes changed in a way that is not supported

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphInstantiateResult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Graph instantiation results

    +
    +
    +cudaGraphInstantiateSuccess = 0
    +

    Instantiation succeeded

    +
    + +
    +
    +cudaGraphInstantiateError = 1
    +

    Instantiation failed for an unexpected reason which is described in the return value of the function

    +
    + +
    +
    +cudaGraphInstantiateInvalidStructure = 2
    +

    Instantiation failed due to invalid structure, such as cycles

    +
    + +
    +
    +cudaGraphInstantiateNodeOperationNotSupported = 3
    +

    Instantiation for device launch failed because the graph contained an unsupported operation

    +
    + +
    +
    +cudaGraphInstantiateMultipleDevicesNotSupported = 4
    +

    Instantiation for device launch failed due to the nodes belonging to different contexts

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphKernelNodeField(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Specifies the field to update when performing multiple node updates +from the device

    +
    +
    +cudaGraphKernelNodeFieldInvalid = 0
    +

    Invalid field

    +
    + +
    +
    +cudaGraphKernelNodeFieldGridDim = 1
    +

    Grid dimension update

    +
    + +
    +
    +cudaGraphKernelNodeFieldParam = 2
    +

    Kernel parameter update

    +
    + +
    +
    +cudaGraphKernelNodeFieldEnabled = 3
    +

    Node enable/disable

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGetDriverEntryPointFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags to specify search options to be used with +cudaGetDriverEntryPoint For more details see +cuGetProcAddress

    +
    +
    +cudaEnableDefault = 0
    +

    Default search mode for driver symbols.

    +
    + +
    +
    +cudaEnableLegacyStream = 1
    +

    Search for legacy versions of driver symbols.

    +
    + +
    +
    +cudaEnablePerThreadDefaultStream = 2
    +

    Search for per-thread versions of driver symbols.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaDriverEntryPointQueryResult(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Enum for status from obtaining driver entry points, used with +cudaApiGetDriverEntryPoint

    +
    +
    +cudaDriverEntryPointSuccess = 0
    +

    Search for symbol found a match

    +
    + +
    +
    +cudaDriverEntryPointSymbolNotFound = 1
    +

    Search for symbol was not found

    +
    + +
    +
    +cudaDriverEntryPointVersionNotSufficent = 2
    +

    Search for symbol was found but version wasn’t great enough

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphDebugDotFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Graph debug write options

    +
    +
    +cudaGraphDebugDotFlagsVerbose = 1
    +

    Output all debug data as if every debug flag is enabled

    +
    + +
    +
    +cudaGraphDebugDotFlagsKernelNodeParams = 4
    +

    Adds cudaKernelNodeParams to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsMemcpyNodeParams = 8
    +

    Adds cudaMemcpy3DParms to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsMemsetNodeParams = 16
    +

    Adds cudaMemsetParams to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsHostNodeParams = 32
    +

    Adds cudaHostNodeParams to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsEventNodeParams = 64
    +

    Adds cudaEvent_t handle from record and wait nodes to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsExtSemasSignalNodeParams = 128
    +

    Adds cudaExternalSemaphoreSignalNodeParams values to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsExtSemasWaitNodeParams = 256
    +

    Adds cudaExternalSemaphoreWaitNodeParams to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsKernelNodeAttributes = 512
    +

    Adds cudaKernelNodeAttrID values to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsHandles = 1024
    +

    Adds node handles and every kernel function handle to output

    +
    + +
    +
    +cudaGraphDebugDotFlagsConditionalNodeParams = 32768
    +

    Adds cudaConditionalNodeParams to output

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphInstantiateFlags(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Flags for instantiating a graph

    +
    +
    +cudaGraphInstantiateFlagAutoFreeOnLaunch = 1
    +

    Automatically free memory allocated in a graph before relaunching.

    +
    + +
    +
    +cudaGraphInstantiateFlagUpload = 2
    +

    Automatically upload the graph after instantiation. Only supported by

    +
    +

    cudaGraphInstantiateWithParams. The upload will be performed using the

    +

    stream provided in instantiateParams.

    +
    +
    + +
    +
    +cudaGraphInstantiateFlagDeviceLaunch = 4
    +

    Instantiate the graph to be launchable from the device. This flag can only

    +
    +

    be used on platforms which support unified addressing. This flag cannot be

    +

    used in conjunction with cudaGraphInstantiateFlagAutoFreeOnLaunch.

    +
    +
    + +
    +
    +cudaGraphInstantiateFlagUseNodePriority = 8
    +

    Run the graph using the per-node priority attributes rather than the priority of the stream it is launched into.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLaunchMemSyncDomain(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Memory Synchronization Domain A kernel can be launched in a +specified memory synchronization domain that affects all memory +operations issued by that kernel. A memory barrier issued in one +domain will only order memory operations in that domain, thus +eliminating latency increase from memory barriers ordering +unrelated traffic. By default, kernels are launched in domain 0. +Kernel launched with cudaLaunchMemSyncDomainRemote will +have a different domain ID. User may also alter the domain ID with +cudaLaunchMemSyncDomainMap for a specific stream / +graph node / kernel launch. See +cudaLaunchAttributeMemSyncDomain, +cudaStreamSetAttribute, cudaLaunchKernelEx, +cudaGraphKernelNodeSetAttribute. Memory operations +done in kernels launched in different domains are considered +system-scope distanced. In other words, a GPU scoped memory +synchronization is not sufficient for memory order to be observed +by kernels in another memory synchronization domain even if they +are on the same GPU.

    +
    +
    +cudaLaunchMemSyncDomainDefault = 0
    +

    Launch kernels in the default domain

    +
    + +
    +
    +cudaLaunchMemSyncDomainRemote = 1
    +

    Launch kernels in the remote domain

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLaunchAttributeID(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Launch attributes enum; used as id field of +cudaLaunchAttribute

    +
    +
    +cudaLaunchAttributeIgnore = 0
    +

    Ignored entry, for convenient composition

    +
    + +
    +
    +cudaLaunchAttributeAccessPolicyWindow = 1
    +

    Valid for streams, graph nodes, launches. See accessPolicyWindow.

    +
    + +
    +
    +cudaLaunchAttributeCooperative = 2
    +

    Valid for graph nodes, launches. See cooperative.

    +
    + +
    +
    +cudaLaunchAttributeSynchronizationPolicy = 3
    +

    Valid for streams. See syncPolicy.

    +
    + +
    +
    +cudaLaunchAttributeClusterDimension = 4
    +

    Valid for graph nodes, launches. See clusterDim.

    +
    + +
    +
    +cudaLaunchAttributeClusterSchedulingPolicyPreference = 5
    +

    Valid for graph nodes, launches. See clusterSchedulingPolicyPreference.

    +
    + +
    +
    +cudaLaunchAttributeProgrammaticStreamSerialization = 6
    +

    Valid for launches. Setting programmaticStreamSerializationAllowed to non-0 signals that the kernel will use programmatic means to resolve its stream dependency, so that the CUDA runtime should opportunistically allow the grid’s execution to overlap with the previous kernel in the stream, if that kernel requests the overlap. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions).

    +
    + +
    +
    +cudaLaunchAttributeProgrammaticEvent = 7
    +

    Valid for launches. Set programmaticEvent to record the event. Event recorded through this launch attribute is guaranteed to only trigger after all block in the associated kernel trigger the event. A block can trigger the event programmatically in a future CUDA release. A trigger can also be inserted at the beginning of each block’s execution if triggerAtBlockStart is set to non-0. The dependent launches can choose to wait on the dependency using the programmatic sync (cudaGridDependencySynchronize() or equivalent PTX instructions). Note that dependents (including the CPU thread calling cudaEventSynchronize()) are not guaranteed to observe the release precisely when it is released. For example, cudaEventSynchronize() may only observe the event trigger long after the associated kernel has completed. This recording type is primarily meant for establishing programmatic dependency between device tasks. Note also this type of dependency allows, but does not guarantee, concurrent execution of tasks.

    +
    +

    The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the cudaEventDisableTiming flag set).

    +
    +
    + +
    +
    +cudaLaunchAttributePriority = 8
    +

    Valid for streams, graph nodes, launches. See priority.

    +
    + +
    +
    +cudaLaunchAttributeMemSyncDomainMap = 9
    +

    Valid for streams, graph nodes, launches. See memSyncDomainMap.

    +
    + +
    +
    +cudaLaunchAttributeMemSyncDomain = 10
    +

    Valid for streams, graph nodes, launches. See memSyncDomain.

    +
    + +
    +
    +cudaLaunchAttributeLaunchCompletionEvent = 12
    +

    Valid for launches. Set launchCompletionEvent to record the event.

    +
    +

    Nominally, the event is triggered once all blocks of the kernel have begun execution. Currently this is a best effort. If a kernel B has a launch completion dependency on a kernel A, B may wait until A is complete. Alternatively, blocks of B may begin before all blocks of A have begun, for example if B can claim execution resources unavailable to A (e.g. they run on different GPUs) or if B is a higher priority than A. Exercise caution if such an ordering inversion could lead to deadlock.

    +

    A launch completion event is nominally similar to a programmatic event with triggerAtBlockStart set except that it is not visible to cudaGridDependencySynchronize() and can be used with compute capability less than 9.0.

    +

    The event supplied must not be an interprocess or interop event. The event must disable timing (i.e. must be created with the cudaEventDisableTiming flag set).

    +
    +
    + +
    +
    +cudaLaunchAttributeDeviceUpdatableKernelNode = 13
    +

    Valid for graph nodes, launches. This attribute is graphs-only, and passing it to a launch in a non-capturing stream will result in an error.

    +
    +

    :cudaLaunchAttributeValue::deviceUpdatableKernelNode::deviceUpdatable can only be set to 0 or 1. Setting the field to 1 indicates that the corresponding kernel node should be device-updatable. On success, a handle will be returned via cudaLaunchAttributeValue::deviceUpdatableKernelNode::devNode which can be passed to the various device-side update functions to update the node’s kernel parameters from within another kernel. For more information on the types of device updates that can be made, as well as the relevant limitations thereof, see cudaGraphKernelNodeUpdatesApply.

    +

    Nodes which are device-updatable have additional restrictions compared to regular kernel nodes. Firstly, device-updatable nodes cannot be removed from their graph via cudaGraphDestroyNode. Additionally, once opted-in to this functionality, a node cannot opt out, and any attempt to set the deviceUpdatable attribute to 0 will result in an error. Device-updatable kernel nodes also cannot have their attributes copied to/from another kernel node via cudaGraphKernelNodeCopyAttributes. Graphs containing one or more device-updatable nodes also do not allow multiple instantiation, and neither the graph nor its instantiated version can be passed to cudaGraphExecUpdate.

    +

    If a graph contains device-updatable nodes and updates those nodes from the device from within the graph, the graph must be uploaded with cuGraphUpload before it is launched. For such a graph, if host-side executable graph updates are made to the device-updatable nodes, the graph must be uploaded before it is launched again.

    +
    +
    + +
    +
    +cudaLaunchAttributePreferredSharedMemoryCarveout = 14
    +

    Valid for launches. On devices where the L1 cache and shared memory use the same hardware resources, setting sharedMemCarveout to a percentage between 0-100 signals sets the shared memory carveout preference in percent of the total shared memory for that kernel launch. This attribute takes precedence over cudaFuncAttributePreferredSharedMemoryCarveout. This is only a hint, and the driver can choose a different configuration if required for the launch.

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaDeviceNumaConfig(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA device NUMA config

    +
    +
    +cudaDeviceNumaConfigNone = 0
    +

    The GPU is not a NUMA node

    +
    + +
    +
    +cudaDeviceNumaConfigNumaNode = 1
    +

    The GPU is a NUMA node, cudaDevAttrNumaId contains its NUMA ID

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaAsyncNotificationType(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    Types of async notification that can occur

    +
    +
    +cudaAsyncNotificationTypeOverBudget = 1
    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaSurfaceBoundaryMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Surface boundary modes

    +
    +
    +cudaBoundaryModeZero = 0
    +

    Zero boundary mode

    +
    + +
    +
    +cudaBoundaryModeClamp = 1
    +

    Clamp boundary mode

    +
    + +
    +
    +cudaBoundaryModeTrap = 2
    +

    Trap boundary mode

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaSurfaceFormatMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA Surface format modes

    +
    +
    +cudaFormatModeForced = 0
    +

    Forced format mode

    +
    + +
    +
    +cudaFormatModeAuto = 1
    +

    Auto format mode

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaTextureAddressMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA texture address modes

    +
    +
    +cudaAddressModeWrap = 0
    +

    Wrapping address mode

    +
    + +
    +
    +cudaAddressModeClamp = 1
    +

    Clamp to edge address mode

    +
    + +
    +
    +cudaAddressModeMirror = 2
    +

    Mirror address mode

    +
    + +
    +
    +cudaAddressModeBorder = 3
    +

    Border address mode

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaTextureFilterMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA texture filter modes

    +
    +
    +cudaFilterModePoint = 0
    +

    Point filter mode

    +
    + +
    +
    +cudaFilterModeLinear = 1
    +

    Linear filter mode

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaTextureReadMode(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
    +

    CUDA texture read modes

    +
    +
    +cudaReadModeElementType = 0
    +

    Read texture as specified element type

    +
    + +
    +
    +cudaReadModeNormalizedFloat = 1
    +

    Read texture as normalized float

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEglPlaneDesc
    +

    CUDA EGL Plane Descriptor - structure defining each plane of a CUDA +EGLFrame

    +
    +
    +width
    +

    Width of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +height
    +

    Height of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +depth
    +

    Depth of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +pitch
    +

    Pitch of plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +numChannels
    +

    Number of channels for the plane

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +channelDesc
    +

    Channel Format Descriptor

    +
    +
    Type:
    +

    cudaChannelFormatDesc

    +
    +
    +
    + +
    +
    +reserved
    +

    Reserved for future use

    +
    +
    Type:
    +

    List[unsigned int]

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEglFrame
    +

    CUDA EGLFrame Descriptor - structure defining one frame of EGL. +Each frame may contain one or more planes depending on whether the +surface is Multiplanar or not. Each plane of EGLFrame is +represented by cudaEglPlaneDesc which is defined as: +typedefstructcudaEglPlaneDesc_st unsignedintwidth; +unsignedintheight; unsignedintdepth; unsignedintpitch; +unsignedintnumChannels; structcudaChannelFormatDescchannelDesc; +unsignedintreserved[4]; cudaEglPlaneDesc;

    +
    +
    +frame
    +
    +
    Type:
    +

    anon_union10

    +
    +
    +
    + +
    +
    +planeDesc
    +

    CUDA EGL Plane Descriptor cudaEglPlaneDesc

    +
    +
    Type:
    +

    List[cudaEglPlaneDesc]

    +
    +
    +
    + +
    +
    +planeCount
    +

    Number of planes

    +
    +
    Type:
    +

    unsigned int

    +
    +
    +
    + +
    +
    +frameType
    +

    Array or Pitch

    +
    +
    Type:
    +

    cudaEglFrameType

    +
    +
    +
    + +
    +
    +eglColorFormat
    +

    CUDA EGL Color Format

    +
    +
    Type:
    +

    cudaEglColorFormat

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEglStreamConnection
    +

    CUDA EGLSream Connection

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaArray_t(*args, **kwargs)
    +

    CUDA array

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaArray_const_t(*args, **kwargs)
    +

    CUDA array (as source copy argument)

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMipmappedArray_t(*args, **kwargs)
    +

    CUDA mipmapped array

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMipmappedArray_const_t(*args, **kwargs)
    +

    CUDA mipmapped array (as source argument)

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaHostFn_t(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.CUuuid
    +
    +
    +bytes
    +

    < CUDA definition of UUID

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaUUID_t
    +
    +
    +bytes
    +

    < CUDA definition of UUID

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaIpcEventHandle_t
    +

    CUDA IPC event handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaIpcMemHandle_t
    +

    CUDA IPC memory handle

    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemFabricHandle_t
    +
    +
    +reserved
    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaStream_t
    +

    CUDA stream

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaEvent_t
    +

    CUDA event types

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphicsResource_t(*args, **kwargs)
    +

    CUDA graphics resource types

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalMemory_t(*args, **kwargs)
    +

    CUDA external memory

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaExternalSemaphore_t(*args, **kwargs)
    +

    CUDA external semaphore

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraph_t
    +

    CUDA graph

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphNode_t
    +

    CUDA graph node.

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaUserObject_t
    +

    CUDA user object for graphs

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphConditionalHandle
    +

    CUDA handle for conditional graph nodes

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaFunction_t
    +

    CUDA function

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaKernel_t(*args, **kwargs)
    +

    CUDA kernel

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaMemPool_t
    +

    CUDA memory pool

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphEdgeData
    +

    Optional annotation for edges in a CUDA graph. Note, all edges +implicitly have annotations and default to a zero-initialized value +if not specified. A zero-initialized struct indicates a standard +full serialization of two nodes with memory visibility.

    +
    +
    +from_port
    +

    This indicates when the dependency is triggered from the upstream +node on the edge. The meaning is specfic to the node type. A value +of 0 in all cases means full completion of the upstream node, with +memory visibility to the downstream node or portion thereof +(indicated by to_port). Only kernel nodes define non-zero +ports. A kernel node can use the following output port types: +cudaGraphKernelNodePortDefault, +cudaGraphKernelNodePortProgrammatic, or +cudaGraphKernelNodePortLaunchCompletion.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +to_port
    +

    This indicates what portion of the downstream node is dependent on +the upstream node or portion thereof (indicated by from_port). +The meaning is specific to the node type. A value of 0 in all cases +means the entirety of the downstream node is dependent on the +upstream work. Currently no node types define non-zero ports. +Accordingly, this field must be set to zero.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +type
    +

    This should be populated with a value from +::cudaGraphDependencyType. (It is typed as char due to compiler- +specific layout of bitfields.) See ::cudaGraphDependencyType.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +reserved
    +

    These bytes are unused and must be zeroed. This ensures +compatibility if additional fields are added in the future.

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphExec_t
    +

    CUDA executable (launchable) graph

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphInstantiateParams
    +

    Graph instantiation parameters

    +
    +
    +flags
    +

    Instantiation flags

    +
    +
    Type:
    +

    unsigned long long

    +
    +
    +
    + +
    +
    +uploadStream
    +

    Upload stream

    +
    +
    Type:
    +

    cudaStream_t

    +
    +
    +
    + +
    +
    +errNode_out
    +

    The node which caused instantiation to fail, if any

    +
    +
    Type:
    +

    cudaGraphNode_t

    +
    +
    +
    + +
    +
    +result_out
    +

    Whether instantiation was successful. If it failed, the reason why

    +
    +
    Type:
    +

    cudaGraphInstantiateResult

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphExecUpdateResultInfo
    +

    Result information returned by cudaGraphExecUpdate

    +
    +
    +result
    +

    Gives more specific detail when a cuda graph update fails.

    +
    +
    Type:
    +

    cudaGraphExecUpdateResult

    +
    +
    +
    + +
    +
    +errorNode
    +

    The “to node” of the error edge when the topologies do not match. +The error node when the error is associated with a specific node. +NULL when the error is generic.

    +
    +
    Type:
    +

    cudaGraphNode_t

    +
    +
    +
    + +
    +
    +errorFromNode
    +

    The from node of error edge when the topologies do not match. +Otherwise NULL.

    +
    +
    Type:
    +

    cudaGraphNode_t

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaGraphDeviceNode_t(*args, **kwargs)
    +

    CUDA device node handle for device-side node update

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLaunchMemSyncDomainMap
    +

    Memory Synchronization Domain map See cudaLaunchMemSyncDomain. By +default, kernels are launched in domain 0. Kernel launched with +cudaLaunchMemSyncDomainRemote will have a different domain ID. User +may also alter the domain ID with ::cudaLaunchMemSyncDomainMap for +a specific stream / graph node / kernel launch. See +cudaLaunchAttributeMemSyncDomainMap. Domain ID range is available +through cudaDevAttrMemSyncDomainCount.

    +
    +
    +default_
    +

    The default domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +remote
    +

    The remote domain ID to use for designated kernels

    +
    +
    Type:
    +

    bytes

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaLaunchAttribute
    +

    Launch attribute

    +
    +
    +id
    +

    Attribute to set

    +
    +
    Type:
    +

    cudaLaunchAttributeID

    +
    +
    +
    + +
    +
    +val
    +

    Value of the attribute

    +
    +
    Type:
    +

    cudaLaunchAttributeValue

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaAsyncCallbackHandle_t(*args, **kwargs)
    +

    CUDA async callback handle

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaAsyncNotificationInfo_t
    +

    Information describing an async notification event

    +
    +
    +type
    +
    +
    Type:
    +

    cudaAsyncNotificationType

    +
    +
    +
    + +
    +
    +info
    +
    +
    Type:
    +

    anon_union9

    +
    +
    +
    + +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaAsyncCallback(*args, **kwargs)
    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaSurfaceObject_t
    +

    An opaque value that represents a CUDA Surface object

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +class cuda.bindings.runtime.cudaTextureObject_t
    +

    An opaque value that represents a CUDA texture object

    +
    +
    +getPtr()
    +

    Get memory address of class instance

    +
    + +
    + +
    +
    +runtime.CUDA_EGL_MAX_PLANES = 3
    +

    Maximum number of planes per frame

    +
    + +
    +
    +runtime.cudaHostAllocDefault = 0
    +

    Default page-locked allocation flag

    +
    + +
    +
    +runtime.cudaHostAllocPortable = 1
    +

    Pinned memory accessible by all CUDA contexts

    +
    + +
    +
    +runtime.cudaHostAllocMapped = 2
    +

    Map allocation into device space

    +
    + +
    +
    +runtime.cudaHostAllocWriteCombined = 4
    +

    Write-combined memory

    +
    + +
    +
    +runtime.cudaHostRegisterDefault = 0
    +

    Default host memory registration flag

    +
    + +
    +
    +runtime.cudaHostRegisterPortable = 1
    +

    Pinned memory accessible by all CUDA contexts

    +
    + +
    +
    +runtime.cudaHostRegisterMapped = 2
    +

    Map registered memory into device space

    +
    + +
    +
    +runtime.cudaHostRegisterIoMemory = 4
    +

    Memory-mapped I/O space

    +
    + +
    +
    +runtime.cudaHostRegisterReadOnly = 8
    +

    Memory-mapped read-only

    +
    + +
    +
    +runtime.cudaPeerAccessDefault = 0
    +

    Default peer addressing enable flag

    +
    + +
    +
    +runtime.cudaStreamDefault = 0
    +

    Default stream flag

    +
    + +
    +
    +runtime.cudaStreamNonBlocking = 1
    +

    Stream does not synchronize with stream 0 (the NULL stream)

    +
    + +
    +
    +runtime.cudaStreamLegacy = 1
    +

    Legacy stream handle

    +

    Stream handle that can be passed as a cudaStream_t to use an implicit stream with legacy synchronization behavior.

    +

    See details of the link_sync_behavior

    +
    + +
    +
    +runtime.cudaStreamPerThread = 2
    +

    Per-thread stream handle

    +

    Stream handle that can be passed as a cudaStream_t to use an implicit stream with per-thread synchronization behavior.

    +

    See details of the link_sync_behavior

    +
    + +
    +
    +runtime.cudaEventDefault = 0
    +

    Default event flag

    +
    + +
    +
    +runtime.cudaEventBlockingSync = 1
    +

    Event uses blocking synchronization

    +
    + +
    +
    +runtime.cudaEventDisableTiming = 2
    +

    Event will not record timing data

    +
    + +
    +
    +runtime.cudaEventInterprocess = 4
    +

    Event is suitable for interprocess use. cudaEventDisableTiming must be set

    +
    + +
    +
    +runtime.cudaEventRecordDefault = 0
    +

    Default event record flag

    +
    + +
    +
    +runtime.cudaEventRecordExternal = 1
    +

    Event is captured in the graph as an external event node when performing stream capture

    +
    + +
    +
    +runtime.cudaEventWaitDefault = 0
    +

    Default event wait flag

    +
    + +
    +
    +runtime.cudaEventWaitExternal = 1
    +

    Event is captured in the graph as an external event node when performing stream capture

    +
    + +
    +
    +runtime.cudaDeviceScheduleAuto = 0
    +

    Device flag - Automatic scheduling

    +
    + +
    +
    +runtime.cudaDeviceScheduleSpin = 1
    +

    Device flag - Spin default scheduling

    +
    + +
    +
    +runtime.cudaDeviceScheduleYield = 2
    +

    Device flag - Yield default scheduling

    +
    + +
    +
    +runtime.cudaDeviceScheduleBlockingSync = 4
    +

    Device flag - Use blocking synchronization

    +
    + +
    +
    +runtime.cudaDeviceBlockingSync = 4
    +

    Device flag - Use blocking synchronization [Deprecated]

    +
    + +
    +
    +runtime.cudaDeviceScheduleMask = 7
    +

    Device schedule flags mask

    +
    + +
    +
    +runtime.cudaDeviceMapHost = 8
    +

    Device flag - Support mapped pinned allocations

    +
    + +
    +
    +runtime.cudaDeviceLmemResizeToMax = 16
    +

    Device flag - Keep local memory allocation after launch

    +
    + +
    +
    +runtime.cudaDeviceSyncMemops = 128
    +

    Device flag - Ensure synchronous memory operations on this context will synchronize

    +
    + +
    +
    +runtime.cudaDeviceMask = 255
    +

    Device flags mask

    +
    + +
    +
    +runtime.cudaArrayDefault = 0
    +

    Default CUDA array allocation flag

    +
    + +
    +
    +runtime.cudaArrayLayered = 1
    +

    Must be set in cudaMalloc3DArray to create a layered CUDA array

    +
    + +
    +
    +runtime.cudaArraySurfaceLoadStore = 2
    +

    Must be set in cudaMallocArray or cudaMalloc3DArray in order to bind surfaces to the CUDA array

    +
    + +
    +
    +runtime.cudaArrayCubemap = 4
    +

    Must be set in cudaMalloc3DArray to create a cubemap CUDA array

    +
    + +
    +
    +runtime.cudaArrayTextureGather = 8
    +

    Must be set in cudaMallocArray or cudaMalloc3DArray in order to perform texture gather operations on the CUDA array

    +
    + +
    +
    +runtime.cudaArrayColorAttachment = 32
    +

    Must be set in cudaExternalMemoryGetMappedMipmappedArray if the mipmapped array is used as a color target in a graphics API

    +
    + +
    +
    +runtime.cudaArraySparse = 64
    +

    Must be set in cudaMallocArray, cudaMalloc3DArray or cudaMallocMipmappedArray in order to create a sparse CUDA array or CUDA mipmapped array

    +
    + +
    +
    +runtime.cudaArrayDeferredMapping = 128
    +

    Must be set in cudaMallocArray, cudaMalloc3DArray or cudaMallocMipmappedArray in order to create a deferred mapping CUDA array or CUDA mipmapped array

    +
    + +
    +
    +runtime.cudaIpcMemLazyEnablePeerAccess = 1
    +

    Automatically enable peer access between remote devices as needed

    +
    + +
    +
    +runtime.cudaMemAttachGlobal = 1
    +

    Memory can be accessed by any stream on any device

    +
    + +
    +
    +runtime.cudaMemAttachHost = 2
    +

    Memory cannot be accessed by any stream on any device

    +
    + +
    +
    +runtime.cudaMemAttachSingle = 4
    +

    Memory can only be accessed by a single stream on the associated device

    +
    + +
    +
    +runtime.cudaOccupancyDefault = 0
    +

    Default behavior

    +
    + +
    +
    +runtime.cudaOccupancyDisableCachingOverride = 1
    +

    Assume global caching is enabled and cannot be automatically turned off

    +
    + +
    +
    +runtime.cudaCpuDeviceId = -1
    +

    Device id that represents the CPU

    +
    + +
    +
    +runtime.cudaInvalidDeviceId = -2
    +

    Device id that represents an invalid device

    +
    + +
    +
    +runtime.cudaInitDeviceFlagsAreValid = 1
    +

    Tell the CUDA runtime that DeviceFlags is being set in cudaInitDevice call

    +
    + +
    +
    +runtime.cudaCooperativeLaunchMultiDeviceNoPreSync = 1
    +

    If set, each kernel launched as part of cudaLaunchCooperativeKernelMultiDevice only waits for prior work in the stream corresponding to that GPU to complete before the kernel begins execution.

    +
    + +
    +
    +runtime.cudaCooperativeLaunchMultiDeviceNoPostSync = 2
    +

    If set, any subsequent work pushed in a stream that participated in a call to cudaLaunchCooperativeKernelMultiDevice will only wait for the kernel launched on the GPU corresponding to that stream to complete before it begins execution.

    +
    + +
    +
    +runtime.cudaArraySparsePropertiesSingleMipTail = 1
    +

    Indicates that the layered sparse CUDA array or CUDA mipmapped array has a single mip tail region for all layers

    +
    + +
    +
    +runtime.CUDA_IPC_HANDLE_SIZE = 64
    +

    CUDA IPC Handle Size

    +
    + +
    +
    +runtime.cudaExternalMemoryDedicated = 1
    +

    Indicates that the external memory object is a dedicated resource

    +
    + +
    +
    +runtime.cudaExternalSemaphoreSignalSkipNvSciBufMemSync = 1
    +

    When the /p flags parameter of cudaExternalSemaphoreSignalParams contains this flag, it indicates that signaling an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as cudaExternalMemoryHandleTypeNvSciBuf, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects.

    +
    + +
    +
    +runtime.cudaExternalSemaphoreWaitSkipNvSciBufMemSync = 2
    +

    When the /p flags parameter of cudaExternalSemaphoreWaitParams contains this flag, it indicates that waiting an external semaphore object should skip performing appropriate memory synchronization operations over all the external memory objects that are imported as cudaExternalMemoryHandleTypeNvSciBuf, which otherwise are performed by default to ensure data coherency with other importers of the same NvSciBuf memory objects.

    +
    + +
    +
    +runtime.cudaNvSciSyncAttrSignal = 1
    +

    When /p flags of cudaDeviceGetNvSciSyncAttributes is set to this, it indicates that application need signaler specific NvSciSyncAttr to be filled by cudaDeviceGetNvSciSyncAttributes.

    +
    + +
    +
    +runtime.cudaNvSciSyncAttrWait = 2
    +

    When /p flags of cudaDeviceGetNvSciSyncAttributes is set to this, it indicates that application need waiter specific NvSciSyncAttr to be filled by cudaDeviceGetNvSciSyncAttributes.

    +
    + +
    +
    +runtime.cudaGraphKernelNodePortDefault = 0
    +

    This port activates when the kernel has finished executing.

    +
    + +
    +
    +runtime.cudaGraphKernelNodePortProgrammatic = 1
    +

    This port activates when all blocks of the kernel have performed cudaTriggerProgrammaticLaunchCompletion() or have terminated. It must be used with edge type cudaGraphDependencyTypeProgrammatic. See also cudaLaunchAttributeProgrammaticEvent.

    +
    + +
    +
    +runtime.cudaGraphKernelNodePortLaunchCompletion = 2
    +

    This port activates when all blocks of the kernel have begun execution. See also cudaLaunchAttributeLaunchCompletionEvent.

    +
    + +
    +
    +runtime.cudaStreamAttrID = <enum 'cudaStreamAttrID'>
    +
    + +
    +
    +runtime.cudaStreamAttributeAccessPolicyWindow = 1
    +
    + +
    +
    +runtime.cudaStreamAttributeSynchronizationPolicy = 3
    +
    + +
    +
    +runtime.cudaStreamAttributeMemSyncDomainMap = 9
    +
    + +
    +
    +runtime.cudaStreamAttributeMemSyncDomain = 10
    +
    + +
    +
    +runtime.cudaStreamAttributePriority = 8
    +
    + +
    +
    +runtime.cudaStreamAttrValue = <class 'cuda.bindings.runtime.cudaStreamAttrValue'>
    +
    + +
    +
    +runtime.cudaKernelNodeAttrID = <enum 'cudaKernelNodeAttrID'>
    +
    + +
    +
    +runtime.cudaKernelNodeAttributeAccessPolicyWindow = 1
    +
    + +
    +
    +runtime.cudaKernelNodeAttributeCooperative = 2
    +
    + +
    +
    +runtime.cudaKernelNodeAttributePriority = 8
    +
    + +
    +
    +runtime.cudaKernelNodeAttributeClusterDimension = 4
    +
    + +
    +
    +runtime.cudaKernelNodeAttributeClusterSchedulingPolicyPreference = 5
    +
    + +
    +
    +runtime.cudaKernelNodeAttributeMemSyncDomainMap = 9
    +
    + +
    +
    +runtime.cudaKernelNodeAttributeMemSyncDomain = 10
    +
    + +
    +
    +runtime.cudaKernelNodeAttributePreferredSharedMemoryCarveout = 14
    +
    + +
    +
    +runtime.cudaKernelNodeAttributeDeviceUpdatableKernelNode = 13
    +
    + +
    +
    +runtime.cudaKernelNodeAttrValue = <class 'cuda.bindings.runtime.cudaKernelNodeAttrValue'>
    +
    + +
    +
    +runtime.cudaSurfaceType1D = 1
    +
    + +
    +
    +runtime.cudaSurfaceType2D = 2
    +
    + +
    +
    +runtime.cudaSurfaceType3D = 3
    +
    + +
    +
    +runtime.cudaSurfaceTypeCubemap = 12
    +
    + +
    +
    +runtime.cudaSurfaceType1DLayered = 241
    +
    + +
    +
    +runtime.cudaSurfaceType2DLayered = 242
    +
    + +
    +
    +runtime.cudaSurfaceTypeCubemapLayered = 252
    +
    + +
    +
    +runtime.cudaTextureType1D = 1
    +
    + +
    +
    +runtime.cudaTextureType2D = 2
    +
    + +
    +
    +runtime.cudaTextureType3D = 3
    +
    + +
    +
    +runtime.cudaTextureTypeCubemap = 12
    +
    + +
    +
    +runtime.cudaTextureType1DLayered = 241
    +
    + +
    +
    +runtime.cudaTextureType2DLayered = 242
    +
    + +
    +
    +runtime.cudaTextureTypeCubemapLayered = 252
    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/motivation.html b/docs/cuda-bindings/latest/motivation.html new file mode 100644 index 000000000..32b5b1ebc --- /dev/null +++ b/docs/cuda-bindings/latest/motivation.html @@ -0,0 +1,421 @@ + + + + + + + + + + Motivation - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    Motivation

    +
    +

    What is CUDA Python?

    +

    NVIDIA’s CUDA Python provides Cython bindings and Python +wrappers for the driver and runtime API for existing toolkits and libraries to +simplify GPU-based accelerated processing. Python is one of the most popular +programming languages for science, engineering, data analytics, and deep +learning applications. The goal of CUDA Python is to unify +the Python ecosystem with a single set of interfaces that provide full coverage +of and access to the CUDA host APIs from Python.

    +
    +
    +

    Why CUDA Python?

    +

    CUDA Python provides uniform APIs and bindings for inclusion into existing +toolkits and libraries to simplify GPU-based parallel processing for HPC, data +science, and AI.

    +

    Numba, a Python compiler from +Anaconda that can compile Python code for execution +on CUDA-capable GPUs, provides Python developers with an easy entry into +GPU-accelerated computing and a path for using increasingly sophisticated CUDA +code with a minimum of new syntax and jargon. Numba has its own CUDA driver API +bindings that can now be replaced with CUDA Python. With CUDA Python and Numba, +you get the best of both worlds: rapid iterative development with Python and the +speed of a compiled language targeting both CPUs and NVIDIA GPUs.

    +

    CuPy is a +NumPy/SciPy compatible Array +library, from Preferred Networks, for +GPU-accelerated computing with Python. CUDA Python simplifies the CuPy build +and allows for a faster and smaller memory footprint when importing the CuPy +Python module. In the future, when more CUDA Toolkit libraries are supported, +CuPy will have a lighter maintenance overhead and have fewer wheels to +release. Users benefit from a faster CUDA runtime!

    +

    Our goal is to help unify the Python CUDA ecosystem with a single standard set +of interfaces, providing full coverage of, and access to, the CUDA host APIs +from Python. We want to provide a foundation for the ecosystem to build on top +of in unison to allow composing different accelerated libraries together to +solve the problems at hand. We also want to lower the barrier to entry for +Python developers to utilize NVIDIA GPUs.

    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/objects.inv b/docs/cuda-bindings/latest/objects.inv new file mode 100644 index 000000000..5d430714f Binary files /dev/null and b/docs/cuda-bindings/latest/objects.inv differ diff --git a/docs/cuda-bindings/latest/overview.html b/docs/cuda-bindings/latest/overview.html new file mode 100644 index 000000000..6cc1f92ba --- /dev/null +++ b/docs/cuda-bindings/latest/overview.html @@ -0,0 +1,718 @@ + + + + + + + + + + Overview - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    Overview

    +

    by Matthew Nicely

    +

    Python plays a key role within the science, engineering, data analytics, and +deep learning application ecosystem. NVIDIA has long been committed to helping +the Python ecosystem leverage the accelerated massively parallel performance of +GPUs to deliver standardized libraries, tools, and applications. Today, we’re +introducing another step towards simplification of the developer experience with +improved Python code portability and compatibility.

    +

    Our goal is to help unify the Python CUDA ecosystem with a single standard set +of low-level interfaces, providing full coverage of and access to the CUDA host +APIs from Python. We want to provide an ecosystem foundation to allow +interoperability among different accelerated libraries. Most importantly, it +should be easy for Python developers to use NVIDIA GPUs.

    +
    +

    CUDA Python workflow

    +

    Because Python is an interpreted language, you need a way to compile the device +code into +PTX and +then extract the function to be called at a later point in the application. It’s +not important for understanding CUDA Python, but Parallel Thread Execution (PTX) +is a low-level virtual machine and instruction set architecture (ISA). You +construct your device code in the form of a string and compile it with +NVRTC, a runtime compilation +library for CUDA C++. Using the NVIDIA Driver +API, manually create a +CUDA context and all required resources on the GPU, then launch the compiled +CUDA C++ code and retrieve the results from the GPU. Now that you have an +overview, jump into a commonly used example for parallel programming: +SAXPY.

    +

    The first thing to do is import the Driver +API and +NVRTC modules from the CUDA +Python package. In this example, you copy data from the host to device. You need +NumPy to store data on the host.

    +
    +
    +
    from cuda.bindings import driver, nvrtc
    +import numpy as np
    +
    +
    +
    +
    +

    Error checking is a fundamental best practice in code development and a code +example is provided. +In a future release, this may automatically raise exceptions using a Python +object model.

    +
    +
    +
    def _cudaGetErrorEnum(error):
    +    if isinstance(error, driver.CUresult):
    +        err, name = driver.cuGetErrorName(error)
    +        return name if err == driver.CUresult.CUDA_SUCCESS else "<unknown>"
    +    elif isinstance(error, nvrtc.nvrtcResult):
    +        return nvrtc.nvrtcGetErrorString(error)[1]
    +    else:
    +        raise RuntimeError('Unknown error type: {}'.format(error))
    +
    +def checkCudaErrors(result):
    +    if result[0].value:
    +        raise RuntimeError("CUDA error code={}({})".format(result[0].value, _cudaGetErrorEnum(result[0])))
    +    if len(result) == 1:
    +        return None
    +    elif len(result) == 2:
    +        return result[1]
    +    else:
    +        return result[1:]
    +
    +
    +
    +
    +

    It’s common practice to write CUDA kernels near the top of a translation unit, +so write it next. The entire kernel is wrapped in triple quotes to form a +string. The string is compiled later using NVRTC. This is the only part of CUDA +Python that requires some understanding of CUDA C++. For more information, see +An Even Easier Introduction to +CUDA.

    +
    +
    +
    saxpy = """\
    +extern "C" __global__
    +void saxpy(float a, float *x, float *y, float *out, size_t n)
    +{
    + size_t tid = blockIdx.x * blockDim.x + threadIdx.x;
    + if (tid < n) {
    +   out[tid] = a * x[tid] + y[tid];
    + }
    +}
    +"""
    +
    +
    +
    +
    +

    Go ahead and compile the kernel into PTX. Remember that this is executed at runtime using NVRTC. There are three basic steps to NVRTC:

    +
      +
    • Create a program from the string.

    • +
    • Compile the program.

    • +
    • Extract PTX from the compiled program.

    • +
    +

    In the following code example, the Driver API is initialized so that the NVIDIA driver +and GPU are accessible. Next, the GPU is queried for their compute capability. Finally, +the program is compiled to target our local compute capability architecture with FMAD enabled.

    +
    +
    +
    # Initialize CUDA Driver API
    +checkCudaErrors(driver.cuInit(0))
    +
    +# Retrieve handle for device 0
    +cuDevice = checkCudaErrors(driver.cuDeviceGet(0))
    +
    +# Derive target architecture for device 0
    +major = checkCudaErrors(driver.cuDeviceGetAttribute(driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR, cuDevice))
    +minor = checkCudaErrors(driver.cuDeviceGetAttribute(driver.CUdevice_attribute.CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR, cuDevice))
    +arch_arg = bytes(f'--gpu-architecture=compute_{major}{minor}', 'ascii')
    +
    +# Create program
    +prog = checkCudaErrors(nvrtc.nvrtcCreateProgram(str.encode(saxpy), b"saxpy.cu", 0, [], []))
    +
    +# Compile program
    +opts = [b"--fmad=false", arch_arg]
    +checkCudaErrors(nvrtc.nvrtcCompileProgram(prog, 2, opts))
    +
    +# Get PTX from compilation
    +ptxSize = checkCudaErrors(nvrtc.nvrtcGetPTXSize(prog))
    +ptx = b" " * ptxSize
    +checkCudaErrors(nvrtc.nvrtcGetPTX(prog, ptx))
    +
    +
    +
    +
    +

    Before you can use the PTX or do any work on the GPU, you must create a CUDA +context. CUDA contexts are analogous to host processes for the device. In the +following code example, a handle for compute device 0 is passed to +cuCtxCreate to designate that GPU for context creation.

    +
    +
    +
    # Create context
    +context = checkCudaErrors(driver.cuCtxCreate(0, cuDevice))
    +
    +
    +
    +
    +

    With a CUDA context created on device 0, load the PTX generated earlier into a +module. A module is analogous to dynamically loaded libraries for the device. +After loading into the module, extract a specific kernel with +cuModuleGetFunction. It is not uncommon for multiple kernels to reside in PTX.

    +
    +
    +
    # Load PTX as module data and retrieve function
    +ptx = np.char.array(ptx)
    +# Note: Incompatible --gpu-architecture would be detected here
    +module = checkCudaErrors(driver.cuModuleLoadData(ptx.ctypes.data))
    +kernel = checkCudaErrors(driver.cuModuleGetFunction(module, b"saxpy"))
    +
    +
    +
    +
    +

    Next, get all your data prepared and transferred to the GPU. For increased +application performance, you can input data on the device to eliminate data +transfers. For completeness, this example shows how you would transfer data to +and from the device.

    +
    +
    +
    NUM_THREADS = 512  # Threads per block
    +NUM_BLOCKS = 32768  # Blocks per grid
    +
    +a = np.array([2.0], dtype=np.float32)
    +n = np.array(NUM_THREADS * NUM_BLOCKS, dtype=np.uint32)
    +bufferSize = n * a.itemsize
    +
    +hX = np.random.rand(n).astype(dtype=np.float32)
    +hY = np.random.rand(n).astype(dtype=np.float32)
    +hOut = np.zeros(n).astype(dtype=np.float32)
    +
    +
    +
    +
    +

    With the input data a, x, and y created for the SAXPY transform device, +resources must be allocated to store the data using cuMemAlloc. To allow for +more overlap between compute and data movement, use the asynchronous function +cuMemcpyHtoDAsync. It returns control to the CPU immediately following command +execution.

    +

    Python doesn’t have a natural concept of pointers, yet cuMemcpyHtoDAsync expects +void*. Therefore, XX.ctypes.data retrieves the pointer value associated with +XX.

    +
    +
    +
    dXclass = checkCudaErrors(driver.cuMemAlloc(bufferSize))
    +dYclass = checkCudaErrors(driver.cuMemAlloc(bufferSize))
    +dOutclass = checkCudaErrors(driver.cuMemAlloc(bufferSize))
    +
    +stream = checkCudaErrors(driver.cuStreamCreate(0))
    +
    +checkCudaErrors(driver.cuMemcpyHtoDAsync(
    +   dXclass, hX.ctypes.data, bufferSize, stream
    +))
    +checkCudaErrors(driver.cuMemcpyHtoDAsync(
    +   dYclass, hY.ctypes.data, bufferSize, stream
    +))
    +
    +
    +
    +
    +

    With data prep and resources allocation finished, the kernel is ready to be +launched. To pass the location of the data on the device to the kernel execution +configuration, you must retrieve the device pointer. In the following code +example, int(dXclass) retries the pointer value of dXclass, which is +CUdeviceptr, and assigns a memory size to store this value using np.array.

    +

    Like cuMemcpyHtoDAsync, cuLaunchKernel expects void** in the argument list. In +the earlier code example, it creates void** by grabbing the void* value of each +individual argument and placing them into its own contiguous memory.

    +
    +
    +
    # The following code example is not intuitive 
    +# Subject to change in a future release
    +dX = np.array([int(dXclass)], dtype=np.uint64)
    +dY = np.array([int(dYclass)], dtype=np.uint64)
    +dOut = np.array([int(dOutclass)], dtype=np.uint64)
    +
    +args = [a, dX, dY, dOut, n]
    +args = np.array([arg.ctypes.data for arg in args], dtype=np.uint64)
    +
    +
    +
    +
    +

    Now the kernel can be launched:

    +
    +
    +
    checkCudaErrors(driver.cuLaunchKernel(
    +   kernel,
    +   NUM_BLOCKS,  # grid x dim
    +   1,  # grid y dim
    +   1,  # grid z dim
    +   NUM_THREADS,  # block x dim
    +   1,  # block y dim
    +   1,  # block z dim
    +   0,  # dynamic shared memory
    +   stream,  # stream
    +   args.ctypes.data,  # kernel arguments
    +   0,  # extra (ignore)
    +))
    +
    +checkCudaErrors(driver.cuMemcpyDtoHAsync(
    +   hOut.ctypes.data, dOutclass, bufferSize, stream
    +))
    +checkCudaErrors(driver.cuStreamSynchronize(stream))
    +
    +
    +
    +
    +

    The cuLaunchKernel function takes the compiled module kernel and execution +configuration parameters. The device code is launched in the same stream as the +data transfers. That ensures that the kernel’s compute is performed only after +the data has finished transfer, as all API calls and kernel launches within a +stream are serialized. After the call to transfer data back to the host is +executed, cuStreamSynchronize is used to halt CPU execution until all operations +in the designated stream are finished.

    +
    +
    +
    # Assert values are same after running kernel
    +hZ = a * hX + hY
    +if not np.allclose(hOut, hZ):
    +   raise ValueError("Error outside tolerance for host-device vectors")
    +
    +
    +
    +
    +

    Perform verification of the data to ensure correctness and finish the code with +memory clean up.

    +
    +
    +
    checkCudaErrors(driver.cuStreamDestroy(stream))
    +checkCudaErrors(driver.cuMemFree(dXclass))
    +checkCudaErrors(driver.cuMemFree(dYclass))
    +checkCudaErrors(driver.cuMemFree(dOutclass))
    +checkCudaErrors(driver.cuModuleUnload(module))
    +checkCudaErrors(driver.cuCtxDestroy(context))
    +
    +
    +
    +
    +
    +
    +

    Performance

    +

    Performance is a primary driver in targeting GPUs in your application. So, how +does the above code compare to its C++ version? Table 1 shows that the results +are nearly identical. NVIDIA NSight +Systems was used to retrieve +kernel performance and CUDA +Events +was used for application performance.

    +

    The following command was used to profile the applications:

    +
    nsys profile -s none -t cuda --stats=true <executable>
    +
    +
    +
    + + + + + + + + + + + + + + + + + + +
    Table 1 Kernel and application performance comparison.

    C++

    Python

    Kernel execution

    352µs

    352µs

    Application execution

    1076ms

    1080ms

    +
    +

    CUDA Python is also compatible with NVIDIA Nsight +Compute, which is an +interactive kernel profiler for CUDA applications. It allows you to have +detailed insights into kernel performance. This is useful when you’re trying to +maximize performance (Fig. 1).

    +
    +_images/Nsigth-Compute-CLI-625x473.png +
    +

    Fig. 1 Screenshot of Nsight Compute CLI output of CUDA Python example.

    +
    +
    +
    +
    +

    Future of CUDA Python

    +

    The current bindings are built to match the C APIs as closely as possible.

    +

    The next goal is to build a higher-level “object oriented” API on top of +current CUDA Python bindings and provide an overall more Pythonic experience. +One such example would be to raise exceptions on errors.

    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release.html b/docs/cuda-bindings/latest/release.html new file mode 100644 index 000000000..e6fc5097d --- /dev/null +++ b/docs/cuda-bindings/latest/release.html @@ -0,0 +1,555 @@ + + + + + + + + + + Release Notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    Release Notes

    +
    + +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.4.0-notes.html b/docs/cuda-bindings/latest/release/11.4.0-notes.html new file mode 100644 index 000000000..723945d59 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.4.0-notes.html @@ -0,0 +1,433 @@ + + + + + + + + + + CUDA Python 11.4.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.4.0 Release notes

    +

    Released on August 16, 2021

    +
    +

    Highlights

    +
      +
    • Initial EA release for CUDA Python

    • +
    • Supports all platforms that CUDA is supported

    • +
    • Supports all CUDA 11.x releases

    • +
    • Low-level CUDA Cython bindings and Python wrappers

    • +
    +
    +
    +

    Limitations

    +
      +
    • Source code release only; Python packages coming in a future release.

    • +
    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • cudaGetTextureReference

    • +
    • cudaGetSurfaceReference

    • +
    • cudaBindTexture

    • +
    • cudaBindTexture2D

    • +
    • cudaBindTextureToArray

    • +
    • cudaBindTextureToMipmappedArray

    • +
    • cudaLaunchKernel

    • +
    • cudaLaunchCooperativeKernel

    • +
    • cudaLaunchCooperativeKernelMultiDevice

    • +
    • cudaMemcpyToSymbol

    • +
    • cudaMemcpyFromSymbol

    • +
    • cudaMemcpyToSymbolAsync

    • +
    • cudaMemcpyFromSymbolAsync

    • +
    • cudaGetSymbolAddress

    • +
    • cudaGetSymbolSize

    • +
    • cudaUnbindTexture

    • +
    • cudaGetTextureAlignmentOffset

    • +
    • cudaBindSurfaceToArray

    • +
    • cudaGetFuncBySymbol

    • +
    • cudaSetValidDevices

    • +
    • cudaGraphExecMemcpyNodeSetParamsFromSymbol

    • +
    • cudaGraphExecMemcpyNodeSetParamsToSymbol

    • +
    • cudaGraphAddMemcpyNodeToSymbol

    • +
    • cudaGraphAddMemcpyNodeFromSymbol

    • +
    • cudaGraphMemcpyNodeSetParamsToSymbol

    • +
    • cudaGraphMemcpyNodeSetParamsFromSymbol

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.5.0-notes.html b/docs/cuda-bindings/latest/release/11.5.0-notes.html new file mode 100644 index 000000000..3aa32e8ff --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.5.0-notes.html @@ -0,0 +1,510 @@ + + + + + + + + + + CUDA Python 11.5.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.5.0 Release notes

    +

    Released on October 18, 2021

    +
    +

    Highlights

    +
      +
    • PyPi support

    • +
    • Conda support

    • +
    • GA release for CUDA Python

    • +
    • Supports all platforms that CUDA is supported

    • +
    • Supports all CUDA 11.x releases

    • +
    • Low-level CUDA Cython bindings and Python wrappers

    • +
    +
    +
    +

    Limitations

    +
      +
    • Changing default stream not supported; coming in future release

    • +
    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • cudaGetTextureReference

    • +
    • cudaGetSurfaceReference

    • +
    • cudaBindTexture

    • +
    • cudaBindTexture2D

    • +
    • cudaBindTextureToArray

    • +
    • cudaBindTextureToMipmappedArray

    • +
    • cudaLaunchKernel

    • +
    • cudaLaunchCooperativeKernel

    • +
    • cudaLaunchCooperativeKernelMultiDevice

    • +
    • cudaMemcpyToSymbol

    • +
    • cudaMemcpyFromSymbol

    • +
    • cudaMemcpyToSymbolAsync

    • +
    • cudaMemcpyFromSymbolAsync

    • +
    • cudaGetSymbolAddress

    • +
    • cudaGetSymbolSize

    • +
    • cudaUnbindTexture

    • +
    • cudaGetTextureAlignmentOffset

    • +
    • cudaBindSurfaceToArray

    • +
    • cudaGetFuncBySymbol

    • +
    • cudaSetValidDevices

    • +
    • cudaGraphExecMemcpyNodeSetParamsFromSymbol

    • +
    • cudaGraphExecMemcpyNodeSetParamsToSymbol

    • +
    • cudaGraphAddMemcpyNodeToSymbol

    • +
    • cudaGraphAddMemcpyNodeFromSymbol

    • +
    • cudaGraphMemcpyNodeSetParamsToSymbol

    • +
    • cudaGraphMemcpyNodeSetParamsFromSymbol

    • +
    • cudaProfilerInitialize

    • +
    • cudaProfilerStart

    • +
    • cudaProfilerStop

    • +
    • cuProfilerInitialize

    • +
    • cuProfilerStart

    • +
    • cuProfilerStop

    • +
    • EGL

      +
        +
      • cuGraphicsEGLRegisterImage

      • +
      • cuEGLStreamConsumerConnect

      • +
      • cuEGLStreamConsumerConnectWithFlags

      • +
      • cuEGLStreamConsumerDisconnect

      • +
      • cuEGLStreamConsumerAcquireFrame

      • +
      • cuEGLStreamConsumerReleaseFrame

      • +
      • cuEGLStreamProducerConnect

      • +
      • cuEGLStreamProducerDisconnect

      • +
      • cuEGLStreamProducerPresentFrame

      • +
      • cuEGLStreamProducerReturnFrame

      • +
      • cuGraphicsResourceGetMappedEglFrame

      • +
      • cuEventCreateFromEGLSync

      • +
      • cudaGraphicsEGLRegisterImage

      • +
      • cudaEGLStreamConsumerConnect

      • +
      • cudaEGLStreamConsumerConnectWithFlags

      • +
      • cudaEGLStreamConsumerDisconnect

      • +
      • cudaEGLStreamConsumerAcquireFrame

      • +
      • cudaEGLStreamConsumerReleaseFrame

      • +
      • cudaEGLStreamProducerConnect

      • +
      • cudaEGLStreamProducerDisconnect

      • +
      • cudaEGLStreamProducerPresentFrame

      • +
      • cudaEGLStreamProducerReturnFrame

      • +
      • cudaGraphicsResourceGetMappedEglFrame

      • +
      • cudaEventCreateFromEGLSync

      • +
      +
    • +
    • GL

      +
        +
      • cuGraphicsGLRegisterBuffer

      • +
      • cuGraphicsGLRegisterImage

      • +
      • cuWGLGetDevice

      • +
      • cuGLGetDevices

      • +
      • cuGLCtxCreate

      • +
      • cuGLInit

      • +
      • cuGLRegisterBufferObject

      • +
      • cuGLMapBufferObject

      • +
      • cuGLUnmapBufferObject

      • +
      • cuGLUnregisterBufferObject

      • +
      • cuGLSetBufferObjectMapFlags

      • +
      • cuGLMapBufferObjectAsync

      • +
      • cuGLUnmapBufferObjectAsync

      • +
      • cudaGLGetDevices

      • +
      • cudaGraphicsGLRegisterImage

      • +
      • cudaGraphicsGLRegisterBuffer

      • +
      • cudaWGLGetDevice

      • +
      • cudaGLSetGLDevice

      • +
      • cudaGLRegisterBufferObject

      • +
      • cudaGLMapBufferObject

      • +
      • cudaGLUnmapBufferObject

      • +
      • cudaGLUnregisterBufferObject

      • +
      • cudaGLSetBufferObjectMapFlags

      • +
      • cudaGLMapBufferObjectAsync

      • +
      • cudaGLUnmapBufferObjectAsync

      • +
      +
    • +
    • VDPAU

      +
        +
      • cuVDPAUGetDevice

      • +
      • cuVDPAUCtxCreate

      • +
      • cuGraphicsVDPAURegisterVideoSurface

      • +
      • cuGraphicsVDPAURegisterOutputSurface

      • +
      • cudaVDPAUGetDevice

      • +
      • cudaVDPAUSetVDPAUDevice

      • +
      • cudaGraphicsVDPAURegisterVideoSurface

      • +
      • cudaGraphicsVDPAURegisterOutputSurface

      • +
      +
    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.6.0-notes.html b/docs/cuda-bindings/latest/release/11.6.0-notes.html new file mode 100644 index 000000000..2f0e35da7 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.6.0-notes.html @@ -0,0 +1,468 @@ + + + + + + + + + + CUDA Python 11.6.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.6.0 Release notes

    +

    Released on Januray 12, 2022

    +
    +

    Highlights

    +
      +
    • Support CUDA Toolkit 11.6

    • +
    • Support Profiler APIs

    • +
    • Support Graphic APIs (EGL, GL, VDPAU)

    • +
    • Support changing default stream

    • +
    • Relaxed primitive interoperability

    • +
    +
    +

    Default stream

    +

    Changing default stream to Per-Thread-Default-Stream (PTDS) is done through environment variable before execution:

    +
    export CUDA_PYTHON_CUDA_PER_THREAD_DEFAULT_STREAM=1
    +
    +
    +

    When set to 1, the default stream is the per-thread default stream. When set to 0, the default stream is the legacy default stream. This defaults to 0, for the legacy default stream. See Stream Synchronization Behavior for an explanation of the legacy and per-thread default streams.

    +
    +
    +

    Primitive interoperability

    +

    APIs accepting classes that wrap a primitive value are now interoperable with the underlining value.

    +

    Example 1: Structure member handles interoperability.

    +
    >>> waitParams = cuda.CUstreamMemOpWaitValueParams_st()
    +>>> waitParams.value64 = 1
    +>>> waitParams.value64
    +<cuuint64_t 1>
    +>>> waitParams.value64 = cuda.cuuint64_t(2)
    +>>> waitParams.value64
    +<cuuint64_t 2>
    +
    +
    +

    Example 2: Function signature handles interoperability.

    +
    >>> cudart.cudaStreamQuery(cudart.cudaStreamNonBlocking)
    +(<cudaError_t.cudaSuccess: 0>,)
    +>>> cudart.cudaStreamQuery(cudart.cudaStream_t(cudart.cudaStreamNonBlocking))
    +(<cudaError_t.cudaSuccess: 0>,)
    +
    +
    +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +

    Note

    +

    Deprecated APIs are removed from tracking

    +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.6.1-notes.html b/docs/cuda-bindings/latest/release/11.6.1-notes.html new file mode 100644 index 000000000..fc693bef8 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.6.1-notes.html @@ -0,0 +1,427 @@ + + + + + + + + + + CUDA Python 11.6.1 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.6.1 Release notes

    +

    Released on March 18, 2022

    +
    +

    Highlights

    +
      +
    • Fix string decomposition for WSL library load

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.7.0-notes.html b/docs/cuda-bindings/latest/release/11.7.0-notes.html new file mode 100644 index 000000000..c351ae7ea --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.7.0-notes.html @@ -0,0 +1,427 @@ + + + + + + + + + + CUDA Python 11.7.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.7.0 Release notes

    +

    Released on May 11, 2022

    +
    +

    Highlights

    +
      +
    • Support CUDA Toolkit 11.7

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.7.1-notes.html b/docs/cuda-bindings/latest/release/11.7.1-notes.html new file mode 100644 index 000000000..e63b2ba4a --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.7.1-notes.html @@ -0,0 +1,446 @@ + + + + + + + + + + CUDA Python 11.7.1 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.7.1 Release notes

    +

    Released on June 29, 2022

    +
    +

    Highlights

    +
      +
    • Fix error propagation in CUDA Runtime bindings

    • +
    • Resolves issue #22

    • +
    +
    +
    +

    Limitations

    +
    +

    Source builds

    +

    CUDA Python no longer re-declares CUDA types, instead it uses the types from CUDA C headers. As such source builds now need to access to latest CTK headers. In particular:

    +
      +
    1. “$CUDA_HOME/include” has latest CTK headers

    2. +
    3. CTK headers have all types defined

    4. +
    +

    (2) Certain CUDA types are not declared on mobile platforms and may face a “has not been declared” error during source builds. A temporary workaround is to use the headers found in https://gitlab.com/nvidia/headers/cuda. In particular CUDA Python needs the following headers and their dependencies:

    +
      +
    • cuda.h

    • +
    • cudaProfiler.h

    • +
    • driver_types.h

    • +
    • cuda_runtime.h

    • +
    • nvrtc.h

    • +
    +

    This a short-term limitation and will be relaxed in a future release.

    +
    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.8.0-notes.html b/docs/cuda-bindings/latest/release/11.8.0-notes.html new file mode 100644 index 000000000..2dc194726 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.8.0-notes.html @@ -0,0 +1,438 @@ + + + + + + + + + + CUDA Python 11.8.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.8.0 Release notes

    +

    Released on October 3, 2022

    +
    +

    Highlights

    +
      +
    • Support CUDA Toolkit 11.8

    • +
    • Source builds allow for missing types and APIs

    • +
    • Resolves source builds for mobile platforms

    • +
    • Resolves issue #24

    • +
    +
    +

    Source Builds

    +

    CUDA Python source builds now parse CUDA headers located in $CUDA_HOME directory, enabling/disabling types and APIs if defined. Therefore this removes the need for CTK headers to have all types defined. By allowing minor variations, previous 11.7.1 mobile platform workaround is no longer needed.

    +

    It’s still required that source builds use the latest CTK headers (i.e. “$CUDA_HOME/include” has latest CTK headers).

    +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.8.1-notes.html b/docs/cuda-bindings/latest/release/11.8.1-notes.html new file mode 100644 index 000000000..439b70f72 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.8.1-notes.html @@ -0,0 +1,428 @@ + + + + + + + + + + CUDA Python 11.8.1 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.8.1 Release notes

    +

    Released on November 4, 2022

    +
    +

    Highlights

    +
      +
    • Resolves issue #27

    • +
    • Update install instructions to use latest CTK

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.8.2-notes.html b/docs/cuda-bindings/latest/release/11.8.2-notes.html new file mode 100644 index 000000000..6151fe468 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.8.2-notes.html @@ -0,0 +1,427 @@ + + + + + + + + + + CUDA Python 11.8.2 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.8.2 Release notes

    +

    Released on May 18, 2023

    +
    +

    Highlights

    +
      +
    • Open libcuda.so.1 instead of libcuda.so

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.8.3-notes.html b/docs/cuda-bindings/latest/release/11.8.3-notes.html new file mode 100644 index 000000000..aaa978232 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.8.3-notes.html @@ -0,0 +1,429 @@ + + + + + + + + + + CUDA Python 11.8.3 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.8.3 Release notes

    +

    Released on October 23, 2023

    +
    +

    Highlights

    +
      +
    • Compatability with Cython 3

    • +
    • New API cudart.getLocalRuntimeVersion()

    • +
    • Modernize build config

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.8.4-notes.html b/docs/cuda-bindings/latest/release/11.8.4-notes.html new file mode 100644 index 000000000..c94727405 --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.8.4-notes.html @@ -0,0 +1,455 @@ + + + + + + + + + + CUDA Python 11.8.4 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.8.4 Release notes

    +

    Released on October 7, 2024

    +
    +

    Highlights

    +
      +
    • Resolve Issue #89: Fix getLocalRuntimeVersion searching for wrong libcudart version

    • +
    • Resolve Issue #90: Use new layout in preperation for cuda-python becoming a metapackage

    • +
    +
    +
    +

    CUDA namespace cleanup with a new module layout

    +

    Issue #75 explains in detail what the new module layout is, what problem it fixes and how it impacts the users. However for the sake of completeness, this release notes will highlight key points of this change.

    +

    Before this change, cuda-python was tightly coupled to CUDA Toolkit releases and all new features would inherit this coupling regardless of their applicability. As we develop new features, this coupling was becoming overly restrictive and motivated a new solution: Convert cuda-python into a metapackage where we use cuda as a namespace with existing bindings code moved to a cuda_bindings subpackage.

    +

    This patch release applies the new module layout for the bindings as follows:

    +
      +
    • cuda.cuda -> cuda.bindings.driver

    • +
    • cuda.ccuda -> cuda.bindings.cydriver

    • +
    • cuda.cudart -> cuda.bindings.runtime

    • +
    • cuda.ccudart -> cuda.bindings.cyruntime

    • +
    • cuda.nvrtc -> cuda.bindings.nvrtc

    • +
    • cuda.cnvrtc -> cuda.bindings.cynvrtc

    • +
    +

    Deprecation warnings are turned on as a notice to switch to the new module layout.

    +
    +

    Note

    +

    This is non-breaking, backwards compatible change. All old module path will continue work as they “forward” user calls towards the new layout.

    +
    +
    +
    +

    Limitations

    +
    +

    Know issues

    + +
    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/11.8.5-notes.html b/docs/cuda-bindings/latest/release/11.8.5-notes.html new file mode 100644 index 000000000..cdcc81e3a --- /dev/null +++ b/docs/cuda-bindings/latest/release/11.8.5-notes.html @@ -0,0 +1,427 @@ + + + + + + + + + + CUDA Python 11.8.5 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 11.8.5 Release notes

    +

    Released on November 5, 2024

    +
    +

    Highlights

    +
      +
    • Resolve Issue #215: module ‘cuda.ccudart’ has no attribute ‘pyx_capi

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.0.0-notes.html b/docs/cuda-bindings/latest/release/12.0.0-notes.html new file mode 100644 index 000000000..563c1d319 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.0.0-notes.html @@ -0,0 +1,429 @@ + + + + + + + + + + CUDA Python 12.0.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.0.0 Release notes

    +

    Released on December 8, 2022

    +
    +

    Highlights

    +
      +
    • Rebase to CUDA Toolkit 12.0

    • +
    • Fix example from MR28

    • +
    • Apply MR35

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.1.0-notes.html b/docs/cuda-bindings/latest/release/12.1.0-notes.html new file mode 100644 index 000000000..adfe92394 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.1.0-notes.html @@ -0,0 +1,430 @@ + + + + + + + + + + CUDA Python 12.1.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.1.0 Release notes

    +

    Released on February 28, 2023

    +
    +

    Highlights

    +
      +
    • Rebase to CUDA Toolkit 12.1

    • +
    • Resolve Issue #41: Add support for Python 3.11

    • +
    • Resolve Issue #42: Dropping Python 3.7

    • +
    • Resolve Issue #43: Trim Conda package dependencies

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.2.0-notes.html b/docs/cuda-bindings/latest/release/12.2.0-notes.html new file mode 100644 index 000000000..f6640369e --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.2.0-notes.html @@ -0,0 +1,429 @@ + + + + + + + + + + CUDA Python 12.2.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.2.0 Release notes

    +

    Released on June 28, 2023

    +
    +

    Highlights

    +
      +
    • Rebase to CUDA Toolkit 12.2

    • +
    • Resolve Issue #44: nogil must be at the end of the function signature line

    • +
    • Resolve Issue #45: Error with pyparsing when no CUDA is found

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.2.1-notes.html b/docs/cuda-bindings/latest/release/12.2.1-notes.html new file mode 100644 index 000000000..39fcf1f22 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.2.1-notes.html @@ -0,0 +1,427 @@ + + + + + + + + + + CUDA Python 12.2.1 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.2.1 Release notes

    +

    Released on January 8, 2024

    +
    +

    Highlights

    +
      +
    • Compatibility with Cython 3

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.3.0-notes.html b/docs/cuda-bindings/latest/release/12.3.0-notes.html new file mode 100644 index 000000000..3a288e6c0 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.3.0-notes.html @@ -0,0 +1,435 @@ + + + + + + + + + + CUDA Python 12.3.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.3.0 Release notes

    +

    Released on October 19, 2023

    +
    +

    Highlights

    +
      +
    • Rebase to CUDA Toolkit 12.3

    • +
    • Resolve Issue #16: cuda.cudart.cudaRuntimeGetVersion() hard-codes the runtime version, rather than querying the runtime

      +
        +
      • New API cudart.getLocalRuntimeVersion()

      • +
      +
    • +
    • Resolve Issue #48: Dropping Python 3.8

    • +
    • Resolve Issue #51: Dropping package releases for ppc64 on PYPI and conda-nvidia channel

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    • cudaFuncGetName

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.4.0-notes.html b/docs/cuda-bindings/latest/release/12.4.0-notes.html new file mode 100644 index 000000000..d17eb1a8a --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.4.0-notes.html @@ -0,0 +1,430 @@ + + + + + + + + + + CUDA Python 12.4.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.4.0 Release notes

    +

    Released on March 5, 2024

    +
    +

    Highlights

    +
      +
    • Rebase to CUDA Toolkit 12.4

    • +
    • Add PyPI/Conda support for Python 12

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    • cudaFuncGetName

    • +
    • cudaFuncGetParamInfo

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.5.0-notes.html b/docs/cuda-bindings/latest/release/12.5.0-notes.html new file mode 100644 index 000000000..1809bd0e6 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.5.0-notes.html @@ -0,0 +1,430 @@ + + + + + + + + + + CUDA Python 12.5.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.5.0 Release notes

    +

    Released on May 21, 2024

    +
    +

    Highlights

    +
      +
    • Rebase to CUDA Toolkit 12.5

    • +
    • Resolve Issue #58: Interop between CUdeviceptr and Runtime

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    • cudaFuncGetName

    • +
    • cudaFuncGetParamInfo

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.6.0-notes.html b/docs/cuda-bindings/latest/release/12.6.0-notes.html new file mode 100644 index 000000000..9531d2e57 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.6.0-notes.html @@ -0,0 +1,432 @@ + + + + + + + + + + CUDA Python 12.6.0 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.6.0 Release notes

    +

    Released on August 1, 2024

    +
    +

    Highlights

    +
      +
    • Rebase to CUDA Toolkit 12.6

    • +
    • Resolve Issue #32: Add ‘pywin32’ as Windows requirement

    • +
    • Resolve Issue #72: Allow both lists and tuples as parameter

    • +
    • Resolve Issue #73: Fix ‘cuLibraryLoadData’ processing of parameters

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    • cudaFuncGetName

    • +
    • cudaFuncGetParamInfo

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.6.1-notes.html b/docs/cuda-bindings/latest/release/12.6.1-notes.html new file mode 100644 index 000000000..40ac4acb5 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.6.1-notes.html @@ -0,0 +1,457 @@ + + + + + + + + + + CUDA Python 12.6.1 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.6.1 Release notes

    +

    Released on October 7, 2024

    +
    +

    Highlights

    +
      +
    • Resolve Issue #90: Use new layout in preparation for cuda-python becoming a metapackage

    • +
    • Resolve Issue #75: CUDA namespace cleanup

    • +
    +
    +
    +

    CUDA namespace cleanup with a new module layout

    +

    Issue #75 explains in detail what the new module layout is, what problem it fixes and how it impacts the users. However for the sake of completeness, this release notes will highlight key points of this change.

    +

    Before this change, cuda-python was tightly coupled to CUDA Toolkit releases and all new features would inherit this coupling regardless of their applicability. As we develop new features, this coupling was becoming overly restrictive and motivated a new solution: Convert cuda-python into a metapackage where we use cuda as a namespace with existing bindings code moved to a cuda_bindings subpackage.

    +

    This patch release applies the new module layout for the bindings as follows:

    +
      +
    • cuda.cuda -> cuda.bindings.driver

    • +
    • cuda.ccuda -> cuda.bindings.cydriver

    • +
    • cuda.cudart -> cuda.bindings.runtime

    • +
    • cuda.ccudart -> cuda.bindings.cyruntime

    • +
    • cuda.nvrtc -> cuda.bindings.nvrtc

    • +
    • cuda.cnvrtc -> cuda.bindings.cynvrtc

    • +
    +

    Deprecation warnings are turned on as a notice to switch to the new module layout.

    +
    +

    Note

    +

    This is non-breaking, backwards compatible change. All old module path will continue work as they “forward” user calls towards the new layout.

    +
    +
    +
    +

    Limitations

    +
    +

    Know issues

    + +
    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    • cudaFuncGetName

    • +
    • cudaFuncGetParamInfo

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/cuda-bindings/latest/release/12.6.2-notes.html b/docs/cuda-bindings/latest/release/12.6.2-notes.html new file mode 100644 index 000000000..6da9b4609 --- /dev/null +++ b/docs/cuda-bindings/latest/release/12.6.2-notes.html @@ -0,0 +1,429 @@ + + + + + + + + + + CUDA Python 12.6.2 Release notes - cuda.bindings 12.6.1 documentation + + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Skip to content + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + +
    +
    +
    + + + + + Back to top + +
    + +
    + +
    + +
    +
    +
    +

    CUDA Python 12.6.2 Release notes

    +

    Released on November 5, 2024

    +
    +

    Highlights

    +
      +
    • Resolve Issue #215: module ‘cuda.ccudart’ has no attribute ‘pyx_capi

    • +
    +
    +
    +

    Limitations

    +
    +

    CUDA Functions Not Supported in this Release

    +
      +
    • Symbol APIs

      +
        +
      • cudaGraphExecMemcpyNodeSetParamsFromSymbol

      • +
      • cudaGraphExecMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphAddMemcpyNodeToSymbol

      • +
      • cudaGraphAddMemcpyNodeFromSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsToSymbol

      • +
      • cudaGraphMemcpyNodeSetParamsFromSymbol

      • +
      • cudaMemcpyToSymbol

      • +
      • cudaMemcpyFromSymbol

      • +
      • cudaMemcpyToSymbolAsync

      • +
      • cudaMemcpyFromSymbolAsync

      • +
      • cudaGetSymbolAddress

      • +
      • cudaGetSymbolSize

      • +
      • cudaGetFuncBySymbol

      • +
      +
    • +
    • Launch Options

      +
        +
      • cudaLaunchKernel

      • +
      • cudaLaunchCooperativeKernel

      • +
      • cudaLaunchCooperativeKernelMultiDevice

      • +
      +
    • +
    • cudaSetValidDevices

    • +
    • cudaVDPAUSetVDPAUDevice

    • +
    • cudaFuncGetName

    • +
    • cudaFuncGetParamInfo

    • +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + + + + + \ No newline at end of file diff --git a/docs/contribute.html b/docs/cuda-bindings/latest/search.html similarity index 60% rename from docs/contribute.html rename to docs/cuda-bindings/latest/search.html index e755a711a..768e16547 100644 --- a/docs/contribute.html +++ b/docs/cuda-bindings/latest/search.html @@ -1,17 +1,17 @@ - - + + + - - - + + - - Contributing - CUDA Python 12.6.1 documentation - - + + +Search - cuda.bindings 12.6.1 documentation + - + @@ -70,7 +70,7 @@ Light mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="feather-sun"> @@ -85,22 +85,63 @@ Dark mode + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon"> - - Auto light/dark mode + + Auto light/dark, in light mode - - - - - - - + stroke-width="1" stroke-linecap="round" stroke-linejoin="round" + class="icon-custom-derived-from-feather-sun-and-tabler-moon"> + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -114,6 +155,8 @@
    Hide table of contents sidebar
    +Skip to content +
    @@ -125,13 +168,14 @@
    @@ -152,22 +196,21 @@
    - CUDA Python 12.6.1 documentation + cuda.bindings 12.6.1 documentation -
    + + cuda-bindings + v: + + +
    +
    +
    + +
    @@ -215,11 +281,11 @@ Back to top
    - -
    +
    @@ -229,53 +295,26 @@
    -
    -
    -

    Contributing#

    -

    Thank you for your interest in contributing to CUDA Python! Based on the type of contribution, it will fall into two categories:

    -
      -
    1. You want to report a bug, feature request, or documentation issue

      -
        -
      • File an issue -describing what you encountered or what you want to see changed.

      • -
      • The NVIDIA team will evaluate the issues and triage them, scheduling -them for a release. If you believe the issue needs priority attention -comment on the issue to notify the team.

      • -
      -
    2. -
    3. You want to implement a feature or bug-fix

      -
        -
      • At this time we do not accept code contributions.

      • -
      -
    4. -
    -
    +
    + + + +