[{"data":1,"prerenderedAt":706},["ShallowReactive",2],{"ZQvpDV2sBd":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":705,"_id":4},"vkGetCudaModuleCacheNV","Get CUDA module cache","VK_NV_cuda_kernel_launch","protos",[],{"type":10,"children":11,"toc":703},"root",[12,20,326,378,463,490,538,697],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To get the CUDA module cache call:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,135],{"type":13,"tag":25,"props":26,"children":32},"pre",{"className":27,"code":28,"filename":29,"language":30,"meta":31,"style":31},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkGetCudaModuleCacheNV(\n VkDevice device,\n VkCudaModuleNV module,\n size_t* pCacheSize,\n void* pCacheData);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,59,79,97,116],{"type":13,"tag":38,"props":39,"children":42},"span",{"class":40,"line":41},"line",1,[43,49,54],{"type":13,"tag":38,"props":44,"children":46},{"style":45},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[47],{"type":18,"value":48},"VkResult ",{"type":13,"tag":38,"props":50,"children":52},{"style":51},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[53],{"type":18,"value":4},{"type":13,"tag":38,"props":55,"children":56},{"style":45},[57],{"type":18,"value":58},"(\n",{"type":13,"tag":38,"props":60,"children":62},{"class":40,"line":61},2,[63,68,74],{"type":13,"tag":38,"props":64,"children":65},{"style":45},[66],{"type":18,"value":67}," VkDevice ",{"type":13,"tag":38,"props":69,"children":71},{"style":70},"--shiki-default:#953800;--shiki-dark:#FFA657",[72],{"type":18,"value":73},"device",{"type":13,"tag":38,"props":75,"children":76},{"style":45},[77],{"type":18,"value":78},",\n",{"type":13,"tag":38,"props":80,"children":82},{"class":40,"line":81},3,[83,88,93],{"type":13,"tag":38,"props":84,"children":85},{"style":45},[86],{"type":18,"value":87}," VkCudaModuleNV ",{"type":13,"tag":38,"props":89,"children":90},{"style":70},[91],{"type":18,"value":92},"module",{"type":13,"tag":38,"props":94,"children":95},{"style":45},[96],{"type":18,"value":78},{"type":13,"tag":38,"props":98,"children":100},{"class":40,"line":99},4,[101,107,112],{"type":13,"tag":38,"props":102,"children":104},{"style":103},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[105],{"type":18,"value":106}," size_t*",{"type":13,"tag":38,"props":108,"children":109},{"style":70},[110],{"type":18,"value":111}," pCacheSize",{"type":13,"tag":38,"props":113,"children":114},{"style":45},[115],{"type":18,"value":78},{"type":13,"tag":38,"props":117,"children":119},{"class":40,"line":118},5,[120,125,130],{"type":13,"tag":38,"props":121,"children":122},{"style":103},[123],{"type":18,"value":124}," void*",{"type":13,"tag":38,"props":126,"children":127},{"style":70},[128],{"type":18,"value":129}," pCacheData",{"type":13,"tag":38,"props":131,"children":132},{"style":45},[133],{"type":18,"value":134},");\n",{"type":13,"tag":25,"props":136,"children":141},{"className":137,"code":138,"filename":139,"language":140,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn get_cuda_module_cache_nv(\n device: crate :: vk :: vk::Device,\n module: vk::CudaModuleNV,\n p_cache_size: *mut usize,\n p_cache_data: *mut c_void,\n) -> vk::Result;\n","Rust","rs",[142],{"type":13,"tag":34,"props":143,"children":144},{"__ignoreMap":31},[145,167,218,247,273,294],{"type":13,"tag":38,"props":146,"children":147},{"class":40,"line":41},[148,153,158,163],{"type":13,"tag":38,"props":149,"children":150},{"style":103},[151],{"type":18,"value":152},"pub",{"type":13,"tag":38,"props":154,"children":155},{"style":103},[156],{"type":18,"value":157}," fn",{"type":13,"tag":38,"props":159,"children":160},{"style":51},[161],{"type":18,"value":162}," get_cuda_module_cache_nv",{"type":13,"tag":38,"props":164,"children":165},{"style":45},[166],{"type":18,"value":58},{"type":13,"tag":38,"props":168,"children":169},{"class":40,"line":61},[170,175,180,185,190,195,200,205,209,214],{"type":13,"tag":38,"props":171,"children":172},{"style":45},[173],{"type":18,"value":174}," device",{"type":13,"tag":38,"props":176,"children":177},{"style":103},[178],{"type":18,"value":179},":",{"type":13,"tag":38,"props":181,"children":182},{"style":103},[183],{"type":18,"value":184}," crate",{"type":13,"tag":38,"props":186,"children":187},{"style":103},[188],{"type":18,"value":189}," ::",{"type":13,"tag":38,"props":191,"children":192},{"style":45},[193],{"type":18,"value":194}," vk ",{"type":13,"tag":38,"props":196,"children":197},{"style":103},[198],{"type":18,"value":199},"::",{"type":13,"tag":38,"props":201,"children":202},{"style":70},[203],{"type":18,"value":204}," vk",{"type":13,"tag":38,"props":206,"children":207},{"style":103},[208],{"type":18,"value":199},{"type":13,"tag":38,"props":210,"children":211},{"style":70},[212],{"type":18,"value":213},"Device",{"type":13,"tag":38,"props":215,"children":216},{"style":45},[217],{"type":18,"value":78},{"type":13,"tag":38,"props":219,"children":220},{"class":40,"line":81},[221,226,230,234,238,243],{"type":13,"tag":38,"props":222,"children":223},{"style":45},[224],{"type":18,"value":225}," module",{"type":13,"tag":38,"props":227,"children":228},{"style":103},[229],{"type":18,"value":179},{"type":13,"tag":38,"props":231,"children":232},{"style":70},[233],{"type":18,"value":204},{"type":13,"tag":38,"props":235,"children":236},{"style":103},[237],{"type":18,"value":199},{"type":13,"tag":38,"props":239,"children":240},{"style":70},[241],{"type":18,"value":242},"CudaModuleNV",{"type":13,"tag":38,"props":244,"children":245},{"style":45},[246],{"type":18,"value":78},{"type":13,"tag":38,"props":248,"children":249},{"class":40,"line":99},[250,255,259,264,269],{"type":13,"tag":38,"props":251,"children":252},{"style":45},[253],{"type":18,"value":254}," p_cache_size",{"type":13,"tag":38,"props":256,"children":257},{"style":103},[258],{"type":18,"value":179},{"type":13,"tag":38,"props":260,"children":261},{"style":103},[262],{"type":18,"value":263}," *mut",{"type":13,"tag":38,"props":265,"children":266},{"style":70},[267],{"type":18,"value":268}," usize",{"type":13,"tag":38,"props":270,"children":271},{"style":45},[272],{"type":18,"value":78},{"type":13,"tag":38,"props":274,"children":275},{"class":40,"line":118},[276,281,285,289],{"type":13,"tag":38,"props":277,"children":278},{"style":45},[279],{"type":18,"value":280}," p_cache_data",{"type":13,"tag":38,"props":282,"children":283},{"style":103},[284],{"type":18,"value":179},{"type":13,"tag":38,"props":286,"children":287},{"style":103},[288],{"type":18,"value":263},{"type":13,"tag":38,"props":290,"children":291},{"style":45},[292],{"type":18,"value":293}," c_void,\n",{"type":13,"tag":38,"props":295,"children":297},{"class":40,"line":296},6,[298,303,308,312,316,321],{"type":13,"tag":38,"props":299,"children":300},{"style":45},[301],{"type":18,"value":302},") ",{"type":13,"tag":38,"props":304,"children":305},{"style":103},[306],{"type":18,"value":307},"->",{"type":13,"tag":38,"props":309,"children":310},{"style":70},[311],{"type":18,"value":204},{"type":13,"tag":38,"props":313,"children":314},{"style":103},[315],{"type":18,"value":199},{"type":13,"tag":38,"props":317,"children":318},{"style":70},[319],{"type":18,"value":320},"Result",{"type":13,"tag":38,"props":322,"children":323},{"style":45},[324],{"type":18,"value":325},";\n",{"type":13,"tag":327,"props":328,"children":329},"ul",{},[330,341,351,368],{"type":13,"tag":331,"props":332,"children":333},"li",{},[334,339],{"type":13,"tag":34,"props":335,"children":337},{"className":336},[],[338],{"type":18,"value":73},{"type":18,"value":340}," is the logical device that destroys the Function.",{"type":13,"tag":331,"props":342,"children":343},{},[344,349],{"type":13,"tag":34,"props":345,"children":347},{"className":346},[],[348],{"type":18,"value":92},{"type":18,"value":350}," is the CUDA module.",{"type":13,"tag":331,"props":352,"children":353},{},[354,360,362],{"type":13,"tag":34,"props":355,"children":357},{"className":356},[],[358],{"type":18,"value":359},"pCacheSize",{"type":18,"value":361}," is a pointer containing the amount of bytes to be\ncopied in ",{"type":13,"tag":34,"props":363,"children":365},{"className":364},[],[366],{"type":18,"value":367},"pCacheData",{"type":13,"tag":331,"props":369,"children":370},{},[371,376],{"type":13,"tag":34,"props":372,"children":374},{"className":373},[],[375],{"type":18,"value":367},{"type":18,"value":377}," is a pointer to a buffer in which to copy the binary\ncache",{"type":13,"tag":14,"props":379,"children":380},{},[381,383,388,390,396,398,403,405,410,412,417,419,424,426,431,433,438,440,445,447,453,455,461],{"type":18,"value":382},"If ",{"type":13,"tag":34,"props":384,"children":386},{"className":385},[],[387],{"type":18,"value":367},{"type":18,"value":389}," is ",{"type":13,"tag":34,"props":391,"children":393},{"className":392},[],[394],{"type":18,"value":395},"NULL",{"type":18,"value":397},", then the size of the binary cache, in bytes,\nis returned in ",{"type":13,"tag":34,"props":399,"children":401},{"className":400},[],[402],{"type":18,"value":359},{"type":18,"value":404},".\nOtherwise, ",{"type":13,"tag":34,"props":406,"children":408},{"className":407},[],[409],{"type":18,"value":359},{"type":18,"value":411}," ",{"type":13,"tag":413,"props":414,"children":416},"normative",{"type":415},"must",[],{"type":18,"value":418}," point to a variable set by the application\nto the size of the buffer, in bytes, pointed to by ",{"type":13,"tag":34,"props":420,"children":422},{"className":421},[],[423],{"type":18,"value":367},{"type":18,"value":425},", and on\nreturn the variable is overwritten with the amount of data actually written\nto ",{"type":13,"tag":34,"props":427,"children":429},{"className":428},[],[430],{"type":18,"value":367},{"type":18,"value":432},".\nIf ",{"type":13,"tag":34,"props":434,"children":436},{"className":435},[],[437],{"type":18,"value":359},{"type":18,"value":439}," is less than the size of the binary shader code, nothing\nis written to ",{"type":13,"tag":34,"props":441,"children":443},{"className":442},[],[444],{"type":18,"value":367},{"type":18,"value":446},", and ",{"type":13,"tag":34,"props":448,"children":450},{"className":449},[],[451],{"type":18,"value":452},"VK_INCOMPLETE",{"type":18,"value":454}," will be returned\ninstead of ",{"type":13,"tag":34,"props":456,"children":458},{"className":457},[],[459],{"type":18,"value":460},"VK_SUCCESS",{"type":18,"value":462},".",{"type":13,"tag":14,"props":464,"children":465},{},[466,468,472,474,480,482,489],{"type":18,"value":467},"The returned cache ",{"type":13,"tag":413,"props":469,"children":471},{"type":470},"may",[],{"type":18,"value":473}," then be used later for further initialization of the\nCUDA module, by sending this cache ",{"type":13,"tag":475,"props":476,"children":477},"em",{},[478],{"type":18,"value":479},"instead",{"type":18,"value":481}," of the PTX code when using\n",{"type":13,"tag":483,"props":484,"children":486},"a",{"href":485},"/man/vkCreateCudaModuleNV",[487],{"type":18,"value":488},"vkCreateCudaModuleNV",{"type":18,"value":462},{"type":13,"tag":491,"props":492,"children":493},"note",{},[494,505],{"type":13,"tag":14,"props":495,"children":496},{},[497,499,503],{"type":18,"value":498},"Using the binary cache instead of the original PTX code ",{"type":13,"tag":413,"props":500,"children":502},{"type":501},"should",[],{"type":18,"value":504},"\nsignificantly speed up initialization of the CUDA module, given that the\nwhole compilation and validation will not be necessary.",{"type":13,"tag":14,"props":506,"children":507},{},[508,510,516,518,521,523,526,528,531,533,536],{"type":18,"value":509},"As with ",{"type":13,"tag":483,"props":511,"children":513},{"href":512},"/man/VkPipelineCache",[514],{"type":18,"value":515},"VkPipelineCache",{"type":18,"value":517},", the binary cache depends on the specific\nimplementation.\nThe application ",{"type":13,"tag":413,"props":519,"children":520},{"type":415},[],{"type":18,"value":522}," assume the cache upload might fail in many\ncircumstances and thus ",{"type":13,"tag":413,"props":524,"children":525},{"type":470},[],{"type":18,"value":527}," have to get ready for falling back to the\noriginal PTX code if necessary.\nMost often, the cache ",{"type":13,"tag":413,"props":529,"children":530},{"type":470},[],{"type":18,"value":532}," succeed if the same device driver and\narchitecture is used between the cache generation from PTX and the use of\nthis cache.\nIn the event of a new driver version or if using a different device\narchitecture, this cache ",{"type":13,"tag":413,"props":534,"children":535},{"type":470},[],{"type":18,"value":537}," become invalid.",{"type":13,"tag":539,"props":540,"children":542},"validity-group",{"name":541},"Valid Usage (Implicit)",[543,570,594,620,674],{"type":13,"tag":544,"props":545,"children":547},"validity-field",{"name":546},"VUID-vkGetCudaModuleCacheNV-device-parameter",[548],{"type":13,"tag":14,"props":549,"children":550},{},[551,556,557,560,562,568],{"type":13,"tag":34,"props":552,"children":554},{"className":553},[],[555],{"type":18,"value":73},{"type":18,"value":411},{"type":13,"tag":413,"props":558,"children":559},{"type":415},[],{"type":18,"value":561}," be a valid ",{"type":13,"tag":483,"props":563,"children":565},{"href":564},"/man/VkDevice",[566],{"type":18,"value":567},"VkDevice",{"type":18,"value":569}," handle",{"type":13,"tag":544,"props":571,"children":573},{"name":572},"VUID-vkGetCudaModuleCacheNV-module-parameter",[574],{"type":13,"tag":14,"props":575,"children":576},{},[577,582,583,586,587,593],{"type":13,"tag":34,"props":578,"children":580},{"className":579},[],[581],{"type":18,"value":92},{"type":18,"value":411},{"type":13,"tag":413,"props":584,"children":585},{"type":415},[],{"type":18,"value":561},{"type":13,"tag":483,"props":588,"children":590},{"href":589},"/man/VkCudaModuleNV",[591],{"type":18,"value":592},"VkCudaModuleNV",{"type":18,"value":569},{"type":13,"tag":544,"props":595,"children":597},{"name":596},"VUID-vkGetCudaModuleCacheNV-pCacheSize-parameter",[598],{"type":13,"tag":14,"props":599,"children":600},{},[601,606,607,610,612,618],{"type":13,"tag":34,"props":602,"children":604},{"className":603},[],[605],{"type":18,"value":359},{"type":18,"value":411},{"type":13,"tag":413,"props":608,"children":609},{"type":415},[],{"type":18,"value":611}," be a valid pointer to a ",{"type":13,"tag":34,"props":613,"children":615},{"className":614},[],[616],{"type":18,"value":617},"size_t",{"type":18,"value":619}," value",{"type":13,"tag":544,"props":621,"children":623},{"name":622},"VUID-vkGetCudaModuleCacheNV-pCacheData-parameter",[624],{"type":13,"tag":14,"props":625,"children":626},{},[627,629,634,636,642,643,648,649,654,656,661,662,665,667,672],{"type":18,"value":628},"If the value referenced by ",{"type":13,"tag":34,"props":630,"children":632},{"className":631},[],[633],{"type":18,"value":359},{"type":18,"value":635}," is not ",{"type":13,"tag":34,"props":637,"children":639},{"className":638},[],[640],{"type":18,"value":641},"0",{"type":18,"value":446},{"type":13,"tag":34,"props":644,"children":646},{"className":645},[],[647],{"type":18,"value":367},{"type":18,"value":635},{"type":13,"tag":34,"props":650,"children":652},{"className":651},[],[653],{"type":18,"value":395},{"type":18,"value":655},", ",{"type":13,"tag":34,"props":657,"children":659},{"className":658},[],[660],{"type":18,"value":367},{"type":18,"value":411},{"type":13,"tag":413,"props":663,"children":664},{"type":415},[],{"type":18,"value":666}," be a valid pointer to an array of ",{"type":13,"tag":34,"props":668,"children":670},{"className":669},[],[671],{"type":18,"value":359},{"type":18,"value":673}," bytes",{"type":13,"tag":544,"props":675,"children":677},{"name":676},"VUID-vkGetCudaModuleCacheNV-module-parent",[678],{"type":13,"tag":14,"props":679,"children":680},{},[681,686,687,690,692],{"type":13,"tag":34,"props":682,"children":684},{"className":683},[],[685],{"type":18,"value":92},{"type":18,"value":411},{"type":13,"tag":413,"props":688,"children":689},{"type":415},[],{"type":18,"value":691}," have been created, allocated, or retrieved from ",{"type":13,"tag":34,"props":693,"children":695},{"className":694},[],[696],{"type":18,"value":73},{"type":13,"tag":698,"props":699,"children":700},"style",{},[701],{"type":18,"value":702},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":31,"searchDepth":61,"depth":61,"links":704},[],"markdown",1729612513373]