@@ -68,7 +68,7 @@ uint64_t compute_3d_array_alloc_bytes(const CUDA_ARRAY3D_DESCRIPTOR* desc) {
6868 }
6969 bytes *= cuarray_format_bytes [desc -> Format ];
7070
71- // TODO: take acount of alignment and etc
71+ // TODO: take account of alignment and etc
7272 // bytes ++ ???
7373 return bytes ;
7474}
@@ -87,7 +87,7 @@ uint64_t compute_array_alloc_bytes(const CUDA_ARRAY_DESCRIPTOR* desc) {
8787 }
8888 bytes *= cuarray_format_bytes [desc -> Format ];
8989
90- // TODO: take acount of alignment and etc
90+ // TODO: take account of alignment and etc
9191 // bytes ++ ???
9292 return bytes ;
9393}
@@ -118,7 +118,7 @@ CUresult cuArrayCreate_v2(CUarray* arr, const CUDA_ARRAY_DESCRIPTOR* desc) {
118118
119119CUresult cuArrayDestroy (CUarray arr ) {
120120 CUDA_ARRAY3D_DESCRIPTOR desc ;
121- LOG_DEBUG ("cuArrayDestory " );
121+ LOG_DEBUG ("cuArrayDestroy " );
122122 CHECK_DRV_API (cuArray3DGetDescriptor (& desc , arr ));
123123 /*uint64_t bytes*/
124124 compute_3d_array_alloc_bytes (& desc );
@@ -281,14 +281,14 @@ CUresult cuMemcpy(CUdeviceptr dst, CUdeviceptr src, size_t ByteCount ){
281281}
282282
283283CUresult cuPointerGetAttribute ( void * data , CUpointer_attribute attribute , CUdeviceptr ptr ){
284- LOG_DEBUG ("cuPointGetAttribue data=%p attribute=%d ptr=%llx" ,data ,(int )attribute ,ptr );
284+ LOG_DEBUG ("cuPointGetAttribute data=%p attribute=%d ptr=%llx" , data , (int )attribute ,ptr );
285285 ENSURE_RUNNING ();
286286 CUresult res = CUDA_OVERRIDE_CALL (cuda_library_entry ,cuPointerGetAttribute ,data ,attribute ,ptr );
287287 return res ;
288288}
289289
290290CUresult cuPointerGetAttributes ( unsigned int numAttributes , CUpointer_attribute * attributes , void * * data , CUdeviceptr ptr ) {
291- LOG_DEBUG ("cuPointGetAttribue data=%p ptr=%llx" ,data ,ptr );
291+ LOG_DEBUG ("cuPointGetAttribute data=%p ptr=%llx" , data , ptr );
292292 ENSURE_RUNNING ();
293293 CUresult res = CUDA_OVERRIDE_CALL (cuda_library_entry ,cuPointerGetAttributes ,numAttributes ,attributes ,data ,ptr );
294294 int cur = 0 ;
@@ -307,7 +307,7 @@ CUresult cuPointerGetAttributes ( unsigned int numAttributes, CUpointer_attribu
307307}
308308
309309CUresult cuPointerSetAttribute ( const void * value , CUpointer_attribute attribute , CUdeviceptr ptr ){
310- LOG_DEBUG ("cuPointSetAttribue value=%p attribute=%d ptr=%llx" ,value ,(int )attribute ,ptr );
310+ LOG_DEBUG ("cuPointSetAttribute value=%p attribute=%d ptr=%llx" , value , (int )attribute , ptr );
311311 ENSURE_RUNNING ();
312312 CUresult res = CUDA_OVERRIDE_CALL (cuda_library_entry ,cuPointerSetAttribute ,value ,attribute ,ptr );
313313 return res ;
@@ -542,7 +542,7 @@ CUresult cuMipmappedArrayCreate(CUmipmappedArray* pHandle,
542542
543543CUresult cuMipmappedArrayDestroy (CUmipmappedArray hMipmappedArray ) {
544544 // TODO: compute bytesize
545- LOG_DEBUG ("cuMipmappedArrayDestory \n" );
545+ LOG_DEBUG ("cuMipmappedArrayDestroy \n" );
546546 CUresult res = CUDA_OVERRIDE_CALL (cuda_library_entry ,cuMipmappedArrayDestroy , hMipmappedArray );
547547 return res ;
548548}
@@ -558,6 +558,16 @@ CUresult cuLaunchKernel ( CUfunction f, unsigned int gridDimX, unsigned int gr
558558 return res ;
559559}
560560
561+ CUresult cuLaunchKernelEx (const CUlaunchConfig * config , CUfunction f , void * * kernelParams , void * * extra ) {
562+ ENSURE_RUNNING ();
563+ pre_launch_kernel ();
564+ if (pidfound == 1 ){
565+ rate_limiter (config -> gridDimX * config -> gridDimY * config -> gridDimZ ,
566+ config -> blockDimX * config -> blockDimY * config -> blockDimZ );
567+ }
568+ CUresult res = CUDA_OVERRIDE_CALL (cuda_library_entry ,cuLaunchKernelEx ,config ,f ,kernelParams ,extra );
569+ return res ;
570+ }
561571
562572CUresult cuLaunchCooperativeKernel ( CUfunction f , unsigned int gridDimX , unsigned int gridDimY , unsigned int gridDimZ , unsigned int blockDimX , unsigned int blockDimY , unsigned int blockDimZ , unsigned int sharedMemBytes , CUstream hStream , void * * kernelParams ){
563573 ENSURE_RUNNING ();
0 commit comments